Internal web portal for managing welding documentation workflow in EPCC (Engineering, Procurement, Construction, Commissioning) projects. Handles the full lifecycle of Welding Test Reports — from joint creation, welder assignment, visual inspection, NDT reporting, up to client transmittal and feedback.
Built for multi-role teams: Admin, Supervisor, QC Inspector, Document Controller, and Client.
- WTR Lifecycle — Draft → Visual Inspection → Approval → Transmittal → Client Feedback. Each status transition is role-gated with validation checks (e.g., can't approve without passing inspection).
- EPC Hierarchy — Organize project data into System → Line Number → Isometric → Spool → Joint. All levels support CRUD from the UI.
- Engineering Data — Manage welders (with stamp numbers/qualifications) and WPS records. Multi-welder pass tracking per WTR (root, fill, cap).
- NDT Reports — Standalone NDT entries linked to WTRs that passed visual inspection. Supports RT, UT, MT, PT methods.
- Defect Tracking — Auto-generated when an inspection is rejected. Tracks severity, resolution, and corrective actions.
- Transmittal & Client Portal — Document Controllers push approved WTRs to clients. Clients can accept/reject with feedback.
- Dashboard — Metrics overview with daily/weekly/monthly trend charts (Recharts).
- Password Reset — Token-based email flow via Resend.
| Layer | Tech |
|---|---|
| Framework | Next.js 16 (App Router) |
| Language | TypeScript 5 |
| UI | MUI 9 + Tailwind CSS 4 |
| Data Grid | MUI X Data Grid |
| Charts | Recharts |
| Auth | NextAuth.js (JWT strategy, Credentials provider) |
| ORM | Prisma 7 (PostgreSQL adapter) |
| Database | Neon PostgreSQL (serverless) |
| Resend |
src/
├── app/
│ ├── (admin)/ # Authenticated pages
│ │ ├── dashboard/ # Metrics + charts
│ │ ├── wtr/ # WTR management (per project)
│ │ ├── hierarchy/ # EPC tree (System/Line/Iso/Spool)
│ │ ├── engineering/ # Welders & WPS
│ │ ├── inspections/ # Visual inspection log
│ │ ├── ndt/ # NDT report management
│ │ ├── defects/ # Defect tracking
│ │ ├── transmittals/ # Document control
│ │ ├── client-feedback/
│ │ ├── templates/ # Joint templates
│ │ └── users/ # User management (admin only)
│ ├── api/ # REST endpoints (mirrors above)
│ ├── login/
│ ├── forgot-password/
│ └── reset-password/
├── components/layout/ # Header, AdminLayout
├── lib/ # Prisma client, auth config
└── types/ # NextAuth type augmentation
# Install dependencies
npm install
# Copy environment variables
cp .env.example .envFill in your .env:
DATABASE_URL="postgresql://user:password@host/dbname?sslmode=require"
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="generate-with-openssl-rand-hex-32"
RESEND_API_KEY="re_your_key_here"# Push schema to database
npx prisma db push
# Generate Prisma client
npx prisma generate
# Start dev server
npm run devApp runs on http://localhost:3000.
You can populate the database with default roles and projects using the seed script:
npx ts-node prisma/seed.tsThis will create the following default users (All passwords are admin123):
| Role | |
|---|---|
| Administrator | admin@e-wtr.lunemich.dev |
| QC Inspector | qc@e-wtr.lunemich.dev |
| QC Supervisor | supervisor@e-wtr.lunemich.dev |
| Document Control | dc@e-wtr.lunemich.dev |
| Client Rep | client@e-wtr.lunemich.dev |
| Action | Admin | Supervisor | QC | Doc Control | Client |
|---|---|---|---|---|---|
| Create WTR | ✓ | — | ✓ | — | — |
| Approve WTR | ✓ | ✓ | — | — | — |
| Transmit WTR | ✓ | — | — | ✓ | — |
| Submit Inspection | ✓ | — | ✓ | — | — |
| Client Feedback | — | — | — | — | ✓ |
| Manage Users | ✓ | — | — | — | — |
| Manage Hierarchy | ✓ | — | — | — | — |
| Engineering Data | ✓ | — | ✓ | — | — |
The button above will clone this repo into your Vercel account and prompt you to fill in the four required environment variables. Make sure DATABASE_URL points to a connection-pooling endpoint if using Neon.
Alternatively, deploy manually:
npm run buildLicensed under CC BY-NC 4.0. You're free to use, modify, and share this project for non-commercial purposes with attribution. Commercial use and resale are not permitted.