Skip to content
Docs
On this page Top level 1/4
Internal — not published

One repository holds both applications, the Docker setup, these docs and the plans. Each application has its own dependencies and its own lockfile, and there is no shared workspace at the root, so the backend and the web app install and build independently.

Top level

FolderHoldsBecomes
backendThe API, the AI reply agent and the campaign engine, plus the database schema, seeds and agent eval scriptsThe backend image, or the backend dev container
frontendThe React web appThe web app image (nginx), or the Vite dev container
dockerThe one dev image every dev container runs: Node to run the code, bun to install and run scripts, with the container user matched to yoursThe dev containers
docsThis site, its screenshot capture pipeline, and the design specs and plans written before a feature is builtThe docs site
plansImplementation plans, one folder per piece of work, such as the redesign and this docs siteNothing; read by people
.superdesignThe design system for redesign B, brand and logo sources, research notes, and the master images for this siteNothing; the docs publish copies of the images
.githubThe only CI job: backend tests with coverage on pushes and pull requests to main that touch the backendA CI run
tmpLocal scratch, ignored by gitNothing

The Compose file at the root describes every service for both the dev and the prod profile, and the comments at its top are the shortest account of how the stack runs. .env.example at the root is the template for the values Compose reads.

A larger change usually moves through the folders in this order:

A feature through the repository
  1. 1 Spec Design spec in the docs folder
  2. 2 Plan Implementation plan in the plans folder
  3. 3 Backend Schema, service, routes, tests
  4. 4 Web app API calls, queries, pages
  5. 5 Docs Pages and screenshots in both languages

Inside the backend

The backend is organised by business area: accounts, sign-in, CRM, content and knowledge, the reply agent, the campaign engine, analytics, and third-party integrations. Under them sits a shared infrastructure layer that every area uses: database access, the messaging clients for each channel, the model clients, the event bus, the cache, file storage and the locks. A thin layer of plain helpers (errors, pagination, small utilities) has no framework wiring at all.

Every area has the same shape. HTTP routes, bus subscribers, agent tools and campaign steps are all entry points, and they all call the area’s services, where the domain rules live:

Inside one backend area
  1. 1 Entry point HTTP route, bus subscriber, agent tool or campaign step
  2. 2 Input schema Request bodies and queries checked
  3. 3 Service The area's domain rules, in one place
  4. 4 Database Reads and writes through one client
  5. 5 Events and errors Events for other areas; errors from the area's own list

Besides the code, the backend folder holds the database schema split into one file per area, the hand-written SQL that runs before a schema push, the demo seeds, and the scripts that evaluate the agent and check stored campaigns. Several areas keep notes of their own in a README next to their code.

Inside the web app

The web app is organised by feature area: people, inbox, campaigns, deals, reports and so on. An area holds its pages and components, and for each entity three small layers: the API calls, the query keys and hooks that cache the results, and the types.

From a route to the backend
  1. 1 Route Each page is loaded lazily
  2. 2 Page The feature area's screen
  3. 3 Query hook Cached server data
  4. 4 API client Adds the token, refreshes it
  5. 5 Backend Through /api

Shared across areas: the base UI primitives (buttons, inputs, modals), the redesign B building blocks (page header, empty state, fit score pill, kanban board, icons), the single HTTP client, the reader for the inbox stream, and two small stores, one for the session and one for the campaign builder’s working graph. A build plugin bundles only the icons whose full names appear in the source. The mascot and illustration images the app shows live in its public folder.

Leftovers

These files are tracked, and each describes an older state of the repository:

WhereWhat
Web app folderAgent instructions that point at a workflow folder git ignores, so a fresh clone has none of it
Web app folderA text file meant to hold the folder tree, which holds only the error from a missing command
Web app folderA committed build of the app used for the product demo video
Web app folderThe old binary lockfile, next to the current text lockfile
Backend folderA README that says to test with npm and quotes 540 tests in 77 suites. The suite runs with bun and had 1253 tests in 142 suites on 2026-11-11.
Backend folderA Vietnamese checklist drawn from the agent evaluation rounds, a Vietnamese to-do list, and an older plan for the email builder
Docs
EN VI