This repo is for the React version of the Mifos-X web-app.
It is currently work in progress and not recommended for deployment.
The main branch contains release code.
All PRs should be submitted to the dev branch first, and will be merged to main at a release.
This project is part of Google Summer of Code 2025 under The Mifos Initiative.
- React + TypeScript β Frontend architecture
- Tailwind CSS + ShadCN UI β UI and styling
- Redux Toolkit β Global state management
- Vite β Build tool
- Fineract API (OpenAPI-generated client) β Backend integration
src/
βββ app/ # Redux store setup (slices, providers)
βββ assets/ # Static assets (images, logos, etc.)
βββ components/ # Reusable UI components
β βββ custom/ # Feature-specific ShadCN components
β βββ styles/ # Custom styles and overrides
β βββ ui/ # Core ShadCN UI elements
βββ fineract-api/ # OpenAPI-generated Fineract client
βββ hooks/ # Custom React hooks
βββ layout/ # Navbar, sidebar, app shell components
βββ lib/ # API clients, helper utilities
βββ pages/ # Route-based page components (contains all the pages)
βββ router/ # React Router setup
βββ App.tsx # Root component
βββ index.css # Global styles (Tailwind base layer)
βββ main.tsx # React entry point
βββ vite-env.d.ts # Vite TypeScript definitions
root/
βββ fineract.yaml # OpenAPI spec for Fineract
βββ openapitools.json # OpenAPI generator config
βββ components.json # ShadCN CLI config
βββ index.html # App HTML shell
βββ .eslintrc.js # Linting rules
βββ .gitignore- A working Apache Fineract backend running locally
- Node.js and npm installed
# 1. Clone the repository
git clone https://github.com/openMF/mifos-x-web-app-react.git
# 2. Move into the project directory
cd mifos-x-web-app-react
# 3. Install dependencies
npm install
# 4. Generate the Fineract API client from OpenAPI spec
npm run generate-sdk
# 5. Start the development server
npm run devRun the complete stack (web app + Fineract backend + database):
# 1. Copy and configure environment file
cp .env.docker.sample .env.docker
# Edit .env.docker with your database passwords
# 2. Start all services
docker compose -f docker-compose-zitadel.yml up -d
# 3. Access the application
# Web App: http://localhost:10706
# Fineract API: https://localhost:3000For production with security hardening and resource limits:
docker compose -f docker-compose-zitadel.yml -f docker-compose.prod.yml up -dThe production overlay requires TLS on both database connections
(sslmode=verify-full). Before starting it, place ca.crt, server.crt,
server.key and a pg_hba.conf in the directory given by POSTGRES_TLS_DIR,
and the same ca.crt in FINERACT_TLS_DIR. The server certificate must carry a
subject alternative name of fineractpostgres. A starting point for the hba
file is provided at fineract-db/tls/pg_hba.conf.sample, which refuses any
connection that is not encrypted.
Pull and run the latest image from Docker Hub:
docker pull mifos/web-app-react:latest
docker run -d -p 80:80 \
-e FINERACT_API_URL=https://your-fineract-server:8443 \
-e FINERACT_API_PROVIDER=/fineract-provider \
-e FINERACT_PLATFORM_TENANT_IDENTIFIER=default \
--name mifos-web-app \
mifos/web-app-react:latestdocker build -t mifos/web-app-react:custom .Docker Features:
- Multi-stage build for optimized image size (~50MB)
- Nginx web server with security headers
- Runtime environment variable configuration
- Non-root user for enhanced security
- Health checks included
- Multi-platform support (linux/amd64, linux/arm64)
For Docker environment variables, see .env.docker.sample.
The application uses environment variables for configuration. Copy .env.sample to .env or .env.development.local and adjust the values as needed.
| Variable | Description | Default |
|---|---|---|
VITE_FINERACT_API_URL |
Base URL for the Fineract server (protocol + host + port) | https://localhost:3000 |
VITE_FINERACT_API_PROVIDER |
API path prefix | /fineract-provider |
VITE_FINERACT_API_VERSION |
API version path | /api |
VITE_FINERACT_PLATFORM_TENANT_IDENTIFIER |
Tenant identifier for multi-tenant deployments | default |
VITE_FINERACT_PLATFORM_TENANTS_IDENTIFIER |
More tenants to offer on the sign-in page, comma separated | (empty) |
VITE_MIFOS_SESSION_IDLE_TIMEOUT |
Sign out after this many ms without activity (0 = off) | 300000 |
Note: In development,
.env.developmentintentionally leavesVITE_FINERACT_API_URLempty so requests use relative URLs and go through the Vite dev proxy, which forwards/fineract-provider/*to the value above (seevite.config.ts).3000is the host port the Docker Compose stack publishes for Fineract. Only override this if you run Fineract yourself on another port.
.env.developmentalso setsVITE_MIFOS_SESSION_IDLE_TIMEOUT=0, so the dev server never signs you out for inactivity. To test the idle timeout locally, set a value such as60000in.env.development.local.
If running Apache Fineract manually (e.g., on https://localhost:8443):
-
Create a file:
.env.development.local -
Add the below configurations
# .env.development.local
VITE_FINERACT_API_URL=https://localhost:8443
VITE_FINERACT_API_PROVIDER=/fineract-provider
VITE_FINERACT_API_VERSION=/api
VITE_FINERACT_PLATFORM_TENANT_IDENTIFIER=default
VITE_FINERACT_PLUGIN_OIDC_ENABLED=falseNote: Files ending in
.localare ignored by git and should be used for machine-specific configuration.
Mifos X Copilot is an AI assistant panel. It is off by default and needs the Copilot gateway from openMF/mcp-mifosx. The web app only talks to that gateway, with the signed-in officer's own credential. It never holds an AI key and never chooses the AI model.
| Variable | Description | Default |
|---|---|---|
VITE_MIFOS_ENABLE_COPILOT |
Turn the Copilot on | false |
VITE_MIFOS_COPILOT_MCP_BASE_URL |
Gateway URL (https, or mock for a demo) |
(empty) |
The launcher appears only when the Copilot is on and the gateway URL is
set. With the URL empty, or not https, it stays hidden and the browser
console says why. http://localhost is accepted by the dev server only.
# .env.development.local
VITE_MIFOS_ENABLE_COPILOT=true
VITE_MIFOS_COPILOT_MCP_BASE_URL=mockmock plays recorded sample answers and marks the panel Demo. Nothing in
them comes from Fineract, so do not use it in production.
In a checkout of openMF/mcp-mifosx (Java 21+):
cd gateway
# Allow this app's dev server, and point at the same Fineract this app uses
export COPILOT_ALLOWED_ORIGINS=http://localhost:5173
export FINERACT_BASE_URL=https://your-fineract-host
./mvnw spring-boot:run # scripted AI, real Fineract reads
COPILOT_LLM_PROVIDER=groq COPILOT_LLM_API_KEY=gsk_... ./mvnw spring-boot:run
COPILOT_LLM_PROVIDER=ollama COPILOT_LLM_MODEL=qwen3:8b ./mvnw spring-boot:run # model on your machineThen, in this app:
# .env.development.local
VITE_MIFOS_ENABLE_COPILOT=true
VITE_MIFOS_COPILOT_MCP_BASE_URL=http://localhost:8090Things that commonly go wrong:
- Nothing happens, CORS error in the console: the app's origin is missing
from
COPILOT_ALLOWED_ORIGINS. - "Configuration mismatch": the gateway's
FINERACT_BASE_URLis a different server from the one this app signed in to. They must match, so the Copilot can never act on another institution's data. - Every lookup fails: the gateway's
FINERACT_API_PATHdoes not match how that Fineract publishes its API.
The AI provider and model (COPILOT_LLM_PROVIDER, COPILOT_LLM_MODEL,
COPILOT_LLM_API_KEY, COPILOT_LLM_BASE_URL) are gateway settings; see the
gateway README.
Contributions are welcome to improve the project.
- Please read the Contributing Guide before making a PR.
- For OpenAPI-related issues, check Issues.