An example configuration for OpenCRVS using a fictional country
Report an issue · Join our community · Read our documentation · www.opencrvs.org
- What is this module for?
- How do I run the module alongside the OpenCRVS core?
- What is in the Farajaland configuration module repository?
This is the fictional country "Farajaland" OpenCRVS country configuration repository for OpenCRVS You must fork this for your own country.
Read our documentation to learn how to set up your own country configuration using this repo as an example.
This is an example country configuration package for the OpenCRVS core. OpenCRVS requires a country configuration in order to run.
OpenCRVS is designed to be highly configurable for your country needs. It achieves this by loading reference data that it needs from this module.
This module also provides a logical location where you may wish to store the code and run the servers for any custom API integrations, extension modules and innovations to OpenCRVS.
- Ensure that you are running OpenCRVS Core.
If you successfully ran the bash setup.sh
script in OpenCRVS Core you already have this module checked out, the dependencies are installed, the Farajaland database is populated and you can just run the following command.
yarn dev
Thats it! 🎉
If you did not run the OpenCRVS Core bash setup.sh
command, or you are forking this repository in order to build your own country configuration.
- Ensure that you are running OpenCRVS Core.
In a separate Terminal window, checkout this repository and checkout the master branch. The develop branch is used for active feature development.
- Run
git clone https://github.com/opencrvs/opencrvs-farajaland.git
- Run
cd opencrvs-farajaland
- Run
git checkout master
- Run
yarn install
- Run
yarn dev
One of the key dependencies and enablers for OpenCRVS is country configuration and a reference data source. This source is bespoke for every implementing nation. If you would like to create your own country implementation, we recommend that you duplicate this repository and use it as a template. So what does it contain?
- On the root level, this repository contains:
-
Cypress end-to-end tests that can be run in continuous integration.
-
Docker Compose scripts that allow you to customise individual OpenCRVS Core microservices and the countryconfig microservice
-
Backups (Backup zips of default reference data for a nation, for a factory reset, clean installation or for local development purposes.)
-
The src folder contians the code required to run the countryconfig microservice and configure your country implementation. For more information please read this section of the documentation.
-
A data-generator example is included that populates a demo environment with example registrations so you can see what performance analytics look like at scale.
-
Postman collections demonstrate how to interoperate with OpenCRVS. You can build any custom integration into OpenCRVS in this repository if you need to.
-
JS configuration settings files that the clients require in order to initialise, set up languages, track any errors and find essential services.
GET /login-config.js
GET /client-config.js
- An endpoint for loading country configuration content such as languages.
GET /content/{application}
- An endpoint that can be used to pre-validate a registration with an external system if the clent-config.js property EXTERNAL_VALIDATION_WORKQUEUE is set to true
POST /validate/registration
- An endpoint that can be used to customise the format of the registration number, perhaps by integrating with another system
POST /generate/{type e.g. <brn|drn>}
Read our documentation in order to learn how to make your own country configuration!