Appearance
Open Issues & TODOs ​
Purpose: Track known follow-ups to align docs and code fully. Audience: Developer, Owner
Admin Analytics revenue: Replace mock totalRevenue with real aggregation
- File:
src/pages/admin/AdminAnalytics.tsx:27 - Suggestion:
sum(amount)fromtransactionswhere status in ('funded','payout_released','completed')
- File:
Email templates persistence: Move from in-memory to DB
- File:
src/hooks/useEmailTemplates.ts:18-254(REAL_EMAIL_TEMPLATES) - Action: Add
email_templatestable and CRUD; wireuseUpdateEmailTemplate
- File:
Edge function contracts: Confirm inputs/outputs marked TODO
- File:
docs/architecture/edge-functions.md(send-notification, send-payment-email, send-admin-contact-notification, etc.) - Action: Document from each function’s
index.ts
- File:
RLS policies: Ensure production DB matches canonical examples
- File:
docs/architecture/access-control.md - Action: Review
supabase/migrationsand add concrete policy snippets
- File:
Search indexing: Validate indexes against slow queries
- File:
docs/architecture/search-indexing.md - Action: Add/adjust composite/partial indexes as patterns emerge
- File:
Stripe price IDs: Verify plan → price mapping
- Files:
supabase/functions/get-price-id/index.ts,src/hooks/useStripeCheckout.ts:31-46 - Action: Ensure Starter $19 ($16 annual), Pro $49 ($41 annual) map correctly
- Files:
Secrets redaction: Confirm no hardcoded secrets remain
- File:
src/integrations/supabase/client.tsuses env; check other integrations
- File:
Diacritics/localization: Normalize RO locale strings in emails and UI where needed
- Files: email templates, locales, and components with mixed EN/RO strings
Webhook coverage: Ensure subscription events update
subscriptionsconsistently- Files:
supabase/functions/stripe-webhook/index.ts, billing functions - Action: Add tests/notes for
checkout.session.completed,customer.subscription.*
- Files:
Cron orchestration: Define cadence and monitoring
- File:
docs/operations/cron-playbook.md - Action: Configure alerting on failures; document slot usage (manual/15utc/20utc)
- File: