Guide 01 · Setup
Getting the field-ready CMMS online.
This path connects the application, private Storage, and preventive-maintenance scheduler to your own Supabase project without putting secrets into source control.
Apply the database migrations
Open the Supabase SQL editor and run every migration file in filename order, including 202608020005_phase_3_preventive_maintenance.sql. The split Phase 1 enum migration is intentional.
Lock authentication down
Disable new public signups, require email verification, and add the production Vercel URL to the permitted redirect URLs. Create one administrator account from the Supabase dashboard.
Add production settings
Add the Supabase URL, anonymous key, service-role key, and exact administrator email to Vercel’s encrypted environment settings. The service-role key is server-only.
Deploy the main branch
Import the GitHub repository into Vercel. The checked-in configuration selects the Next.js production build and automatic HTTPS. Confirm that production deployments follow main.
Complete all acceptance loops
Run the asset-to-closed-work lifecycle and mobile attachment flow. Then deploy the PM Edge Function, connect Cron, invoke one due template twice, and confirm exactly one generated work order.
Upgrading an existing install
Keep your data; apply only the new migrations.
Do not rerun or edit a migration that has already been applied. A Phase 2 install only needs 202608020005_phase_3_preventive_maintenance.sql, the PM Edge Function, and the checked-in Cron job. Store all scheduler secrets in Supabase.