mirror of
https://github.com/bitbaum/orangecat.git
synced 2026-12-04 05:17:20 +01:00
The docs tree had sprawled into ~40 overlapping/singleton/empty directories. Consolidated (history preserved via git rename detection; links rewritten so no previously-working link broke): - architecture/ ← adr/, database/, + loose *_ARCHITECTURE / my-cat specs - development/ ← standards, contributing, guides, examples, templates, components, ai - operations/ ← devops (+runbooks), deployment, supabase - design-system/← design, UX, ux-improvements, branding - reference/ ← api, changelog, content, misc - forward-looking/ ← planning, improvements, implementation - archive/2026-h1/ ← point-in-time reports/plans that were loose at docs/ root - removed empty docs/analysis/; rewrote docs/README.md as a current index Verified: non-README relative-link health 81→83 OK (0 regressions, same 64 pre-existing-rot broken); all new README links resolve; external refs in .claude/ + root repointed to moved targets. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2.5 KiB
2.5 KiB
created_date, last_modified_date, last_modified_summary
| created_date | last_modified_date | last_modified_summary |
|---|---|---|
| 2026-01-18 | 2026-01-18 | Initial engineering principles (privacy/local-first, SSOT/DRY/SoC, a11y, security-by-default) |
Engineering Principles
These principles guide feature design and implementation across Orangecat.
Product Principles
- Privacy-first: Minimize data collection and retention; private by default; explicit user actions to persist/share.
- Local-first: Prefer local execution paths when feasible; remote as opt-in or fallback.
- Progressive disclosure: Simple defaults; reveal complexity only when needed.
- Empower users: Provide model choice and clear trade-offs (cost, rate limits, capabilities).
Technical Principles
- SSOT: Single sources of truth for entities, models, navigation, and configuration.
- DRY: Reuse workflows/components (CreateEntityWorkflow, EntityForm, ModelSelector, etc.).
- Separation of concerns: Thin UI; provider adapters; clear API surfaces; isolated persistence concerns.
- SSR safety: Guard browser-only features with
'use client'and runtime checks. - Accessibility: Keyboard navigation, visible focus, proper aria labels, readable contrast.
Security Principles
- Least privilege: Scope keys, tokens, and access; never expose secrets to the client.
- Encrypt at rest: BYOK/API keys encrypted using AES-256-GCM with dedicated secrets.
- No sensitive content logging: Avoid logging chat contents or PII; use structured metadata only.
- Feature flags: Gate non-critical features and risky integrations.
- Defense in depth: Rate limiting, RLS, CSP/headers, dependency scanning.
Observability & Quality
- Errors: User-friendly messages; structured error responses; correlation IDs where applicable.
- Tests: Unit + integration for core logic; E2E for critical flows; mock external services.
- Performance: Streaming for incremental UX; avoid heavy client bundles; cache where appropriate.
- Documentation: ADRs for key decisions; specs for reusable components; update docs with code changes.
Application to AI/Voice Features
- Private chat: No server-side persistence of My Cat chats by default; only explicit conversion to entities persists.
- Model choice: Local runtime support (Ollama/LM Studio) and BYOK with encrypted storage; offer a client-only key mode where practical.
- Voice input: Default to browser Web Speech API; future optional local Whisper endpoint; no audio uploads by default.
- Prefill flows: Use localStorage as a transient bridge; keep server decoupled from chat.