Skip to content

Commit 3b6dca9

Browse files
committed
Update tooling and add agent docs
1 parent 40f58aa commit 3b6dca9

19 files changed

Lines changed: 939 additions & 1082 deletions

.github/workflows/pages.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: Deploy to GitHub Pages
22

33
on:
4+
push:
5+
branches:
6+
- master
7+
paths-ignore:
8+
- server/**
49
workflow_dispatch:
510

611
permissions:

AGENTS.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# TestAnalyser Agent Notes
2+
3+
This repository has two active code areas:
4+
5+
- `/` - Vite + React frontend
6+
- `/server` - Express + Prisma backend
7+
8+
Ignore `/_ref`. It is a reference copy, not an active part of the app.
9+
10+
## Working Areas
11+
12+
- Frontend source lives in `src/`.
13+
- Static assets live in `public/`.
14+
- Backend-specific guidance lives in `server/AGENTS.md`.
15+
16+
## Common Commands
17+
18+
From the repo root:
19+
20+
```bash
21+
npm install
22+
npm run dev
23+
npm run build
24+
npm run lint
25+
```
26+
27+
From `server/`:
28+
29+
```bash
30+
npm install
31+
npm run dev
32+
npm run build
33+
npx prisma migrate deploy
34+
npx prisma generate
35+
```
36+
37+
## Environment
38+
39+
Frontend env file:
40+
41+
- `.env`
42+
- `VITE_API_BASE_URL`
43+
- `VITE_API_URL`
44+
45+
Backend env file:
46+
47+
- `server/.env`
48+
- `DATABASE_URL`
49+
- `JWT_SECRET`
50+
- `ENCRYPTION_KEY`
51+
- `CORS_ORIGIN`
52+
53+
## Frontend Conventions
54+
55+
- TypeScript is strict enough that quick `any` patches usually cause follow-up cleanup. Prefer explicit local types.
56+
- Path alias `@/*` maps to `src/*`.
57+
- The app uses React Router and store-driven state in `src/lib/store.tsx`.
58+
- UI components mostly come from the local `src/components/ui/` layer.
59+
- If you change question/test flows, check both `src/pages/TestDetail.tsx` and `src/pages/QuestionDetail.tsx`.
60+
61+
## Verification Expectations
62+
63+
For frontend changes, run:
64+
65+
```bash
66+
npm run lint
67+
npm run build
68+
```
69+
70+
For backend changes, run:
71+
72+
```bash
73+
cd server
74+
npm run build
75+
```
76+
77+
If a change crosses frontend/backend boundaries, run all three.
78+
79+
## Deployment Notes
80+
81+
- GitHub Pages deploy is handled by `.github/workflows/pages.yaml`.
82+
- Pages auto-deploys on pushes to `master` when `server/**` is unchanged.
83+
- Server changes do not trigger the Pages deploy workflow.
84+
85+
## Known Constraints
86+
87+
- `vite-plugin-pwa@1.2.0` is currently compatible with Vite 7 in this repo. Do not bump Vite to 8 without resolving that compatibility first.
88+
- Large refactors around hooks can trigger stricter React Hooks lint rules. Keep handler dependencies stable and avoid synchronous state writes inside effects unless you intentionally refactor the surrounding flow.

0 commit comments

Comments
 (0)