A containerized expense tracking web app showing how a small business can run a full-stack product (UI + API + data + caching + messaging) with a reproducible local/CI workflow.
Small businesses often manage expenses with Excel + receipts scattered across WhatsApp/email. That creates:
- missing approvals and unclear accountability
- late monthly reporting and poor spend visibility
- messy reimbursements and “lost receipt” chaos
This project provides a service-ready foundation that can run on a small VM and grow into a production system.
- Capture expenses: amount, date, vendor, category, cost center, notes
- Approval workflow:
submitted → approved/rejected - Monthly summary totals + breakdowns (by category/status/currency)
- UI that feels like a real internal tool (dashboard + forms + approvals)
- Multi-service architecture: frontend + backend + MongoDB + Redis + RabbitMQ
- Docker Compose orchestration (one command to run the whole stack)
- Healthchecks + dependency readiness (
depends_on: condition: service_healthy) - Nginx reverse proxy (single entrypoint:
:8080) - CI pipeline runs the stack + smoke tests (repeatable validation)
Frontend: React built and served by Nginx
Backend: Node.js/Express API
MongoDB: persistence for expense records
Redis: caching foundation (future phase)
RabbitMQ: async messaging foundation (future phase)
Flow:
- User opens:
http://localhost:8080 - UI calls API via Nginx proxy:
/api/* - Backend persists to MongoDB
POST /api/expenses— create an expenseGET /api/expenses— list with filters (from,to,category,status)PATCH /api/expenses/:id— edit expense fieldsPATCH /api/expenses/:id/status— approve/rejectGET /api/reports/summary?from=YYYY-MM-DD&to=YYYY-MM-DD— totals + breakdowns
- Dashboard cards (totals/byStatus/top categories)
- Add expense form
- Filters (date range/category/status)
- Expense table with inline edit + approve/reject
- Single entrypoint experience on
:8080
Users + roles:
employee— create + view own expenses; edit only own submitted expensesmanager— view all; approve/reject submitted expenses; access reportsaccountant— access reports (and can view expenses; no edit/approve)
JWT authentication:
- Login returns a token
- Frontend attaches
Authorization: Bearer <token>to API requests
Audit trail (stored in MongoDB):
createdByupdatedByapprovedBy,approvedAt(set on approve/reject)
- Docker + Docker Compose
cp .env.example .env
make up
make smoke