Skip to content

Commit 34c4d0e

Browse files
committed
refactor: migrate to Turborepo 2.6.1 monorepo structure
- Restructure project: frontend/ → apps/web/, backend/ → apps/api/ - Remove unused shared packages (eslint-config, typescript-config, ui, shared) - Each app now has self-contained ESLint and TypeScript configs - Update all paths in CI workflows, Docker, Vercel, and Playwright configs - Update pnpm-workspace.yaml to only include apps/* - Keep api/ folder at root for Vercel serverless deployment - All 386 tests passing, builds successful
1 parent fe4a379 commit 34c4d0e

File tree

183 files changed

+490
-23866
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+490
-23866
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ on:
1010
push:
1111
branches: [main]
1212
paths:
13-
- 'frontend/**'
14-
- 'backend/**'
13+
- 'apps/web/**'
14+
- 'apps/api/**'
15+
- 'packages/**'
1516
- 'e2e/**'
1617
- 'playwright.config.ts'
1718
- '.github/workflows/ci.yml'
@@ -20,8 +21,9 @@ on:
2021
pull_request:
2122
branches: [main]
2223
paths:
23-
- 'frontend/**'
24-
- 'backend/**'
24+
- 'apps/web/**'
25+
- 'apps/api/**'
26+
- 'packages/**'
2527
- 'e2e/**'
2628
- 'playwright.config.ts'
2729
- '.github/workflows/ci.yml'
@@ -59,7 +61,8 @@ jobs:
5961
name: Backend
6062
uses: ./.github/workflows/reusable-ci.yml
6163
with:
62-
project: backend
64+
project: apps/api
65+
filter: '@repo/api'
6366
test-command: pnpm test
6467

6568
# ==========================
@@ -69,7 +72,8 @@ jobs:
6972
name: Frontend
7073
uses: ./.github/workflows/reusable-ci.yml
7174
with:
72-
project: frontend
75+
project: apps/web
76+
filter: '@repo/web'
7377
test-command: pnpm test
7478

7579
# ==========================
@@ -107,11 +111,11 @@ jobs:
107111
run: pnpm exec playwright install-deps chromium
108112

109113
- name: Build frontend
110-
run: pnpm --filter frontend build
114+
run: pnpm --filter @repo/web build
111115

112116
- name: Start frontend preview server
113117
run: |
114-
cd frontend
118+
cd apps/web
115119
pnpm preview --port 5173 &
116120
# Wait for server to be ready
117121
npx wait-on http://localhost:5173 --timeout 30000

.github/workflows/reusable-ci.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ on:
99
workflow_call:
1010
inputs:
1111
project:
12-
description: Project name (backend or frontend)
12+
description: Project directory path (e.g., apps/api or apps/web)
13+
required: true
14+
type: string
15+
filter:
16+
description: pnpm filter name (e.g., @repo/api or @repo/web)
1317
required: true
1418
type: string
1519
node-version:
@@ -46,12 +50,7 @@ jobs:
4650
node-version: ${{ inputs.node-version }}
4751

4852
- name: Run TypeScript typecheck
49-
run: |
50-
if [ "${{ inputs.project }}" = "frontend" ]; then
51-
pnpm exec tsc -p tsconfig.app.json --noEmit
52-
else
53-
pnpm exec tsc -p tsconfig.json --noEmit
54-
fi
53+
run: pnpm --filter ${{ inputs.filter }} typecheck
5554

5655
lint:
5756
name: Lint
@@ -70,7 +69,7 @@ jobs:
7069
node-version: ${{ inputs.node-version }}
7170

7271
- name: Run ESLint
73-
run: pnpm lint
72+
run: pnpm --filter ${{ inputs.filter }} lint
7473

7574
test:
7675
name: Test
@@ -90,13 +89,13 @@ jobs:
9089
node-version: ${{ inputs.node-version }}
9190

9291
- name: Run tests
93-
run: ${{ inputs.test-command }}
92+
run: pnpm --filter ${{ inputs.filter }} test
9493

9594
- name: Upload coverage
9695
if: always()
9796
uses: actions/upload-artifact@v5
9897
with:
99-
name: ${{ inputs.project }}-coverage
98+
name: ${{ inputs.filter }}-coverage
10099
path: ${{ inputs.project }}/coverage
101100
retention-days: 7
102101
if-no-files-found: ignore
@@ -120,4 +119,4 @@ jobs:
120119
node-version: ${{ inputs.node-version }}
121120

122121
- name: Build
123-
run: pnpm build
122+
run: pnpm --filter ${{ inputs.filter }} build

.gitignore

Lines changed: 32 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,46 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
13
# Dependencies
2-
node_modules/
4+
node_modules
5+
.pnp
6+
.pnp.js
7+
8+
# Local env files
9+
.env
10+
.env.local
11+
.env.development.local
12+
.env.test.local
13+
.env.production.local
14+
*.env
15+
16+
# Testing
17+
coverage
18+
test-results/
19+
playwright-report/
20+
21+
# Turbo
22+
.turbo
323

4-
# Build outputs
5-
dist/
6-
build/
7-
coverage/
24+
# Vercel
25+
.vercel
826

9-
# Turborepo
10-
.turbo/
27+
# Build Outputs
28+
.next/
29+
out/
30+
build
31+
dist
1132

12-
# Logs
13-
logs/
14-
*.log
33+
# Debug
1534
npm-debug.log*
16-
pnpm-debug.log*
1735
yarn-debug.log*
1836
yarn-error.log*
19-
lerna-debug.log*
2037

21-
# Environment files
22-
.env
23-
.env.*
24-
!.env.example
25-
26-
# OS
38+
# Misc
2739
.DS_Store
28-
Thumbs.db
40+
*.pem
2941

3042
# IDE
3143
.idea/
32-
*.suo
33-
*.ntvs*
34-
*.njsproj
35-
*.sln
36-
*.sw?
37-
38-
# Testing
39-
/.nyc_output
4044

41-
# Uploaded files
45+
# Uploads (development)
4246
uploads/
43-
44-
# Vercel
45-
.vercel/
46-
47-
# Temporary
48-
.temp/
49-
.tmp/
50-
*.local
51-
52-
# SSL certs
53-
ca.pem

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
auto-install-peers=true

.vscode/settings.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2-
"files.autoSave": "afterDelay",
3-
"editor.fontFamily": "'JetBrainsMono Nerd Font', 'monospace', monospace"
2+
"eslint.workingDirectories": [
3+
{
4+
"mode": "auto"
5+
}
6+
]
47
}

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
.PHONY: help up down db logs clean pre e2e
1+
.PHONY: help up down db logs clean build pre e2e
22

33
help:
44
@echo "make up - Start all services"
55
@echo "make down - Stop all services"
66
@echo "make db - Start PostgreSQL only"
77
@echo "make logs - View logs"
88
@echo "make clean - Stop and remove volumes"
9+
@echo "make build - Build all services"
910
@echo "make pre - Run pre-commit checks"
1011
@echo "make e2e - Run end-to-end tests"
1112

@@ -24,6 +25,9 @@ logs:
2425
clean:
2526
docker compose down -v
2627

28+
build:
29+
pnpm build
30+
2731
pre:
2832
pnpm precommit
2933

0 commit comments

Comments
 (0)