Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
4f67a7c
chore: initialize compliance-admin app with essential configurations …
claudfuen May 9, 2025
26cfee5
chore: set up framework-editor app with initial configurations, inclu…
claudfuen May 9, 2025
a442a80
chore(deps): add workspace dependencies for @comp/ui and @comp/db in …
claudfuen May 9, 2025
138eb01
chore: remove version field from framework-editor package.json
claudfuen May 9, 2025
017d9e3
refactor: restructure framework-editor layout and navigation, impleme…
claudfuen May 9, 2025
b9db4b9
feat: fetch and display frameworks in framework-editor page
claudfuen May 9, 2025
3287353
feat: add database migrations and update Prisma schema for framework …
claudfuen May 9, 2025
21566bb
feat: enhance framework editor layout with Toolbar and MenuTabs compo…
claudfuen May 9, 2025
22cc9b6
refactor: simplify Tailwind configuration and remove unused component…
claudfuen May 9, 2025
939a058
refactor(MenuTabs): change export to named export and update TabsList…
claudfuen May 9, 2025
03e1627
refactor(MenuTabs): wrap Tabs component in a div for improved styling…
claudfuen May 9, 2025
a74dfca
feat: implement DataTable component for enhanced data display and sea…
claudfuen May 9, 2025
034f75e
feat: update framework-editor with new columns for DataTable across c…
claudfuen May 9, 2025
2400d35
feat: enhance framework-editor layout by restructuring RootLayout for…
claudfuen May 9, 2025
917e998
refactor(DataTable): remove unnecessary wrapper div around Table for …
claudfuen May 9, 2025
4b4308b
refactor(FrameworksClientPage): simplify state management by removing…
claudfuen May 9, 2025
4151d8f
feat: implement FrameworkRequirementsClientPage and enhance framework…
claudfuen May 9, 2025
f726f88
Merge branch 'main' of https://github.com/trycompai/comp into claudio…
claudfuen May 9, 2025
903e89b
chore: update dependencies to latest versions, including AWS SDK, Rea…
claudfuen May 9, 2025
066efcc
feat: introduce FrameworkBaseSchema for consistent framework validati…
claudfuen May 9, 2025
2e1e91e
feat: add RequirementBaseSchema for requirement validation; implement…
claudfuen May 9, 2025
1db3b8f
feat: enhance FrameworkRequirementsClientPage with requirement editin…
claudfuen May 9, 2025
ff56470
fix(CreateFrameworkDialog): adjust form layout by reducing gap size a…
claudfuen May 9, 2025
91a9b27
feat(FrameworkRequirementsClientPage): add delete functionality with …
claudfuen May 9, 2025
5bdbeb1
feat: implement delete framework functionality with confirmation dial…
claudfuen May 9, 2025
7c7900f
refactor(delete-framework): enhance delete framework action with impr…
claudfuen May 9, 2025
0efa400
feat: implement add and delete requirement functionality with corresp…
claudfuen May 9, 2025
e2ffd95
chore: update react-hook-form to version 7.56.3 in package.json and b…
claudfuen May 9, 2025
9233ca7
chore: add .env.example file for database configuration and update .g…
claudfuen May 9, 2025
4952a3d
chore: update AWS SDK dependencies to version 3.806.0 in package.json…
claudfuen May 9, 2025
620426c
Merge pull request #540 from trycompai/claudio/comp-118-create-data-p…
claudfuen May 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 0 additions & 94 deletions .cursorrules

This file was deleted.

10 changes: 7 additions & 3 deletions apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"@ai-sdk/openai": "^1.3.19",
"@ai-sdk/provider": "^1.1.3",
"@ai-sdk/react": "^1.2.9",
"@aws-sdk/client-s3": "^3.796.0",
"@aws-sdk/s3-request-presigner": "^3.800.0",
"@aws-sdk/client-s3": "^3.806.0",
"@aws-sdk/s3-request-presigner": "^3.806.0",
"@browserbasehq/sdk": "^2.5.0",
"@comp/data": "workspace:*",
"@comp/db": "workspace:*",
Expand Down Expand Up @@ -82,7 +82,6 @@
"puppeteer-core": "^24.7.2",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react-hook-form": "^7.56.1",
"react-hotkeys-hook": "^4.6.2",
"react-intersection-observer": "^9.16.0",
"react-markdown": "^9.1.0",
Expand Down Expand Up @@ -122,5 +121,10 @@
},
"exports": {
"./src/lib/encryption": "./src/lib/encryption.ts"
},
"peerDependencies": {
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react-hook-form": "^7.56.3"
}
}
3 changes: 2 additions & 1 deletion apps/app/src/app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import "@/styles/globals.css";
import "@comp/ui/globals.css";

import { auth } from "@/utils/auth";
import { cn } from "@comp/ui/cn";
import "@comp/ui/globals.css";
import { GeistMono } from "geist/font/mono";
import type { Metadata } from "next";
import localFont from "next/font/local";
Expand Down
1 change: 1 addition & 0 deletions apps/framework-editor/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/comp?schema=public"
28 changes: 28 additions & 0 deletions apps/framework-editor/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules

# next.js
/.next/
/out/

# production
/build

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# env files
.env*
!.env.example

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
44 changes: 44 additions & 0 deletions apps/framework-editor/app/(pages)/controls/components/columns.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
'use client';

import type { ColumnDef } from '@tanstack/react-table';
import Link from 'next/link';
import type { FrameworkEditorControlTemplate } from '@prisma/client';

export const columns: ColumnDef<FrameworkEditorControlTemplate>[] = [
{
accessorKey: 'name',
header: 'Name',
size: 350,
cell: ({ row }) => {
const control = row.original;
return (
<Link href={`/controls/${control.id}`} className="hover:underline">
{control.name}
</Link>
);
},
},
{
accessorKey: 'description',
header: 'Description',
size: 700,
minSize: 400,
cell: ({ row }) => {
const description = row.getValue('description') as string;
return (
<div style={{ wordBreak: 'break-word' }}>
{description}
</div>
);
},
},
// TODO: Add columns for policyTemplates, requirements, taskTemplates if needed
// This might involve custom cell renderers to display counts or summaries.
// Example for displaying count of policy templates:
// {
// id: 'policyTemplatesCount',
// header: 'Policy Templates',
// accessorFn: row => row.policyTemplates?.length || 0,
// cell: ({ getValue }) => `${getValue()} policies`
// },
];
27 changes: 27 additions & 0 deletions apps/framework-editor/app/(pages)/controls/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { db } from "@comp/db";
import PageLayout from "@/app/components/PageLayout";
// import { ControlsTable } from "./components/ControlsTable"; // Old import
import { DataTable } from "@/app/components/DataTable"; // New generic table
import { columns } from "./components/columns"; // Import the new columns

export default async function Page() {
const controls = await db.frameworkEditorControlTemplate.findMany({
// Optionally include related data if you plan to display it and it's not too large
// include: {
// policyTemplates: true,
// requirements: true,
// taskTemplates: true,
// }
});

return (
<PageLayout breadcrumbs={[{ label: "Controls", href: "/controls" }]}>
{/* <ControlsTable controls={controls} /> */}
<DataTable
data={controls}
columns={columns} // Pass the columns
searchQueryParamName="controls-search"
/>
</PageLayout>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
'use client'

import { useState } from 'react';
import { useRouter } from 'next/navigation';
// import { db } from "@comp/db";
import PageLayout from "@/app/components/PageLayout";
import { DataTable } from "@/app/components/DataTable";
import { columns } from "./components/columns";
import { CreateFrameworkDialog } from './components/CreateFrameworkDialog';
import type { FrameworkEditorFramework } from '@prisma/client';

export interface FrameworkWithCounts extends Omit<FrameworkEditorFramework, 'requirements'> {
requirementsCount: number;
controlsCount: number;
}

interface FrameworksClientPageProps {
initialFrameworks: FrameworkWithCounts[];
}

export function FrameworksClientPage({ initialFrameworks }: FrameworksClientPageProps) {
const [isCreateDialogOpen, setIsCreateDialogOpen] = useState(false);
const router = useRouter();

const handleRowClick = (framework: FrameworkWithCounts) => {
router.push(`/frameworks/${framework.id}`);
};

return (
<PageLayout breadcrumbs={[{ label: "Frameworks", href: "/frameworks" }]}>
<DataTable
data={initialFrameworks}
columns={columns}
searchQueryParamName="frameworks-search"
searchPlaceholder="Search frameworks..."
onCreateClick={() => setIsCreateDialogOpen(true)}
createButtonLabel="Create New Framework"
onRowClick={handleRowClick}
/>
<CreateFrameworkDialog
isOpen={isCreateDialogOpen}
onOpenChange={setIsCreateDialogOpen}
onFrameworkCreated={() => setIsCreateDialogOpen(false)}
/>
</PageLayout>
);
}
Loading
Loading