Production 🛠️ The Idle Game
Find a file
2026-10-16 11:15:28 +02:00
backend Fix production batch cycle input deduction and downstream stock reservation 2026-10-16 00:17:20 +02:00
frontend Replace alert/confirm with modals, hide sector numbers on cramped layout, enforce 2/3/6 grid for All Sectors 2026-10-16 11:15:28 +02:00
nginx feat: initial commit for El Puro idle game with Docker stack, honeypot auth, and mobile OS UI 2026-10-15 15:26:08 +02:00
.env.example feat: transform game into Production - The Idle Game with multi-tier supply chains, B2B contracts, IPO prestige, and responsive executive UI 2026-10-15 21:29:51 +02:00
.gitignore feat: transform game into Production - The Idle Game with multi-tier supply chains, B2B contracts, IPO prestige, and responsive executive UI 2026-10-15 21:29:51 +02:00
docker-compose.yml feat: transform game into Production - The Idle Game with multi-tier supply chains, B2B contracts, IPO prestige, and responsive executive UI 2026-10-15 21:29:51 +02:00
README.md feat: transform game into Production - The Idle Game with multi-tier supply chains, B2B contracts, IPO prestige, and responsive executive UI 2026-10-15 21:29:51 +02:00

PRODUCTION - The Idle Game

"Build the Ultimate Global Supply Chain Empire."

Production - The Idle Game is an expansive, strategic incremental/idle web game inspired by Capitalism, Factorio-lite, and modern idle tycoon simulators. Take command of a burgeoning enterprise, starting from primary extraction (wheat, timber, iron ore) and scaling into complex, multi-tiered industrial supply chains producing microchips, commercial trucks, consumer smartphones, and corporate office furniture.

The game is packaged as a lightweight, turnkey Docker Compose stack powered by a fast Python FastAPI backend with SQLite persistence and an Nginx reverse-proxy frontend.


🌟 Key Features

  • Real Supply Chain Dependencies (DAG Pipeline):
    • Higher-tier industrial goods require and consume physical stockpiles of lower-tier commodities.
    • Real-time bottleneck warnings when upstream inputs run short.
    • 6 Interconnected Industry Sectors:
      1. Agriculture & Food: Wheat, Milled Flour, Sugar Beet, Refined Sugar, Artisan Bread, Packaged Meals.
      2. Forestry & Materials: Raw Timber, Milled Planks, Industrial Paper, Office Furniture.
      3. Mining & Metallurgy: Iron Ore, Coking Coal, Structural Steel, Heavy Frameworks.
      4. Chemicals & Polymers: Crude Oil, Silica Quartz Sand, Industrial Polymers, Purified Silicon.
      5. High-Tech & Electronics: Silicon Microchips, PCB Motherboards, Consumer Smartphones.
      6. Heavy Industry & Vehicles: Industrial Engines, Commercial Logistics Trucks.
  • Dual Revenue Channels:
    • Continuous Logistics Distribution: Deploy dedicated logistics fleets to automatically wholesale products to regional distributors for continuous passive cashflow.
    • B2B Procurement Contracts Board: Bid on time-sensitive procurement tenders from MegaCorps and industrial clients for massive capital injections and reputation.
  • Corporate IPO & Boardroom Prestige:
    • File for an Initial Public Offering (IPO) on Wall Street when your enterprise valuation reaches critical mass.
    • Cash in for Venture Shares ($V-Shares) to unlock permanent perks on the Boardroom R&D Tech Tree (Automated ERP Routing, Industrial Robotics, Logistics Subsidies, Venture Capital Syndicate).
  • Responsive Executive UI:
    • Desktop Command Station: 3-column workstation layout (Departments & Sectors sidebar, main Production Floor, and live Supply Chain Inspector with instant spot-market liquidation).
    • Mobile Optimization: Ergonomic single-column interface with bottom navigation tabs and thumb-friendly controls.
  • Cloud & Offline Sync:
    • Plays instantly as a Guest with local persistence.
    • Optional lightweight account system (username + password with anti-bot honeypot protection).
    • Authoritative offline tick engine: when you return, your automated lines calculate production and logistics sales up to 8 hours.

🛠️ Architecture

                          ┌────────────────────────┐
                          │   Browser Client UI    │
                          │   (ES Modules, CSS3)   │
                          └───────────┬────────────┘
                                      │ HTTP / :HOST_PORT
                                      ▼
                          ┌────────────────────────┐
                          │      Nginx Proxy       │
                          │   (Reverse Proxy)      │
                          └─────┬────────────┬─────┘
                                │            │
                    / (Statiske aktiver)     │ /api/*
                                │            ▼
                                │    ┌───────────────┐
                                │    │ Python FastAPI│
                                │    │ (JWT & Engine)│
                                │    └───────┬───────┘
                                │            │
                                ▼            ▼
                        [frontend/]     [SQLite DB]
                                      (/app/data/production.db)

🚀 Quick Start with Docker Compose

1. Prerequisites

2. Configuration (.env)

Create a .env file from the example:

cp .env.example .env

3. Launch the Stack

docker compose up -d --build

The game is live in your browser at:
👉 http://localhost:8080 (or the port defined in .env).


📁 Project Directory Structure

.
├── .env.example
├── docker-compose.yml
├── backend/
│   ├── Dockerfile
│   ├── requirements.txt
│   ├── auth.py              # JWT authentication & password hashing
│   ├── database.py          # SQLite connection and migration setup
│   ├── engine.py            # Authoritative DAG simulation and offline calculations
│   ├── main.py              # FastAPI endpoints
│   └── models.py            # Pydantic schemas
├── frontend/
│   ├── index.html           # Responsive executive layout
│   ├── css/
│   │   └── style.css        # Modern corporate design system
│   └── js/
│       ├── app.js           # Application orchestrator & game loop
│       ├── core/
│       │   ├── engine.js    # Client-side DAG tick simulation
│       │   ├── formatters.js# Number notations (Standard K/M/B/T, Scientific)
│       │   ├── state.js     # State manager, schema handling & IPO reset
│       │   └── sync.js      # Backend synchronization & auth handling
│       ├── data/
│       │   ├── products.js  # 24+ commodities across 6 sectors
│       │   ├── contracts.js # B2B procurement tenders
│       │   ├── boardroom.js # IPO perks and Venture Share logic
│       │   └── achievements.js
│       └── ui/
│           ├── productionView.js
│           ├── contractsView.js
│           ├── boardroomView.js
│           ├── inspectorView.js
│           └── achievementsView.js
└── nginx/
    └── default.conf.template