Repo restructure into workspaces — apps/api, apps/client, packages/api-client #181

Closed
opened 2026-06-20 15:44:09 +00:00 by james · 0 comments
Owner

Restructure the repo into workspaces so the API and the universal client live side-by-side without code or build bleed.

Today the entire app is one Next.js project. After this ticket: apps/api (Next.js, API-only), apps/client (Expo), packages/api-client (generated TS client + TanStack hooks), packages/i18n (the catalog), and any other shared bits.

Scope

  • Adopt pnpm workspaces (recommend pnpm over npm for hoist control + faster CI).
  • Move the current Next.js app to apps/api.
  • Create apps/client placeholder (the Expo scaffolding ticket fills it in).
  • Create packages/api-client placeholder (the generated-client ticket fills it in).
  • Create packages/i18n and move messages/*.json into it.
  • Update CI to run per-workspace test/build, not one monolithic step. Dual-engine DB tests stay against apps/api.
  • Update the container build to know about the workspace layout (Dockerfile stage that builds only apps/api + needed packages/* for prod).
  • Update README and CLAUDE.md paths to reflect the new layout.

Acceptance criteria

  • Repo layout: apps/api/, apps/client/ (empty-ish), packages/api-client/, packages/i18n/.
  • pnpm install at the root resolves all workspaces.
  • pnpm -F api test and pnpm -F api build work; existing test suites pass against both DB engines.
  • Container build still produces a working image (with no UI yet — that's expected pre-scaffolding).
  • README, CLAUDE.md, and all internal doc paths reflect the new layout.

Out of scope

  • Filling in apps/client or packages/api-client (later tickets).

Composes with

OpenAPI generation, Generated typed client, Expo scaffolding.

Part of

#176

Restructure the repo into workspaces so the API and the universal client live side-by-side without code or build bleed. Today the entire app is one Next.js project. After this ticket: `apps/api` (Next.js, API-only), `apps/client` (Expo), `packages/api-client` (generated TS client + TanStack hooks), `packages/i18n` (the catalog), and any other shared bits. ## Scope - Adopt **pnpm workspaces** (recommend pnpm over npm for hoist control + faster CI). - Move the current Next.js app to `apps/api`. - Create `apps/client` placeholder (the Expo scaffolding ticket fills it in). - Create `packages/api-client` placeholder (the generated-client ticket fills it in). - Create `packages/i18n` and move `messages/*.json` into it. - Update CI to run per-workspace test/build, not one monolithic step. Dual-engine DB tests stay against `apps/api`. - Update the container build to know about the workspace layout (Dockerfile stage that builds only `apps/api` + needed `packages/*` for prod). - Update README and CLAUDE.md paths to reflect the new layout. ## Acceptance criteria - [ ] Repo layout: `apps/api/`, `apps/client/` (empty-ish), `packages/api-client/`, `packages/i18n/`. - [ ] `pnpm install` at the root resolves all workspaces. - [ ] `pnpm -F api test` and `pnpm -F api build` work; existing test suites pass against both DB engines. - [ ] Container build still produces a working image (with no UI yet — that's expected pre-scaffolding). - [ ] README, CLAUDE.md, and all internal doc paths reflect the new layout. ## Out of scope - Filling in `apps/client` or `packages/api-client` (later tickets). ## Composes with OpenAPI generation, Generated typed client, Expo scaffolding. ## Part of #176
james closed this issue 2026-06-21 03:21:55 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
james/carol#181
No description provided.