Common pages status: - Credits: Partial (balance only, missing pricing/packages) - Explore Services: Fully wired - Settings: Fully wired - Help Center: Fully wired - Switch Services: Basic - Logout: Fully wired Identified missing pricing/payment flow for credits.
3 KiB
Common Pages - Real Data Wiring Status
Credits Page
File: CreditsPage.tsx
Current Wiring:
- ✅ GET /api/{prefix}/wallet/me - Load wallet balance (Professional roles only)
- ✅ GET /api/{prefix}/wallet/me/ledger - Load transaction history
What's Missing:
- ❌ Pricing/Packages - No pricing management wired
- ❌ Role-specific packages - No subscription plans shown
- ❌ Purchase credits - No payment/buy flow
Status: Partial - Shows balance but no pricing/packages
Explore Services Page
File: ExploreServicesPage.tsx
Current Wiring:
- ✅ GET /api/me/roles - Get user's active roles
- ✅ GET /api/admin/roles?audience=EXTERNAL - Get available services
- ✅ POST /api/me/roles/register - Register new role
- ✅ POST /api/auth/switch-role - Switch active role
Status: Fully wired - Shows real available services from backend
Settings Page
File: SettingsPage.tsx
Current Wiring:
- ✅ GET /api/me/settings - Load notification preferences
- ✅ PATCH /api/me/settings/notifications - Save notifications
- ✅ POST /api/auth/change-password - Change password
- ✅ POST /api/me/settings/delete-account-request - Delete account
- ✅ GET /api/me/settings/delete-account-request - Check delete status
Status: Fully wired - All settings functional
Help Center Page
File: HelpCenterDashboardPage.tsx
Current Wiring:
- ✅ GET /api/kb/categories - Load help categories
- ✅ GET /api/kb/articles?role={role} - Load role-specific articles
Status: Fully wired - Shows real KB articles
Switch Services Page
File: SwitchServicesPage.tsx
Current Wiring:
- ✅ Shows roles from auth context
- ✅ Link to /roles page for registration
Status: Basic - Could be enhanced with role switcher
Logout Page
File: LogoutPage.tsx
Current Wiring:
- ✅ Clears localStorage/sessionStorage
- ✅ Calls logout API
- ✅ Redirects to login
Status: Fully wired
What's Missing - Pricing/Packages
The Credits page needs to show:
-
Pricing Tiers - Different credit packages
- Basic: 100 Tracecoins - ₹999
- Pro: 500 Tracecoins - ₹3999
- Enterprise: 2000 Tracecoins - ₹14999
-
Role-specific Packages - Subscription plans
- Job Seeker: Free tier, Premium (resume boost)
- Professional: Basic, Pro, Premium visibility
- Company: Job posting packs, Featured listings
- Customer: Service request packs
-
Payment Flow
- Select package
- Payment gateway integration
- Credit top-up on success
API Endpoints Needed:
- GET /api/pricing/packages - Get available packages
- GET /api/pricing/packages?role={role} - Role-specific pricing
- POST /api/payments/create-order - Create payment order
- POST /api/payments/verify - Verify payment and add credits
Should Credits page show pricing or should it be a separate "Pricing" sidebar item?
Currently the sidebar has "Credits" but not "Pricing". The Credits page only shows balance.