You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A robust, full-stack staff management system built with Next.js, Express.js, and PostgreSQL. Designed to handle large-scale staff operations across multiple store locations.
Features
Authentication & Authorization — JWT-based auth with 4 role levels (Super Admin, Admin, Manager, Viewer)
Staff Management — Full CRUD with search, filter, pagination, bulk operations
Store/Branch Management — Manage multiple locations with staff assignments
# 1. Install dependencies
npm install
# 2. Set up environment
cp .env.example .env
# Edit .env with your database credentials# 3. Start PostgreSQL (or use Docker)
docker compose up -d postgres
# 4. Generate Prisma client and run migrationscd packages/backend
npx prisma generate
npx prisma migrate dev
npx prisma db seed
# 5. Start both frontend and backendcd ../..
npm run dev
Option 2: Docker (All-in-One)
# Copy and configure environment
cp .env.example .env
# Build and start all services
docker compose up -d
# Seed the database
docker compose exec backend npx prisma db seed
# 1. Place your old staff_data.json and users.json in the project root# 2. Run the migration script
npx tsx scripts/migrate-existing-data.ts
# 3. The script generates migration-output.json with all your data# 4. Use this data to seed your new PostgreSQL database
npm run dev # Start both frontend and backend
npm run dev:backend # Start backend only
npm run dev:frontend # Start frontend only
npm run build # Build both
npm run db:migrate # Run database migrations
npm run db:seed # Seed database
npm run db:studio # Open Prisma Studio
npm run db:generate # Generate Prisma client
npm run migrate:data # Run data migration script