Skip to content

refactor: restructure into true monorepo with turborepo and workspace packages#2

Merged
mikais13 merged 11 commits intomainfrom
refactor/true-monorepo
Apr 5, 2026
Merged

refactor: restructure into true monorepo with turborepo and workspace packages#2
mikais13 merged 11 commits intomainfrom
refactor/true-monorepo

Conversation

@mikais13
Copy link
Copy Markdown
Owner

@mikais13 mikais13 commented Apr 5, 2026

Description

This PR restructures the repository into a true monorepo by introducing Bun workspaces, Turborepo, and splitting the codebase into distinct apps/api and packages/core workspace packages.

  • converts the root package.json to a private workspace root with workspaces: ["apps/*", "packages/*"]
  • moves the API source, Dockerfile, and fly.toml into apps/api/ with its own package.json and tsconfig.json
  • extracts shared business logic (application services, GitHub client, models, schemas) into a new packages/core package published as @pr-stack/core
  • adds a turbo.json with task definitions for build, dev, types:check, lint:check, and lint:fix, replacing the manual per-app scripts in the root
  • updates root scripts to delegate to turbo run with optional --filter=api for targeted execution
  • adds a bun build script in packages/core for the bundler output
  • removes upstream dependsOn from turbo tasks that don't require it to keep task scheduling lean
  • updates the Dockerfile to install dependencies from the workspace root before building the api app
  • updates .github/workflows/fly-deploy.yml to reflect the moved Dockerfile path
  • adds @pr-stack/core path alias in the root tsconfig.json pointing to packages/core/src for type checking

Not related to a ticket

How to test this change

Run the dev server via the root workspace:

bun dev

or for the API only:

bun dev:api

Verify the build works end-to-end:

bun build

Check that turbo correctly resolves the @pr-stack/core workspace dependency in apps/api and that types pass with bun types:check.

@mikais13 mikais13 merged commit 7f8241a into main Apr 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant