what-wallstreet-buys

Sales Sampling Workflow Dashboard

Revised Phase 1 scaffold for a manufacturing company’s internal sampling workflow, limited to:

Out of scope in this version:

Stack

What’s Included

Roles

Local Setup

  1. Install dependencies:
npm install
  1. Copy the environment template:
cp .env.example .env.local
  1. Add your Supabase values to .env.local:
NEXT_PUBLIC_SUPABASE_URL=...
NEXT_PUBLIC_SUPABASE_ANON_KEY=...
SUPABASE_SERVICE_ROLE_KEY=...
  1. Start the app:
npm run dev

The app automatically uses demo data if the Supabase env vars are missing.

Demo Accounts

If you run without Supabase configured, use these demo users on the login screen:

Shared demo password:

password123

Supabase Setup

Apply the SQL files in this order:

  1. supabase/schema.sql
  2. supabase/seed.sql

If you use the Supabase CLI:

supabase db reset

Or run the files manually in the SQL editor.

Security Notes

Data Model Notes

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:

Seed data creates:

Project Structure

app/
  (auth)/login/
  (dashboard)/
    pipeline/
    tasks/
    tracker/
components/
  dashboard/
  forms/
  layout/
  providers/
  ui/
lib/
  data/
  supabase/
supabase/
  schema.sql
  seed.sql
types/
  app.ts

Verification

The current revision has been verified locally with:

npm run lint
npm run build

Current Scope Note

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.