M18-1: Monorepo restructure (Bun + Turbo workspace) #162
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#162
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As an operator, I want the repo reshaped from a single
src/tree into a Bun + Turbo workspace (apps/server,apps/web,packages/shared), so that the server, the new web app, and shared types live side-by-side without tangled imports.Acceptance criteria
Layout
package.jsonwithworkspaces: ["apps/*", "packages/*"]) driven by Turbo (turbo.jsonwithbuild,dev,qa,testpipelines)apps/server/— currentsrc/*.tsmoves here;main.tsstill boots on port 4500apps/web/— empty Vite + React shell (populated by #M18-2+)packages/shared/— cross-app TypeScript types (TaskRecord,ResolvedAgent, SSE event envelopes,/queueresponse shape) consumed by both apps viaworkspace:*justfile:just devrunsturbo run dev(server + web in parallel with hot reload);just qastill runs typecheck + lint + format across the workspaceMigration safety
src/that survives the move is rewritten — no lingeringfrom "../src/…"*.test.tsfiles move alongside their modules;bun testcontinues to work from workspace root and fromapps/server/.forgejo/workflows/qa.yml+release.ymllearn about the workspace: one QA job covers the whole monorepo; release still builds the server binary (web ships as static assets served by the server)bun run apps/server/src/main.ts)Docs
apps/*andpackages/*has a short README (purpose + dev commands)apps/server/src/…)Tests
bun testpasses after the movejust qapasses (types + Biome)just devstarts both apps cleanly;http://localhost:4500still serves legacydashboard.html(zero UX regression until #M18-3 parity ships)Out of scope
apps/web(empty shell only — #M18-2)apps/serverinto sub-packages (core,webhook,agents) — prematureDependencies
References
specs/m18-ui-rewrite-and-architect.md§Story M18-1