Development Workflows
This page maps common engineering tasks to the actual OpenChat architecture.Monorepo Layout
apps/web: TanStack Start frontend and server routes.apps/server/convex: Convex schema, queries, mutations, actions.docs-sitein source repo: upstream Mintlify docs source.
Typical Feature Flow
Feature Ownership Map
| Area | Primary files |
|---|---|
| Chat lifecycle | use-persistent-chat.ts, use-chat-actions.ts, messages.ts |
| Streaming and resume | use-chat-streaming.ts, streamExecution.ts, backgroundStream.ts |
| Model catalog | model.ts, api/models.ts |
| Provider credentials | settings-providers.tsx, provider-credentials.ts, userApiKeys.ts |
| Auth | auth-client.tsx, server-auth.ts, auth.ts |
| Settings | settings.tsx, settings-*.tsx |
Local Debug Tips
- Use Convex dashboard for function logs and table inspection.
- Verify same-origin and auth token behavior when testing API routes.
- For provider credential issues, confirm
OPENROUTER_ENCRYPTION_KEYis valid base64 32-byte key.