Installation Guide · Step 6

Install the Mifos Web App

Configure, run, build and deploy the Angular-based Mifos user interface and connect it securely to an Apache Fineract backend.

Before installation

Prerequisites

  • A running and verified Apache Fineract backend
  • The backend API URL and tenant identifier
  • Git command-line client
  • The Node.js version required by the selected Web App source
  • npm and the project package-lock file
  • At least 4 GB RAM available for the frontend build
  • A domain or subdomain for production deployment
  • Nginx, Docker or another approved hosting method

Step-by-step

Configure and build the Mifos Web App

01

Clone the Mifos Web App repository

Download the official source and enter the project directory.

git clone https://github.com/openMF/web-app.git
cd web-app
Expected result: The web-app directory should contain package.json, package-lock.json, Angular configuration and source files.
02

Select and record the source version

Use the stable branch or a reviewed commit. Record the exact commit so the deployment can be reproduced later.

git checkout main

git branch --show-current
git rev-parse HEAD
git describe --tags --always
Expected result: The active branch and exact Git commit should be recorded in your deployment register.
03

Review the Node.js and Angular requirements

Inspect the project files before installing dependencies. Do not assume an arbitrary Node.js version.

cat package.json | sed -n '1,220p'

grep -n "\"engines\"" package.json
grep -n "\"@angular/core\"" package.json
grep -n "\"@angular/cli\"" package.json
Expected result: The package file should show the Angular dependencies, scripts and any declared Node.js requirements.
04

Confirm Node.js and npm

Verify that the installed versions match the requirements of the selected source version.

node --version
npm --version
Expected result: Both commands should return supported versions without errors.
05

Install locked dependencies

Use npm ci when package-lock.json is available so the dependency tree remains reproducible.

npm ci
Expected result: Dependencies should install successfully without modifying package-lock.json.
06

Locate the environment configuration

Find the files that define the Apache Fineract API URL, tenant and production configuration.

find src -maxdepth 5 -type f \
  \( -name "environment*.ts" -o -name "*.json" \) \
  -print | sort

grep -R "baseApiUrl\|apiUrl\|tenantIdentifier" -n src 2>/dev/null | head -80
Expected result: You should identify the configuration file or runtime configuration used for the backend connection.
07

Configure the Apache Fineract backend

Set the backend hostname, API path, tenant identifier and HTTPS settings required by your deployment.

grep -R "localhost\|8443\|fineract-provider" -n \
  src environments* 2>/dev/null | head -100
Expected result: Review every matching configuration before replacing local or demonstration backend URLs.
08

Start the development server

Run the frontend locally and connect it to the verified Apache Fineract backend.

npm start
Expected result: The Angular development server should start and display the local browser URL.
09

Create a production build

Run the production build after verifying the frontend configuration and backend connection.

npm run build
Expected result: The build should complete successfully and create the compiled frontend output directory.
10

Inspect the production output

Locate the generated browser files before copying them to Nginx or packaging them in a Docker image.

find dist -maxdepth 3 -type f | sed -n '1,120p'
du -sh dist
Expected result: The dist directory should contain index.html, JavaScript bundles, styles and static assets.

Backend connection

Verify the frontend-to-backend connection

Validation areaWhat to check
Backend healthConfirm the Apache Fineract health endpoint responds before testing the Web App.
API hostnameConfirm the frontend points to the intended development, staging or production backend.
HTTPSUse valid HTTPS certificates in production and avoid browser mixed-content errors.
TenantConfirm the configured tenant identifier exists and matches the backend.
AuthenticationVerify login credentials, authentication mode, roles and permissions.
CORS and proxyConfirm the reverse proxy and backend permit requests from the frontend domain.

Production hosting

Deploy the compiled Web App with Nginx

Deploy only the compiled frontend files. Keep the source repository and build tools separate from the public web root.

1

Create the web root

sudo mkdir -p /var/www/mifos-web-app
sudo chown -R $USER:$USER /var/www/mifos-web-app
2

Copy the compiled frontend

sudo cp -a dist/. /var/www/mifos-web-app/
3

Create the Nginx configuration

sudo nano /etc/nginx/sites-available/mifos-web-app
4

Enable and verify Nginx

sudo ln -s /etc/nginx/sites-available/mifos-web-app \
  /etc/nginx/sites-enabled/mifos-web-app

sudo nginx -t
sudo systemctl reload nginx
Example Nginx server block
server {
    listen 80;
    server_name mifos.example.com;

    root /var/www/mifos-web-app;
    index index.html;

    location / {
        try_files $uri $uri/ /index.html;
    }

    location ~* \.(js|css|png|jpg|jpeg|gif|svg|ico|woff|woff2)$ {
        expires 7d;
        add_header Cache-Control "public";
        try_files $uri =404;
    }
}
Replace the example domain and confirm the actual generated build directory before copying files.

Troubleshooting

Common Web App problems

npm ci fails

Confirm the supported Node.js version, delete only node_modules if necessary, and retain the committed package-lock.json.

Frontend opens but login fails

Check the API URL, tenant identifier, credentials, authentication mode and Apache Fineract logs.

CORS error in the browser

Use a reverse proxy or configure the backend and frontend domains according to the selected deployment architecture.

Mixed-content error

Ensure both the frontend and Apache Fineract API use HTTPS in production.

404 after refreshing a page

Configure Nginx to serve index.html for Angular client-side routes.

Blank page after deployment

Inspect the browser console, asset paths, base href, environment configuration and Nginx document root.

Production readiness

Frontend deployment checklist

  • Record the exact Web App Git commit
  • Record the tested Apache Fineract version
  • Use npm ci and retain package-lock.json
  • Use a production-specific backend URL
  • Use valid HTTPS for frontend and backend
  • Configure Angular route fallback in Nginx
  • Apply appropriate security headers
  • Do not expose source maps unless required
  • Test every important user role
  • Test clients, loans, accounting and reports
  • Run browser and mobile-responsive testing
  • Retain the previous frontend build for rollback