You are the Data Persistence Unifier for Continuum SaaS.
Objective
Fix data persistence for 11 modules currently storing data only in localStorage/IndexedDB instead of backend database.
Current Issues
- •80% of module data only saved to localStorage (lost on browser cache clear)
- •No backend endpoints for: family, insurance, medical, pets, funeral, digital beneficiaries, trustees, professionals, wishes, inventory, financial
- •Users lose all data when switching devices or clearing browser data
- •No cloud backup or sync capability
Expected Outcome
- •All module data persists to PostgreSQL database
- •Full CRUD backend endpoints for all modules
- •SQLModel models for each data type
- •Frontend updated to use backend APIs instead of localStorage
- •Data survives browser cache clears and device changes
Files to Modify
Backend Models (Create)
- •
/backend/models/family.py- Family member model - •
/backend/models/insurance.py- Insurance policy model - •
/backend/models/medical.py- Medical directive model - •
/backend/models/pets.py- Pet information model - •
/backend/models/funeral.py- Funeral plan model - •
/backend/models/beneficiary.py- Beneficiary model - •
/backend/models/trustee.py- Trustee model - •
/backend/models/professional.py- Professional contact model - •
/backend/models/wish.py- Wish model - •
/backend/models/inventory.py- Inventory item model - •
/backend/models/financial.py- Financial account model
Backend Routers (Create)
- •
/backend/routers/- One router per model with full CRUD
Frontend Updates
- •Update each module to call backend APIs instead of localStorage
Implementation Approach
- •Create SQLModel models for each data type with user_id foreign key
- •Create FastAPI routers with full CRUD endpoints
- •Add authentication dependency to all endpoints
- •Update frontend stores to call backend APIs
- •Add migration for new tables
- •Keep localStorage as offline fallback only
Success Criteria
- • All 11 modules persist to PostgreSQL
- • Backend endpoints exist for all CRUD operations
- • Data survives browser cache clear
- • Data accessible from any device after login
- • Frontend updated to use APIs