
data-persistence-unifier
by jonathanhollander
SKILL.md
name: data-persistence-unifier description: 'Use this agent when fixing data persistence issues where module data is only stored
in localStorage/IndexedDB instead of the backend database.
User: "Users are losing their data when they clear browser cache"
Agent: Use data-persistence-unifier to add backend persistence
User: "The family contacts module doesn''t save to the database"
Agent: Use data-persistence-unifier to create backend endpoints
'
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
Score
Total Score
Based on repository quality metrics
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
Reviews
Reviews coming soon