Components¶
OpenLMIS v3 uses a micro-services Architecture with different services each providing different APIs.
Each component below has its own Git repository, API docs and ERD. Many services below also have a corresponding UI component (e.g. Auth UI, Requisition UI). The Reference UI builds all of these UI components together into one web application.
Logging into the Live Documentation¶
The live documentation links below connect directly to our API Console docs on our CI server. To use the API you’ll first need to get an access token from the Auth service, and then you’ll need to give that token when using one of the RESTful operations.
Obtaining an access token:
- Go to the Auth service’s POST /api/oauth/token
- Click
Try it
in the top right of the tab - In the Authentication section, enter username
user-client
and passwordchangeme
- In the Query Parameters section, enter username
administrator
and passwordpassword
- Click
Authorize
underpassword
- Enter the username
administrator
and passwordpassword
- Click
Post
- In the
Response
box, copy the UUID. e.g."access_token": "a93bcab7-aaf5-43fe-9301-76c526698898"
copya93bcab7-aaf5-43fe-9301-76c526698898
to use later - Paste the UUID you just copied into any endpoint’s
access_token
field or intoAuthorization
with Bearer e.g."access_token": "a93bcab7-aaf5-43fe-9301-76c526698898"
->Authorization: Bearer a93bcab7-aaf5-43fe-9301-76c526698898
Auth Service¶
Auth Service provides RESTful API endpoints for Authentication and Authorization. It holds user security credentials, handles password resets, and also manages API keys. It uses OAuth2. The Auth Service works with the Reference Data service to handle role-based access controls. (See the Auth Service README for details.)
Fulfillment Service¶
Fulfillment Service provides RESTful API endpoints for orders, shipments, and proofs of delivery. It supports fulfillment within OpenLMIS as well as external fulfillment using external ERP warehouse systems.
CCE Service¶
The Cold Chain Equipment (CCE) Service provides RESTful API endpoints for managing a CCE catalog, inventory (tracking equipment at locations) and functional status. The catalog can use the WHO PQS.
Notification Service¶
The Notification Service provides RESTful API endpoints that allow other OpenLMIS services to send email notifications to users. The Notification Service does not provide a web UI.
Reference Data Service¶
The Reference Data Service provides RESTful API endpoints that provide master lists of reference data including users, facilities, programs, products, schedules, and more. Most other OpenLMIS services depend on Reference Data Service. Many of these master lists can be loaded into OpenLMIS in bulk using the Reference Data Seed Tool or can be added and edited individually using the Reference Data Service APIs.
Reference UI¶
The OpenLMIS Reference UI is a single page application that is compiled from multiple UI repositories. The Reference UI is similar to the OpenLMIS-Ref-Distro, in that it’s an example deployment for implementers to use.
Learn about the Reference UI:
- OpenLMIS UI Overview describes the UI architecture and tooling
- UI Styleguide shows examples and best practices for many re-usable components
- Dev UI documents the build process and commands used by all UI components
Coding and Customizing the UI:
UI Repositories:
- Reference UI puts all the UI repositories into one single page application (Reference UI GitHub repo)
- Dev UI provides the build tools and commands. All other UI repositories use these build tools by including Dev UI as a base image in docker-compose. (Dev UI GitHub repo)
- UI Components is where OpenLMIS reusable components are defined along with base CSS styles (UI Components GitHub repo)
- Auth UI connects the OpenLMIS UI to the OpenLMIS Auth Service and handles all authentication details so other UI repositories don’t have to (Auth UI GitHub repo)
- UI Layout defines UI layouts and page architecture used in the OpenLMIS UI (UI Layout GitHub repo)
- Reference Data UI adds administration screens for objects defined in the OpenLMIS Reference Data Service (Reference Data UI GitHub repo)
- Stock Management UI adds screens to interact with the OpenLMIS Stock Management Service (Stock Management UI GitHub repo)
- Fulfillment UI adds screens to connect to the OpenLMIS Fulfillment Service (Fulfillment UI GitHub repo)
- CCE UI adds screens for the OpenLMIS CCE Service. (CCE UI GitHub repo)
- Requisition UI adds screens to support the OpenLMIS Requisition Service (Requisition UI GitHub repo)
- Report UI adds screens to interact with OpenLMIS Report Service (Report UI GitHub repo)
Report Service¶
The Report Service provides RESTful API endpoints for generating printed / banded reports. It owns report storage, generation (including in PDF format), and seeding rights that users may be given.
Requisition Service¶
The Requisition Service provides RESTful API endpoints for a robust requisition workflow used in pull-based supply chains for requesting more stock on a schedule through an administrative hierarchy. Requisitions are initiated, filled out, submitted, and approved based on configuration. Requisition Templates control what information is collected on the Requisition form for different programs and facilities.
Stock Management Service¶
The Stock Management Service provides RESTful API endpoints for creating electronic stock cards and recording stock transactions over time.