A multi-tenant Supabase/Postgres schema for work order and maintenance management systems (CMMS).
This repository provides the database layer for Work Order Systems: a secure, multi-tenant CMMS backend designed for teams managing assets, locations, and maintenance workflows.
- Multi-tenant isolation with row level security (RLS)
- Work orders with configurable workflow statuses and priorities
- Assets, locations (hierarchical), and departments
- Roles, permissions, and ABAC scopes for access control
- Audit logging and analytics-friendly materialized views
- RPC-first API surface for safe, permissioned writes
Prereqs:
- Node.js 20+ recommended
- Supabase CLI
npm install
npm run supabase:start
npm testsupabase/- schema, migrations, and architecture docstests/- Vitest integration tests
Detailed architecture and database rules live in:
See CONTRIBUTING.md for setup, workflow, and migration rules.
Please review SECURITY.md for how to report vulnerabilities.
Use GitHub Issues for bug reports and feature requests.
Licensed under AGPL-3.0-or-later. See LICENSE.