How ashwinjo/ixinventorymanagement works
Main Components
• User Browser (UI client)
• Docker Host / Container
• Flask Application (myapp.py + app/ package)
– Controllers (routes in myapp.py and app/__init__.py)
– Views / Templates (app/templates/*.html)
– Static Assets (app/static/css, js, img)
• Background Data Poller (data_poller.py)
• Database Layer
– SQLite (init_db.py, sqlite3_utilities.py, db_queries.py)
• External Services (IxOS REST APIs)
– chassis swagger endpoints (chassis, platform)
• Utility Modules
– RestApi/IxOSRestInterface.py for wrapping external calls
– IxOSRestCallerModifier.py for request customization
Relationships & Data Flows
• Browser → HTTP Requests → Flask App
– GET/POST routes render templates or return JSON
• Flask App → Local SQLite
– Reads from / writes to DB via db_queries.py
• Flask App → RestApi Module
– On‑demand calls to IxOS REST via IxOSRestInterface
• Data Poller (scheduled or on‑demand) → RestApi Module → SQLite
– Periodic polling imports chassis/card/port/license data
• Shell Script (runApplication.sh) → Docker Entry
– Boots the Flask server inside container
Architectural Patterns
• MVC‑like separation
– Models: SQLite + db_queries layer
– Views: Jinja2 templates under app/templates
– Controllers: Flask routes in myapp.py
• Repository / Adapter pattern
– IxOSRestInterface abstracts external API details
– sqlite3_utilities abstracts direct SQL calls
• Containerization
– Single Dockerfile mounts code, exposes port 3000
• Background Worker vs Web Worker separation
– data_poller runs asynchronously vs request‑driven Flask
Technologies & Frameworks
• Python 3.x, Flask
• Jinja2 templating, JavaScript/CSS static assets
• SQLite database
• Docker container (Dockerfile, runApplication.sh)
Detail‑Capture Checklist
• User flows: login (if any), data‑view, CSV download
• Background flows: periodic data refresh, log collection
• Docker start process: runApplication.sh invokes Flask
• Configuration: RestApi/requirements.txt, root requirements.txt
• Clearly separates UI, application logic, data store, background jobs, and external services
• Shows how data moves through the system synchronously and asynchronously
• Highlights key design patterns and technologies