Skip to content

Commit 0f2eaf4

Browse files
committed
ci+prisma: add pipeline and phase-2 schema baseline
1 parent e4617a0 commit 0f2eaf4

7 files changed

Lines changed: 404 additions & 2 deletions

File tree

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/measuretent?schema=public"

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
quality:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Setup pnpm
16+
uses: pnpm/action-setup@v4
17+
with:
18+
version: 9
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 20
24+
cache: pnpm
25+
26+
- name: Install
27+
run: pnpm install --frozen-lockfile
28+
29+
- name: Typecheck
30+
run: pnpm typecheck
31+
32+
- name: Build
33+
run: pnpm build
34+
35+
- name: Package Workspace
36+
run: pnpm package:all

AI/TODO.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
- All foreign keys and indexes defined
9292
- `pnpm prisma generate` succeeds
9393
- **Next Agent:** Codex
94-
- **Status:** TODO
94+
- **Status:** ✅ DONE
9595

9696
---
9797

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pnpm install
4646

4747
This installs all workspace dependencies, including:
4848

49-
- Root/tooling: `typescript`, `tsx`, `@types/node`
49+
- Root/tooling: `typescript`, `tsx`, `@types/node`, `prisma`, `@prisma/client`
5050
- API: `fastify`, `@fastify/swagger`, `@fastify/swagger-ui`, `@fastify/sensible`
5151
- Shared validation: `zod`
5252
- Web: `react`, `react-dom`, `@tanstack/react-query`, `vite`, `tailwindcss`, `postcss`, `autoprefixer`
@@ -66,6 +66,12 @@ export PORT=3001
6666
export HOST=0.0.0.0
6767
```
6868

69+
For Prisma commands, set `DATABASE_URL` (see `.env.example`) and run:
70+
71+
```bash
72+
pnpm prisma:generate
73+
```
74+
6975
### 5) Start backend API
7076

7177
```bash

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@
88
"dev:web": "pnpm --filter @measurtent/web dev",
99
"build": "pnpm -r build",
1010
"typecheck": "pnpm -r typecheck",
11+
"prisma:generate": "prisma generate",
12+
"prisma:validate": "prisma validate",
1113
"package:all": "pnpm typecheck && pnpm build && pnpm -C packages/shared pack --pack-destination ../../artifacts && pnpm -C packages/config pack --pack-destination ../../artifacts && pnpm -C packages/engine pack --pack-destination ../../artifacts && pnpm -C packages/api pack --pack-destination ../../artifacts && pnpm -C packages/sdk pack --pack-destination ../../artifacts"
1214
},
1315
"devDependencies": {
1416
"@types/node": "^22.13.0",
17+
"prisma": "^6.17.1",
1518
"tsx": "^4.20.6",
1619
"typescript": "^5.8.0"
1720
},
@@ -35,5 +38,8 @@
3538
"homepage": "https://github.com/248Tech/MeasureTent",
3639
"bugs": {
3740
"url": "https://github.com/248Tech/MeasureTent/issues"
41+
},
42+
"dependencies": {
43+
"@prisma/client": "^6.17.1"
3844
}
3945
}

0 commit comments

Comments
 (0)