Skip to content

Commit 7a4d4db

Browse files
peterkudlickaclaude
andcommitted
Add CLAUDE.md and NOTES.md project docs
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 8b2551b commit 7a4d4db

2 files changed

Lines changed: 35 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# CLAUDE.md
2+
3+
## Architecture
4+
- routes/users.js — the users resource, one route per action
5+
- db/store.js — the in-memory data helper all routes go through
6+
- tests/update-user.test.js — the tests
7+
8+
9+

NOTES.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# NOTES.md
2+
3+
## Plan
4+
Plan the new endpoint "update a user" to
5+
6+
- update an existing user by id (PUT /users/:id)
7+
- validate the input, rejecting missing or invalid fields with a clear error
8+
- return a sensible "not found" response when the user doesn't exist, rather than crashing
9+
- go through db/store.js for data access, following the existing pattern
10+
11+
The repo already contains the tests for this endpoint, in tests/update-user.test.js. They start red — making them pass is how
12+
13+
14+
## Tasks
15+
16+
[ ] Add the updateUser function to db/store.js
17+
[ ] Add the PUT /users/:id route to routes/users.js
18+
[ ] Add input validation (return 400 for missing fields)
19+
[ ] Add 404 handling for non-existent users
20+
21+
## Commits
22+
First commit contains changes to db/store.js
23+
Second commit contains the creation of the new endpoint (+ input validation, 400 and 404 return responses)
24+
25+
## Model
26+
I will use opusplan

0 commit comments

Comments
 (0)