Overview
Savings Tracker is a production-oriented personal finance app focused on goal-based saving rather than full budgeting. Users create goals with optional targets and deadlines, log deposits by channel (bank, mobile money, SACCO, or cash), and see totals, completion status, and monthly deposit trends on a dashboard.
The product is intentionally shaped for East African and broader African savings habits — mobile money, SACCO membership, and local currencies are first-class in onboarding — while remaining usable globally through a curated country and currency list.
The Problem
Many savings tools assume Western banking patterns and password-based accounts. Users in markets like Uganda often save across multiple channels (MoMo, SACCO, cash) and want a simple way to track progress toward specific goals without complex budgeting or spreadsheet maintenance.
The Solution
A focused, passwordless web app with:
- A guided onboarding flow that captures country, currency, savings channels, and SACCO details
- A dashboard with total savings, active/completed goals, and a monthly deposits chart
- Per-goal detail pages with progress bars, deposit history, and channel tagging
- Secure sign-in via Google OAuth or email OTP (no passwords)
- An admin panel for user management, bans, role changes, session revocation, and impersonation
- A
/api/v1 REST layer designed for a future Expo app sharing the same auth instance
Key Features
User experience
- Multi-step onboarding (profile, savings channels, SACCO, review + terms acceptance)
- Bento-style goal grid with filter (all / active / completed) and sort options
- Goal detail view with progress visualization and completion states
- Locale-aware currency formatting via user profile
- Dark/light theme support
Authentication & security
- Passwordless auth: Google OAuth + 6-digit email OTP via Resend
- Session gating via Next.js proxy (cookie check) plus server-side session validation
- Account deletion with email verification link and cascade cleanup of user data
- App Store reviewer OTP bypass (env-gated) for store review flows
Admin & operations
- Admin dashboard: search users, promote/demote roles, ban/unban, revoke sessions, delete users, impersonate for support
- Impersonation banner in the main app when acting as another user
Mobile-ready backend
- better-auth Expo + Bearer plugins for native clients
- Documented REST endpoints for goals, deposits, profile, and public reference data
- API auth supports cookies (web) or
Authorization: Bearer (mobile)
Architecture Highlights
- Server-first data loading: Goals are fetched in the main layout and hydrated into Zustand; server actions handle mutations.
- Layered auth: Edge proxy checks cookie presence; layouts validate the real session and onboarding state against the database.
- Single auth instance: Web and mobile share one better-auth setup — cookies for browser, Bearer tokens for native.
- Domain-modeled schema: Users carry profile fields (country, currency, channels, SACCO); goals and deposits are user-scoped with cascade deletes.
Technical Decisions Worth Highlighting
- No passwords anywhere — reduces support burden and fits mobile-first, email-centric markets.
- Africa-first reference data — countries, default currencies, and savings channels (including SACCO) baked into onboarding and deposit tagging.
- API excluded from page middleware — unauthenticated and Bearer-only mobile requests get JSON errors, not HTML redirects.
- Admin as web-only — mobile API stays lean; operational tools live in a separate admin route group.