CMMS

Python Flask SQLAlchemy MariaDB Bootstrap 5.3 FullCalendar.js xhtml2pdf qrcode smtplib JavaScript

Project Overview

A comprehensive, multi-site Computerised Maintenance Management System built for bakery and food production operations. The system manages the full maintenance lifecycle — from problem reporting through work order execution, preventive maintenance scheduling, certifications tracking, and inventory control — across multiple locations with support for internal teams and external contractors. Fully bilingual (English and Polish) with dark mode and granular role-based access control.

The Problem

Maintenance across multiple bakery and shop sites was managed informally — problems reported by word of mouth, no history of repairs, no way to track parts usage or recurring faults. Equipment breakdowns caused production delays, certifications expired without notice, and there was no visibility into what work was pending, in progress, or overdue. External contractors had no structured communication channel for scheduling inspections.

The Solution

A purpose-built web application that anyone can use to report a problem — including scanning a QR code on equipment. Supervisors triage requests, create work orders, and assign technicians or contractors. The system handles preventive maintenance scheduling with a visual calendar, tracks certifications with automated email reminders, manages parts inventory with stock validation, and provides a granular permissions matrix for fine-tuned access control.

Reactive Maintenance

Preventive Maintenance Planner

Asset & Inventory Management

Certifications & Compliance

Administration & Access Control

Key Features

  • Multi-site management with independent data and shared parts/suppliers
  • QR code scanning — scan labels on equipment to report problems instantly
  • Preventive maintenance planner with FullCalendar, fixed/floating schedules, and counter-based triggers
  • Certifications tracking with automated three-tier email reminders
  • Parts inventory with stock validation, reorder reports, and supplier "Order Online" links
  • Granular RBAC permissions matrix with per-user overrides
  • Customisable email templates with {variable} substitution
  • Custom fields per site (up to 5, types: text, date, image) with expiry monitoring
  • Bilingual interface (English and Polish) with database-driven translations
  • Dark mode with system preference detection
  • SMTP email integration with PDF report attachments
  • Admin impersonation ("Login as") for testing user permissions
  • Print-optimised reports (A4 portrait, clean black layout)
  • 22 database models, 151 routes, 73 templates, 846 translation keys per language

My Role

Full-stack development — database architecture (22 models with complex relationships), backend logic (13 Flask blueprints, 151 routes), frontend interface (Bootstrap 5 with dark mode), PM scheduling engine, certification reminder system, email integration, PDF generation, QR code system, and deployment. Built with a focus on mobile usability for non-technical staff and operational portability across hosting environments.

Technology Used

Python 3.12 Flask 3.1 SQLAlchemy MariaDB Bootstrap 5.3 FullCalendar.js xhtml2pdf qrcode smtplib Pillow uv Tailscale

Challenges and Learning

Designing a system that serves two very different user groups — non-technical staff who just need to report a problem quickly, and maintenance professionals who need detailed execution tools — required careful progressive disclosure. The multi-site architecture with shared parts inventory, cross-site contractor access, and per-site custom fields added complexity to the data model. Building a granular permissions system that coexists with legacy role-based decorators while allowing per-user overrides required a layered approach with per-request caching. The certification reminder engine with three urgency levels, customisable email templates, and automated CLI scheduling demonstrated real-world operational automation.

Outcome / Value

A production-ready maintenance system managing 136 real assets across 4 sites with 22 database models, full bilingual support, and automated compliance tracking. The system demonstrates multi-tenant architecture, granular RBAC, real-time inventory control, automated email workflows, and modern UI patterns (dark mode, AJAX interactions, searchable selectors). Currently in active use for bakery maintenance operations.