Bharat.
HomeCareerEducationProjectsResume

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

  1. Install dependencies
npm install
  1. Configure env
cp .env.example .env.local
  1. Start dev server
npm run dev

Environment Variables

  • DATABASE_URL: MongoDB connection URI (primary)
  • JWT_SECRET: JWT signing secret
  • CLOUDINARY_CLOUD_NAME: Cloudinary cloud name
  • CLOUDINARY_API_KEY: Cloudinary API key
  • CLOUDINARY_API_SECRET: Cloudinary API secret
  • CLOUDINARY_FOLDER_NAME: Cloudinary folder for images
  • NEXT_PUBLIC_API_URL: Client API base URL (default /api)

Scripts

  • npm run dev - development server
  • npm run lint - lint checks
  • npm run build - production build
  • npm run start - run production server

Architecture

  • src/app: routes + API handlers
  • src/features: feature UI modules
  • src/components: reusable UI/layout/providers
  • src/lib: shared utilities, env config, API layer, cloudinary
  • src/hooks: app hooks and React Query hooks
  • src/models, src/repositories, src/services, src/controllers: backend layering
  • src/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

  1. Set all environment variables in hosting platform.
  2. Ensure MongoDB network access allows deployment environment.
  3. Build and start:
npm run build
npm run start
  1. Configure Cloudinary credentials and folder.

Troubleshooting

  • Invalid environment configuration: verify .env.local against .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 lint then npm run build locally.

Additional Documentation

  • docs/HLD.md
  • docs/ARCHITECTURE.md
  • docs/API.md
  • docs/UX.md
  • docs/TECH_STACK.md
  • docs/DATABASE_SCHEMA.md
  • docs/screenshots.md

Screenshots

Track My Biryani — Landing

Track My Biryani

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

Project Details

Stars0
Forks0
LanguageTypeScript
LicenseMIT
UpdatedJul 12, 2026
View CodeLive Demo