Problem Description
The frontend relies heavily on frontend/lib/mockStore.ts to simulate plan creation, plan listing, and KYC status using browser localStorage. When connected to a live backend service, pages such as /asset-owner/plans, /asset-owner/plans/[planId], and /asset-owner/plans/claim should query the Axum backend API endpoints instead of reading from localStorage.
Missing Functionality & Specs
- Refactor
useApiQuery and plan context providers to call /api/plans, /api/plans/{id}, and /api/kyc/status from the backend service.
- Provide proper fallback/demo toggles via environment variable (
NEXT_PUBLIC_USE_MOCK_DATA=true/false).
- Implement robust error states, loading skeletons, and automatic data revalidation when connected to backend API endpoints.
- Ensure authentication headers (JWT or Ed25519 signature headers) are attached when fetching protected resources.
Affected Files
frontend/lib/mockStore.ts
frontend/hooks/useApiQuery.ts
frontend/app/asset-owner/plans/page.tsx
frontend/app/asset-owner/plans/[planId]/page.tsx
Problem Description
The frontend relies heavily on
frontend/lib/mockStore.tsto simulate plan creation, plan listing, and KYC status using browserlocalStorage. When connected to a live backend service, pages such as/asset-owner/plans,/asset-owner/plans/[planId], and/asset-owner/plans/claimshould query the Axum backend API endpoints instead of reading fromlocalStorage.Missing Functionality & Specs
useApiQueryand plan context providers to call/api/plans,/api/plans/{id}, and/api/kyc/statusfrom the backend service.NEXT_PUBLIC_USE_MOCK_DATA=true/false).Affected Files
frontend/lib/mockStore.tsfrontend/hooks/useApiQuery.tsfrontend/app/asset-owner/plans/page.tsxfrontend/app/asset-owner/plans/[planId]/page.tsx