munch-ease-backend/backend-spec.md

32 lines
1.7 KiB
Markdown
Raw Normal View History

2025-11-02 10:17:53 +00:00
# Backend Specification: Final Polish
2025-11-02 10:17:53 +00:00
## 1. Current State & Objective
2025-11-01 02:31:51 +00:00
2025-11-02 10:17:53 +00:00
**The multi-tenancy migration is functionally complete and successful.** The backend has been refactored to a robust, household-scoped system with JWT-based authentication. The legacy `persons` model has been purged, and data isolation is enforced.
2025-11-01 02:31:51 +00:00
2025-11-02 10:17:53 +00:00
The objective is to complete the final remaining tasks to officially close out the project.
2025-11-01 02:31:51 +00:00
2025-11-02 10:17:53 +00:00
## 2. Final Tasks
2025-11-01 02:31:51 +00:00
2025-11-02 10:17:53 +00:00
This checklist represents all remaining work.
2025-11-01 02:31:51 +00:00
2025-11-02 10:17:53 +00:00
- [ ] **1. Implement "Copy Invite Link" API**:
- **Objective**: Modify the invitation creation logic to support a "copy link" UX on the frontend, instead of sending an email.
- **File**: `api/households.py`
- **Action**: The existing `POST /api/v1/households/{householdSlug}/invitations` endpoint should be modified. Instead of returning a simple `201 Created`, it must create the invitation token and return a JSON object containing the full, shareable URL.
- **Example Response**:
```json
{
"invite_link": "https://app.example.com/invitations/accept?token=a1b2c3d4e5f6..."
}
```
2025-11-01 02:31:51 +00:00
2025-11-02 10:17:53 +00:00
- [ ] **2. Final Codebase Sweep**:
- **Objective**: Perform a final search for and remove any dead code, comments, or variables related to the old system.
- **Action**: Search the entire codebase for the following keywords: `legacy`, `old`, `previous`, `workaround`, `fallback`, `person`.
- **Outcome**: Any remaining artifacts from the migration are pruned, leaving the codebase in a clean, maintainable state for future development.
2025-11-01 02:31:51 +00:00
2025-11-02 10:17:53 +00:00
- [ ] **3. Mark Project as Complete**:
- **Objective**: Once the above tasks are done, this document is complete.
- **Action**: Check this box and archive this specification.