2022-11-08frontend

Auth and private dashboard

  • Change: Sign-in flow and a gated /dashboard route landed (81d1feb0 "private dashboard added", 5c3322bc "login process fixed"). A Jotai atom holds auth state globally; private pages check session presence before deciding which API endpoint to call.
  • Why: Some metrics were wallet-level personal data (individual user stats). Publishing them publicly didn't make sense; auth was the minimum viable gate to separate the public dashboard from personal views.
  • Affected Modules: pages/dashboard/, auth atoms in src/lib/, nav sidebar
  • Trade-offs:
    • Pro: Clean separation between public metrics and private wallet-level data.
    • Con: Auth state threads through every private page's data-fetch path — each gated page carries an extra session check before the API call, adding a consistent but repetitive pattern.