From b289fbe3cec593167c37643bf84e90a4a11f3518 Mon Sep 17 00:00:00 2001 From: Shubham Kumar Date: Mon, 23 Feb 2026 02:45:10 +0530 Subject: [PATCH] WEB-757 refactor: update default API endpoint to demo.mifos.community (#3202) docs: address PR feedback in README.md Removed duplicate demo entry and updated stale reference from sandbox to demo environment. --- README.md | 31 ++++++++++++++-------------- docker-compose.yml | 2 +- docs/backend-proxy.md | 10 ++++----- env.sample | 2 +- proxy.conf.js | 2 +- src/environments/environment.prod.ts | 3 +-- src/environments/environment.ts | 3 +-- 7 files changed, 25 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 486df9db5..00605e431 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Mifos® X Web App is a modern single-page application (SPA) built on top of the ## Quick Links -- [Live Demo](https://sandbox.mifos.community/#/login) (Updated nightly — sandbox data is reset every 6 hours; test data and transient state may be cleared.) +- [Live Demo](https://demo.mifos.community/#/login) (Updated nightly — sandbox data is reset every 6 hours; test data and transient state may be cleared.) - [GitHub Repository](https://github.com/openMF/web-app) - [Slack Channel](https://app.slack.com/client/T0F5GHE8Y/CJJGJLN10) - [Jira Board of Mifos](https://mifosforge.jira.com/jira/your-work) @@ -31,8 +31,7 @@ Before installing the web app, you need to set up the Apache Fineract® backend 1. **Choose ONE of these backend options:** - **Option A: Use existing remote server** - - Use the [sandbox (MariaDB)](https://sandbox.mifos.community) — sandbox data is reset every 6 hours; test data and transient state may be cleared. - - Use the [demo (MariaDB)](https://demo.mifos.community) + - Use the [demo (MariaDB)](https://demo.mifos.community) — sandbox data is reset every 6 hours; test data and transient state may be cleared. - Use the [demo (Keycloak)](https://oauth.mifos.community) - Use the [demo (2FA)](https://2fa.mifos.community) - Use the [demo (Oidc)](https://oidc.mifos.community) @@ -140,9 +139,9 @@ The web app includes a proxy configuration (`proxy.conf.js`) that allows you to By default, the proxy forwards `/fineract-provider` requests to the Mifos sandbox environment: -- **Target:** `https://sandbox.mifos.community` -- **API Endpoint:** `https://apis.mifos.community` (exposed in the sandbox) -- **System Reset:** Sandbox test data and transient state are reset every 6 hours (expect data to be periodically cleared). +- **Target:** `https://demo.mifos.community` +- **API Endpoint:** `https://apis.mifos.community` (exposed in the demo environment) +- **System Reset:** Demo test data and transient state are reset every 6 hours (expect data to be periodically cleared). **Sandbox Environment Variables:** @@ -197,10 +196,10 @@ To verify the proxy is working correctly, start the development server (`ng serv curl -i "http://localhost:4200/fineract-provider/api/v1/runreports/FullClientReport?R_officeId=1&output-type=HTML&R_loanOfficerId=-1" ``` -Expected: HTTP 200 response with proxied data from the sandbox. Server console shows: +Expected: HTTP 200 response with proxied data from the demo environment. Server console shows: ```text -[Proxy] Proxying: GET /fineract-provider/api/v1/runreports/... -> https://sandbox.mifos.community/api/v1/runreports/... +[Proxy] Proxying: GET /fineract-provider/api/v1/runreports/... -> https://demo.mifos.community/api/v1/runreports/... ``` **Simulated proxy error (backend unreachable):** @@ -215,7 +214,7 @@ If the backend is unreachable or returns an error, the proxy returns HTTP 502: Server console (example): ```text -[Proxy] Error while proxying request: GET /fineract-provider/... -> https://sandbox.mifos.community - ECONNREFUSED +[Proxy] Error while proxying request: GET /fineract-provider/... -> https://demo.mifos.community - ECONNREFUSED ``` HTTP response: @@ -235,13 +234,13 @@ All these environment variables can be set when using Docker or Docker Compose: #### Fineract Backend Settings -| Variable | Description | Default Value | -| ------------------------------------ | -------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| FINERACT_API_URLS | Fineract server list | https://sandbox.mifos.community,https://demo.mifos.community,https://localhost:8443 | -| FINERACT_API_URL | Default Fineract server | https://localhost:8443 | -| FINERACT_API_ACTUATOR | Default Fineract Actuator endpoint | /fineract-provider | -| FINERACT_PLATFORM_TENANT_IDENTIFIER | Default tenant identifier (must align with Fineract `tenants` table) | default | -| FINERACT_PLATFORM_TENANTS_IDENTIFIER | Tenant identifier list (must align with Fineract `tenants` table) | - | +| Variable | Description | Default Value | +| ------------------------------------ | -------------------------------------------------------------------- | --------------------------------------------------- | +| FINERACT_API_URLS | Fineract server list | https://demo.mifos.community,https://localhost:8443 | +| FINERACT_API_URL | Default Fineract server | https://localhost:8443 | +| FINERACT_API_ACTUATOR | Default Fineract Actuator endpoint | /fineract-provider | +| FINERACT_PLATFORM_TENANT_IDENTIFIER | Default tenant identifier (must align with Fineract `tenants` table) | default | +| FINERACT_PLATFORM_TENANTS_IDENTIFIER | Tenant identifier list (must align with Fineract `tenants` table) | - | #### Language Settings (i18n) diff --git a/docker-compose.yml b/docker-compose.yml index 5f0bb0086..1b57259e2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,7 +15,7 @@ services: ports: - '4200:80' environment: - - FINERACT_API_URLS=https://sandbox.mifos.community,https://demo.mifos.community,https://localhost:8443 + - FINERACT_API_URLS=https://demo.mifos.community,https://localhost:8443 - FINERACT_API_URL=https://localhost:8443 - FINERACT_API_PROVIDER=/fineract-provider/api - FINERACT_API_VERSION=/v1 diff --git a/docs/backend-proxy.md b/docs/backend-proxy.md index 46e8ffa60..564f3a550 100644 --- a/docs/backend-proxy.md +++ b/docs/backend-proxy.md @@ -19,7 +19,7 @@ The interesting part is there: const proxyConfig = [ { context: ['/fineract-provider'], - target: 'https://sandbox.mifos.community', + target: 'https://demo.mifos.community', pathRewrite: { '^/fineract-provider': '' }, changeOrigin: true, secure: true, @@ -42,8 +42,8 @@ const proxyConfig = [ ``` This forwards requests sent to `/fineract-provider/...` on the dev server to the Fineract backend root (for example, -`/fineract-provider/1.0/...` becomes `https://sandbox.mifos.community/1.0/...`). Use `pathRewrite` to strip the prefix -because the sandbox exposes Fineract APIs at the root path. +`/fineract-provider/1.0/...` becomes `https://demo.mifos.community/1.0/...`). Use `pathRewrite` to strip the prefix +because the demo exposes Fineract APIs at the root path. **Error Handling:** @@ -55,7 +55,7 @@ The `onError` handler captures proxy failures (network errors, backend unreachab Example server console output when proxy fails: ```text -[Proxy] Error while proxying request: GET /fineract-provider/api/v1/clients -> https://sandbox.mifos.community - ECONNREFUSED +[Proxy] Error while proxying request: GET /fineract-provider/api/v1/clients -> https://demo.mifos.community - ECONNREFUSED ``` Example client response: @@ -81,7 +81,7 @@ the dev server forward requests through a corporate proxy when required. **Behavior:** - **When `HTTP_PROXY` is set:** Logs `"Using proxy server: "` and configures the agent for corporate proxy forwarding -- **When `HTTP_PROXY` is not set:** Logs `"No proxy server configured. API requests will not be proxied."` — note that this refers only to corporate proxy forwarding; the Angular dev server proxy (forwarding `/fineract-provider` to the sandbox) still works normally +- **When `HTTP_PROXY` is not set:** Logs `"No proxy server configured. API requests will not be proxied."` — note that this refers only to corporate proxy forwarding; the Angular dev server proxy (forwarding `/fineract-provider` to the demo) still works normally See `proxy.conf.js` for the exact implementation. diff --git a/env.sample b/env.sample index 0d00c6c6b..746aaa826 100644 --- a/env.sample +++ b/env.sample @@ -1,6 +1,6 @@ # Fineract URLs list delimited by colon -FINERACT_API_URLS=https://sandbox.mifos.community,https://demo.mifos.community,https://localhost:8443 +FINERACT_API_URLS=https://demo.mifos.community,https://localhost:8443 FINERACT_API_URL=https://localhost:8443 diff --git a/proxy.conf.js b/proxy.conf.js index c138af69a..dda6cde79 100644 --- a/proxy.conf.js +++ b/proxy.conf.js @@ -19,7 +19,7 @@ const { HttpsProxyAgent } = require('https-proxy-agent'); const proxyConfig = [ { context: ['/fineract-provider'], - target: 'https://sandbox.mifos.community', + target: 'https://demo.mifos.community', pathRewrite: { '^/fineract-provider': '' }, changeOrigin: true, secure: true, diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index d17ab78c9..0dd73a521 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -23,8 +23,7 @@ export const environment = { fineractPlatformTenantIds: loadedEnv['fineractPlatformTenantIds'] || 'default', // For connecting to others servers running elsewhere update the base API URL baseApiUrls: - loadedEnv['fineractApiUrls'] || - 'https://sandbox.mifos.community,https://demo.mifos.community,https://localhost:8443,' + window.location.origin, + loadedEnv['fineractApiUrls'] || 'https://demo.mifos.community,https://localhost:8443,' + window.location.origin, // For connecting to server running elsewhere set the base API URL baseApiUrl: loadedEnv['fineractApiUrl'] || diff --git a/src/environments/environment.ts b/src/environments/environment.ts index dfb110ec5..78ef11632 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -26,8 +26,7 @@ export const environment = { fineractPlatformTenantIds: loadedEnv.fineractPlatformTenantIds || 'default', // For connecting to others servers running elsewhere update the base API URL baseApiUrls: - loadedEnv.fineractApiUrls || - 'https://sandbox.mifos.community,https://demo.mifos.community,https://localhost:8443,' + window.location.origin, + loadedEnv.fineractApiUrls || 'https://demo.mifos.community,https://localhost:8443,' + window.location.origin, // For connecting to server running elsewhere set the base API URL baseApiUrl: loadedEnv.fineractApiUrl ||