mirror of
https://github.com/bitbaum/evig.git
synced 2026-12-04 15:17:59 +01:00
Two of the four follow-ups from the post-team-rebuild backlog. #7 — docs/MIGRATIONS.md (new): Spells out that scripts/db/migrations/ is the canonical path, ./drizzle/ is leftover from a retired Drizzle Kit trial and is only useful for drizzle-kit studio browsing. Covers naming conventions, idempotency rules, the schema_migrations tracking table (added in migration 075), local vs Neon application, and the most common foot-guns (editing an applied migration, drift between Drizzle schema and SQL). Linked from docs/README.md under Operations. #5 — Drizzle .check() declarations mirroring existing migration constraints. The DB already enforces these (migrations 079 + 080); adding .check() at the schema level just makes the constraint visible to developers reading the TypeScript model. Touched only constraints from migrations the project owns (not the broader historical schema), so Drizzle Kit's generate flow stays consistent: src/db/schema/auth.ts + users_token_version_non_negative (mig 079) src/db/schema/team.ts + team_profiles_work_state_valid (mig 080) + compensation_history_at_least_one_amount (mig 080) + compensation_history_amounts_non_negative (mig 080) + leave_periods_kind_valid (mig 080) + leave_periods_dates_ordered (mig 080) + payroll_batches_dates_ordered (mig 080) src/db/schema/timecards.ts + timecards_rate_applied_non_negative (mig 080) Each name matches the migration's pg_constraint name so a future drizzle-kit diff sees them as same-name same-shape — no phantom migration generated. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3.0 KiB
3.0 KiB
Documentation
Curated reference for engineers, operators, and contributors. Everything in this folder is meant to stay reasonably current — point-in-time work logs, incident reports, and superseded plans live under archive/.
Getting started
- SHARED_CONTEXT.md — tech stack, database, file layout
- COMMANDS.md — every npm script and what it does
- BEST_PRACTICES.md — engineering standards (logger, TABLE_NAMES, parameterized queries, Swiss-German rules)
- ARCHITECTURE_QUICK_START.md — the 10-minute architecture orientation
Architecture
- ARCHITECTURE_DATABASE_BACKEND.md — schema, Drizzle ORM, query patterns
- DATABASE_SCHEMA.md — the canonical schema reference
- UNIFIED_AUTH.md — NextAuth v5 + staff/permission model
- HIRN_AI.md — the in-house AI knowledge / action system
- API_DOCUMENTATION.md — public + internal API surface
Product surfaces
- BLOG_SYSTEM.md — content pipeline + approval flow
- PROJECT_PAGES_GUIDE.md — community project pages
- SERVICE_PAGES_GUIDE.md — paid service pages
- ADMIN_QUICK_REFERENCE.md — admin surface tour for staff
- AI_BOT_SYSTEM_PROMPT.md · AI_BOT_SYSTEM_PROMPT_README.md — public chatbot system prompt + how to update it
Design
- DESIGN_SYSTEM.md — CSS-variable SSOT, semantic Tailwind, dark-mode behavior
- RESPONSIVE_DESIGN_SYSTEM.md — mobile-first responsive primitives in
src/lib/responsive.ts
Operations
- MIGRATIONS.md — canonical migration path (
scripts/db/migrations/), naming, idempotency rules, Neon application - EMAIL_SETUP.md — Listmonk + Brevo configuration
- RELIABILITY.md — uptime expectations, on-call practices
- CODE_AUDIT.md — running list of known issues being worked on
- LEGAL_NONPROFIT_COMPLIANCE.md — Swiss-Verein legal posture, data handling
Mission
- MISSION_STATEMENT.md — why this codebase exists
- CODE_OF_CONDUCT.md — community norms
Subdirectories
api/— per-route referencecomponents/— component-level notesdevelopment/— environment + workflow setupfeatures/— feature briefsguides/— how-to walkthroughshirn/— HIRN AI internalslegacy/— preserved older docsreference/— long-form reference materialarchive/— superseded plans, incident reports, completed-migration logs (preserved for history, not for navigation)