Full warehouse operations demo revived from an SE100 course project. The public /demo route is read-only, uses live Convex data, and needs no account. Authenticated routes retain the complete operator workspace.
- Live operations dashboard and reports
- Product, SKU, category, brand, and supplier master data
- Purchase, receiving, outbound, picking, return, transfer, and adjustment flows
- Cycle counting, traceability, audit logs, notifications, and role permissions
- Interactive 3D warehouse layout editor
- Public evaluator demo backed by Convex
- Deterministic demo reset at 00:00, 06:00, 12:00, and 18:00 UTC
- Next.js 16 and React 19
- Convex for operational data, realtime queries, functions, and cron jobs
- Better Auth with Neon for authenticated operator accounts
- Tailwind CSS 4, Radix UI, TanStack Query/Table, Motion, and React Three Fiber
- Turborepo and pnpm workspaces
Requirements: Node.js 20+ and pnpm 10.28+.
pnpm install
cp apps/web/.env.example apps/web/.env.local
pnpm --dir packages/backend db:app:setup
pnpm seed:demo
pnpm --dir packages/backend db:auth:push
pnpm seed:auth
pnpm devOpen http://localhost:3000. Root redirects to /demo. Full operator login lives at /auth/sign-in.
The auth initializer is idempotent and binds Neon identities to Convex's seeded users:
| Login | Better Auth role | WMS role |
|---|---|---|
[email protected] |
owner | Administrator |
[email protected] |
admin | Warehouse Manager |
[email protected] |
member | Viewer |
All use DEMO_ACCOUNT_PASSWORD from apps/web/.env.local (or the shell).
Account, organization, membership, and role
mutations are blocked at runtime. Better Auth may only write session lifecycle
records so users can sign in, sign out, and select the fixed organization.
pnpm check-types
pnpm build:webpnpm check writes Biome fixes. Review its diff before committing.
Set these Vercel variables before deploying:
| Variable | Scope | Purpose |
|---|---|---|
CONVEX_DEPLOY_KEY |
Production / Preview | Deploy matching Convex backend |
AUTH_DATABASE_URL |
Production / Preview | Neon pooled PostgreSQL URL |
BETTER_AUTH_SECRET |
Production / Preview | 32+ character auth secret |
SITE_URL |
Production / Preview | Exact Vercel origin |
RESEND_API_KEY |
Production / Preview | Auth email delivery |
RESEND_EMAIL_FROM |
Production / Preview | Verified sender |
NEXT_PUBLIC_CONVEX_URL is injected into the Next build by convex deploy.
DEMO_ACCOUNT_PASSWORD is only needed while running pnpm seed:auth; it is not
needed by the deployed runtime.
- Create a production deployment in Convex.
- Generate production and preview deploy keys.
- Import this repository into Vercel with repository root as project root.
- Add
CONVEX_DEPLOY_KEYto Production and Preview using their matching keys. - Add authenticated-app variables from
apps/web/.env.exampleif operator login is required. - Deploy.
vercel.jsonruns Convex deployment before the Next.js build. - Seed production once:
pnpm --dir packages/backend exec convex run seedMockData:seedAllTestData --prod
pnpm --dir packages/backend db:auth:push
pnpm seed:authPreview Convex deployments seed automatically through --preview-run.
Detailed assessment and production checklist: docs/REVIVAL.md.