- Rewrote Drizzle schema: 20 tables with enums, relations, indexes - Generated migration with DROP TABLE records (v1 EAV removal) - Added passkey auth routes (register/login) - Added requireWorkspaceAccess helper - Added seedDefaultData for Personal workspace + welcome note - Updated SSE endpoint for v2 entities + workspace_id filtering - Created recordActivity helper (insert + pg_notify) - Updated sidebar: Graph replaces Reports, removed Analytics - Updated command palette for v2 entities - Created AGENTS.md with locked contract - Created llm-wiki scaffold (5 stubs) - Added inline AGENT INSTRUCTION comments to all 50 API route files - Fixed globals.css border-border class conflict - Updated database.ts stub for v1 compatibility
33 lines
902 B
Markdown
33 lines
902 B
Markdown
# Conventions
|
|
|
|
## Naming
|
|
|
|
- Tables: snake_case, plural (e.g., `activity_feed`, `task_tags`)
|
|
- Columns: snake_case (e.g., `domain_id`, `created_at`)
|
|
- TypeScript: camelCase (e.g., `domainId`, `createdAt`)
|
|
- API routes: kebab-case (e.g., `/api/domains/[domainId]/tasks`)
|
|
- Files: kebab-case (e.g., `auth-config.ts`, `command-palette.tsx`)
|
|
|
|
## File Structure
|
|
|
|
- Schema: `packages/db/src/schema.ts` (single file for all tables)
|
|
- API routes: `apps/web/app/api/[entity]/route.ts`
|
|
- Components: `apps/web/components/[entity]/[component].tsx`
|
|
- Stores: `apps/web/lib/stores/use-[store-name]-store.ts`
|
|
- Lib: `apps/web/lib/[module].ts`
|
|
|
|
## Commit Format
|
|
|
|
```
|
|
type: short description
|
|
|
|
- Bullet points for details
|
|
```
|
|
|
|
Types: `feat`, `fix`, `refactor`, `docs`, `chore`, `test`
|
|
|
|
## Build
|
|
|
|
- Run `npm run build --workspace=apps/web` before committing
|
|
- Do NOT commit build artifacts (`.next/`, `dist/`, `.turbo/`)
|