A web portal for the Kenya Miller Fortification Index (KMFI), developed and maintained by TechnoServe. This application facilitates self-assessments, score tracking, and data reporting for food fortification compliance across Kenya's milling sector.
https://selfassessment.kmfi-ke.org
- Secure user authentication
- Role-based access for admins, millers, and TNS reviewers
- Dynamic SAT (Self-Assessment Tool) forms
- Score computation and IVC data management
- Commenting and approval workflows
- Real-time updates via Firestore
- Google Sheets integration (restricted to admin)
- Frontend: React.js
- Backend: Node.js 20 (Firebase Functions)
- Functions Runtime: nodejs20
- Database: Firestore (NoSQL)
- Authentication: Firebase Auth
- Storage: Firebase Cloud Storage
- Email Service: Brevo SMTP
- Deployment: Firebase Hosting
| Area | Old Setup | Current Setup |
|---|---|---|
| Functions Runtime | nodejs18 | nodejs20 |
| Local Node Version | Node 18.x | Node 20.18.2 |
| Firebase CLI | Unpinned | v15.4.0 (required) |
| Deployment Model | Firebase Functions (Gen 1) | Firebase Functions (Gen 1, upgraded runtime) |
| Architecture | Shared legacy assumptions | KMFI-isolated logic & database |
| Authentication | Firebase Auth (basic roles) | Firebase Auth (KMFI-specific access control) |
This upgrade modernizes the KMFI platform, improves security and performance, and aligns it with Firebase’s supported runtimes while maintaining backward compatibility with existing Gen 1 Functions.
See the full architecture diagram below and in docs/architecture.
KMFI-Web/
├── frontend/ # React-based frontend
├── functions/ # Firebase Functions backend (Node.js)
├── docs/ # Architecture & technical documentation
├── docs/architecture/ # Architecture diagrams
├── .firebaserc # Firebase project config
└── README.md
-
Clone the repository:
git clone https://github.com/TechnoServe/KMFI-Web.git cd KMFI-Web -
Install dependencies:
-
Frontend:
cd frontend npm install -
Backend:
cd ../functions npm install
-
-
Use correct Node version:
nvm use 20.18.2
Make sure you're using Firebase CLI version 15.4.0:
firebase --version # If needed, install a specific version: npm install -g firebase-tools@15.4.0 -
Start development servers:
-
Frontend:
firebase serve --only hosting
-
Backend (in root):
firebase emulators:start
-
- Create
.envin bothfrontend/andfunctions/with necessary variables. - Important: Do not commit sensitive files like
auth-google-sheets.json.
To be implemented.
- docs/README.md (Documentation Index)
- docs/TECH_TRAINING_MANUAL.md
- docs/HANDOVER_TECHNICAL_DOCUMENT.md
- docs/DEPLOYMENT_RUNBOOK.md
Formal PDF/Word exports are available for client handover.
MIT License – see LICENSE file for details.
For questions or support, reach out to the TechnoServe Digital team.
