A Machine Learning-Based Financial Distress Prediction System for Small and Medium Enterprises in Zambia
# FinWatch Zambia
> **ML-Based Financial Distress Prediction System for Zambian SMEs**
---
## Overview
**FinWatch Zambia** is a production-deployed, full-stack machine learning system designed to predict financial distress in Small and Medium Enterprises (SMEs) within Zambia. It features a dual-portal architecture serving both business owners and institutional oversight bodies, combining classical financial ratio analysis with SHAP-based explainability and a multi-tier NLP narrative engine.
The system is fully cross-platform, available as a professional web portal and a native Android application, featuring robust 30-day persistent sessions and a hardened environment-aware API.
Developed as a Bachelor of Science in Computing (BSc BCOM) dissertation project at **Cavendish University Zambia**, 2026.
---
## Key Features
- **Institutional Umbrella Architecture**
- **SME Portal**: Company profile management, financial data submission, interpreted risk assessments, and prediction history with robust persistence.
- **Regulator Portal**: Accessible via `/regulator`. Full systemic oversight, monthly distress trends, and anonymised anomaly flags (Emerald Theme).
- **Policy Analyst Portal**: Accessible via `/analyst`. Read-only aggregate sector analytics and strategic reporting (Blue Theme).
- **Native Mobile Experience**: Fully integrated with **Capacitor** for Android. Includes unclipped adaptive icons, native splash screen API integration, and mobile-optimized navigation.
- **Robust Persistence Layer**:
- **Persistent Sessions**: Mobile-only 30-day JWT sessions using dual-layer async storage (@capacitor/preferences + native file system).
- **Prediction Persistence**: Retains manual financial inputs and extracted metrics across refreshes and navigations via `localStorage`.
- **Explainable AI (XAI)**: Per-prediction SHAP attributions and global feature importance rankings. RANDOM_FOREST predictions take precedence on model disagreement.
- **Environment-Awa …