Example Concept Guide
Template demonstrating the structure for concept and architecture documentation.
Example Concept: Feature Flags Pipeline
Use this as a blueprint for explaining architecture, data flow, or abstract concepts.
Overview
Feature flags let you ship changes to a subset of users, toggle experiments, or disable unstable features without redeploying.
When to use
- Launching a beta version of a page.
- Gradually enabling integrations (Vipps, Appwrite collections) while monitoring metrics.
- Providing per-tenant customization.
⚠️
Do not use feature flags to hide unfinished code from version control. Ship minimal, reviewable slices instead.
How it works
- Admin toggle – Editors set flag values in the admin app (
/admin/experiments). - Appwrite storage – Flags are stored in the
feature_flagscollection with context (environment, locale, rollout %). - Runtime lookup – Web and admin apps read flags via
@repo/apiin Server Components or server actions. - Rendering – Components branch on the flag value (SSR-safe).
Folder layout
📁apps/
📁web/
📄src/lib/flags.ts
📁src/components/feature-flag/
📁admin/
📁src/app/(admin)/admin/experiments/
📁packages/
📄api/flags.ts
Related documentation
- @repo/api Package – retrieving Appwrite documents.
- Admin App Overview – where editors manage flags.
- Web App Components – conditional rendering patterns.
