- Modernization API - Provides backend services and endpoints to support the searching and management of patients, requests related to configuration, user information, value sets, and other core functionalities required by the frontend and other services.
- Modernization UI
- Question Bank - Provides the backend services and endpoints for to support modernized Page Builder.
- NBS Gateway - A reverse proxy and routing layer for the NEDSS Modernization project. It directs incoming requests to the appropriate backend services (such as Modernization UI, Modernization API, and Question bank), enabling seamless integration between both the modernized and pre-existing frontend, and multiple backend services.
Reusable code is organized into three main types:
- Feature libraries provide modular endpoints or features that can be integrated into applications.
- Utility libraries offer shared components for common tasks and standardized interactions with NBS database, and security model.
- Testing libraries supply tools and mock servers to support automated testing across modernization services.
These categories help maintain a clear separation of concerns and promote code reuse throughout the project.
Standalone modules that provide specific endpoints or features (e.g., configuration, user info, value sets, redirects) which can be packaged within other applications.
- Configuration - An endpoint to expose externalized configuration to the
modernization-ui. - Me-api - An endpoint that provides information about the currently logged-in user.
- Options-api - Provides endpoints to retrieve the contents of value sets.
- Redirect - A generic endpoint to handle transitions from
wildflytospring-bootbased services.
Shared components that offer common utilities and standardized interactions with NBS data and the WildFly application, such as auditing, authentication, authorization, data flattening, and session propagation.
- Accumulation - Flattening the results of select statements that join multiple tables into single objects or lists of objects grouped by a common identifier.
- Audit - Standardizes the auditing fields on NBS tables
- Authentication - An adapter that incorporate the NBS security model in Spring Security.
- Authorization - Allows resolution of the object / operation specific NBS permissions.
- Change - Resolves changes between disparate collections of items representing the same underlying models.
- Classic Interaction - Propagates the session associated with a user when transitioning
between
wildflyandspring-bootbased services. - Database-Entities
- Event-Schema
- Id Generator - A Java implementation of the
getNextUid_spstored procedure used to create identifiers within NBS. - Web - Standardizes handling of Cookie management and provides a common
Responsepattern.
Modules that implement reusable feature test steps and mock servers to support automated testing across modernization services, including user setup, database containers, HTTP response verification, and test data management.
- Auth and Auth Cucumber - Enables feature test steps for establishing users and permissions.
- Classic Interaction Cucumber - A mock server to verify interactions with
wildfly. - Database - Testcontainer support for the
nbs-mssqlcontainer. - HTTP Interaction - Enables feature test steps to verify the status and body of HTTP Responses.
- Identity - An in memory implementation of the NBS ID Generator to reduce database activity during tests.
- Support - An API to make referencing data created for tests.
The CDC Sandbox provides containers to support local development.
- Package by Feature to make code easier to find.
- Code Formatting
- Pull requests
Some containers within the cdc-sandbox directory require sensitive values be set prior to building.
| Container | Required environment variable |
|---|---|
| nbs-mssql | DATABASE_PASSWORD |
| nifi | NIFI_PASSWORD, DATABASE_PASSWORD |
| keycloak | KEYCLOAK_ADMIN_PASSWORD |
-
Gain access to the NBS source code repository this is required to build the wildfly container
-
Navigate to the
cdc-sandboxdirectorycd cdc-sandbox -
Run the
build_all.shscript./build_all.sh
-
Visit the NBS Login page
username: msa password: -
To create your own user account:
- Navigate to System Management
- Expand Security Management
- Click Manage Users & click Add
- Enter userId, First Name and Last Name
- Add a Role(s) & click submit
To learn more about the build process view the cdc-sandbox README
-
Navigate to the
cdc-sandboxdirectorycd cdc-sandbox -
Start the database and Elasticsearch containers
docker compose up -d nbs-mssql elasticsearch
-
Navigate to the root directory
cd .. -
Start the
modernized-apiPort5005will be open for debugger attachment../gradlew :modernization-api:bootRun
-
Navigate to the
modernization-uifoldercd apps/modernization-ui/ -
Launch the
modernization-uinpm run start
-
Access the UI
./gradlew printVersion
> Task :printVersion
Version: 1.0.0-SNAPSHOT
The nbs-gateway container is configured to route to the containerized services. Routing to a local service can be
achieved by altering the configuration to point to the local instances.
| Name | Default | Description |
|---|---|---|
| MODERNIZATION_UI_SERVER | modernization-ui |
The host name of the server that provides the frontend UI. |
| MODERNIZATION_UI_PORT | 80 |
The port the frontend UI is served from. |
| MODERNIZATION_API_SERVER | modernization-api |
The host name of the server that provides the backend API. |
| MODERNIZATION_API_PORT | 8080 |
The port that modernization-api is served from. |
| PAGEBUILDER_API | pagebuilder-api |
The host name of the server that provides the page-builder API. |
| PAGEBUILDER_API_PORT | 8095 |
The port that page-builder is served from. |
| NBS_GATEWAY_SERVER | nbs-gateway |
The host name of the server that provides the NBS Gateway. |
| NBS_GATEWAY_PORT | 8000 |
The port the NBS Gateway is served from. |
flowchart TD
subgraph External
User[User]
end
subgraph NBS7
GW[nbs-gateway]
M[modernization-api/moderniztion-ui]
PB[pagebuilder-api]
ES[(elasticsearch)]
DB[(nbs-mssql)]
WF(wildfly)
end
User --> GW
GW --routes--> M
GW --routes--> PB
GW --routes--> WF
M --read/write--> DB
M --read/write--> ES
M --request--> WF
PB --read/write--> DB
PB --request--> WF
style GW fill:#8168b3,stroke:#333,stroke-width:2px
style M fill:#1a4480,stroke:#333,stroke-width:2px
style PB fill:#28a0cb,stroke:#333,stroke-width:2px
style DB fill:#565c65,stroke:#333,stroke-width:2px
style ES fill:#565c65,stroke:#333,stroke-width:2px
style WF fill:#c05600,stroke:#333,stroke-width:2px
-
Start the frontend UI locally by running the following command from the
apps/modernization-uifolder.npm run start
-
Start the
nbs-gatewaycontainer configured to route to the localmodernization-uiby executing the following command from the root folderMODERNIZATION_UI_SERVER=host.docker.internal MODERNIZATION_UI_PORT=3000 docker compose up -d nbs-gateway
From the root folder.
-
Start the backend API locally listening on port 9080 from the root project folder. The
nbs-gatewaycontainer is accessible from port8080, which is the default port for themodernization-api. It must be changed in order for the backend to start properly../gradlew :modernization-api:bootRun --args='--server.port=9080' -
Start the
nbs-gatewaycontainer configured to route to the localmodernization-apiby executing the following command.MODERNIZATION_API_SERVER=host.docker.internal MODERNIZATION_API_PORT=9080 docker compose up -d nbs-gateway
From the root folder.
-
Start the local
pagebuilder-apiservice../gradlew :question-bank:bootRun' -
Start the
nbs-gatewaycontainer configured to route to the localpagebuilder-apiby executing the following command.PAGEBUILDER_API=host.docker.internal PAGEBUILDER_API_PORT=8095 docker compose up -d nbs-gateway
Start the nbs-gateway container by running the following command from the root folder
docker compose up -d nbs-gateway