This project is a React + Vite application integrated with Supabase, featuring a multi-tenant architecture with a launcher and modules (starting with QiHome).
apps/qione-web/: React frontend application.supabase/migrations/: Database schema migrations (adapted forqioneschema).supabase/bootstrap_tenant.sql: SQL template to bootstrap a new tenant with roles and module access.
As requested, all tables and views are located within the qione schema.
The web application uses .schema('qione') on all Supabase queries.
-
Supabase Setup:
- Run the migrations in
supabase/migrations/on your Supabase project. - Ensure you have the
VITE_SUPABASE_URLandVITE_SUPABASE_ANON_KEYenvironment variables.
- Run the migrations in
-
Bootstrap a Tenant:
- Create a tenant via the web UI or SQL.
- Use
supabase/bootstrap_tenant.sqlto grant yourself the 'Owner' role and enable modules for that tenant.
-
Frontend:
cd apps/qione-webnpm install(If node/npm is not in your path, ensure it is installed)npm run dev
Deploy the apps/qione-web directory to Cloudflare Pages or similar, setting the required environment variables.