Knowledge baseDocuments

Documents

The document library stores all scheme files — by-laws, financial reports, meeting notices, minutes, insurance certificates, and more. Documents are organised into categories, controlled by access levels, and support versioning via supersession.

Categories

Every document belongs to a category. Categories are scheme-specific, but a set of system categories is seeded for every new scheme and cannot be deleted:

System categoryTypical contents
By-lawsRegistered by-law documents
Financial ReportsAudited accounts, levy notices, budgets
Meeting NoticesAuto-generated when a notice is issued from a meeting
Meeting MinutesDrafted and approved minutes for all meeting types
InsuranceCurrent and historical policy documents
ContractsContractor agreements, strata management agreements
CorrespondenceLetters, NCAT applications, legal correspondence
OtherCatch-all for documents that don't fit above

Committees can add custom categories. All categories have a is_system flag.

Access levels

Each document has an access_level that controls who can view it. Access is additive — a higher-privilege role sees all levels below its own:

LevelWho can see it
allAll authenticated users (including tenants)
ownersOwners, committee, strata managers, admins
committeeCommittee members and above
strata_managerStrata managers and platform admins
platform_adminPlatform staff only

The API enforces access level filtering on every list and detail request. The computedaccessible_levels for the caller's role is used to filter the query server-side.

Versioning

When a document is superseded, the new version sets supersedes_document_id to the previous document's ID. The old document has is_current_version set to false.

  • The document list endpoint returns only current versions by default (?current_only=true).
  • The version history for a document is retrievable via GET .../documents/:id/versions.
  • The version field is an integer, incrementing from 1.
  • Superseding a document does not delete the old version — it remains accessible to users with the appropriate access level.

Publish workflow

Documents have an is_published flag. Unpublished documents are visible only to committee members and above. Publishing makes the document visible to all members at or above its access level.

  • Meeting notices are auto-published when issued (is_published: true).
  • Minutes are typically uploaded as draft, reviewed, then published after confirmation at the next meeting.
  • Any committee member can publish or unpublish a document.

File uploads

Documents are stored in Supabase Storage. The upload flow:

  1. Client requests a signed upload URL via POST /api/schemes/:id/documents/upload-url.
  2. Client uploads the file directly to Supabase Storage using the signed URL.
  3. Client confirms the upload via POST /api/schemes/:id/documents with metadata.

Download links are short-lived signed URLs (1-hour expiry) generated on each detail or list request.

Allowed file types:

application/pdf.doc / .docx.xls / .xlsx.ppt / .pptximage/jpegimage/pngimage/webpimage/giftext/plaintext/csv

Other MIME types return HTTP 422.

Meeting-linked documents

A document can be linked to a meeting via the optional meeting_id field. Meeting notices created automatically by the issue-notice endpoint are linked in this way. The meeting detail endpoint does not inline documents — query the document list with?meeting_id= to retrieve all documents attached to a meeting.

Plan access

  • Full document history is available on every plan — there is no free tier or history cap.
  • Document writes (upload, edit, publish) are blocked only when a scheme is past its trial without payment (status expired), returning HTTP 402 until billing is set up. Storage is subject to Supabase project limits.

Fields

FieldTypeNotes
document_idUUIDPrimary key.
titlestringDisplay name. Required.
descriptionstringOptional longer description.
category_idUUIDRequired. Links to document_categories.
category_namestringDenormalised for convenience on list responses.
access_levelstringOne of the five levels. Default: owners.
is_publishedboolControls visibility to non-committee members.
versionintVersion number, starting at 1.
is_current_versionboolFalse for superseded documents.
supersedes_document_idUUIDPrevious version's ID, if this is a replacement.
file_namestringOriginal filename.
mime_typestringMIME type of the uploaded file.
file_size_bytesintSize of the uploaded file in bytes.
meeting_idUUIDOptional link to a meeting.
signed_urlstring1-hour download URL. Regenerated on each fetch.