Skip to content

About

Role-based maintenance management platform for tracking requests, assignments, SLA deadlines, notifications, assets, and operational reports.

Resources

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

MaintOps

MaintOps is a full-stack maintenance request and operations system. Requesters can report faults and follow their progress, technicians can manage assigned work, and supervisors can triage the queue, monitor service levels, and review reports. SLA policy administration and account administration are independent privileges that can be granted to any operational role.

The application is designed for a single organization. It combines a React single-page application with a Fastify API and a MySQL data store. Optional Groq-powered assistance can help draft requests, summarize histories, suggest triage values, and identify possible duplicates; the core workflow remains fully usable when AI is disabled or unavailable.

Features

  • Verified requester registration, password reset, secure cookie sessions, and lockout-aware authentication
  • Request creation, editing, cancellation, reopening, resolution confirmation, and role-aware lifecycle controls
  • Supervisor assignment and reprioritization, technician task workflows, holds, resolutions, comments, internal notes, and private evidence attachments
  • SLA policy versioning, response and resolution clocks, on-hold tracking, breach monitoring, and operational notifications
  • Role-specific dashboards, reports, search, filtering, and queue views
  • Audited account administration, notification preferences, and secure administrator bootstrap
  • Optional, task-specific AI assistance with prompt-injection screening, bounded context, rate limits, timeouts, validation, and human approval

Architecture

The repository contains two applications:

  • src/ — React 18, Material UI, React Router, Axios, Recharts, and Vite
  • backend/src/ — Fastify 5, MySQL 8, bcrypt, JWT, Nodemailer, and the optional Groq SDK integration

The backend owns authorization and workflow transitions. The frontend never decides access on its own; route guards and button visibility are convenience layers over server-side enforcement. Schema definitions live only in backend/sql/schema.sql, and npm run migrate applies that source idempotently.

See Architecture for module boundaries, request flow, data ownership, and operational constraints.

Roles and core workflow

  • A requester reports a fault, follows public updates, and confirms or reopens resolved work.
  • A supervisor reviews the unassigned queue, sets priority and category, assigns a technician, and monitors SLA performance.
  • The assigned technician starts work, places it on hold, resumes, documents, and resolves it.
  • An account administrator manages users, privileges, and SLA policies through separate, audited authorization paths.

Prerequisites

  • Node.js 20 or newer
  • npm 10 or newer
  • MySQL 8.0 or a compatible managed MySQL service
  • SMTP credentials only when real email delivery is required
  • A Groq API key only when optional AI assistance is enabled

Local setup

  1. Install frontend and backend dependencies:

    npm ci
    cd backend
    npm ci
  2. Create local environment files:

    # From the repository root
    copy .env.example .env
    copy backend\.env.example backend\.env

    On macOS or Linux, use cp instead of copy. Fill in DB_USER, DB_PASSWORD, DB_NAME, and a unique JWT_SECRET in backend/.env. Keep MAIL_TRANSPORT=console and AI_ENABLED=false for the smallest safe local setup.

  3. Create or upgrade the database and load stable lookup data:

    cd backend
    npm run migrate
    npm run seed
  4. Start the API from backend/:

    npm run dev
  5. In a second terminal, start the frontend from the repository root:

    npm run dev

By default, the frontend is available at http://localhost:5174, the API at http://127.0.0.1:3001, and the health endpoint at http://127.0.0.1:3001/api/health.

The console mail transport deliberately does not expose verification codes, so configure SMTP before testing interactive registration or password reset. Public registration always creates a requester account. After creating the first verified user through the UI, grant that account administrator access once:

cd backend
npm run admin:bootstrap -- verified_username

All later role and administrator changes belong in the audited User Administration interface.

Environment configuration

The committed examples are the configuration reference:

The frontend uses only VITE_API_BASE_URL. The backend example documents every server, database, session, email, worker, verification, attachment, and AI setting. DB_USER, DB_NAME, and JWT_SECRET are required; SMTP fields are required only for SMTP delivery. AI variables may remain empty while AI is disabled.

Never commit .env files or credentials. In deployment, use the platform's secret manager and rotate database, JWT, SMTP, and provider credentials independently.

Demo data

MaintOps includes an opt-in synthetic demo seed. It creates four fictional accounts and four representative requests, including assigned, on-hold, and resolved work, a public update, and an internal note. It refuses to run in production or against a database whose name does not explicitly identify it as a demo/test database.

See Demo and evaluation guide for safe setup, account names, reset instructions, presentation flow, and screenshot guidance.

Optional AI assistance

AI assistance is disabled by default. Enabling it requires the global switch, the relevant per-feature switch, a server-side provider key, and supported model identifiers. Provider failures degrade to unavailable UI states; they do not block the core ticket workflow or health check.

AI output is advisory. Suggested triage values require supervisor confirmation, duplicate matches are candidates rather than facts, and generated request text is editable before submission. See AI security and operations for the data flow, guardrail design, configuration, and validation checklist.

Validation

Run the release checks from the repository root:

npm run lint
npm run test
npm run build
cd backend
npm test
npm audit --omit=dev

Run npm audit at the repository root as part of dependency review when development-dependency findings are also in scope.

Deployment notes

  • Set NODE_ENV=production and use a unique, high-entropy JWT_SECRET.
  • Terminate HTTPS at a controlled reverse proxy or load balancer.
  • Keep TRUST_PROXY=false unless the exact trusted proxy hop count is known.
  • Set CLIENT_URL to the exact public frontend origin.
  • Serve ticket attachments only through the authenticated API; do not expose backend/storage/ as static content.
  • Back up the database and private attachment store together and test restores.
  • Run npm run migrate once per deployment before starting the new API.
  • Keep AI disabled until provider access, model identifiers, data handling, and cost controls have been reviewed for the target environment.

More detailed production and incident guidance is in Security policy and Architecture.

Repository structure

src/                 React application
backend/src/         Fastify API and business modules
backend/sql/         schema and stable lookup seed
backend/test/        backend test suite
docs/                architecture, AI, and demo guidance
public/              MaintOps brand assets

Generated dist/, dependency directories, local environment files, private attachments, coverage, logs, dumps, and temporary artifacts are ignored.

Known limitations and future work

  • MaintOps targets one organization and does not provide tenant isolation.
  • Console mail does not reveal verification codes; interactive registration and password reset require SMTP.
  • The default private attachment store is a local directory. A production deployment must provide durable, backed-up storage.
  • AI availability depends on an external provider and supported model access; every core workflow has a manual path.
  • A future production release should add environment-specific deployment automation and continuous release scans without changing domain semantics.

Security reporting

Do not place vulnerabilities, credentials, private attachments, or personal data in a public issue. Follow SECURITY.md for the private reporting process, deployment controls, and incident response steps.

License

Copyright © 2026 MaintOps project author. All rights reserved.

This repository is available for academic evaluation and portfolio review. It is not open source and does not grant permission to copy, modify, redistribute, sublicense, or use the software commercially. See LICENSE.

Runtime dependencies retain their own licenses. The direct dependency set is MIT, MIT-0, BSD-2-Clause, Apache-2.0, and SIL Open Font License 1.1 licensed; review the installed packages and lockfiles before redistribution.

About

Role-based maintenance management platform for tracking requests, assignments, SLA deadlines, notifications, assets, and operational reports.

Resources

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages