This is the repository-level fallback DESIGN.md used when a project workspace does not define its own DESIGN.md.
Project-level rules always win over this file.
- Prefer simple, testable modules over deep framework magic.
- Keep domain logic separate from transport or UI layers.
- Keep persistence logic behind a thin repository or service boundary.
- Favor explicit wiring and small functions over hidden side effects.
- Add tests for behavior changes and bug fixes.
- Stack:
fastapi+react+postgres+python - API uses routers + Pydantic schemas + dependency-injected DB sessions.
- SQLAlchemy models are persistence-only; never use them as request or response bodies.
- Frontend calls backend through typed API helpers.
- Stack:
flask+htmx+sqlite+python - Use app factory + blueprints + extension registry.
- htmx endpoints return HTML partials, not JSON unless explicitly API routes.
- Keep template fragments in
templates/partials/.
- Stack:
django+none+postgres+python - One app per domain area; route via
include(). - Use migrations for schema changes, not ad-hoc table creation.
- Keep heavy business logic out of views.
- Stack:
hono+svelte+sqlite+node - Keep server routes, DB schema, and UI components clearly separated.
- Use one DB client instance, shared by handlers.
- Use migrations for schema evolution.
- Stack:
nextjs-api+react+postgres+node - Use App Router conventions (
app/,route.ts,page.tsx). - Reuse a singleton Prisma client.
- Default to Server Components; opt into client components only when needed.
- Stack:
none+none+json-file+python - Keep CLI parsing in
cli.py; keep logic incore.py. - Keep file IO in
store.py. - Ensure commands are scriptable and deterministic.
- Stack:
avalonia+none+none+dotnet - Use MVVM: minimal code-behind, logic in ViewModels and Services.
- Favor constructor-injected services and async APIs.
- Keep UI state in ViewModels, not models.
When available, use these docs in priority order:
FOXFORGE.mdCLAUDE.mdPATTERNS.mdDESIGN.mdCODE.mdARCHITECTURE.md
If project docs and this fallback conflict, project docs take precedence.