diff --git a/AGENTS.md b/AGENTS.md index 639fec3..0f83537 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -20,7 +20,7 @@ The flagship project is a vehicle for learning. **Every recommendation, interact * [`bitetrack-api`](https://github.com/kiskaadee/bitetrack-api) (the implementation repository) contains the implementation codebase. * Both repositories are independent Git repositories. * Documentation in `backend-residency` must remain synchronized with implementation in `bitetrack-api` whenever appropriate. -* **Link Portability & Integrity:** All markdown links within repository documents must use relative repository paths (e.g., `[CURRENT.md](CURRENT.md)` or Obsidian links `[[CURRENT]]`). Never write absolute machine-specific file system paths (e.g., `/home/kiskaadee/...` or `file:///home/...`) inside version-controlled files. **When reorganizing directories or renaming files, verify that all relative links pointing to or from those files are updated and valid.** +* **Link Portability & Integrity:** All markdown links within repository documents must use relative repository paths (e.g., `[CURRENT.md](CURRENT.md)` or Obsidian links `[[CURRENT]]`). Never write absolute machine-specific file system paths (e.g., `/home/kiskaadee/...` or `file:///home/...`) inside version-controlled files. Any links pointing to files or directories in the separate `bitetrack-api` repository must use their public GitHub repository URLs (e.g., `https://github.com/kiskaadee/bitetrack-api/blob/main/...`). **When reorganizing directories or renaming files, verify that all relative links pointing to or from those files are updated and valid.** * **Local Configuration:** Since the repositories reside in separate directories, the absolute path to `bitetrack-api` must NOT be hardcoded in version-controlled files. Instead, agents must look for a machine-local, git-ignored `.local_config.json` at the root of `backend-residency` containing `{"bitetrack_api_path": "/path/to/bitetrack-api"}` to determine the implementation codebase path. --- diff --git a/CURRENT.md b/CURRENT.md index 05e88a0..80399f5 100644 --- a/CURRENT.md +++ b/CURRENT.md @@ -7,13 +7,13 @@ Implement Secure User Registration & CRUD (Milestone 1). None. ## Next Action !!!! -Implement `UserRegister` and `UserResponse` schemas and the registration endpoint with validation. +Implement profile retrieval (`GET /users/me`) and partial update (`PATCH /users/me`) endpoints. Tactical actions for today's session: -1. Design `UserRegister` and `UserResponse` Pydantic models in `src/schemas/users.py` (inheriting/extending `UserBase`). -2. Implement `POST /auth/register` in `src/routers/auth.py` to return a dummy response conforming to `UserResponse`. -3. Manually verify the endpoint's automatic type validation and `422 Unprocessable Entity` responses. -4. Draft basic validation tests in the `/tests` folder using `fastapi.testclient.TestClient`. +1. Design the `UserUpdate` Pydantic schema in [src/schemas/users.py](https://github.com/kiskaadee/bitetrack-api/blob/main/src/schemas/users.py) (ensuring all fields are optional to support partial `PATCH` updates). +2. Implement the `GET /users/me` endpoint in [src/routers/users.py](https://github.com/kiskaadee/bitetrack-api/blob/main/src/routers/users.py) to return a dummy user profile matching `UserResponse`. +3. Implement the `PATCH /users/me` endpoint in [src/routers/users.py](https://github.com/kiskaadee/bitetrack-api/blob/main/src/routers/users.py) accepting the `UserUpdate` model and returning a merged dummy `UserResponse`. +4. Add automated tests in [tests/test_users.py](https://github.com/kiskaadee/bitetrack-api/blob/main/tests/test_users.py) (or `tests/test_auth.py`) to verify validation and responses. --- ### Step 1 — Read only what you need (30–60 min) --