1. Activate the foundation
Create a Supabase project. Run supabase/migrations/0001_foundation.sql, then 0002_commercial_engine.sql in its SQL editor, then configure these public build variables:
NEXT_PUBLIC_SUPABASE_URL
NEXT_PUBLIC_SUPABASE_ANON_KEYThese are the project URL and public anon key. Never use the service role key in browser code. Rebuild the site after setting them.
2. Configure authentication
Enable email confirmation in Supabase Auth. Set the Site URL to your deployment origin and add exact allowed redirect URLs for /workspace/ and /reset-password/. Configure production SMTP and abuse protection before launch.
3. Create your workspace
Register and verify your email, then sign in. Add your company name, country, currency and time zone. Website, logo, services and branding are optional and can be added later in Company settings.
What works in this preview?
Authentication, one organisation per user, company setup, profile/settings, private logo storage and a database-connected dashboard. Commercial workflows include customer records, editable source briefs, proposals, itemised quotations, version history, approval locks and PDF/DOCX exports. Database permissions isolate organisations.
AI integration code is included as a Supabase Edge Function. Deploy commercial-ai, set OPENAI_API_KEY and ALLOWED_ORIGINS in Supabase secrets, then test it with a signed-in account. Missing credentials never return invented results. Financial models, pipeline editing, billing and team invitations remain planned. Live authentication, AI and storage testing still require configured services.