Problem
The name, location, and type of each asset are stored in localStorage with the key medovant_asset_names (see app/src/utils/assetNames.ts).
If the user changes browser, clears the cache, or opens the app from another device, they lose all metadata of their assets. The data is also not shareable between users of the same institution.
Impact
Critical for real-world use. A hospital with multiple users cannot share the inventory.
Plan
- Create
assets table in Supabase with fields: asset_pda, hospital, name, location, asset_type, created_at
- Replace reads/writes of
assetNames.ts with Supabase API calls
- The on-chain Asset PDA remains the source of truth for the state; the DB adds descriptive metadata
Affected files
app/src/utils/assetNames.ts
- Components that call
getAssetName() and setAssetName()
Milestone: v1.1 — Week 3 of incubation
Problem
The name, location, and type of each asset are stored in
localStoragewith the keymedovant_asset_names(seeapp/src/utils/assetNames.ts).If the user changes browser, clears the cache, or opens the app from another device, they lose all metadata of their assets. The data is also not shareable between users of the same institution.
Impact
Critical for real-world use. A hospital with multiple users cannot share the inventory.
Plan
assetstable in Supabase with fields:asset_pda,hospital,name,location,asset_type,created_atassetNames.tswith Supabase API callsAffected files
app/src/utils/assetNames.tsgetAssetName()andsetAssetName()Milestone: v1.1 — Week 3 of incubation