All projects

Case study · Client project

Canteen Credit Monitoring System

A credit management system for a canteen whose meals are charged to employees of partner companies and settled through payroll.

Canteen Credit Monitoring System cover
Role
Full-stack developer
Type
Client project
Timeline
Aug – Oct 2026
Status
Completed

Overview

The canteen feeds workers from two partner companies on credit. Each worker has a meal allowance for every payroll cutoff, anything above it becomes their own balance, and the rest is settled through payroll deductions. Keeping every meal, allowance, excess and settlement straight across two companies with different payroll calendars is slow and error-prone by hand.

The system records each meal as it's served, applies each company's cutoff and allowance rules automatically, and gives the canteen a live view of who has gone over their limit, what is still unpaid and which cutoffs are settled.

Key features

  • Dashboard per company

    For the current cutoff: employees over their limit, total excess, outstanding balances, settlement progress, an outstanding trend and credit utilization.

  • Fast meal recording

    Charge a meal to an employee with the canteen, date, meal type and amount, and see a warning before saving if it takes them past their allowance.

  • Payments and settlement

    Record payments and salary deductions, and settle each cutoff's credit against what payroll actually deducted.

  • Employee profiles

    Import a roster with company and department, then see each employee's balance, history and breakdowns, and act on them from their profile.

  • Reports and exports

    Daily sales, consumption, outstanding balances, payments and credit settlement, filtered by cutoff and canteen, and exported to Excel or PDF.

  • Accounts and approvals

    Staff sign in with email, new accounts wait for approval, and email notifications cover the outcome.

Highlights

  1. One formula for every credit figure

    The excess and credit shortfall calculation had been written separately in several places and had started to drift. It now lives in one function that every screen, report and export uses.

  2. Overlapping payroll calendars

    The two companies run payroll on different days, so their cutoffs overlap. Each company has its own cutoffs, a meal belongs to the cutoff of its employee's company, and overlapping cutoffs within one company are rejected.

  3. Payments that can't race

    Recording a payment locks the employee's record inside a database transaction before reading their balance, so two payments at the same moment can't both act on a stale figure.

  4. Designed around the person encoding

    The over-allowance warning appears inside Add Meal before saving instead of as an after-the-fact message, and the canteen toggle works from the keyboard for quick entry.

Screenshots

Dashboard for the current cutoff
Meal transactions
Charging a meal to an employee
Daily sales report
Employees

Built with

Frontend
React, React Router, Vite, Recharts, react-datepicker, Lucide icons
Backend
Node.js, Express, express-session, express-rate-limit, bcrypt
Database
PostgreSQL, Prisma ORM
Reports & Exports
ExcelJS, SheetJS, PDFKit
Email
Nodemailer, Brevo