How mgriot/dataentrykpi works
Project type and purpose
• This is a desktop/web dashboard application (“dataentryKPI”) for visualizing and analyzing data‐entry KPIs.
• It offers two UI flavors—Streamlit (web) and Tkinter (desktop)—for charting, filtering, performance tracking, and data export of Excel-based sources.
File structure
• Top-level: README, requirements.txt.
• src/
• app_streamlit.py – Streamlit UI entrypoint
• app_tkinter.py – Tkinter UI entrypoint
• main.py – Orchestrates the workflow between UI, data loading, processing, and export
• database_manager.py – Reads, parses, and filters Excel data into in-memory structures (e.g., pandas DataFrames)
• export_manager.py – Exports processed data to CSV, Excel, etc.
README for additional insights
• Dependencies: pandas, streamlit, openpyxl (implicit).
• Usage: “streamlit run …” for web, place Excel files in a data directory, then filter via UI.
• Customization: add KPIs, modify filters, tweak layout in the Python code.
a. Main components
1. UI Layer
• Streamlit App (app_streamlit.py)
• Tkinter App (app_tkinter.py)
2. Business Logic Layer
• main.py (controller/orchestrator)
3. Data Access Layer
• database_manager.py (Excel reader, filter functions)
4. Export Layer
• export_manager.py (CSV/Excel writer)
5. Data Source
• Raw Excel files
6. External Libraries
• pandas, openpyxl, streamlit, tkinter, etc.
b. Relationships and interactions
1. User → selects UI (Streamlit/Tkinter) → triggers main.py
2. main.py → invokes database_manager to load and filter Excel data
3. Processed data → returned to main.py → passed to UI for rendering charts & tables
4. User export action → main.py → invokes export_manager → writes CSV/Excel
5. Data flow is unidirectional: UI → controller → data layer → controller → UI/export
c. Architectural patterns/design principles
• Modular separation (UI / controller / data access / export) reminiscent of MVC
• Single responsibility for each module
• Pluggable UI backends (Streamlit vs Tkinter) share the same core logic
d. Key technologies/frameworks
• streamlit for web UI
• tkinter for desktop UI
• pandas & openpyxl for Excel I/O and data manipulation
• standard Python modules and packaging (requirements.txt)