Revised Phase 1 scaffold for a manufacturing company’s internal sampling workflow, limited to:
Out of scope in this version:
sales_manager and business_ownerbusiness_ownersales_managersales_executivernd_managerpackaging_managernpm install
cp .env.example .env.local
.env.local:NEXT_PUBLIC_SUPABASE_URL=...
NEXT_PUBLIC_SUPABASE_ANON_KEY=...
SUPABASE_SERVICE_ROLE_KEY=...
npm run dev
The app automatically uses demo data if the Supabase env vars are missing.
If you run without Supabase configured, use these demo users on the login screen:
owner@ramanufacturing.testsales.manager@ramanufacturing.testsales.exec@ramanufacturing.testrnd.manager@ramanufacturing.testpackaging.manager@ramanufacturing.testShared demo password:
password123
Apply the SQL files in this order:
If you use the Supabase CLI:
supabase db reset
Or run the files manually in the SQL editor.
sales_manager and business_owner.public.leads_secure for dashboard queries.business_owner is read-only at the UI and RLS levels.The revised workflow uses parallel and branch-like stage codes such as 2A, 2B, 5A_CONFIRM, and 7.4, so the schema models stage identifiers as a checked text domain instead of an integer.
The schema includes:
usersleadsstage_logsbriefssamplesnotificationsSeed data creates:
app/
(auth)/login/
(dashboard)/
pipeline/
tasks/
tracker/
components/
dashboard/
forms/
layout/
providers/
ui/
lib/
data/
supabase/
supabase/
schema.sql
seed.sql
types/
app.ts
The current revision has been verified locally with:
npm run lint
npm run build
The workflow action forms are aligned to the revised Phase 1 stages and validated in the UI. They remain scaffolded for the final Supabase write-path wiring, so the display, routing, security model, schema, and seed data are updated now without forcing a second structural rewrite later.