How omkarok2510/optimzation_assign_system works
Project Type and Purpose
• This is a full-stack, modular monolith web application built in Python (Flask), with AI/ML and blockchain sub-modules, plus a Telegram Bot integration. Its goal is to assign tasks/resources optimally via a web dashboard and chat interface.
Main Components
a. Presentation Layer
• Web UI (templates/dashboard.html, advanced_dashboard.html)
• Telegram Bot Interface (telegram_bot.py)
b. Application Layer
• Flask App (app.py) – handles HTTP routes, API endpoints, orchestrates logic
• Business Logic Sub-modules:
– AI Module (ai/predictive.py, ai/federated.py)
– Blockchain Module (blockchain/ledger.py)
c. Data Layer
• Relational Database (complaints.db – SQLite)
• Logging System (digital_twin_log.txt)
d. External Services
• Telegram API
• (Optional) Future DB backends (MySQL/PostgreSQL)
Interactions and Data Flows
• Users → Web Browser → HTTP(S) → Flask App →
• Queries/Updates DB
• Invokes AI Module for optimization calculations
• Calls Blockchain Module to record transaction/assignment proofs
• Logs events to digital_twin_log.txt
← Renders Dashboard HTML
• Telegram User → Telegram API → telegram_bot.py → internally forwards requests to Flask App or directly uses AI/Blockchain modules → sends replies back to Telegram API
Architectural Patterns & Principles
• Layered Architecture (Presentation / Application / Data)
• Modularization: Separate folders for ai/ and blockchain/ keep independent concerns
• Single-process monolith currently, but components can be extracted into microservices later
• Use clear abstraction boundaries: API layer, service layer, data access layer