Code Structure
An exploration of the POB open-source code base.
Last Updated: 27 May 2022 • Page Author: Jillur Quddus
Overview
This page is intended for software engineers who wish to gain a better understanding of the structure of the POB open-source code base.
Prerequisites
Please ensure that you have read and followed the instructions in the Build from Source and Development Environment articles respectively prior to reading this page.
Software Services
The POB open-source code base can be broadly divided into the following categories.
Configuration
The following Maven modules are relative to $POB_BASE
.
Maven Module | Logical Software Service | Description |
---|---|---|
| Global configuration | This Maven module contains the global configuration for POB's Spring bootstrap and application contexts respectively, and is included as a dependency in all of POB's applications. |
Entity Model
The following Maven modules are relative to $POB_BASE
.
Maven Module | Logical Software Service | Description |
---|---|---|
| Entity Model | This Maven module contains the POB entity model (for example the framework, opportunity and publisher class definitions), and is included as a dependency in all of POB's applications. |
Core Services
The following Maven modules are relative to $POB_BASE/pob-core
.
Maven Module | Logical Software Service | Description |
---|---|---|
| IO services | This Maven module contains POB's services for processing YAML files and mapping Java objects to JSON. |
| RDBMS data services | This Maven module contains POB's Spring Data JPA entity repositories (for example managing the persistence and querying of framework and opportunity objects in relevant SQL tables). |
| Utility services | This Maven module contains POB's utility methods, including utility methods for date formatting and hashing. |
Data Services
The following Maven modules are relative to $POB_BASE/pob-data
.
Maven Module | Logical Software Service | Description |
---|---|---|
| Native procurement framework parsers | This Maven module contains POB's native procurement framework parsers. |
| Native end-to-end data pipelines | This Maven module contains POB's main end-to-end data pipeline responsible for executing all the registered parsers and publishers listed and enabled in the POB Application Configuration. |
| Native opportunity publishers to downstream applications | This Maven module contains POB's native opportunity publishers to downstream applications such as Slack, Microsoft Teams and Google Chat. |
Application Wrappers
The following Maven modules are relative to $POB_BASE/pob-apps
.
Maven Module | Logical Software Service | Description |
---|---|---|
| Spring Boot applications | This Maven module contains POB's Spring Boot applications that are designed for deployment to self-managed or Spring Cloud environments. |
| AWS Spring Boot applications | This Maven module contains POB's Spring Boot applications that are designed for deployment to AWS Lambda functions. |
| Azure Spring Boot applications | This Maven module contains POB's Spring Boot applications that are designed for deployment to Azure Function apps. |
Parent POM
The POB parent POM, found at $POB_BASE/pom.xml
, contains the exhaustive list of all 3rd party Java dependencies directly utilised by the POB open-source project along with their version numbers. All the POB Maven modules listed above are children (or grandchildren) of the parent POM and thus inherit all configuration defined in it.
Parent Maven Profiles
In addition to dependency management, the POB parent POM also defines the following Maven profiles that can be selected based on which services you wish to build and package:
Profile Name | Default Profile | Description |
---|---|---|
| Yes | Manages the lifecycle of all of POB's core services as well as all POB Spring Boot applications across all cloud vendors. |
Maven Application Profiles
In addition to the Maven profiles defined in the POB parent POM, four (4) further Maven application-specific profiles are defined in $POB_BASE/pob-apps/pom.xml
. These Maven profiles enable software and platform engineers to explicitly select which Spring Boot applications to compile, build and package based on the target deployment environment, as follows:
Profile Name | Default Profile | Description |
---|---|---|
| Yes | Manages the lifecycle of all POB Spring Boot applications (i.e. serverless function apps and API applications) across all cloud vendors. |
| No | Manages the lifecycle of Spring Boot applications designed for development and testing purposes, or for deployment to self-managed or Spring Cloud environments. |
| No | Manages the lifecycle of AWS Spring Boot applications designed for deployment to AWS Lambda and AWS Beanstalk apps respectively. |
| No | Manages the lifecycle of Microsoft Azure Spring Boot applications designed for deployment to Azure Function apps and Azure Web Apps respectively. |
Last updated