Skip to content

Snehit70/PLMPRO

Repository files navigation

Mold

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.

Preview

Mold login screen

What It Covers

  • 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, and ADMIN
  • 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

Stack

  • App framework: Next.js App Router + TypeScript
  • Runtime and package manager: bun
  • Database: PostgreSQL
  • ORM: Prisma
  • Validation: zod
  • Styling: Tailwind CSS
  • Tables: @tanstack/react-table

Local Setup

  1. Copy the environment file:
cp .env.example .env
  1. Install dependencies:
bun install
  1. Generate Prisma client and prepare the database:
bun run db:generate
bun run db:migrate --name init
bun run db:seed
  1. Start the app:
bun run dev

Useful Commands

bun 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:demo

Demo Reset

When the local demo state drifts, reset everything with:

bun run db:reset:demo

That command is destructive and intended only for local development. It will:

  1. reset the local schema
  2. re-apply all migrations
  3. re-seed the deterministic demo dataset

Seeded Demo State

After a reset, the app includes:

  • 5 seeded users:
    • admin@plm.local
    • engineering@plm.local
    • approver@plm.local
    • approver.backup@plm.local
    • operations@plm.local
  • 3 seeded products:
    • FG-100 / Servo Press Assembly
    • FG-200 / Conveyor Drive Module
    • FG-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-1001
    • ECO-B-1001
    • ECO-P-2001
    • ECO-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

Auth And Roles

  • /login supports seeded role sign-in
  • /signup creates new ENGINEERING users only
  • ADMIN can access workflow settings
  • OPERATIONS is restricted to the active approved baseline
  • ENGINEERING owns ECO drafting and submission
  • APPROVER owns ECO approval and rejection

Workflow Settings

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.

Reports

The reports area includes:

  • Engineering Change Orders report
  • Product Version History
  • BoM Change History
  • Active Product-Version-BoM matrix
  • Archived Products and Versions

Verification

The narrowest useful check after most code changes is:

bun run typecheck

If Prisma schema changes are involved, also run:

bun run db:generate

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages