Go to file
2025-11-12 22:21:35 +03:00
.vscode first commit 2025-11-12 22:21:35 +03:00
app first commit 2025-11-12 22:21:35 +03:00
components first commit 2025-11-12 22:21:35 +03:00
lib first commit 2025-11-12 22:21:35 +03:00
prisma first commit 2025-11-12 22:21:35 +03:00
public Initial commit from Create Next App 2025-11-12 12:09:16 +03:00
types first commit 2025-11-12 22:21:35 +03:00
.gitignore first commit 2025-11-12 22:21:35 +03:00
ADMIN_CRUD_IMPLEMENTATION.md first commit 2025-11-12 22:21:35 +03:00
AUTHENTICATION_UPDATE.md first commit 2025-11-12 22:21:35 +03:00
CREDENTIALS.md first commit 2025-11-12 22:21:35 +03:00
eslint.config.mjs Initial commit from Create Next App 2025-11-12 12:09:16 +03:00
IMPLEMENTATION_SUMMARY.md first commit 2025-11-12 22:21:35 +03:00
middleware.ts first commit 2025-11-12 22:21:35 +03:00
next.config.ts Initial commit from Create Next App 2025-11-12 12:09:16 +03:00
NEXTJS15_FIXES.md first commit 2025-11-12 22:21:35 +03:00
package-lock.json first commit 2025-11-12 22:21:35 +03:00
package.json first commit 2025-11-12 22:21:35 +03:00
postcss.config.mjs Initial commit from Create Next App 2025-11-12 12:09:16 +03:00
prisma.config.ts first commit 2025-11-12 22:21:35 +03:00
project.md first commit 2025-11-12 22:21:35 +03:00
QUICK_START.md first commit 2025-11-12 22:21:35 +03:00
README.md first commit 2025-11-12 22:21:35 +03:00
SETUP.md first commit 2025-11-12 22:21:35 +03:00
SHIFT_DETAILS_VIEW.md first commit 2025-11-12 22:21:35 +03:00
SHIFT_OPERATOR_ASSIGNMENT.md first commit 2025-11-12 22:21:35 +03:00
SHIFT_TIMES_FIX.md first commit 2025-11-12 22:21:35 +03:00
STATUS.md first commit 2025-11-12 22:21:35 +03:00
TEAM_MANAGER_VALIDATION.md first commit 2025-11-12 22:21:35 +03:00
TESTING_GUIDE.md first commit 2025-11-12 22:21:35 +03:00
TROUBLESHOOTING.md first commit 2025-11-12 22:21:35 +03:00
tsconfig.json Initial commit from Create Next App 2025-11-12 12:09:16 +03:00
WORKER_TEAM_ASSIGNMENT.md first commit 2025-11-12 22:21:35 +03:00

Müller Bottle Production Management System

A Next.js application for managing milk bottle production shifts, operators, and quality control reports.

Features

  • Admin Dashboard: Manage teams, workers, shift managers, and machines
  • Shift Manager Portal: Create and manage shifts, assign operators to machines
  • Operator Portal: View active shifts and fill out detailed production reports
  • Real-time Reporting: Track production parameters, quality checks, bottle weights, and more

Tech Stack

  • Next.js 16 (App Router)
  • TypeScript
  • Prisma ORM
  • PostgreSQL
  • NextAuth.js for authentication
  • Tailwind CSS
  • Recharts for data visualization

Getting Started

Prerequisites

  • Node.js 18+ installed
  • PostgreSQL database running

Installation

  1. Clone the repository
  2. Install dependencies:
npm install
  1. Set up your environment variables in .env:
DATABASE_URL="postgresql://user:password@localhost:5432/muller_db"
AUTH_SECRET="your-secret-key"
NEXTAUTH_URL="http://localhost:3000"
  1. Push the database schema:
npm run db:push
  1. Seed the database with initial data:
npm run db:seed
  1. Run the development server:
npm run dev
  1. Open http://localhost:3000

Default Login Credentials

Admin

  • Email: admin@muller.com
  • Password: admin123

Shift Manager

  • Email: john.manager@muller.com
  • Password: (No password - needs to be set up)

Operators

  • Email: operator1@muller.com to operator7@muller.com
  • Password: (No password - needs to be set up)

Application Structure

Admin Features

  • Manage teams (Red, Green, Blue, Yellow)
  • Add/edit workers and operators
  • Add/edit shift managers
  • Manage 7 machines (T1-T7)

Shift Manager Features

  • Create shifts (AM/PM)
  • Assign team members to shifts
  • Distribute operators across machines
  • Close completed shifts

Operator Features

  • View active shifts
  • Fill out comprehensive shift reports including:
    • Safety checklist
    • Production pre-checks (wall thickness, section weights, station weights)
    • Hourly production parameters
    • Bottle weight tracking with charts
    • Hourly quality checks
    • Production tracking
    • Seam leak tests
    • Film details
    • Production data and metrics

Database Schema

  • admins: System administrators
  • shiftManagers: Shift managers who create and manage shifts
  • workers: Operators and engineers
  • teams: 4 teams (Red, Green, Blue, Yellow)
  • machines: 7 blow moulding machines (T1-T7)
  • shifts: Shift records (AM/PM, 12 hours each)
  • shiftTeamMembers: Assignment of workers to shifts
  • machineShiftReports: Detailed production reports for each operator

Development

# Run development server
npm run dev

# Build for production
npm run build

# Start production server
npm start

# Lint code
npm run lint

Notes

  • AM shift: 7:00 AM - 7:00 PM
  • PM shift: 8:00 PM - 7:00 AM
  • Each shift requires 7 operators (one per machine), 1 Level 2 supervisor, and 1 engineer
  • Reports are automatically created when a shift manager assigns operators to machines