Electronics assembly manufacturing (Laptops/Smartphones) require highly precise inventory tracking and transaction-safe operations. This ERP is designed to eliminate human errors and data mismatches on the production floor by automating the entire lifecycle of raw component replenishment, recipe configuration, hardware assembly validation, and customer sales.
The Technical Architecture
The project is built upon Clean Architecture (Decoupled Layers) to ensure the business logic remains independent of external frameworks, databases, and APIs.
- Domain (Core): Houses the pure business entities (Products, Suppliers, BOMs, AssemblyOrders, Customers, SalesOrders) and basic validations.
- Application (Business Rules): Manages DTOs, AutoMapper profiles, Service contracts, and business logic execution.
- Infrastructure (Data/External): Implements the Entity Framework Core DbContext, migrations, Token Services, and data persistence logic.
- Web API (Presentation): Exposes secure, role-restricted REST endpoints integrated with Swagger UI for developer access.
Key Core Engines Developed
- Automated Production & Assembly Engine (BOM):
- A dynamic "recipe" system that checks component stock levels against nested Bill of Materials before executing an assembly. If parts are available, stock is deducted from raw materials and added to the finished goods inventory atomically under a single Unit of Work transaction.
- Custom Identity & Role-Based Security (RBAC):
- Engineered a custom, lightweight identity system. User passwords are encrypted using HMACSHA512 hashing and unique cryptographic salts. API access is fully restricted using JWT Bearer Tokens corresponding to system roles:
- Admin: Full system visibility and setup control.
- ProductionManager: Authorized to configure BOMs and trigger factory assemblies.
- StockManager: Controls supplier procurement and inventory logs.
- Invoicing & Stock Deductions Loop (Sales):
- Handles complex nested Sales Orders. Selling an assembled laptop dynamically checks stock, fetches prices from the database, deducts finished goods inventory, and logs the customer revenue.
- Real-time Analytics Dashboard:
- Aggregates live database records using advanced LINQ grouping and calculations to present factory heads with total revenues, active sales, assembly success/failure metrics, and low-stock alerts.
Key Takeaways & System Performance
- Highly scalable codebase due to strict separation of concerns.
- Zero data leaks during failures thanks to the atomic Unit of Work pattern.
- Complete circular supply-chain coverage.