01 / CLIENTS
Applications
Electron · React
Flutter · QR scan
April 2025 · Construction Industrielle Africaine (C.I.A) · Casablanca, Morocco
Complete real-time and offline inventory management ecosystem
Designed and developed C.I.A STOCK, an inventory management system for industrial consumables, bringing desktop administration and mobile stock operations into one solution.

Architecture
The project is based on an asynchronous distributed client-server architecture, built for maximum resilience against internet instability typical in remote workshops and work sites.
01 / CLIENTS
Electron · React
Flutter · QR scan
02 / NETWORK
Connects the mobile app to the local PC server over LAN or VPN.
03 / API
The API receives requests and applies inventory business rules.
04 / DATA
Stores products, stock movements, users, and configuration.
05 / RESPONSE
Results return to the interfaces
After persistence, the desktop app refreshes stock; the report describes synchronization to the interface via SSE.
DATA PIPELINE
When a device is connected, each stock movement follows these steps.
STEP 01
The mobile app scans the product QR code and prepares the stock operation.
STEP 02
The request reaches the API over the local network or Tailscale VPN.
STEP 03
FastAPI validates the operation, checks business rules, and calculates product status.
STEP 04
MongoDB records the product or stock movement through the asynchronous Motor driver.
STEP 05
The desktop interface reflects the new stock state; synchronization is described via SSE.
OFFLINE PATH
The report describes local storage on mobile: operations are kept offline and synchronized when the connection returns.
Overview
The C.I.A STOCK project consists of the design and development of a complete software ecosystem for inventory management at Construction Industrielle Africaine (C.I.A). The primary goal is to modernize technical consumables management (industrial gas, welding electrodes, tools) which was previously manual, in order to eliminate stock-outs that paralyze heavy industrial work sites (mines, cement plants, civil engineering sites).
The system shifts the company from a traditional paper-based flow to a smooth, secure, and zero-paper digital solution.
PERSISTENCE
The report identifies four main MongoDB collections:
Tech Stack
01
Cross-platform desktop console built with Electron, React (Vite), and Tailwind CSS for administration, inventory dashboards, and product management.
02
Cross-platform mobile application development (Android/iOS) with a single codebase for native performance on the field.
03
High-performance async backend utilizing Python async/await to handle load peaks and auto-generate OpenAPI/Swagger documentation.
04
NoSQL database selected for schema flexibility, ideal for indexing highly diverse technical items with different specifications.
05
Tailscale VPN connects the mobile terminal to the local PC server; communications are encrypted with WireGuard.
06
Automated generation of branded C.I.A purchase orders in PDF format using Python.
Innovations & AI
01
Local storage cache enabling inventory scanning and registration offline, with automatic synchronization upon reconnecting.
02
Dark mode designed for dim warehouses and large incremental touch buttons usable with protective work gloves.
03
End-to-end encrypted tunnels. Simple QR code scan configuration for field operators to pair devices instantly.
04
Real-time stock status calculations (Optimal, Critical, Out of Stock) with automatic check-out blocking and urgent alert systems.
05
Conceptualized AI integrations: Time-series demand forecasting (LSTM/Prophet), computer vision visual item identification (YOLO/ResNet), predictive maintenance on heavy machinery, and LLM-powered natural language inventory assistant.