This file provides guidance for AI coding assistants working with this codebase.
Freundebuch - A self-hostable web application for relationship management (a digital friendship book for adults). See docs/architecture.md for full details and docs/brand.md for brand guidelines.
| Document | Purpose |
|---|---|
| docs/architecture.md | Tech stack, monorepo structure, feature roadmap |
| docs/development.md | Workflow, commands, git conventions, testing |
| docs/principles.md | Core principles and design constraints |
| docs/tone.md | Writing style guidelines |
| docs/design-language.md | Visual design system |
| docs/database-conventions.md | Database design patterns |
| docs/git-workflow.md | Branching model, commit conventions, git hooks |
Each workspace has its own AGENTS.md with specific guidance:
- apps/frontend/AGENTS.md - SvelteKit, components, stores
- apps/backend/AGENTS.md - Hono, routes, database, auth
- packages/shared/AGENTS.md - Types, schemas, utilities
Use the gh CLI to interact with issues and PRs:
gh issue list # List open issues
gh issue view <number> # View issue details
gh pr list # List open PRs
gh pr view <number> # View PR detailsSee docs/development.md for full list. Composite tasks live in mise.toml; per-script commands run via aube <script>.
# Bootstrap (one-time)
mise install # Install pinned tools + register hk git hooks
aube install # Install JS dependencies
# Database (run from root)
aube migrate:create <name> # Create new migration
aube migrate # Run pending migrations
aube pgtyped # Generate types from SQL
# Development
aube dev # Run all dev servers
aube check # Lint + format
aube test # Run all tests
# Docker
mise run docker:up # Start database
mise run docker:down # Stop database
# Hooks (managed by hk, see hk.pkl)
hk run pre-commit # Run the pre-commit hook ad-hoc
hk check # Run all linters in check-only mode
hk fix # Run all linters with auto-fixThe pre-commit hook (defined in hk.pkl) runs:
- biome — auto-fix lint + format on staged JS/TS/Svelte/CSS/JSON files
- frontend-type-check —
aube --filter @freundebuch/frontend run type-checkwhenapps/frontend/**is staged - backend-type-check —
aube --filter @freundebuch/backend run type-checkwhenapps/backend/**is staged - shared-build — build shared package + root type-check when
packages/shared/**is staged
There is no per-app build step in the pre-commit hook; full builds run on pre-push.
- TypeScript strict mode everywhere
- No
anytypes - useunknownand narrow - ArkType for runtime validation at API boundaries
- PgTyped for type-safe SQL queries
- Biome for linting and formatting
- Test coverage target: >80% (gated on PRs via danger-plugin-coverage)
- All tests must pass before merging
- Prefer explicit conditionals over truthiness coercion on non-boolean values
(e.g.
x === undefined,arr.length === 0, not bare!x) — see docs/principles.md §7 "Say What You Mean"
Detailed implementation plans are in project-management/epics/.