Skip to content

13otKmdr/BennettOS

Repository files navigation

BennettOS

Production Management System for Manufacturing

A full-stack inventory and production management system built for a beekeeping supplies manufacturer. Tracks work orders, inventory across multiple warehouses, daily production checks, and includes an AI assistant for querying data.

TypeScript React Node.js PostgreSQL


What It Does

For Production Supervisors:

  • 📋 Daily production checklists across 11 departments
  • 📦 Real-time inventory tracking with pallet/bundle calculations
  • 🏗️ Work order management with Kanban board
  • 📊 Bill of Materials calculator
  • 🤖 AI assistant for querying inventory and production data

For Business Owners:

  • 📈 Dashboard with key metrics
  • 🔔 Low stock alerts
  • 📝 Audit trail for all inventory adjustments
  • 📱 Mobile-responsive design

Screenshots

Dashboard Inventory Kanban Board
Dashboard Inventory Kanban

Tech Stack

Layer Technology
Frontend React 18, TypeScript, TailwindCSS, Radix UI, Zustand, TanStack Query
Backend Node.js, Express, TypeScript, Prisma ORM
Database PostgreSQL
Auth JWT with bcrypt
AI OpenRouter API (GPT, Claude, Gemini, Llama)
Build Vite

Key Features

📦 Inventory Management

  • Smart quantity display: 11 plts (8,250 pcs) based on pallet/bundle config
  • Multi-warehouse tracking
  • Production adjustments with audit trail
  • Low stock alerts

📋 Production Checklists

  • Daily production dashboard (11 departments, AM/PM tracking)
  • After lunch grid
  • Supervisor checklist (20 leadership items)
  • Weekly personnel schedule

🏗️ Work Orders & Kanban

  • Customer orders with linked work orders
  • Kanban board: To Do → In Process → On Hold → Ready for Shipping → Shipped
  • Department assignment and due dates
  • Drag-and-drop status updates

📊 BOM Calculator

  • Pre-built templates for common products
  • Shows component availability
  • Calculates producible units

🤖 AI Assistant

  • Query inventory in natural language
  • Encrypted API key storage (AES-256-GCM)
  • Supports multiple LLM providers

Architecture

┌─────────────────────────────────────────────────────────────┐
│                      Frontend (React)                        │
│  ┌─────────┐  ┌──────────┐  ┌──────────┐  ┌──────────────┐  │
│  │Dashboard│  │Inventory │  │Production│  │ AI Assistant │  │
│  └────┬────┘  └────┬─────┘  └────┬─────┘  └──────┬───────┘  │
│       │            │             │               │          │
│       └────────────┴─────────────┴───────────────┘          │
│                          │                                   │
│                    TanStack Query                           │
│                          │                                   │
└──────────────────────────┼───────────────────────────────────┘
                           │
                      REST API
                           │
┌──────────────────────────┼───────────────────────────────────┐
│                     Backend (Express)                        │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐  ┌─────────────┐   │
│  │Auth Route│  │Inventory │  │Production│  │Assistant API│   │
│  └────┬─────┘  └────┬─────┘  └────┬─────┘  └──────┬──────┘   │
│       │             │             │               │          │
│       └─────────────┴─────────────┴───────────────┘          │
│                          │                                   │
│                    Prisma ORM                               │
│                          │                                   │
└──────────────────────────┼───────────────────────────────────┘
                           │
                    PostgreSQL

Quick Start

# Clone
git clone https://github.com/13otKmdr/BennettOS.git
cd BennettOS

# Backend setup
cd server
npm install
cp .env.example .env
# Edit .env with your database URL
npx prisma generate
npx prisma db push

# Frontend setup
cd ../client
npm install

# Run
cd ../server && npm run dev   # Terminal 1
cd ../client && npm run dev   # Terminal 2

Open http://localhost:5173


Environment Variables

# server/.env
DATABASE_URL="postgresql://user:password@localhost:5432/bennettpm"
JWT_SECRET="your-jwt-secret"
ENCRYPTION_KEY="64-char-hex-for-aes-encryption"
PORT=3001
CLIENT_URL="http://localhost:5173"

Generate encryption key:

node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"

What I Learned Building This

Complex State Management: Managing production checklists across multiple departments with real-time updates taught me a lot about React state patterns and optimistic UI updates.

Domain Modeling: Designing a schema that handles inventory in multiple formats (pieces, bundles, pallets) with full audit trails required careful data modeling.

AI Integration: Building a secure AI assistant with encrypted API key storage and natural language querying of structured data.

Real-World Constraints: Building for actual factory workflows means handling edge cases, offline-first patterns, and mobile-responsive layouts for floor use.


Project Structure

BennettOS/
├── server/
│   ├── prisma/schema.prisma    # Database models
│   └── src/
│       ├── routes/             # API endpoints
│       │   ├── auth.ts
│       │   ├── inventory.ts
│       │   ├── production.ts
│       │   ├── orders.ts
│       │   └── assistant.ts
│       └── utils/
│           └── encryption.ts   # AES-256-GCM
├── client/
│   └── src/
│       ├── pages/              # Route components
│       ├── components/         # UI components
│       └── lib/api.ts          # API client
└── README.md

License

MIT


Built for Bennett Apiaries | A manufacturing inventory and production management system

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages