# cjbshuosi/daoxin architecture

> Architecture diagram of the GitHub repository cjbshuosi/daoxin, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-03-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cjbshuosi/daoxin
- Repository: https://github.com/cjbshuosi/daoxin

## Overview

This repository is a full-stack Next.js application built around an AI-assisted content generation workflow, with a strong separation between UI, domain logic, knowledge content, and persistence.

#### 1) Top-level architecture

The system is organized into four main boundaries:

1. **Client-facing application shell and workflows**
   - Built with Next.js App Router under `src/app`.
   - Most user interaction happens in reusable React components under `src/components`.
   - Global state is managed with Zustand stores under `src/store`.

2. **Server-side API layer**
   - Route handlers under `src/app/api/*` expose generation, knowledge matching, search, and performance-analysis capabilities.
   - Middleware and API guards enforce request/auth boundaries.

3. **Domain and AI orchestration layer**
   - Core business logic lives in `src/lib`.
   - This includes model selection, prompt construction, calibration, memory handling, and API protection.

4. **Data and knowledge layer**
   - Supabase provides authentication and database persistence.
   - The `doc/knowledge` markdown files act as a curated domain knowledge base for tracks, strategies, and content patterns.
   - SQL migrations under `supabase/migrations` define the backend schema.

#### 2) Primary runtime and framework

- **Next.js 15 / React 19 / TypeScript** form the main application runtime.
- The app uses the **App Router** structure, with server-rendered pages, route handlers, and a shared layout.
- **Supabase** is the backend platform for auth and data storage.
- The README states AI integration is designed around multiple providers, likely via the Vercel AI SDK pattern, with support for Anthropic, OpenAI, and Google models.

#### 3) Frontend structure

##### Application pages
The `src/app` tree indicates the main navigation surfaces:

- `src/app/page.tsx` — main landing/entry page.
- `src/app/login/page.tsx` — authentication entry.
- `src/app/auth/callback/route.ts` — OAuth or auth callback handling.
- `src/app/test/page.tsx` — likely a diagnostics or sandbox page.

##### Page-level feature containers
Feature screens are grouped under `src/components`:

- `components/workspace/WorkspacePage.tsx` — the primary creation workspace.
- `components/generation/*` — the multi-step generation wizard.
- `components/knowledge/KnowledgePage.tsx` — browse and manage track knowledge.
- `components/tracks/TracksPage.tsx` and `components/track/*` — track list and track detail/profile modals.
- `components/performance/*` — performance analysis UI.
- `components/documents/DocumentsPage.tsx` — document browsing/management.
- `components/settings/SettingsPage.tsx` — application settings.
- `components/memory/*` — memory visualization and editing.

##### Shared layout
- `components/layout/AppLayout.tsx`, `SidebarMinimal.tsx`, and `TopBar.tsx` define the shell around the active page.
- This suggests a single-shell application where navigation and top-level controls stay persistent while the main workspace changes.

##### UI system
- `src/components/ui/*` contains reusable primitive components such as buttons, dialogs, inputs, textareas, tooltips, badges, and scroll areas.
- `components.json` suggests the project is using a shadcn/ui-style component setup.

#### 4) Core workflows and data flows

##### A. AI content generation flow
This is the main product workflow.

User-facing entry points:
- The workspace page
- The 5-step generation wizard in `components/generation/StepCards/*`

The step sequence is explicitly modeled in the UI:
- Topic confirmation
- Strategy selection
- Topic selection
- Final result generation
- Polish confirmation

Likely flow:
1. User enters a topic or idea in the workspace/wizard.
2. The client collects state across the step cards.
3. A generation API route is called: `src/app/api/generate/route.ts`.
4. Server logic in `src/lib/prompt.ts`, `src/lib/model.ts`, `src/lib/calibration.ts`, and possibly `src/lib/memory.ts` prepares the request.
5. The backend sends the request to an AI provider.
6. Generated text is returned to the client and displayed in result components such as `ResultCard.tsx`.
7. UI elements like `EmotionCurve.tsx` and `Step5PolishConfirm.tsx` support refinement before final confirmation.

Important architectural point:
- The client UI is not just a simple editor; it is a guided orchestration layer over server-side AI generation logic.

##### B. Track matching and knowledge retrieval
This repo is strongly domain-driven around “tracks” — niche content categories like finance, career, fitness, psychology, etc.

Relevant surfaces:
- Track-related components in `components/track` and `components/tracks`
- Knowledge page in `components/knowledge`
- Knowledge files in `doc/knowledge`
- API routes:
  - `src/app/api/match-track/route.ts`
  - `src/app/api/search/route.ts`
  - `src/app/api/generate-knowledge/route.ts`

Likely flow:
1. User selects or searches for a track.
2. The app matches the input against curated track definitions and patterns.
3. Knowledge files provide track-specific strategy, tone, and structure.
4. The matched track influences generation prompts and output style.

This is an important boundary:
- The knowledge base is not embedded in the UI alone; it is a separate content corpus that informs generation and search behavior.

##### C. Performance analysis flow
The performance subsystem is a separate analysis pipeline.

Relevant routes:
- `src/app/api/performance/parse-screenshot/route.ts`
- `src/app/api/performance/analyze/route.ts`

Relevant UI:
- `components/performance/AnalysisPanel.tsx`
- `PerformanceBadge.tsx`
- `PerformanceModal.tsx`

Likely flow:
1. User uploads or submits a screenshot or performance artifact.
2. The screenshot is parsed server-side.
3. Parsed data is analyzed and converted into structured insights.
4. The UI renders score badges, analysis panels, and modal details.

This subsystem is distinct from generation:
- One creates content.
- The other evaluates content performance and feeds insight back into strategy.

##### D. Memory / preference feedback loop
The app includes a memory subsystem:

- `src/lib/memory.ts`
- `components/memory/*`

This suggests the app stores user preferences, prior successful patterns, or reusable context to improve future generation. In architecture terms, this is a feedback loop:
- Past usage informs future prompts and suggestions.
- The memory layer likely participates in prompt construction or UI defaults.

##### E. Authentication and session handling
Authentication is split across client and server boundaries:

- `src/app/login/page.tsx` for the login screen
- `src/app/auth/callback/route.ts` for callback processing
- `src/hooks/useAuth.ts` for client auth state
- `src/lib/supabase/client.ts` and `server.ts` for Supabase access
- `middleware.ts` likely guards routes or handles session propagation

This implies:
- Auth state is available both in the UI and in server route handlers.
- Protected actions such as generation, persistence, or analysis likely depend on Supabase session context.

#### 5) Important backend and business logic boundaries

##### `src/lib`
This is the most important non-UI boundary in the repo:

- `api-guard.ts` — protects API routes and likely centralizes auth/rate-limit/validation concerns.
- `model.ts` — selects and configures AI providers/models.
- `prompt.ts` — prompt engineering and system instruction assembly.
- `calibration.ts` — tuning, scoring, or transformation logic used to adapt output quality.
- `knowledge-seeds.ts` — seed patterns and structured domain hints.
- `memory.ts` — user/context memory logic.
- `constants.ts` and `utils.ts` — shared configuration and helpers.

This layer is what turns the app from “UI plus API routes” into a content-engine product.

##### `src/types`
- Shared type definitions for domain objects and performance data live here.
- `src/types/performance.ts` suggests structured analysis output is a first-class domain model.

#### 6) Persistence and external systems

##### Supabase
Supabase is the main external backend:
- Authentication
- Database persistence
- Likely storage of user state, settings, generated content, track data, or performance records

The presence of `supabase/migrations/001_initial_schema.sql` indicates the schema is intentionally versioned and managed as part of the repo.

##### AI provider layer
The README and `src/lib/model.ts` imply a multi-provider AI abstraction:
- Anthropic
- OpenAI
- Google

Architecturally, this means provider choice is abstracted behind the server-side model layer rather than scattered across the UI.

#### 7) Content and documentation assets as part of the product

A notable part of this repo is that product knowledge is stored in the repository itself:

- `doc/knowledge/*.md` contains track-specific strategy docs.
- `doc/ARCHITECTURE.md` and other planning docs describe the intended system design and roadmap.
- `doc/guid.pdf` and related docs appear to support domain knowledge, design guidance, or operational planning.

This means the repo is not just code:
- It includes a content corpus that functions as an application asset.
- That knowledge content likely feeds generation, browsing, and track matching.

#### 8) Legacy and static assets

- `public-legacy/` contains an older static implementation (`index.html`, `app.js`, `style.css`).
- `public/` contains current static assets.

Architecturally, the legacy directory suggests a prior non-React implementation was preserved, likely for reference, migration, or fallback purposes.

#### 9) Cross-cutting concerns

##### State management
- Zustand stores in `src/store` handle global UI and workflow state:
  - navigation
  - performance
  - settings
  - tracks

This reduces prop drilling in a multi-step app with several interconnected panels.

##### Styling
- `src/app/globals.css` and `src/styles/typewriter.css` are the global style entry points.
- Tailwind-based styling is implied by the README and config files.

##### Request safety
- `middleware.ts` plus `src/lib/api-guard.ts` form the boundary that protects server actions and API endpoints.

#### 10) What an architecture diagram should show

A clear diagram for this repository should include:

- **User/browser**
  - interacts with the workspace, generator, knowledge, performance, memory, and settings screens

- **Next.js App Router layer**
  - pages and route handlers
  - shared layout
  - auth callback and middleware

- **Client feature components**
  - generation wizard
  - track/knowledge browsing
  - performance analysis panels
  - memory UI
  - settings and documents

- **State layer**
  - Zustand stores for navigation, performance, settings, and track state

- **Server domain layer**
  - API routes for generate, generate-knowledge, match-track, search, and performance analysis
  - prompt/model/calibration/memory utilities
  - API guard

- **External services**
  - Supabase auth/database
  - AI model providers

- **Knowledge corpus**
  - markdown track docs under `doc/knowledge`
  - seed/pattern data in `src/lib/knowledge-seeds.ts`

In short, this is a Next.js-based AI content strategy platform where the main architectural pattern is: user workflow UI on the client, server-side AI orchestration in API routes and `lib`, Supabase for auth/persistence, and a repository-backed knowledge base that shapes generation quality.

Main entry points: [`src/app/layout.tsx`](https://github.com/cjbshuosi/daoxin/blob/main/src/app/layout.tsx) (App shell), [`src/app/api/generate/route.ts`](https://github.com/cjbshuosi/daoxin/blob/main/src/app/api/generate/route.ts) (Generate API), [`src/lib/supabase/server.ts`](https://github.com/cjbshuosi/daoxin/blob/main/src/lib/supabase/server.ts) (Supabase), [`src/app/api/match-track/route.ts`](https://github.com/cjbshuosi/daoxin/blob/main/src/app/api/match-track/route.ts) (Track APIs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client app"]
  node_browser(("User<br/>actor"))
  node_app_shell["App shell<br/>next layout<br/>[layout.tsx]"]
  node_workspace["Workspace<br/>feature screen<br/>[WorkspacePage.tsx]"]
  node_generation_flow["Generator flow<br/>wizard flow<br/>[StepContainer.tsx]"]
  node_knowledge_ui["Knowledge UI<br/>feature screen<br/>[KnowledgePage.tsx]"]
  node_tracks_ui["Tracks UI<br/>feature screen<br/>[TracksPage.tsx]"]
  node_performance_ui["Performance UI<br/>analysis screen<br/>[AnalysisPanel.tsx]"]
  node_memory_ui["Memory UI<br/>feature screen<br/>[MemoryDisplay.tsx]"]
  node_settings_ui["Settings UI<br/>feature screen<br/>[SettingsPage.tsx]"]
  node_stores["Zustand stores<br/>state layer"]
end

subgraph group_server["Server API"]
  node_api_generate["Generate API<br/>route handler<br/>[route.ts]"]
  node_api_track["Track APIs<br/>route handlers<br/>[route.ts]"]
  node_api_performance["Performance APIs<br/>route handlers<br/>[route.ts]"]
  node_auth_boundary["Auth boundary<br/>middleware/callback<br/>[middleware.ts]"]
end

subgraph group_domain["Domain logic"]
  node_api_guard["API guard<br/>security layer<br/>[api-guard.ts]"]
  node_prompt_model["Prompt model<br/>ai orchestration<br/>[model.ts]"]
  node_calibration["Calibration<br/>tuning layer<br/>[calibration.ts]"]
  node_memory_core["Memory core<br/>context layer<br/>[memory.ts]"]
  node_knowledge_seeds["Knowledge seeds<br/>domain seeds<br/>[knowledge-seeds.ts]"]
end

subgraph group_data["Data layer"]
  node_supabase[("Supabase<br/>backend platform<br/>[server.ts]")]
  node_knowledge_corpus["Knowledge corpus<br/>content base<br/>[track-licai.md]"]
  node_schema["DB schema<br/>sql migrations"]
end

node_browser -->|"uses"| node_app_shell
node_app_shell -->|"navigates"| node_workspace
node_app_shell -->|"navigates"| node_knowledge_ui
node_app_shell -->|"navigates"| node_tracks_ui
node_app_shell -->|"navigates"| node_performance_ui
node_app_shell -->|"navigates"| node_memory_ui
node_app_shell -->|"navigates"| node_settings_ui
node_workspace -->|"hosts"| node_generation_flow
node_generation_flow -->|"reads/writes"| node_stores
node_generation_flow -->|"calls"| node_api_generate
node_knowledge_ui -->|"calls"| node_api_track
node_tracks_ui -->|"calls"| node_api_track
node_performance_ui -->|"calls"| node_api_performance
node_api_generate -->|"protected by"| node_api_guard
node_api_track -->|"protected by"| node_api_guard
node_api_performance -->|"protected by"| node_api_guard
node_api_generate -->|"uses"| node_prompt_model
node_api_generate -->|"uses"| node_calibration
node_api_generate -->|"uses"| node_memory_core
node_api_generate -->|"uses"| node_knowledge_seeds
node_api_track -->|"reads"| node_knowledge_corpus
node_knowledge_corpus -->|"informs"| node_prompt_model
node_memory_ui -->|"edits"| node_memory_core
node_memory_core -->|"persists to"| node_supabase
node_auth_boundary -->|"auths with"| node_supabase
node_api_generate -->|"reads/writes"| node_supabase
node_api_track -->|"reads/writes"| node_supabase
node_api_performance -->|"reads/writes"| node_supabase
node_supabase -->|"defined by"| node_schema

click node_app_shell "https://github.com/cjbshuosi/daoxin/blob/main/src/app/layout.tsx"
click node_workspace "https://github.com/cjbshuosi/daoxin/blob/main/src/components/workspace/WorkspacePage.tsx"
click node_generation_flow "https://github.com/cjbshuosi/daoxin/blob/main/src/components/generation/StepCards/StepContainer.tsx"
click node_knowledge_ui "https://github.com/cjbshuosi/daoxin/blob/main/src/components/knowledge/KnowledgePage.tsx"
click node_tracks_ui "https://github.com/cjbshuosi/daoxin/blob/main/src/components/tracks/TracksPage.tsx"
click node_performance_ui "https://github.com/cjbshuosi/daoxin/blob/main/src/components/performance/AnalysisPanel.tsx"
click node_memory_ui "https://github.com/cjbshuosi/daoxin/blob/main/src/components/memory/MemoryDisplay.tsx"
click node_settings_ui "https://github.com/cjbshuosi/daoxin/blob/main/src/components/settings/SettingsPage.tsx"
click node_stores "https://github.com/cjbshuosi/daoxin/blob/main/src/store/useNavigationStore.ts"
click node_api_generate "https://github.com/cjbshuosi/daoxin/blob/main/src/app/api/generate/route.ts"
click node_api_track "https://github.com/cjbshuosi/daoxin/blob/main/src/app/api/match-track/route.ts"
click node_api_performance "https://github.com/cjbshuosi/daoxin/blob/main/src/app/api/performance/analyze/route.ts"
click node_auth_boundary "https://github.com/cjbshuosi/daoxin/blob/main/middleware.ts"
click node_api_guard "https://github.com/cjbshuosi/daoxin/blob/main/src/lib/api-guard.ts"
click node_prompt_model "https://github.com/cjbshuosi/daoxin/blob/main/src/lib/model.ts"
click node_calibration "https://github.com/cjbshuosi/daoxin/blob/main/src/lib/calibration.ts"
click node_memory_core "https://github.com/cjbshuosi/daoxin/blob/main/src/lib/memory.ts"
click node_knowledge_seeds "https://github.com/cjbshuosi/daoxin/blob/main/src/lib/knowledge-seeds.ts"
click node_supabase "https://github.com/cjbshuosi/daoxin/blob/main/src/lib/supabase/server.ts"
click node_knowledge_corpus "https://github.com/cjbshuosi/daoxin/blob/main/doc/knowledge/track-licai.md"
click node_schema "https://github.com/cjbshuosi/daoxin/blob/main/supabase/migrations/001_initial_schema.sql"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_browser,node_app_shell,node_workspace,node_generation_flow,node_knowledge_ui,node_tracks_ui,node_performance_ui,node_memory_ui,node_settings_ui,node_stores toneBlue
class node_api_generate,node_api_track,node_api_performance,node_auth_boundary toneAmber
class node_api_guard,node_prompt_model,node_calibration,node_memory_core,node_knowledge_seeds toneMint
class node_supabase,node_knowledge_corpus,node_schema toneRose
```

## Components

### Client app

Next.js app shell, screens, and shared UI components

- **User**: actor · Interacts with the app through workspace, tracks, knowledge, performance, and settings
- [App shell](https://github.com/cjbshuosi/daoxin/blob/main/src/app/layout.tsx): next layout · Shared Next.js layout and persistent navigation chrome · `src/app/layout.tsx`
- [Workspace](https://github.com/cjbshuosi/daoxin/blob/main/src/components/workspace/WorkspacePage.tsx): feature screen · Primary creation surface for guided content generation · `src/components/workspace/WorkspacePage.tsx`
- [Generator flow](https://github.com/cjbshuosi/daoxin/blob/main/src/components/generation/StepCards/StepContainer.tsx): wizard flow · Five-step generation sequence and result presentation · `src/components/generation/StepCards/StepContainer.tsx`
- [Knowledge UI](https://github.com/cjbshuosi/daoxin/blob/main/src/components/knowledge/KnowledgePage.tsx): feature screen · Browse and manage track knowledge and strategy content · `src/components/knowledge/KnowledgePage.tsx`
- [Tracks UI](https://github.com/cjbshuosi/daoxin/blob/main/src/components/tracks/TracksPage.tsx): feature screen · Track browsing, selection, and modal detail views · `src/components/tracks/TracksPage.tsx`
- [Performance UI](https://github.com/cjbshuosi/daoxin/blob/main/src/components/performance/AnalysisPanel.tsx): analysis screen · Screenshot and performance insight presentation · `src/components/performance/AnalysisPanel.tsx`
- [Memory UI](https://github.com/cjbshuosi/daoxin/blob/main/src/components/memory/MemoryDisplay.tsx): feature screen · Displays and edits stored preferences and context · `src/components/memory/MemoryDisplay.tsx`
- [Settings UI](https://github.com/cjbshuosi/daoxin/blob/main/src/components/settings/SettingsPage.tsx): feature screen · Application settings and configuration surface · `src/components/settings/SettingsPage.tsx`
- [Zustand stores](https://github.com/cjbshuosi/daoxin/blob/main/src/store/useNavigationStore.ts): state layer · Navigation, performance, settings, and track state · `src/store/useNavigationStore.ts`

### Server API

Route handlers and middleware boundary

- [Generate API](https://github.com/cjbshuosi/daoxin/blob/main/src/app/api/generate/route.ts): route handler · Main content generation endpoint · `src/app/api/generate/route.ts`
- [Track APIs](https://github.com/cjbshuosi/daoxin/blob/main/src/app/api/match-track/route.ts): route handlers · Track matching, search, and knowledge generation endpoints · `src/app/api/match-track/route.ts`
- [Performance APIs](https://github.com/cjbshuosi/daoxin/blob/main/src/app/api/performance/analyze/route.ts): route handlers · Parse screenshot and analyze performance artifacts · `src/app/api/performance/analyze/route.ts`
- [Auth boundary](https://github.com/cjbshuosi/daoxin/blob/main/middleware.ts): middleware/callback · Middleware and auth callback handling session flow · `middleware.ts`

### Domain logic

AI orchestration, prompts, calibration, memory, and guards

- [API guard](https://github.com/cjbshuosi/daoxin/blob/main/src/lib/api-guard.ts): security layer · Central request protection and access control · `src/lib/api-guard.ts`
- [Prompt model](https://github.com/cjbshuosi/daoxin/blob/main/src/lib/model.ts): ai orchestration · Model selection, prompt assembly, and provider abstraction · `src/lib/model.ts`
- [Calibration](https://github.com/cjbshuosi/daoxin/blob/main/src/lib/calibration.ts): tuning layer · Output shaping and quality adjustment logic · `src/lib/calibration.ts`
- [Memory core](https://github.com/cjbshuosi/daoxin/blob/main/src/lib/memory.ts): context layer · Persists and reuses user context and preferences · `src/lib/memory.ts`
- [Knowledge seeds](https://github.com/cjbshuosi/daoxin/blob/main/src/lib/knowledge-seeds.ts): domain seeds · Structured hints and reusable content patterns · `src/lib/knowledge-seeds.ts`

### Data layer

Supabase persistence and repository-backed knowledge content

- [Supabase](https://github.com/cjbshuosi/daoxin/blob/main/src/lib/supabase/server.ts): backend platform · Authentication and database persistence · `src/lib/supabase/server.ts`
- [Knowledge corpus](https://github.com/cjbshuosi/daoxin/blob/main/doc/knowledge/track-licai.md): content base · Repository-managed markdown knowledge for tracks and strategy · `doc/knowledge/track-licai.md`
- [DB schema](https://github.com/cjbshuosi/daoxin/blob/main/supabase/migrations/001_initial_schema.sql): sql migrations · Versioned Supabase schema and tables · `supabase/migrations/001_initial_schema.sql`

## Connections

- User → App shell: uses · User interacts with the application shell
- App shell → Workspace: navigates · Shell routes into the main workspace
- App shell → Knowledge UI: navigates · Shell routes into knowledge browsing
- App shell → Tracks UI: navigates · Shell routes into track management
- App shell → Performance UI: navigates · Shell routes into analysis views
- App shell → Memory UI: navigates · Shell routes into memory views
- App shell → Settings UI: navigates · Shell routes into settings
- Workspace → Generator flow: hosts · Workspace drives the guided generation workflow
- Generator flow → Zustand stores: reads/writes · Wizard state is kept in global stores
- Generator flow → Generate API: calls · Final generation is requested from the server
- Knowledge UI → Track APIs: calls · Knowledge browsing and matching use track APIs
- Tracks UI → Track APIs: calls · Track selection and lookup use track APIs
- Performance UI → Performance APIs: calls · Performance analysis is delegated to server routes
- Generate API → API guard: protected by · Generation requests pass through request protection
- Track APIs → API guard: protected by · Track and search requests are guarded
- Performance APIs → API guard: protected by · Performance requests are guarded
- Generate API → Prompt model: uses · Generation composes prompts and selects models
- Generate API → Calibration: uses · Output quality is tuned before returning
- Generate API → Memory core: uses · Prior context influences generation
- Generate API → Knowledge seeds: uses · Seed patterns inform prompts and style
- Track APIs → Knowledge corpus: reads · Track matching and search consult markdown knowledge
- Knowledge corpus → Prompt model: informs · Knowledge content shapes generation prompts
- Memory UI → Memory core: edits · UI exposes stored memory for review and update
- Memory core → Supabase: persists to · Memory state is stored in the backend
- Auth boundary → Supabase: auths with · Middleware and callback rely on Supabase sessions
- Generate API → Supabase: reads/writes · Generation may persist or retrieve user data
- Track APIs → Supabase: reads/writes · Track data and user state are persisted
- Performance APIs → Supabase: reads/writes · Performance analysis records may be stored
- Supabase → DB schema: defined by · Database structure is versioned in migrations
