Local Setup CCRS Service
Overview
This guide provides step-by-step instructions to set up the pgr-services module on your local system. It follows the official LOCALSETUP.md from the egovernments/Citizen-Complaint-Resolution-System repository.
Why and When You Need a Local Setup of CCRS Services
Setting up the CCRS (Citizen Complaint Resolution System) locally is an essential step for developers, QA engineers, and technical stakeholders working on the eGov platform. Below is an overview of the key reasons and scenarios when a local environment becomes necessary.
✅ Why Set Up CCRS Locally?
Development and Customisation
Local setup enables developers to modify and test new features, enhancements, and bug fixes in isolation before pushing code to shared environments.
It allows customisation specific to a state, region, or integration requirement without affecting other teams.
Faster Debugging and Troubleshooting
Logs, breakpoints, and real-time inspection tools become available in a local IDE, greatly reducing turnaround time for issue resolution.
Easier to isolate problems that may not be reproducible in remote or containerised environments.
Better Control Over the Environment
Developers can control dependencies, database state, and configuration files (e.g.,
application.properties
, MDMS), and simulate scenarios like failures or latency.
Offline Development Capability
A fully configured local environment allows productive development even in cases of restricted or no internet access to cloud/dev environments.
Learning and Experimentation
New team members can explore the architecture, flow, and modules safely.
Allows sandbox experimentation with business logic, workflows, and integrations like Elasticsearch, Kafka, MDMS, etc.
Steps
Clone the Core Service Repository
Clone the municipal-services repository (which contains pgr-services):
git clone [email protected]:egovernments/Citizen-Complaint-Resolution-System.git
Go to the root directory of ccrs-services using the command below:
cd backend/pgr-services
Install Required Dependencies
Ensure the following services/tools are installed and running on your local system before starting the CCRS backend.
PostgreSQL – Relational database for storing structured data 📄 Official Documentation 💻 Download & Install
Apache Kafka – Message broker for producer-consumer event communication 📄 Official Documentation 💻 Download & Install
Elasticsearch – Search and analytics engine for indexing and querying data 📄 Official Documentation 💻 Download & Install
Start or Access Dependent Services
The pgr-services module depends on several other DIGIT services.
🛠 Option 1: Use Port-Forwarding (Recommended)
If the dependent services are deployed in a Kubernetes cluster, you can use kubectl port-forward to access them locally:
kubectl port-forward -n egov {egov-idgen} 8087:8080
kubectl port-forward -n egov {egov-mdms} 8088:8080
kubectl port-forward -n egov {egov-user} 8089:8080
kubectl port-forward -n egov {egov-workflow-v2} 8090:8080
kubectl port-forward -n egov {egov-localisation} 8091:8080
kubectl port-forward -n egov {egov-url-shortner} 8092:8080
kubectl port-forward -n egov {egov-hrms} 8093:8080
This is the most preferred way to run services locally without deploying all DIGIT services yourself.
Option 2: Run All Dependent Services Locally
If you don’t have access to a DIGIT environment, you can clone and run each dependent service locally. You will need to:
Pull the repositories
Configure local PostgreSQL and Kafka
Set the correct ports and DB connections in each service’s application.properties
Start each service
Recommended Machine Specifications
Running all dependent services locally is resource-intensive. Below are the minimum and recommended machine specifications based on community best practices and real-world experience:
CPU
4 cores
8+ cores
RAM
16 GB
32 GB or more
Disk Space
50 GB free (SSD)
100+ GB (SSD preferred)
OS
Ubuntu 20.04+ / macOS / Windows 10+ (WSL2 for Linux compatibility)
Ubuntu 22.04 LTS or macOS
Java
OpenJDK 17+
OpenJDK 17
Network
Stable internet connection (for dependency downloads, npm, maven, etc.)
Required
Others
Node.js (for UI), Maven 3.8+, PostgreSQL, Kafka, Elasticsearch
Same
💡 Note: Running heavy services like Kafka, Elasticsearch, PostgreSQL, and multiple Spring Boot apps simultaneously can easily consume 80–90% of system resources on a 16 GB RAM machine. A machine with 32 GB RAM and SSD storage is highly recommended for a smooth experience.
Configure application.properties
Edit your local application.properties or application-local.properties file with the appropriate values:
spring.datasource.url=jdbc:postgresql://localhost:5432/{your_local_db_name}
spring.flyway.url=jdbc:postgresql://localhost:5432/{your_local_db_name}
egov.mdms.host=http://localhost:8088
egov.user.host=http://localhost:8089
egov.idgen.host=http://localhost:8087
egov.localization.host=http://localhost:8091
egov.hrms.host=http://localhost:8093
egov.url.shortner.host=http://localhost:8092
egov.workflow.host=http://localhost:8090
👉 Replace {your_local_db_name} with your actual PostgreSQL database name and ensure the credentials are correctly set.
Last updated
Was this helpful?