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.
This commit is contained in:
@@ -12,7 +12,7 @@ Mifos® X Web App is a modern single-page application (SPA) built on top of the
|
|||||||
|
|
||||||
## Quick Links
|
## 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)
|
- [GitHub Repository](https://github.com/openMF/web-app)
|
||||||
- [Slack Channel](https://app.slack.com/client/T0F5GHE8Y/CJJGJLN10)
|
- [Slack Channel](https://app.slack.com/client/T0F5GHE8Y/CJJGJLN10)
|
||||||
- [Jira Board of Mifos](https://mifosforge.jira.com/jira/your-work)
|
- [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:**
|
1. **Choose ONE of these backend options:**
|
||||||
- **Option A: Use existing remote server**
|
- **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) — 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 (Keycloak)](https://oauth.mifos.community)
|
- Use the [demo (Keycloak)](https://oauth.mifos.community)
|
||||||
- Use the [demo (2FA)](https://2fa.mifos.community)
|
- Use the [demo (2FA)](https://2fa.mifos.community)
|
||||||
- Use the [demo (Oidc)](https://oidc.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:
|
By default, the proxy forwards `/fineract-provider` requests to the Mifos sandbox environment:
|
||||||
|
|
||||||
- **Target:** `https://sandbox.mifos.community`
|
- **Target:** `https://demo.mifos.community`
|
||||||
- **API Endpoint:** `https://apis.mifos.community` (exposed in the sandbox)
|
- **API Endpoint:** `https://apis.mifos.community` (exposed in the demo environment)
|
||||||
- **System Reset:** Sandbox test data and transient state are reset every 6 hours (expect data to be periodically cleared).
|
- **System Reset:** Demo test data and transient state are reset every 6 hours (expect data to be periodically cleared).
|
||||||
|
|
||||||
**Sandbox Environment Variables:**
|
**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"
|
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
|
```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):**
|
**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):
|
Server console (example):
|
||||||
|
|
||||||
```text
|
```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:
|
HTTP response:
|
||||||
@@ -236,8 +235,8 @@ All these environment variables can be set when using Docker or Docker Compose:
|
|||||||
#### Fineract Backend Settings
|
#### Fineract Backend Settings
|
||||||
|
|
||||||
| Variable | Description | Default Value |
|
| Variable | Description | Default Value |
|
||||||
| ------------------------------------ | -------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
| ------------------------------------ | -------------------------------------------------------------------- | --------------------------------------------------- |
|
||||||
| FINERACT_API_URLS | Fineract server list | https://sandbox.mifos.community,https://demo.mifos.community,https://localhost:8443 |
|
| FINERACT_API_URLS | Fineract server list | https://demo.mifos.community,https://localhost:8443 |
|
||||||
| FINERACT_API_URL | Default Fineract server | https://localhost:8443 |
|
| FINERACT_API_URL | Default Fineract server | https://localhost:8443 |
|
||||||
| FINERACT_API_ACTUATOR | Default Fineract Actuator endpoint | /fineract-provider |
|
| 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_TENANT_IDENTIFIER | Default tenant identifier (must align with Fineract `tenants` table) | default |
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- '4200:80'
|
- '4200:80'
|
||||||
environment:
|
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_URL=https://localhost:8443
|
||||||
- FINERACT_API_PROVIDER=/fineract-provider/api
|
- FINERACT_API_PROVIDER=/fineract-provider/api
|
||||||
- FINERACT_API_VERSION=/v1
|
- FINERACT_API_VERSION=/v1
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ The interesting part is there:
|
|||||||
const proxyConfig = [
|
const proxyConfig = [
|
||||||
{
|
{
|
||||||
context: ['/fineract-provider'],
|
context: ['/fineract-provider'],
|
||||||
target: 'https://sandbox.mifos.community',
|
target: 'https://demo.mifos.community',
|
||||||
pathRewrite: { '^/fineract-provider': '' },
|
pathRewrite: { '^/fineract-provider': '' },
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
secure: 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,
|
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
|
`/fineract-provider/1.0/...` becomes `https://demo.mifos.community/1.0/...`). Use `pathRewrite` to strip the prefix
|
||||||
because the sandbox exposes Fineract APIs at the root path.
|
because the demo exposes Fineract APIs at the root path.
|
||||||
|
|
||||||
**Error Handling:**
|
**Error Handling:**
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ The `onError` handler captures proxy failures (network errors, backend unreachab
|
|||||||
Example server console output when proxy fails:
|
Example server console output when proxy fails:
|
||||||
|
|
||||||
```text
|
```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:
|
Example client response:
|
||||||
@@ -81,7 +81,7 @@ the dev server forward requests through a corporate proxy when required.
|
|||||||
**Behavior:**
|
**Behavior:**
|
||||||
|
|
||||||
- **When `HTTP_PROXY` is set:** Logs `"Using proxy server: <url>"` and configures the agent for corporate proxy forwarding
|
- **When `HTTP_PROXY` is set:** Logs `"Using proxy server: <url>"` 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.
|
See `proxy.conf.js` for the exact implementation.
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
# Fineract URLs list delimited by colon
|
# 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
|
FINERACT_API_URL=https://localhost:8443
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@ const { HttpsProxyAgent } = require('https-proxy-agent');
|
|||||||
const proxyConfig = [
|
const proxyConfig = [
|
||||||
{
|
{
|
||||||
context: ['/fineract-provider'],
|
context: ['/fineract-provider'],
|
||||||
target: 'https://sandbox.mifos.community',
|
target: 'https://demo.mifos.community',
|
||||||
pathRewrite: { '^/fineract-provider': '' },
|
pathRewrite: { '^/fineract-provider': '' },
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
secure: true,
|
secure: true,
|
||||||
|
|||||||
@@ -23,8 +23,7 @@ export const environment = {
|
|||||||
fineractPlatformTenantIds: loadedEnv['fineractPlatformTenantIds'] || 'default',
|
fineractPlatformTenantIds: loadedEnv['fineractPlatformTenantIds'] || 'default',
|
||||||
// For connecting to others servers running elsewhere update the base API URL
|
// For connecting to others servers running elsewhere update the base API URL
|
||||||
baseApiUrls:
|
baseApiUrls:
|
||||||
loadedEnv['fineractApiUrls'] ||
|
loadedEnv['fineractApiUrls'] || 'https://demo.mifos.community,https://localhost:8443,' + window.location.origin,
|
||||||
'https://sandbox.mifos.community,https://demo.mifos.community,https://localhost:8443,' + window.location.origin,
|
|
||||||
// For connecting to server running elsewhere set the base API URL
|
// For connecting to server running elsewhere set the base API URL
|
||||||
baseApiUrl:
|
baseApiUrl:
|
||||||
loadedEnv['fineractApiUrl'] ||
|
loadedEnv['fineractApiUrl'] ||
|
||||||
|
|||||||
@@ -26,8 +26,7 @@ export const environment = {
|
|||||||
fineractPlatformTenantIds: loadedEnv.fineractPlatformTenantIds || 'default',
|
fineractPlatformTenantIds: loadedEnv.fineractPlatformTenantIds || 'default',
|
||||||
// For connecting to others servers running elsewhere update the base API URL
|
// For connecting to others servers running elsewhere update the base API URL
|
||||||
baseApiUrls:
|
baseApiUrls:
|
||||||
loadedEnv.fineractApiUrls ||
|
loadedEnv.fineractApiUrls || 'https://demo.mifos.community,https://localhost:8443,' + window.location.origin,
|
||||||
'https://sandbox.mifos.community,https://demo.mifos.community,https://localhost:8443,' + window.location.origin,
|
|
||||||
// For connecting to server running elsewhere set the base API URL
|
// For connecting to server running elsewhere set the base API URL
|
||||||
baseApiUrl:
|
baseApiUrl:
|
||||||
loadedEnv.fineractApiUrl ||
|
loadedEnv.fineractApiUrl ||
|
||||||
|
|||||||
Reference in New Issue
Block a user