Managing personal finances is overwhelming. Most people rely on spreadsheets or memory, leading to missed budgets, untracked expenses, and no insight into their spending patterns. Existing apps either lack AI capabilities or lock core features behind paywalls.
Built a full-stack finance platform with Next.js and TypeScript on the frontend, Prisma + MongoDB for the data layer, and Google Gemini for AI-powered spending analysis. NextAuth.js handles authentication with Google OAuth and credentials provider.
- Frontend: Next.js 14 App Router, Tailwind CSS, Framer Motion
- Backend: Next.js API routes, Prisma ORM, MongoDB
- Auth: NextAuth.js with Google OAuth + credentials
- AI: Google Gemini for spending insights and categorization
- Caching: Redis for dashboard data and session management
Structured AI response validation was a key challenge. Gemini's free-form responses needed to be parsed into deterministic financial categories without hallucination. Implemented a two-stage prompt pipeline: first stage categorizes, second stage validates the structure — discarding and retrying on malformed output.
- 100% AI response validation rate after implementing the two-stage pipeline
- Budget snapshot system preserves historical data even after edits
- Sub-second dashboard loads via Redis cache layer
- Two-factor authentication for sensitive operations
Lessons Learned
Every project comes with tradeoffs. If I were to rebuild this today, I would invest more time in automated testing early in the cycle — catching edge cases in payment webhooks and encryption boundaries before they reach production. The architecture decisions held up well, but the test coverage should have matched the complexity from day one.
Was this project helpful?
Comments
Be the first to commentBe the first to share your thoughts.