Professional PySide6 water balance management application for Trans Africa Resources
A comprehensive water balance management system featuring:
- Interactive Flow Diagrams - Visual representation of water flows with drag-and-drop editing
- Real-time Dashboard - KPI cards showing storage facilities, capacity, utilization
- Calculation Engine - Water balance calculations with error tracking
- Data Integration - Excel import/export, database storage
- Licensing + Updates - License validation with update checks
- Notifications - In-app message and notification center
- Professional UI - Modern PySide6 interface with dark/light themes
- Python 3.10 or higher
- Windows 10/11
# Clone the repository
git clone https://github.com/Caliphsdev/Water-Balance-Application.git
cd Water-Balance-Application
# Create virtual environment
python -m venv .venv
.venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run the application
python src/main.py- Storage Facilities - Count of active facilities from database
- Total Capacity - Combined capacity in Mm³
- Current Volume - Live volume readings
- Utilization - Percentage utilization with status indicators
- Environmental KPIs - Rainfall and evaporation data
- Interactive node placement and editing
- Orthogonal edge routing (90° angles)
- 17 anchor points per node for precise connections
- Color-coded flow types (clean, dirty, recirculation)
- Real-time balance calculations
- Monthly water balance calculations
- Inflow/outflow tracking
- Recirculation monitoring
- Balance error detection with status indicators
- Borehole and PCD monitoring dashboards
- Message center with notification updates
- License validation on startup (fail-closed)
- Runtime license revalidation every 15 minutes (configurable)
- Runtime checks run in background so UI remains responsive
- Background update checks with download prompts
dashboard_waterbalance/
├── src/
│ ├── main.py # Application entry point
│ ├── ui/ # PySide6 UI components
│ │ ├── main_window.py # Main application window
│ │ ├── dashboards/ # Page controllers
│ │ ├── dialogs/ # Modal dialogs
│ │ └── components/ # Reusable widgets
│ ├── services/ # Business logic layer
│ ├── database/ # SQLite database access
│ └── models/ # Pydantic data models
├── config/ # YAML configuration files
├── data/ # Diagrams, database files
├── tests/ # pytest test suite
├── Docs/ # Documentation
└── .github/ # Copilot instructions, skills
# Run all tests
pytest tests/ -v
# Run with coverage
pytest tests/ --cov=src
# Run specific test
pytest tests/test_storage_facilities_backend.py -vSee Docs/INDEX.md for complete documentation including:
- User data is stored in
%LOCALAPPDATA%\WaterBalanceDashboardfor packaged builds. - Local config lives in
config/app_config.yamland is copied to the user folder on first run.
| Component | Technology |
|---|---|
| UI Framework | PySide6 (Qt for Python) |
| Database | SQLite |
| Data Processing | pandas, numpy |
| Excel Integration | openpyxl |
| Configuration | PyYAML, Pydantic |
| Testing | pytest, pytest-qt |
| Packaging | PyInstaller |
Proprietary - Trans Africa Resources
- This application uses PySide6 (Qt for Python) and related Qt libraries.
- Third-party notices are provided in
THIRD_PARTY_LICENSES.txt. - Bundled Qt/PySide license texts are provided in
licenses/qt/for distribution builds. - Packaging excludes Qt Virtual Keyboard binaries/plugins to avoid accidental GPL-only module distribution in standard builds.
- Startup is fail-closed when licensing system is unavailable.
- Splash screen is hidden before any licensing modal is shown.
- Runtime recheck interval is configured by
licensing.runtime_check_interval_seconds(default900). - Offline token defaults are production-safe (
license.offline_validity_days, fallback30days). - Blocked states:
expired,revoked,hwid_mismatch,invalid,clock_tamper,system_unavailable.
- Development Team - Caliphsdev
Last Updated: February 2026