A production-minded starter for your internal Project Management & Billing System built with Next.js App Router, Tailwind CSS, Prisma, and MySQL.
- Role-based app shell and login
- Platform user types: Admin, Manager, Team Lead, Employee, Report Viewer
- Fixed functional role per employee/team lead for reporting
- Employee groups for project visibility
- Client-first project model with optional movie linkage
- Time entry submission and moderation
- Estimate submission and moderation
- Team Lead ↔ Employee assignment model
- Project billing transactions:
- Partial billing
- Upgrade before completion
- Upgrade after completion
- Adjustment
- Seed data and sample dashboard/report pages
- Every employee can be assigned to one or more Team Leads.
- A Team Lead can only moderate time entries and estimates for employees explicitly assigned to them.
- Admin and Manager can perform full project-level moderation.
- Node.js 20.19+ or 22.12+ or 24+ recommended by Prisma's current Next.js guide. citeturn584036view0
- MySQL running locally in WSL, Docker, or another reachable host
- Git
cp .env.example .envUpdate .env:
DATABASE_URL="mysql://root:password@127.0.0.1:3306/pms_db"
SESSION_SECRET="replace-with-a-long-random-secret"
APP_URL="http://localhost:3000"npm installCREATE DATABASE pms_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;npx prisma generate
npx prisma db pushnpm run db:seednpm run devOpen:
http://localhost:3000/login
- Admin:
admin@company.com/Admin@123 - Manager:
manager@company.com/Manager@123 - Team Lead:
lead@company.com/Lead@123 - Employee:
dev1@company.com/Employee@123
cd ~/projects
unzip pms-nextjs.zip
cd pms-nextjs
cp .env.example .env
npm install
npx prisma db push
npm run db:seed
npm run devIf you use VS Code:
code .This repository is ready for the setup you described:
- Vercel for the Next.js app
- Railway MySQL for the database
Prisma documents a Next.js + Prisma deployment flow to Vercel, and Vercel's Railway integration can expose Railway database variables such as DATABASE_URL to Vercel deployments. citeturn584036view0turn584036view2
- Create a Railway project
- Add a MySQL database service
- Copy the generated
DATABASE_URL
- Push this project to GitHub
- Import the repo into Vercel
- Add environment variables:
DATABASE_URLSESSION_SECRETAPP_URL
- Keep install/build settings standard initially
Prisma recommends regenerating Prisma Client during Vercel builds and using prisma migrate deploy in deployment workflows. This starter already includes postinstall: prisma generate; for production migrations, use npm run db:deploy. citeturn584036view1
"vercel-build": "prisma generate && prisma migrate deploy && next build"That pattern comes directly from Prisma's Vercel deployment guidance. citeturn584036view1