Admin Panel (/admin)

A small web dashboard for the owner — served at https://gharsaathi.itsmehere.com/admin. Static SPA (vanilla or light framework) hitting the Admin API. Separate admin login, NOT the user JWT.

Auth

  • Admin logs in with email + password (admins table, scrypt). Returns an admin token (short-lived).
  • All /admin/* API calls carry the admin token. Rate-limited login. Never reuse user auth.

Screens

  1. Dashboard — headline metrics: - Total users, new this week, DAU (completed a reminder today) - Pro subscribers, trialing, MRR (₹), churn % - Reminders fired today, WhatsApp messages sent (OTP / alert / reminder / share) - Simple charts (signups over time, Pro over time) — use the dataviz palette.
  2. Users — searchable table: name, phone, plan, status, #reminders, joined. Row → detail. - Actions: grant/revoke Pro (support/testing), view their reminder counts (no private content dumped).
  3. Templates — view/edit the WhatsApp wa_templates (otp, reminder, family_alert, expiry, welcome).
  4. Billing — recent subscription events (from Razorpay webhook log), failed payments.

Design

  • Clean, data-first (impeccable + dataviz standards): OKLCH, honest charts, light/dark, readable tables.
  • Read-mostly; the few write actions (grant Pro, edit template) confirm before applying.

Security

  • Admin token in memory/session only; HTTPS only; admin API scoped + audited (log admin actions).
  • No customer PII beyond what's needed (phone + plan); never expose other users' data to a user token.