Profile feature #21

Closed
opened 2026-06-12 20:28:14 +00:00 by james · 0 comments
Owner

Scope

Fields per idea.md: Name, Contact details (multi-entry), Picture, Title statement, Brief.

Backend:

  • Entities + migrations for the profile. The profile row carries a user_id FK and is unique per user (one profile per user).
  • API routes for read and update. DTOs distinct from entities. Queries are scoped to the authenticated user; user_id is taken from the session, never from the request body.
  • Picture storage uses a configurable storage abstraction; default to disk under a configured path for self-hosters. Picture paths are namespaced by user_id so files can't collide or leak across users.
  • Tests on both SQLite and Postgres, including a cross-user isolation test (user A's GET returns A's profile even when user B's profile exists; user A cannot PUT to user B's profile).

Frontend:

  • Profile page that reads and edits all fields.
  • Correctness over optimistic UI.

Acceptance criteria

  • All fields round-trip on both DB engines.
  • Route is gated by the auth middleware.
  • Picture upload works and an uploaded picture renders on the profile page.
  • Cross-user reads return 404; cross-user writes return 404 (don't leak existence).

Part of epic #4. Depends on #8, #10, #20.

## Scope Fields per `idea.md`: Name, Contact details (multi-entry), Picture, Title statement, Brief. Backend: - Entities + migrations for the profile. **The profile row carries a `user_id` FK and is unique per user (one profile per user).** - API routes for read and update. DTOs distinct from entities. **Queries are scoped to the authenticated user; `user_id` is taken from the session, never from the request body.** - Picture storage uses a configurable storage abstraction; default to disk under a configured path for self-hosters. **Picture paths are namespaced by `user_id` so files can't collide or leak across users.** - Tests on both SQLite and Postgres, **including a cross-user isolation test (user A's GET returns A's profile even when user B's profile exists; user A cannot PUT to user B's profile).** Frontend: - Profile page that reads and edits all fields. - Correctness over optimistic UI. ## Acceptance criteria - [ ] All fields round-trip on both DB engines. - [ ] Route is gated by the auth middleware. - [ ] Picture upload works and an uploaded picture renders on the profile page. - [ ] Cross-user reads return 404; cross-user writes return 404 (don't leak existence). Part of epic #4. Depends on #8, #10, #20.
james closed this issue 2026-06-18 13:13:20 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
james/carol#21
No description provided.