Track My Biryani
Production-grade full-stack expense tracker built with Next.js App Router, TypeScript, MongoDB, React Query, GSAP, and Cloudinary.
Features
- JWT cookie auth with protected routes via middleware
- Expense/category management with analytics dashboard
- Dark/light theme with persisted preference (
next-themes) - Locale-aware currency/timezone preference detection
- Cloudinary image upload with client-side compression
- Data export (JSON format)
- PWA installable with service worker
Setup
- Install dependencies
npm install
- Configure env
cp .env.example .env.local
- Start dev server
npm run dev
Environment Variables
DATABASE_URL: MongoDB connection URI (primary)JWT_SECRET: JWT signing secretCLOUDINARY_CLOUD_NAME: Cloudinary cloud nameCLOUDINARY_API_KEY: Cloudinary API keyCLOUDINARY_API_SECRET: Cloudinary API secretCLOUDINARY_FOLDER_NAME: Cloudinary folder for imagesNEXT_PUBLIC_API_URL: Client API base URL (default/api)
Scripts
npm run dev- development servernpm run lint- lint checksnpm run build- production buildnpm run start- run production server
Architecture
src/app: routes + API handlerssrc/features: feature UI modulessrc/components: reusable UI/layout/providerssrc/lib: shared utilities, env config, API layer, cloudinarysrc/hooks: app hooks and React Query hookssrc/models,src/repositories,src/services,src/controllers: backend layeringsrc/types: centralized domain types
API Overview
Main APIs:
- Auth:
/api/auth/* - Expenses:
/api/expenses - Categories:
/api/categories - Analytics:
/api/dashboard - Upload Signature:
/api/uploads/signature - Export:
/api/export
Detailed docs: docs/API.md
Deployment Guide
- Set all environment variables in hosting platform.
- Ensure MongoDB network access allows deployment environment.
- Build and start:
npm run build
npm run start
- Configure Cloudinary credentials and folder.
Troubleshooting
- Invalid environment configuration: verify
.env.localagainst.env.example. - Auth redirect loops: clear auth cookie and login again.
- Upload failures: verify Cloudinary credentials/folder and file constraints.
- Build issues: run
npm run lintthennpm run buildlocally.
Additional Documentation
docs/HLD.mddocs/ARCHITECTURE.mddocs/API.mddocs/UX.mddocs/TECH_STACK.mddocs/DATABASE_SCHEMA.mddocs/screenshots.md
Screenshots
Track My Biryani — Landing

A full mobile UI walkthrough with every page and in-page interactions
(chart tooltips, category filtering, date-range switching) is in
docs/screenshots.md.