Meal Manager is an open-source, full-stack application designed to streamline meal planning, expense tracking, and accounting for hostels, mess halls, and shared living spaces. Built with efficiency and transparency in mind, it automates the complex calculations of daily meal rates, monthly balances, and deposit management.
- 📊 Dashboard: Real-time overview of personal balance, daily meal consumption, and system stats.
- 🍛 Meal Management:
- Daily Lunch/Dinner toggle.
- Automated cutoff times (lock meals after a certain hour).
- "Guest Meal" support (Count > 1).
- Admin override for past/future dates.
- 💰 Expense Tracking:
- Detailed expense logging with unit, quantity, and cost.
- Image Uploads: Receipts/Memos via Vercel Blob (optimized with Sharp).
- Auto-calculation of daily meal rates based on monthly expenses.
- 💳 Accounting System:
- Dual-Rate Calculation: Dynamic rates for current month vs. fixed rates for past months.
- Monthly Snapshots: Auto-freezing of financial data at month-end to preserve history.
- Wallet System: Deposit requests with Admin approval workflow.
- 📱 Mobile Optimized: Fully responsive UI + Capacitor support for Android APK generation.
- 🛡️ Role-Based Access: Admin and Member roles with protected routes (via Middleware).
- Framework: Next.js 16 (App Router, Server Actions)
- Database: PostgreSQL (via Supabase)
- ORM: Prisma
- Auth: Auth.js (NextAuth v5)
- Styling: Tailwind CSS
- Storage: Vercel Blob
- Node.js 18+
- A Supabase Project (PostgreSQL)
-
Clone the repository
git clone https://github.com/haseebafeef/meal-manager.git cd meal-manager -
Install dependencies
npm install
-
Configure Environment Create a
.envfile in the root directory:# Database (Supabase) DATABASE_URL="postgres://[user]:[password]@[host]:6543/postgres?pgbouncer=true" DIRECT_URL="postgres://[user]:[password]@[host]:5432/postgres" # Auth (NextAuth) AUTH_SECRET="your-generated-secret" # Generate with: npx auth secret AUTH_URL="http://localhost:3000" # Google Auth (Optional) GOOGLE_CLIENT_ID="your-google-client-id" GOOGLE_CLIENT_SECRET="your-google-client-secret" # Email Service (For Password Reset) GMAIL_USER="your-email@gmail.com" GMAIL_APP_PASSWORD="your-app-password" NEXT_PUBLIC_BASE_URL="http://localhost:3000" # Blob Storage (Vercel) BLOB_READ_WRITE_TOKEN="your-vercel-blob-token"
-
Initialize Database
npx prisma generate npx prisma db push
-
Run the Development Server
npm run dev
Open http://localhost:3000.
This project uses Capacitor to wrap the web app.
npx cap sync
npx cap open androidContributions are welcome! Please fork the repository and submit a Pull Request.
This project is licensed under the MIT License.