Mold is a controlled engineering change workspace for versioned Product and BoM data. It lets engineering teams draft changes, route them through approval, apply them into the active baseline, and retain an audit trail of what changed.
- Product master data with active and archived versions
- BoM snapshots linked to product versions
- ECO creation, drafting, validation, approval, rejection, and apply flows
- Role-based access for
ENGINEERING,APPROVER,OPERATIONS, andADMIN - Workflow settings for approval behavior, versioning defaults, and configurable stage labels
- Reports for ECO history, BoM change history, product version history, and active baseline coverage
- App framework:
Next.jsApp Router + TypeScript - Runtime and package manager:
bun - Database:
PostgreSQL - ORM:
Prisma - Validation:
zod - Styling: Tailwind CSS
- Tables:
@tanstack/react-table
- Copy the environment file:
cp .env.example .env- Install dependencies:
bun install- Generate Prisma client and prepare the database:
bun run db:generate
bun run db:migrate --name init
bun run db:seed- Start the app:
bun run devbun run typecheck
bun run lint
bun run db:generate
bun run db:migrate --name <name>
bun run db:push
bun run db:seed
bun run db:reset:demoWhen the local demo state drifts, reset everything with:
bun run db:reset:demoThat command is destructive and intended only for local development. It will:
- reset the local schema
- re-apply all migrations
- re-seed the deterministic demo dataset
After a reset, the app includes:
- 5 seeded users:
admin@plm.localengineering@plm.localapprover@plm.localapprover.backup@plm.localoperations@plm.local
- 3 seeded products:
FG-100 / Servo Press AssemblyFG-200 / Conveyor Drive ModuleFG-300 / Cartoner Frame Cell
- 6 product versions total:
- 3 archived
- 3 active
- 4 BoMs total:
- 2 archived
- 2 active
- 4 seeded ECOs across multiple workflow states:
ECO-P-1001ECO-B-1001ECO-P-2001ECO-B-3001
- 2 draft ECOs, 1 in-review ECO, and 1 applied ECO
- one active product intentionally has no linked BoM so empty-state master-data behavior can be demonstrated
- audit log entries for seeded users, master-data baselines, approval events, and applied workflow history
/loginsupports seeded role sign-in/signupcreates newENGINEERINGusers onlyADMINcan access workflow settingsOPERATIONSis restricted to the active approved baselineENGINEERINGowns ECO drafting and submissionAPPROVERowns ECO approval and rejection
Settings currently support:
- approval required vs direct validate-and-apply
- require one approver vs all approvers
- default new-version behavior
- allow or disallow in-place apply
- configurable labels for the three workflow stages
The underlying workflow engine still uses the three-stage model:
- draft
- review
- done
So stage labels are configurable today, while arbitrary stage creation is not.
The reports area includes:
- Engineering Change Orders report
- Product Version History
- BoM Change History
- Active Product-Version-BoM matrix
- Archived Products and Versions
The narrowest useful check after most code changes is:
bun run typecheckIf Prisma schema changes are involved, also run:
bun run db:generate