Quality management
The qms preset installs controlled documents, cases for nonconformities, complaints and changes, audits and inspections, a risk register, qualifications and acknowledgements, linked through relations.
The qms preset is for a quality management system in the style of
MasterControl or Qualio, for ISO 9001, ISO 13485 or a similar standard. A
company releases its procedures as controlled documents that staff
acknowledge, opens a case for each nonconformity or complaint and closes it
with a root cause and actions, runs internal audits whose findings raise
cases, keeps a risk register and tracks who is qualified for which work.
Config
import { defineConfig } from "better-supabase/config";
export default defineConfig({ preset: "qms" });npx better-supabase init --preset qms starts a new project from it, and
npx better-supabase add --preset qms adds it to one you have
(CLI).
Blocks
The preset is saas plus these blocks, and
whatever they require:
| Block | Role in the app |
|---|---|
| drive | Controlled documents: numbers, owners, release and periodic review |
| versions | The released versions of documents, policies and risk assessments |
| approvals | The release of a controlled document |
| acknowledgements | Read and understood records for documents and policies |
| compliance | Clauses as controls with evidence, and quality policies |
| cases | Nonconformities, complaints, incidents, changes and audit findings |
| tasks | Corrective and preventive actions on a case |
| pipelines | The stages of each case kind |
| inspections | Audit programmes, internal and supplier audits, findings |
| forms | Audit checklists and the complaint intake form |
| risks | The risk register, its matrix, treatments and reviews |
| qualifications | Competence: who holds which qualification, what each role requires |
| courses | Training that grants a qualification with its certificate |
| employees | Job titles that qualification requirements name |
| contacts | Suppliers and customers: complaint sources and supplier qualifications |
| assets | Equipment and its calibration as qualifications |
| relations | The links between cases, documents, controls and risks |
| numbering | DOC-, NC-, AUD- and RSK- numbers |
| state-machine | The lifecycle of a controlled document |
| signatures | A signature on an acknowledgement |
| attachments | Evidence and qualification certificates |
| metrics | Quality objectives such as complaints per month |
| posts | A board for improvement ideas from staff |
The preset also installs enrollments for course
progress, and posts brings comments, reactions, messaging and moderation with
it. The audit block from saas keeps who changed each record.
Options it sets
The preset turns on the drive's
document control with the types manual,
policy, procedure, work_instruction and form, and gives the release
one approval step that any member with approvals.manage can decide:
export default defineConfig({
preset: "qms",
blocks: {
drive: {
options: {
control: { types: ["sop", "policy", "form"], reviewMonths: 24 },
},
},
},
});An entry of your own replaces the preset's keys one level deep, so setting
blocks.drive.options replaces the whole options object of the preset.
Repeat control there, as above, when you change another drive option, and
set blocks.approvals.options.policies.drive_node.release to require more
approvers.
How the blocks connect
The blocks link through relations kinds rather than foreign keys, so each block also works on its own:
| From | To | Through |
|---|---|---|
| Controlled document | versions, approvals | submitDocument files a release request; approval releases it |
| Controlled document | acknowledgements | each release asks the assigned readers again |
| Compliance policy | acknowledgements | publishPolicy asks the members to acknowledge the version |
| Case | pipelines, tasks, forms | a pipeline per kind, actions as work items, intake from a form |
| Case | controlled document | affects: a change case closes after the document's release |
| Inspection | forms, cases | a checklist form; raiseCase opens a case per nonconformity |
| Inspection | compliance control | assesses, and each finding names the control it concerns |
| Risk | compliance control, task | mitigated_by: the risk's barriers |
| Risk | case | materialized_as: the cases a risk turned into |
| Qualification | courses, employees, assets | a certificate grants it; job titles and asset kinds require it |
A nonconformity found in an audit shows most of them at once. The finding
raises a finding case, which closes once it has a root cause and its
corrective actions, as work items, are done. When the fix changes a
procedure, a change case affects that document and can't close until a
new version of it is released, and that release asks the procedure's readers
to acknowledge it.
With ReUI
Each part of the app has a recipe built from ReUI components:
- Document register: the controlled documents in a Data Grid with Filters on type and status.
- Case board and case detail: a Kanban per kind, and the actions with the close blockers in an Alert.
- Inspection programme calendar and inspection run.
- Risk register and risk heatmap.
- Qualification matrix and my qualifications.
- Acknowledgement inbox for what each member still has to read.
Last updated on
Compliance
The compliance preset installs frameworks and controls with recurring evidence tasks, evidence files, versioned policies that members acknowledge and a posture per framework.
Environment, health and safety
The ehs preset installs incidents and near misses as cases, safety inspections, a risk register, training and licences as qualifications, equipment in assets and acknowledged procedures.