Skip to content

Commit 10b70d2

Browse files
author
Ryan Roland Dabao
committed
docs: update stale references across 5 doc files
- architecture.md: Next.js 15→16.1.1, actual routes, all 17 DB models, 35 API endpoints - decisions.md: ADR-001 Next.js 15→16.1.1 + React 19 - BUILD_SPEC.md: API routes expanded from 10 to 35 - BUILD_LOG.md: pending items resolved, AGENTS.md status updated - ENGINEERING_DIARY.md: notes updated, new audit entry for 2026-07-16
1 parent a45a641 commit 10b70d2

5 files changed

Lines changed: 131 additions & 60 deletions

File tree

docs/BUILD_LOG.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
| README.md | valid | Complete, accurate documentation |
3333
| docs/ARCHITECTURE.md | valid | Comprehensive architecture docs |
3434
| docs/DECISIONS.md | valid | Contains project decisions |
35-
| AGENTS.md | stale | Needs update to reflect current stack |
35+
| AGENTS.md | valid | Updated to reflect current stack (Next.js 16.1.1, Prisma v6, etc.) |
3636

3737
## Stack Detected
3838

@@ -50,9 +50,9 @@
5050

5151
TBD - Run `python3 scripts/validate_project.py --target . --profile standard`
5252

53-
## Next Actions
53+
## Completed Actions
5454

55-
1. Run validation script to verify project structure
56-
2. Update AGENTS.md to fix stale content
57-
3. Create remaining docs (ENGINEERING_DIARY, ERROR_LOG, LOOP_ENGINEERING)
58-
4. Set up CI/CD verification
55+
- [x] AGENTS.md updated with current stack (Next.js 16.1.1, Prisma v6, etc.)
56+
- [x] ENGINEERING_DIARY.md, ERROR_LOG.md, LOOP_ENGINEERING.md created
57+
- [x] CI/CD pipeline configured (GitHub Actions with PostgreSQL, unit + integration tests)
58+
- [x] All docs audited and stale references updated (2026-07-16)

docs/BUILD_SPEC.md

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,38 @@ This slice proves:
7070
| POST /api/auth/register | User registration |
7171
| POST /api/auth/login | User login |
7272
| POST /api/auth/logout | User logout |
73-
| GET /api/auth/me | Get current user |
73+
| POST /api/auth/verify-email | Email verification |
7474
| GET /api/questions | List questions (role, difficulty filters) |
75-
| POST /api/interviews | Create interview session |
76-
| POST /api/interviews/:id/answer | Submit answer |
77-
| GET /api/interviews/:id/results | Get session results |
78-
| POST /api/resume/review | Upload and review resume |
79-
| POST /api/cover-letter/generate | Generate cover letter |
75+
| GET /api/questions/count | Question count |
76+
| POST /api/interview | Create interview session |
77+
| GET /api/interview/[id] | Get interview session |
78+
| POST /api/interview/[id]/complete | Complete interview |
79+
| GET /api/dashboard | Dashboard aggregation |
80+
| GET /api/profile | Get user profile |
81+
| PUT /api/profile | Update user profile |
82+
| POST /api/resume | Upload resume |
83+
| GET /api/resume/[id] | Get resume |
84+
| POST /api/cover-letter | Generate cover letter |
85+
| GET /api/cover-letter/[id] | Get cover letter |
86+
| GET /api/assessments | List assessments |
87+
| GET /api/assessments/[id] | Get assessment |
88+
| GET /api/guides | List guides |
89+
| GET /api/guides/[id] | Get guide |
90+
| POST /api/guides/progress | Update guide progress |
91+
| GET /api/downloads | List downloads |
92+
| GET /api/downloads/[id] | Get download |
93+
| POST /api/export | Export DOCX/PDF/Excel |
94+
| POST /api/ai/coach | AI interview coach |
95+
| POST /api/ai/resume-review | AI resume review |
96+
| POST /api/ai/cover-letter | AI cover letter generation |
97+
| POST /api/ai/assessment-score | AI assessment scoring |
98+
| GET /api/subscription/status | Get subscription status |
99+
| GET /api/subscription/usage | Get usage limits |
100+
| POST /api/subscription/checkout | Create checkout session |
101+
| POST /api/subscription/webhook | Stripe webhook |
102+
| POST /api/subscription/manage | Manage subscription |
103+
| GET /api/admin/questions | Admin: manage questions |
104+
| GET /api/admin/analytics | Admin: analytics |
80105

81106
### Data Models
82107

docs/ENGINEERING_DIARY.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Added standard documentation profile to existing Interview Lab project.
2323

2424
### Notes
2525
- Existing docs in `docs/` are comprehensive (13 detailed documents)
26-
- AGENTS.md needs update (references Next.js 16 vs actual 16.1.1)
26+
- AGENTS.md updated to reflect Next.js 16.1.1 (2026-07-16)
2727
- No environment examples detected
2828
- Prisma schema uses PostgreSQL but dev uses SQLite
2929

@@ -42,6 +42,23 @@ See `PONYTAIL-AUDIT.md` for full details.
4242

4343
---
4444

45+
## 2026-07-16: Doc Freshness Audit
46+
47+
### Action
48+
Audited all 26 docs for stale/outdated content against current project state.
49+
50+
### Changes
51+
- `docs/architecture.md` — Next.js 15 → 16.1.1, route structure updated to match actual routes, DB schema expanded to include all 17 models, API routes list expanded to 35 endpoints
52+
- `docs/decisions.md` — ADR-001 Next.js 15 → 16.1.1 + React 19 consequences
53+
- `docs/BUILD_SPEC.md` — API routes list expanded from 10 to 35
54+
- `docs/BUILD_LOG.md` — Pending actions resolved as completed
55+
- `docs/ENGINEERING_DIARY.md` — Notes updated to reflect AGENTS.md is current
56+
57+
### Evidence
58+
Cross-referenced against: `package.json` (dependencies), `prisma/schema.prisma` (17 models), `src/app/api/**/route.ts` (35 route files), `AGENTS.md` (current).
59+
60+
---
61+
4562
## Older Entries
4663

4764
See `WORKLOG.md` for previous engineering decisions and development sessions.

docs/architecture.md

Lines changed: 73 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Architecture — Interview Lab
22

3-
**Version:** 1.0 | **Updated:** 2026-07-02
3+
**Version:** 1.1 | **Updated:** 2026-07-16
44

55
---
66

@@ -10,7 +10,7 @@
1010
┌──────────────────────────────────────────────────────────────┐
1111
│ Browser │
1212
├──────────────────────────────────────────────────────────────┤
13-
│ Next.js 15 App Router — Standalone Output (Vercel)
13+
│ Next.js 16.1.1 App Router — Standalone Output (Vercel) │
1414
│ │
1515
│ ┌─────────────────────────┐ ┌───────────────────────────┐ │
1616
│ │ Client Layer │ │ Server Layer │ │
@@ -33,33 +33,51 @@
3333

3434
```
3535
/ → Landing page
36-
/(auth)/login → Login
37-
/(auth)/register → Registration
38-
39-
/(dashboard)/
40-
├── / → User dashboard (progress, stats)
41-
├── interviews/ → AI Mock Interviews
42-
│ ├── / → Role selection
43-
│ ├── [roleId] → Start interview
44-
│ └── [roleId]/[sessionId] → Active interview + scoring
45-
├── resume/ → Resume Lab
46-
│ └── / → Upload, review, improve
47-
├── cover-letter/ → Cover Letter Studio
48-
│ └── / → Generate, customize, download
49-
├── practice-tests/ → Practice Tests
50-
│ ├── / → Test selection
51-
│ └── [testId] → Active test + results
52-
├── learning/ → Learning Paths
53-
│ ├── / → Path selection
54-
│ └── [pathId] → Path content + progress
55-
├── downloads/ → Download Center (tier-gated)
56-
└── profile/ → User profile + settings
57-
58-
/(admin)/
59-
├── dashboard → Analytics
60-
├── users/ → User management
61-
├── questions/ → Question bank management
62-
└── content/ → Content management
36+
/login → Login
37+
/register → Registration
38+
/dashboard → User dashboard (progress, stats)
39+
/about → About page
40+
/contact → Contact page
41+
```
42+
43+
### API Routes
44+
45+
```
46+
POST /api/auth/register → User registration
47+
POST /api/auth/login → User login
48+
POST /api/auth/logout → User logout
49+
POST /api/auth/verify-email → Email verification
50+
GET /api/questions → List questions (role, difficulty filters)
51+
GET /api/questions/count → Question count
52+
POST /api/interview → Create interview session
53+
GET /api/interview/[id] → Get interview session
54+
POST /api/interview/[id]/complete → Complete interview
55+
GET /api/dashboard → Dashboard aggregation
56+
GET /api/profile → Get user profile
57+
PUT /api/profile → Update user profile
58+
POST /api/resume → Upload resume
59+
GET /api/resume/[id] → Get resume
60+
POST /api/cover-letter → Generate cover letter
61+
GET /api/cover-letter/[id] → Get cover letter
62+
GET /api/assessments → List assessments
63+
GET /api/assessments/[id] → Get assessment
64+
GET /api/guides → List guides
65+
GET /api/guides/[id] → Get guide
66+
POST /api/guides/progress → Update guide progress
67+
GET /api/downloads → List downloads
68+
GET /api/downloads/[id] → Get download
69+
POST /api/export → Export DOCX/PDF/Excel
70+
POST /api/ai/coach → AI interview coach
71+
POST /api/ai/resume-review → AI resume review
72+
POST /api/ai/cover-letter → AI cover letter generation
73+
POST /api/ai/assessment-score → AI assessment scoring
74+
GET /api/subscription/status → Get subscription status
75+
GET /api/subscription/usage → Get usage limits
76+
POST /api/subscription/checkout → Create checkout session
77+
POST /api/subscription/webhook → Stripe webhook
78+
POST /api/subscription/manage → Manage subscription
79+
GET /api/admin/questions → Admin: manage questions
80+
GET /api/admin/analytics → Admin: analytics
6381
```
6482

6583
---
@@ -70,13 +88,23 @@
7088

7189
| Entity | Key Fields | Relations |
7290
|--------|------------|-----------|
73-
| **User** | id, email, name, password, role, tier | → Interview[], Resume[], CoverLetter[] |
74-
| **Interview** | id, userId, role, score, answers, feedback, startedAt, completedAt | → User |
75-
| **Resume** | id, userId, content, analysis, improvements, createdAt | → User |
76-
| **CoverLetter** | id, userId, role, tone, content, createdAt | → User |
77-
| **TestAttempt** | id, userId, type, score, answers, duration, completedAt | → User |
78-
| **Question** | id, role, difficulty, text, idealAnswer, category | |
79-
| **Progress** | id, userId, pathId, moduleId, completed, score | → User |
91+
| **User** | id, email, name, passwordHash, subscriptionTier, isAdmin, emailVerified | → UserProfile, Resume[], CoverLetter[], InterviewSession[], AgentRun[], GuideProgress[], Subscription, Payment[] |
92+
| **UserProfile** | id, userId, targetRole, experienceLevel, toolsKnown, weakAreas, onboardingDone | → User |
93+
| **Question** | id, role, difficulty, type, skillArea, question, whyEmployersAsk, strongAnswerPoints, weakAnswerWarnings, sampleAnswer, answerFormat, timeLimit, status | → QuestionAttempt[] |
94+
| **InterviewSession** | id, userId, mode, targetRole, overallScore, transcript | → User, QuestionAttempt[] |
95+
| **QuestionAttempt** | id, sessionId, questionId, userAnswer, aiFeedback, score, rubricBreakdown | → InterviewSession, Question |
96+
| **Resume** | id, userId, originalText, targetRole, score, improvedVersion, truthFlags | → User |
97+
| **CoverLetter** | id, userId, jobDescription, tone, generatedLetter, truthFlags | → User |
98+
| **Assessment** | id, title, role, difficulty, description, datasetInfo, answerKey, rubric | |
99+
| **Download** | id, title, fileType, role, fileName, accessTier, category, downloadCount | |
100+
| **Guide** | id, title, slug, level, role, content, status | → GuideProgress[] |
101+
| **GuideProgress** | id, userId, guideId, completed, checklist | → User, Guide |
102+
| **AgentRun** | id, userId, agentType, input, output, safetyFlags | → User |
103+
| **Subscription** | id, userId, tier, status, stripeCustomerId, stripePriceId, stripeSubscriptionId, currentPeriodStart, currentPeriodEnd, cancelAtPeriodEnd | → User |
104+
| **Payment** | id, userId, amount, currency, status, stripePaymentId, stripeInvoiceId, description, metadata | → User |
105+
| **AppSetting** | key, value | |
106+
| **VerificationToken** | id, token, email, expiresAt | |
107+
| **RateLimitEntry** | id, key, count, resetTime | |
80108

81109
### Auth Flow
82110

@@ -97,12 +125,12 @@ Middleware → Check HttpOnly cookie on protected routes
97125
### AI Coaching Flow (Z AI SDK)
98126

99127
```
100-
User starts interview → POST /api/interviews/start
128+
User starts interview → POST /api/interview
101129
→ Load role-specific prompt + questions
102130
→ Initialize Z AI SDK session
103131
→ Stream AI responses (real-time chat)
104132
→ Each answer → AI scores + gives feedback
105-
→ Interview complete → POST /api/interviews/complete
133+
→ Interview complete → POST /api/interview/[id]/complete
106134
→ Save transcript + scores + feedback
107135
→ Return results page
108136
```
@@ -163,16 +191,17 @@ User requests download (resume/cover letter/report)
163191
```
164192
[Vercel Edge Network]
165193
166-
[Next.js 15 Standalone Output]
167-
- SSR pages (landing, interviews, resume)
168-
- API Routes (interview sessions, auth, exports)
194+
[Next.js 16.1.1 Standalone Output]
195+
- SSR pages (landing, dashboard, about, contact)
196+
- API Routes (auth, interview, questions, assessments, subscription, admin, ai, export, guides, downloads, resume, cover-letter, profile, dashboard)
169197
- Static assets (downloads, images, fonts)
170198
171199
[SQLite Database] (dev)
172-
[PostgreSQL] (planned production)
200+
[PostgreSQL] (production — Neon/Supabase)
173201
174202
[Z AI SDK Cloud API]
175203
- Interview coaching
176204
- Resume analysis
177-
- Content generation
178-
```
205+
- Cover letter generation
206+
- Assessment scoring
207+
```

docs/decisions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44

55
---
66

7-
## ADR-001: Next.js 15 with App Router (Standalone Output)
7+
## ADR-001: Next.js 16.1.1 with App Router (Standalone Output)
88

99
**Status:** ✅ ACCEPTED
1010

1111
**Context:** Need a React framework with SSR, API routes, and Vercel deployment support. The app requires rich interactivity for interview sessions alongside static marketing pages.
1212

13-
**Decision:** Use Next.js 15 with App Router in standalone output mode for Vercel deployment.
13+
**Decision:** Use Next.js 16.1.1 with App Router in standalone output mode for Vercel deployment.
1414

1515
**Consequences:**
1616
- ✅ Server Components for landing/marketing pages (fast, SEO)
1717
- ✅ API Routes for interview sessions, auth, exports
1818
- ✅ Middleware for auth protection
1919
- ✅ Standalone output optimized for Vercel
20-
- ⚠️ Must stay on v15 until v16 ecosystem stability
20+
- ✅ React 19 server components for streaming AI responses
2121

2222
---
2323

0 commit comments

Comments
 (0)