Project Structure¶
A complete tour of the repo.
doable/
├── apps/
│ └── web/ # Next.js 15 frontend
│ ├── app/ # App Router pages
│ │ ├── (auth)/ # Sign in / sign up
│ │ ├── (dashboard)/ # Workspace list, billing, members
│ │ ├── (workspace)/ # Workspace settings, integrations
│ │ ├── (project)/ # Editor, chat, preview
│ │ └── api/ # Next.js route handlers (auth callbacks, etc.)
│ ├── components/ # React components
│ │ ├── editor/ # Monaco wrapper, file tree, tabs
│ │ ├── chat/ # Chat UI, message list, tool cards
│ │ ├── visual-edit/ # Inline editing overlay
│ │ ├── integrations/ # Per-integration UI
│ │ └── ui/ # shadcn/ui base components
│ ├── lib/ # Frontend utils, API client, hooks
│ ├── public/ # Static assets
│ └── package.json
│
├── services/
│ ├── api/ # Hono REST/SSE API
│ │ ├── src/
│ │ │ ├── routes/ # ~80 route files (one per topic)
│ │ │ ├── routes.ts # Mount table
│ │ │ ├── ai/ # Provider adapters, engine resolver
│ │ │ ├── integrations/ # Connector registry, OAuth handlers
│ │ │ ├── chat/ # Chat orchestration, streaming
│ │ │ ├── projects/ # Project lifecycle, dev server mgmt
│ │ │ ├── files/ # File CRUD, retrieval, indexing
│ │ │ ├── publish/ # Publishing pipeline
│ │ │ ├── billing/ # Stripe webhooks, plan logic
│ │ │ ├── analytics/ # Event ingestion + rollups
│ │ │ ├── audit/ # Audit log writer
│ │ │ ├── auth/ # JWT, OAuth, sessions
│ │ │ ├── db/ # DB client, migration runner
│ │ │ ├── middleware/ # Hono middleware (auth, rate-limit, ...)
│ │ │ ├── app.ts # Hono app factory
│ │ │ └── index.ts # Entry point (binds 127.0.0.1:4000)
│ │ ├── projects/ # PROJECTS_ROOT (gitignored)
│ │ ├── thumbnails/ # Generated screenshots (gitignored)
│ │ ├── .env.example
│ │ └── package.json
│ │
│ └── ws/ # Yjs WebSocket server
│ ├── src/
│ │ ├── rooms/ # Room/awareness mgmt
│ │ ├── auth.ts # JWT validation
│ │ ├── persistence.ts # Periodic Yjs doc → DB sync
│ │ └── index.ts # Entry point (binds 127.0.0.1:4001)
│ └── package.json
│
├── packages/
│ ├── db/ # Schema + queries
│ │ ├── migrations/ # Numbered SQL files (004 → 050+)
│ │ ├── src/
│ │ │ ├── client.ts # postgres-js singleton
│ │ │ ├── queries/ # Query helpers per topic
│ │ │ ├── types-core.ts # Hand-written DB types
│ │ │ └── test/ # Test harness (throwaway PG)
│ │ └── package.json
│ │
│ ├── docore/ # AI engine
│ │ ├── src/
│ │ │ ├── engine.ts # DoCoreEngine
│ │ │ ├── pool.ts # DoCorePool, WorkerPool
│ │ │ ├── user-manager.ts # DoCoreUserManager
│ │ │ ├── event-bus.ts # In-process pub/sub
│ │ │ ├── event-mapper.ts # mapSdkEvent
│ │ │ ├── policy/ # PolicyStore, createPolicySandbox
│ │ │ └── isolators/ # ProcessIsolator + backends
│ │ └── package.json
│ │
│ ├── dovault/ # Sandboxing
│ │ ├── src/
│ │ │ ├── vault.ts # Vault.spawn entry
│ │ │ ├── guards/ # ConfigGuard, ProcessJail, ResourceLimiter
│ │ │ └── backends/ # Direct, Systemd, Nsjail, JobObject, WindowsHeap
│ │ └── package.json
│ │
│ └── shared/ # Cross-cutting utilities
│ ├── src/
│ │ ├── kv-store.ts # Memory ↔ Redis abstraction
│ │ ├── crypto.ts # Encryption helpers
│ │ ├── logger.ts
│ │ └── types.ts
│ └── package.json
│
├── docker/ # Docker Compose deployment
│ ├── docker-compose.yml
│ ├── Dockerfile
│ ├── init.sql # Initial Postgres extensions
│ ├── nginx.conf.template
│ ├── nginx-http.conf.template
│ ├── nginx-doctest.conf
│ ├── tmux-entrypoint.sh
│ ├── setup.sh # One-shot installer
│ └── README.md
│
├── documentation/ # This documentation
│ ├── mkdocs.yml
│ ├── .readthedocs.yaml
│ ├── requirements.txt
│ └── ... # All section folders
│
├── setup-server.sh # Bare-metal Ubuntu installer
├── start.sh # Local boot helper
├── dev.ps1 # Windows dev helper
├── sync-codehub.ps1 # Internal sync script
├── package.json # Root workspace
├── pnpm-workspace.yaml
├── turbo.json
├── tsconfig.base.json
├── README.md
├── CLAUDE.md # Project rules (network binding, tmux, ...)
└── LICENSE # MIT
Notable conventions¶
- No
src/index.tsre-exports unless the package is consumed externally — direct imports keep the dep graph clean. - One Hono route per file under
services/api/src/routes/. Mount table inroutes.ts. - One query module per topic under
packages/db/src/queries/. - Co-located tests:
foo.test.tsnext tofoo.ts. - Migrations numbered, lexicographic order, idempotent SQL where possible.
.envfiles never committed; only.env.example.
Auto-generated files¶
apps/web/.next/— Next.js build output.apps/web/next-env.d.ts— Next.js type shims.node_modules/,pnpm-lock.yaml— package management.
Runtime-only directories (gitignored)¶
services/api/projects/—PROJECTS_ROOT.services/api/thumbnails/— generated screenshots.services/api/sites/— published static sites (SITES_DIR).~/.copilot/session-state/— Copilot CLI session cache (only when using Copilot CLI).
Workspaces and dependencies¶
pnpm-workspace.yaml declares:
Internal deps use the workspace:* protocol, e.g. "@doable/db": "workspace:*".