From b8ac21d373309b465c86874d0deaffdbbd7f155f Mon Sep 17 00:00:00 2001 From: Christian Date: Fri, 16 Oct 2026 14:37:49 +0200 Subject: [PATCH] docs: update README.md to reflect latest architecture, unit detail dossier, and full-width executive UI --- README.md | 103 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 82 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 2c296a4..de566c5 100644 --- a/README.md +++ b/README.md @@ -2,37 +2,61 @@ > **"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. +**Production - The Idle Game** is an expansive, strategic incremental/idle tycoon simulator inspired by *Factorio*, *Capitalism*, and modern idle engineering games. 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. +The game is packaged as a lightweight, turnkey **Docker Compose stack** powered by a fast Python FastAPI backend with SQLite persistence and a high-performance 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: +* **True Supply Chain Dependencies (Directed Acyclic Graph - DAG Pipeline):** + * Higher-tier industrial goods require and physically consume stockpiles of lower-tier commodities. + * Real-time bottleneck detection and alerts when upstream inputs run short. + * **Fine-Tuned Operational Controls:** + * **Production Target Throttling:** Dial down any facility to 100%, 75%, 50%, 25%, or 0% (Paused) to conserve upstream stockpiles or manage intermediate bottlenecks. + * **Distribution Fleet Toggle:** Toggle wholesale logistics off per facility to preserve finished goods for internal downstream lines or B2B tenders. + * **Downstream Supply Policy:** Block or permit delivery to downstream consumers on a per-facility basis. + * **6 Interconnected Industry Sectors (24 Facilities & Commodities):** 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. + +* **Dedicated Facility Intelligence Dossier (Unit Detail View):** + * Clicking any facility card opens a comprehensive, full-page analytics dossier tailored for data and numbers enthusiasts. + * **Financial Telemetry:** Wholesale unit price, live revenue/s, projected revenue/hour, asset valuation, and stock inventory value. + * **Cycle Dynamics:** Operating lines, base cycle duration, milestone throughput multipliers, batches/second, units/second, and hourly output projections. + * **Net Flow Balance Breakdown:** Transparent arithmetic showing `Production Rate - Downstream Pull - Logistics Sales = Net Inventory Change (Ξ”/s)`. + * **Visual Presentation:** Dual photography placeholders for facility architecture and product specimens (with pre-built hooks for custom photographic assets). + * **Spot-Market Liquidation:** Instantly liquidate 50% or 100% of stockpiles for immediate emergency cash injection. + * **Interactive Upstream/Downstream DAG Navigation:** Jump between connected facilities with one click. + +* **Streamlined Executive Navigation & Layout:** + * **Full-Width Sticky Executive Header:** + * **Capital & Valuation:** Consolidated live cash balance, net cashflow/s, Enterprise Valuation, and Venture Shares ($V-Shares). + * **Full-Width Sector Control Bar:** Seamless edge-to-edge sector switcher with live sector income rates. + * **Department Quick-Actions:** Instant access to B2B Contracts, Boardroom, Milestones, and Buy Multipliers (1x, 10x, 100x, Next). + * **Theme & Number Settings:** Built-in Dark / Light theme toggle with persistent preferences and Standard/Scientific notation toggle. + * **Zero Annoying Browser Popups:** All interactions, confirmations, and alerts use native, stylized modals and toasts. + * **Responsive Grid Layout:** + * "All Sectors" view displays a clean 3x2 grid on desktop and 2 columns on tablet/mobile. + * Mobile optimization with thumb-friendly bottom navigation and condensed pill icons. + * **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. + * **B2B Procurement Contracts Board:** Bid on time-sensitive procurement tenders from MegaCorps and industrial clients for massive capital injections and corporate prestige. + * **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. + * Instant Guest play 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. + * Authoritative offline tick engine: when you return, automated lines calculate production and logistics sales up to 8 hours. --- @@ -50,7 +74,7 @@ The game is packaged as a lightweight, turnkey **Docker Compose stack** powered β”‚ (Reverse Proxy) β”‚ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ - / (Statiske aktiver) β”‚ /api/* + / (Static Assets) β”‚ /api/* β”‚ β–Ό β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ Python FastAPIβ”‚ @@ -68,6 +92,7 @@ The game is packaged as a lightweight, turnkey **Docker Compose stack** powered ### 1. Prerequisites * [Docker](https://docs.docker.com/get-docker/) & [Docker Compose](https://docs.docker.com/compose/) +* (Optional for standalone testing) Python 3.10+ ### 2. Configuration (.env) Create a `.env` file from the example: @@ -81,7 +106,13 @@ docker compose up -d --build ``` The game is live in your browser at: -πŸ‘‰ **`http://localhost:8080`** (or the port defined in `.env`). +πŸ‘‰ **`http://localhost:8081`** (or the port defined in `.env`). + +### 4. Running Backend Verification Tests +To run the automated Python backend engine simulation tests: +```bash +python backend/test_engine.py +``` --- @@ -91,6 +122,7 @@ The game is live in your browser at: . β”œβ”€β”€ .env.example β”œβ”€β”€ docker-compose.yml +β”œβ”€β”€ FACILITY_PHOTO_PROMPT_GUIDE.md # Photographic generation guide for all 24 units & goods β”œβ”€β”€ backend/ β”‚ β”œβ”€β”€ Dockerfile β”‚ β”œβ”€β”€ requirements.txt @@ -98,29 +130,58 @@ The game is live in your browser at: β”‚ β”œβ”€β”€ database.py # SQLite connection and migration setup β”‚ β”œβ”€β”€ engine.py # Authoritative DAG simulation and offline calculations β”‚ β”œβ”€β”€ main.py # FastAPI endpoints -β”‚ └── models.py # Pydantic schemas +β”‚ β”œβ”€β”€ models.py # Pydantic schemas +β”‚ └── test_engine.py # Comprehensive backend regression test suite β”œβ”€β”€ frontend/ -β”‚ β”œβ”€β”€ index.html # Responsive executive layout +β”‚ β”œβ”€β”€ index.html # Full-width executive workspace layout +β”‚ β”œβ”€β”€ assets/ +β”‚ β”‚ └── images/ +β”‚ β”‚ β”œβ”€β”€ facilities/ # Facility architectural blueprints/photos +β”‚ β”‚ └── products/ # Commodity and material specimen photos β”‚ β”œβ”€β”€ css/ -β”‚ β”‚ └── style.css # Modern corporate design system +β”‚ β”‚ β”œβ”€β”€ style.css # Central stylesheet orchestrator +β”‚ β”‚ β”œβ”€β”€ base/ +β”‚ β”‚ β”‚ β”œβ”€β”€ reset.css # Typography, normalize and box model +β”‚ β”‚ β”‚ └── theme.css # Light & Dark theme tokens, form elements & scrollbars +β”‚ β”‚ β”œβ”€β”€ layout/ +β”‚ β”‚ β”‚ β”œβ”€β”€ header.css # Full-width sticky executive header & HUD +β”‚ β”‚ β”‚ β”œβ”€β”€ workspace.css# Responsive content canvas +β”‚ β”‚ β”‚ └── responsive.css# Breakpoints & mobile navigation +β”‚ β”‚ └── views/ +β”‚ β”‚ β”œβ”€β”€ production.css # Facility cards & sector summaries +β”‚ β”‚ β”œβ”€β”€ unitDetail.css # Full facility intelligence dossier +β”‚ β”‚ β”œβ”€β”€ contracts.css # B2B contracts board +β”‚ β”‚ β”œβ”€β”€ boardroom.css # Executive suite & IPO perks +β”‚ β”‚ └── achievements.css# Milestones & badges β”‚ └── js/ -β”‚ β”œβ”€β”€ app.js # Application orchestrator & game loop +β”‚ β”œβ”€β”€ app.js # Application orchestrator, theme manager & event loop β”‚ β”œβ”€β”€ core/ β”‚ β”‚ β”œβ”€β”€ engine.js # Client-side DAG tick simulation -β”‚ β”‚ β”œβ”€β”€ formatters.js# Number notations (Standard K/M/B/T, Scientific) +β”‚ β”‚ β”œβ”€β”€ formatters.js# Number notations (Standard K/M/B/T, Scientific, Currency) β”‚ β”‚ β”œβ”€β”€ state.js # State manager, schema handling & IPO reset β”‚ β”‚ └── sync.js # Backend synchronization & auth handling β”‚ β”œβ”€β”€ data/ β”‚ β”‚ β”œβ”€β”€ products.js # 24+ commodities across 6 sectors +β”‚ β”‚ β”œβ”€β”€ sectors/ # Modular sector & product definitions β”‚ β”‚ β”œβ”€β”€ contracts.js # B2B procurement tenders β”‚ β”‚ β”œβ”€β”€ boardroom.js # IPO perks and Venture Share logic β”‚ β”‚ └── achievements.js β”‚ └── ui/ β”‚ β”œβ”€β”€ productionView.js +β”‚ β”œβ”€β”€ unitDetailView.js β”‚ β”œβ”€β”€ contractsView.js β”‚ β”œβ”€β”€ boardroomView.js -β”‚ β”œβ”€β”€ inspectorView.js -β”‚ └── achievementsView.js +β”‚ β”œβ”€β”€ achievementsView.js +β”‚ └── production/ +β”‚ β”œβ”€β”€ facilityCard.js +β”‚ β”œβ”€β”€ ratesCalculator.js +β”‚ └── sectorBar.js └── nginx/ └── default.conf.template ``` + +--- + +## 🎨 Asset Generation & Custom Visuals + +Refer to [`FACILITY_PHOTO_PROMPT_GUIDE.md`](./FACILITY_PHOTO_PROMPT_GUIDE.md) for master prompts and camera recipes to generate photorealistic assets for all 24 production facilities and commodities using modern image models (Midjourney, Stable Diffusion, Imagen). Dropping generated images into `frontend/assets/images/facilities/` and `frontend/assets/images/products/` seamlessly populates the facility dossiers without modifying any code.