diff options
| author | nsfisis <54318333+nsfisis@users.noreply.github.com> | 2026-02-09 19:54:59 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-09 19:54:59 +0900 |
| commit | 9a52e7ad3b2d46c523caf079794fdb7757375b91 (patch) | |
| tree | 5a28a84b1e8a149e529725bc6dd5f39c5e55c0e0 | |
| parent | b0a36f221338291a47ee0ad61b545cfbccc1b1b9 (diff) | |
| parent | f70a01d04d939d41ee675c4067e34d2808a7f893 (diff) | |
| download | kioku-9a52e7ad3b2d46c523caf079794fdb7757375b91.tar.gz kioku-9a52e7ad3b2d46c523caf079794fdb7757375b91.tar.zst kioku-9a52e7ad3b2d46c523caf079794fdb7757375b91.zip | |
Merge pull request #14 from nsfisis/claude/create-claude-md-H1HAa
Add CLAUDE.md developer documentation
| -rw-r--r-- | CLAUDE.md | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..25c313f --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,54 @@ +# Kioku + +Spaced repetition learning app (Anki clone). Full-stack TypeScript with Hono backend, React frontend, PostgreSQL database, and offline-first PWA support. + +## Quick Reference + +```bash +pnpm install # Install dependencies +pnpm dev # Start backend server (hot reload) +pnpm dev:client # Start frontend dev server (port 5173) +pnpm build # Build both server and client +pnpm test # Run tests (Vitest) +pnpm typecheck # TypeScript type checking +pnpm lint # Lint with Biome +pnpm lint:fix # Auto-fix lint issues +pnpm format # Format with Biome +pnpm db:generate # Generate database migrations +pnpm db:migrate # Run database migrations +pnpm db:push # Push schema changes to DB +``` + +## Architecture + +See [docs/dev/architecture.md](docs/dev/architecture.md) for details. + +## Code Style + +- **Formatter/Linter**: Biome (run `pnpm lint` to check, `pnpm lint:fix` to auto-fix) +- **Indentation**: Tabs +- **Quotes**: Double quotes for JS/TS +- **Imports**: Organized by Biome (auto-sorted) +- **Naming**: PascalCase for components/types, camelCase for functions/variables, atoms suffixed with `Atom` +- **Tests**: Co-located with source files (`*.test.ts`, `*.test.tsx`) + +## Database Conventions + +- Soft deletes via `deletedAt` timestamp +- Sync versioning via `syncVersion` field +- All tables have `createdAt` and `updatedAt` timestamps with timezone + +## Testing + +Vitest with `@testing-library/react` for component tests. Tests run with: + +```bash +pnpm test # Single run +pnpm test:watch # Watch mode +``` + +Test environment uses `JWT_SECRET=test-secret-key` and mock factories for test data. IndexedDB is mocked with `fake-indexeddb`. + +## CI Pipeline + +Lint → Typecheck → Test → Build (see `.github/workflows/ci.yaml`) |
