feat: convert api repo to Turborepo workspace (Phase 0.5)#502
feat: convert api repo to Turborepo workspace (Phase 0.5)#502sweetmantech wants to merge 1 commit into
Conversation
Restructures the api repo as a pnpm + Turborepo monorepo so Phase 2 can
land open-agents' packages/sandbox and packages/agent as proper workspace
packages instead of inlined lib/ directories.
Layout:
api/
apps/
web/ <- everything that was at the repo root
packages/ <- (empty; Phase 2 lands sandbox + agent here)
package.json <- workspace root (turbo + scripts)
pnpm-workspace.yaml
turbo.json
Mechanics:
- Pure git mv for every file -> rename detection preserves git history.
Imports do not change: tsconfig paths "@/*": ["./*"] still resolve
correctly because tsconfig.json moved with the code.
- Root package.json scripts delegate to turbo (turbo run build / test
/ lint:check / format:check / etc.).
- apps/web/package.json renamed @recoupable/web (was next-mainnet-example).
- CI workflows pnpm 9 -> 10 to match new packageManager declaration.
- .gitignore patterns un-anchored so node_modules/, .next/, etc. are
ignored at every workspace level. Added .turbo/.
Validation:
- pnpm install: clean
- pnpm lint:check: clean
- pnpm test: 2362/2362 pass across 388 files
Vercel deployment note: the project's "Root Directory" setting in the
Vercel dashboard needs to point at apps/web before this PR's preview
deploy will build correctly. Without that change, Vercel will look for
a Next.js app at the repo root and fail. This is a one-time dashboard
update; cannot be configured via vercel.json.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (300)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
No issues found across 1453 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: This is a major architectural change converting the repo to a Turborepo monorepo, requiring manual infrastructure changes (Vercel) and affecting CI/CD workflows.
Note: This PR contains a large number of files. cubic only reviews up to 75 files per PR, so some files may not have been reviewed. cubic prioritises the most important files to review.
|
Closing per discussion. Going with the simpler approach: inline open-agents' packages/sandbox, packages/agent, and packages/shared as domain-specific lib/ subfolders in api, no Turborepo conversion needed. Decisions from the discussion:
Phase 2 will land via separate small PRs starting with the @vercel/sandbox version bump. |
Summary
Phase 0.5 of the open-agents → main app migration. Restructures the api repo as a pnpm + Turborepo monorepo so Phase 2 can land open-agents' `packages/sandbox` and `packages/agent` as proper workspace packages.
What changes
Mechanics
Validation
The Vercel project for this repo currently treats the repo root as a Next.js app. After this PR there's no Next.js app at root — the app lives at `apps/web/`. Vercel needs:
Project Settings → General → Root Directory → `apps/web`
This cannot be configured via `vercel.json` (Root Directory is dashboard-only). Without it, the preview deploy will fail to build. Please make this change before approving the PR so the preview deploy validates the move.
If preview build still fails after the Root Directory change, also verify:
What's next
🤖 Generated with Claude Code
Summary by cubic
Convert the API repo into a
pnpm+Turborepoworkspace and move the Next.js app toapps/webto prepare for adding workspace packages in Phase 2. No source changes; history is preserved.Refactors
apps/web(package renamed to@recoupable/web);packages/added as a placeholder; workspace files at root (package.json,pnpm-workspace.yaml,turbo.json).git mv; imports unchanged via existing tsconfig path aliases.turbo; app scripts remain the same.pnpm10..gitignorepatterns un-anchored and.turbo/added.Migration
apps/webbefore merging. Adjust Build/Install commands only if auto-detect fails.Written for commit 5a77493. Summary will update on new commits.