Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Mobile app designed to collect, manage revenue and expenditure
A mobile-based application that enables the gram panchayat water committee to collect & manage revenue and expenditure.
mGramSeva is an application that has been developed as part of the exemplar in Punjab. It enables rural local bodies to manage revenue and expenditures related to water supply projects using a mobile app. The app is meant for members of the water management committee and collection agents. The collection agents can add consumers (or households), and generate bills and receipt acknowledgements.
The Finance Department and Water Supply and Sanitation Department have limited visibility over the fiscal sustainability of water schemes and get hit by the sudden demand for large funds to clear electricity bills.
The Department of Water Supply & Sanitation (DWSS) faces several problems due to the lack of financial visibility of schemes:
Unreliable and poor-quality of water
Inability to collect adequate water charges
Lack of visibility of revenue and expenditure information
Large amounts of pending electricity bills
Large unplanned expenditure to pay pending bills
mGramSeva helps digitise revenue and expense records of Gram Panchayat Water Supply Committees. The dashboards and data insights provide visibility of the GPWSC financial status to the DWSS and FD officials.
The app provides:
Digital way to maintain the revenue and expenditure records
Easy to share reports over WhatsApp
Updated information on consumer satisfaction/quality of services
Dashboards for a snapshot of collections and expenditures to the Sarpanch/other GP officials
Further details of collection from each household provided for easy management
mGramSeva posts standardized fiscal events on the fiscal information exchange (FIX) platform. The events are processed and provide rich insights to the users through the fiscal sustainability dashboards.
The key benefits of using the mGramSeva app are listed below:
mGramSeva offers multiple features required to manage revenues and expenditures (listed below).
This section contains all docs and information required to understand the mGramSeva, its key features, functional scope, and configuration details. Click on the links below to learn more about deploying, configuring, customizing, and using the mGramSeva app.
Navigation Tips
Click on the embedded links within the content to browse topic details
Use the Contents links available on the right side of the screen to move to a specific heading
Find the list of Related Docs links at the bottom of each page to browse through additional product details
Steps to remove the cache data whenever a new build is deployed
The build number of the application is compared every time we hit the URL. If the build number is not present in the local storage or the build number does not match the existing build number then the local storage cache is deleted.
Here, 17 is the build number.
Note: Add all localizations to the respective environment, before deploying the build to any environment.
If we add new localizations after deploying the build, we need to increment the build version and deploy a new build to reflect those localizations. The previous web cache validates the build number check and does not delete the localization messages stored in the local storage.
1
Product Release Notes
Sandhya/Engineering Team
Yes
2
List of services that needs to be upgraded
Sandhya/Engineering Team
Yes
3
List of SMS and Email template
N/A
Not Required
4
Configs, MDMS
Sandhya/Engineering Team
Yes
5
Upgrade mGramSeva UAT
Snehal/Arindam/Impl Team
Yes
28-Nov-2022
6
Loading the localization codes in mGramSeva-UAT environemnt
Snehal/Arindam/Impl Team
Yes
28-Nov-2022
Provided by the Engineering Team
7
Regression in mGramSeva-UAT environment
Nirupama/Impl Team
Yes
5-Dec-2022
8
List of bugs identified by Impl Team(Known issues)
, ,
Sandhya/Engineering Team
No
Product Bug
9
Functional Sign off on mGramSeva UAT
Satish N/Product Team
Yes
9-Dec-2022
10
Backward compatibility testing passed
Nirupama, Ramkrishna
No
The app is not backward compatible and the force update will not work due a technical issue. The mitigation plan is in place.
11
Mitigation plan verified?
Satish N, Ajay Bansal, Prashanth
Yes
16-Dec-2022
The certain feature of the app will break when the user will try to do transaction. So, the user have to update the app and the training needs to be provided by the program team.
12
Take go ahead for production deployment from the Program Team
Ajay Bansal/Program Team
No
15-Dec-2022
13
Tentative deployment on mGramSeva in Production Punjab
Snehal/Impl Team
No
4-Jan-2023
1-2 days of effort
14
Loading localization in Production Punjab
Snehal/Impl Team
No
4-Jan-2023
On the same day after deployment
15
Communication to DWSS team for the APK/Mobile App for Production Deployment
Ramkrishna(eGov)/Sumit(DWSS)
No
4-Jan-2023
Communication to DWSS tech team. The build will take around 2-4 hrs to release in Playstore.
16
Testing/Sanity on mGramSeva production Punjab
Nirupama/Impl Team
No
5-Jan-2023
4-Jan and 5-Jan 2023
16
Marking all mGramSeva-1.2 upgade tasks as DONE
Arindam/Nirupama/Impl Team
No
5-Jan-2023
4-Jan and 5-Jan 2023
1
Development is completed for all the features that are part of the release.
Yes
@Sandhya K
2
Test cases are documented by the QA team, reviewed by the product owners and test results are updated in the test cases sheet.
Yes
@Vasanth Kumar
3
The incremental demo of the features showcased during the sprint showcase and feedback incorporated. If possible list out the JIRA tickets for feedback.
Yes
@Satish N @Vasanth Kumar
Sprint Showcase (12-Dec-2022) and internal team demo(14-Sep-2022 ) with Product owner completed
4
UI/UX Audit review by UX Architect is completed along with feedback incorporation for any changes in UI/UX.
Yes
@Ramkrishna Sahoo @Antriksh Kumar
Audit completed (30-Nov-2022). Observations added in the card. PFM-1683
5
Incremental demos to the product owners are completed as part of the sprint and feedbacks are incorporated.
Yes
@Sandhya K
@Vasanth Kumar
6
QA signoff is completed by the QA team and communicated to the product owners. All the tickets QA signoff status is updated in the JIRA.
Yes
@Vasanth Kumar
QA sign-off done (20-Sep-22)
7
UI, API Technical documents are updated for the release along with the configuration documents.
Yes
@Sandhya K
8
UAT promotion and regression testing from the QA team is completed. QA team has shared the UAT regression test cases with the product owners.
Yes
@Vasanth Kumar. @Nirupama
UAT regression test cases. Signed off on 8-Dec-2022
9
API Automation scripts are updated for new APIs or changes to any existing APIs for the release. API automation regression is completed on UAT, the automation test results are analyzed and necessary actions are taken to fix the failure cases. Publish the list of failure use cases with a reason for failure and the resolution taken to fix these failures for the release.
No
@Vasanth Kumar
No API Automation for mgramSeva
10
The API backward compatibility testing is completed.
No
@Vasanth Kumar
No API Automation for mgramSeva
11
The communication is shared with the product owners for the completion of UAT promotion and regression by the QA team. The product owners have to give a Product signoff within one week of this communication.
Yes
@Nirupama Karanam @Satish N
QA Communication was done on 28-Nov-22 UAT Sign off was on 5-Dec-22 Product sign-off was on 9-Dec-22
12
UAT Product Signoff communication is received from the Product owners along with the release notes and User guides (if applicable).
Yes
@Satish N
Signed off on 9-Dec-2022
13
The GIT tags and releases are created for the code changes for the release.
Yes
@Sandhya K
14
Verify whether the Release notes are updated
Yes
@Sandhya K
15
Verify whether all UAT Builds are updated along with the GIT tag details.
Yes
@Vasanth Kumar
16
Verify whether all MDMS, Configs, InfraOps configs updated.
Yes
@snehal.gothe @Sandhya K
17
Verify whether all docs are published to mGram website by the Technical Writer as part of the release.
Yes
@Sandhya K
@Anjoo Narayan
18
Verify whether all test cases are up to date and updated along with necessary permissions to view the test cases sheet. The test cases sheet is verified by the Test Lead.
Yes
@Vasanth Kumar
19
Verify whether the UAT credentials sheet is updated with the details of new Users and Roles if any
Yes
@Vasanth Kumar
It will be internally shared.
20
Verify whether all the localisation data was added in UAT including Hindi and updated in Release Kits.
Yes
@Vasanth Kumar
21
Verify whether the product release notes and user guides are updated and published
Yes
@Satish N
22
The Demo of released features is done by the product team as part of the Sprint/Release showcase.
Yes
@Satish N
Release showcase done on 12-Dec-22
23
Technical and Product workshops/demos are conducted by the Engineering and Product team to the implementation team (Impel handover)
Yes
@Satish N @Arindam Gupta
Workshop Oct17, 22
24
Plan for upgrading the staging/demo instance with the release product - within 2-4 weeks based on the period where no demos are planned from staging for the previous version of the released product.
NA
25
Architect SignOff and Technical Quality Report
No
@Ghanshyam
No dedicated Architect to mgramseva & Phani has done code review during the dev cycle. As discussed in the show case, Ghanshyam would be doing the sign-off. Sandhya will be coordinating with ghanshyam on this. This will be taken after the release since we are already late for the product release.
26
Success Metrics and Product Roadmap
Yes
@Satish N
27
Adoption Metrics
Yes
28
Program Roll-out Plan
Yes
29
Impel checklist
Yes
@Arindam Gupta
30
Impel roll-out plan
Yes
@Arindam Gupta
31
Gate 2
Yes
Gate 2 Review is scheduled on 14-Dec-2022
32
The Internal release communication along with all the release artefacts are shared by the Engineering team.
Yes
@Sandhya K
Communication will be done by Engineering team 14-Dec-2022
33
The Release communication to partners is shared by the GTM team and the Webinar is arranged by the GTM team after the release communication - within 2-4 weeks of the release.
No
GTM Team
Vendor Registry is a system that enables ULB employees to create and search vendors i.e. Desludging Operator (DSO) and driver entities with appropriate vehicle Entities for FSM Applications. This document contains details on how to set up the Vendor and describes the functionalities provided.
Before you proceed with the configuration, make sure the following pre-requisites are met -
Java 8
The Kafka server is up and running
egov-persister service is running and has a vendor-persister config path added to it
PSQL server is running and a database is created to store FSM Application data
The following services should be up and running:
egov-mdms-service
egov-user-service
boundary-service
vehicle
Added payment payment preference and agency attributes for DSO
Added gender attribute in the create and update APIs for Vendor
Updated the Vendor search API to add vehicleCapacity in the search parameter to search all vendors matching the vehicle capacity specified in the search parameter.
Deploy the latest version of the vendor
Add vendor-persister.yml file in the config folder in git and add that path in persister. (The file path is to be added in the environment yaml file in a param called persist-yml-path ) and restart egov-persister-service.
After adding Actions and role-action mappings, restart the egov-mdms-service.
Actions
Role Action Mapping
Configurations we can manage through values.yml of the vendor in the infra ops repo are as follows: values.yml for a vehicle can be found.
Configurations sample in Values.yml
DSO for FSM System is a vendor, For every city/ULB DSO should be created with the Representative details as owner, associated vehicles and drivers.
Sample Curl
Any system or DIGIT module can integrated with Vendor Service, which helps to manage the Vendor with the vehicles, drivers and owner for the representative and login for the representative/owner to log into the system to carry our role-specific operations
Validation of DSO/Vendor availability
Fetch the vehicle assigned to the DSO
Fetch the Drivers assigned to the DSO
FSM to call vendor/v1/_search to fetch the DSOs
FSM can call vendor/v1/_search to fetch the DSOs and the respective vehicles and drivers
eGov-User-Events service provides a common point to manage all the events generated for the user in the system. Events include updates from multiple applications like PT, PGR, TL etc, events created by the employee addressing the citizen etc. This service provides APIs to create, update and search such events for the user.
Before you proceed with the documentation, make sure the following pre-requisites are met -
Java 8
The Kafka server is up and running
egov-persister service is running and has egov-user-events persister config path added to it
PSQL server is running and the database is created
Provide a common platform to create, manage and notify events.
Events can be created either through an API call or by pushing records to the Kafka queue.
Add mdms configs required for egov-user-events.
Add Role-Action mapping for API’s.
Deploy the latest version of egov-user-events
Add egov-user-events file in config folder in git and add that path in persister. (The file path is to be added in environment yaml file in a param called persist-yml-path )
Add master data in MDMS service with the module name as mseva. Following is some sample master data for the service: Event Categories
Event Types:
Using /localization/messages/v1/_upsert , add localisation (templates) for notification messages to be sent. Following are the product notification templates:
Configurable Properties
Following are the properties in application.properties file in egov-user-events service which are configurable.
Entities:
Events: Model to capture the events information. This object captures all the details of an event which is either being created or updated.
EventDetails: Captures details of the event such as organiser, location, time etc are captured here. This is the child object to the Events object. This has significance only because the type of the event is ‘EVENTSONGROUND’.
Action: This captures the user actions involved in the event. Say the pay now option, reopen option, download certificate option etc.
Recipient: Every event is addressed to a crowd to which a notification of the same is sent. This model captures information about the recipients of the notification of this event or can also be framed as details of the address of the event.
Event Type: Events are divided into multiple types as follows:
BROADCAST - These are messages broadcasted addressing a group of people. For instance, “There’s road blockage near the bus stand, please use a different route”
EVENTSONGROUND - These are events organised by a group of people addressing another group of people usually it is the ULB organising events for the citizens. It can be any activity like a 10K Marathon, Polio Drive, Property Tax collection drive etc.
SYSTEMGENERATED - These events are generated by different systems on the egov platform like PT, TL, PGR etc addressing a group of people. For instance, “Dear Citizen, Your TL has been approved please proceed to Pay here <PAY_NOW>”
OTHERS - Events that don’t belong to the types mentioned above.
These are configured in MDMS.
Event Category: Events are categorised into the following:
PUBLICHEALTH - Events related to public health.
CULTURAL - Cultural events
WARDCOMMITEEMEETING - Events for recurring meetings of the ward committee.
These event categories are mapped to event types internally. The categories mentioned here are for EVENTSONGROUND type. These are configured in MDMS.
How does it work?
This service manages user events on the egov-platform, which means all the events about which the user (essentially citizen) has to be notified are stored and retrieved through this service. Events can be created either by an API call or by pushing records to the Kafka queue.
Once the event is sent for creation, the service validates all the required fields and assigns a recipient list to that event. An event can be addressed to a particular person, group of people, user type and also roles. Events like updates on the TL application are addressed to the owner of the TL only, Events like Polio Drive are addressed to the entire ULB, and Events like mass Bill generation are addressed only to those who are required to pay those bills. Similarly, a recipient list is generated based on the request and stored in the system.
When an event is updated a counter event is generated, Counter events are of 2 types: Counter event on Delete and Counter event on Update. When an event in ACTIVE status is made INACTIVE or CANCELLED, a counter event on delete is generated. When details of an event are updated irrespective of the status a counter event on update is generated. These counter-events are stored along with the actual event in the system. However, when a counter-event on delete is generated, its corresponding actual event is marked INACTIVE.
One of the important aspects of this service is the search API. Searching for the events stored in the user-events system is different for different roles. When CITIZEN searches, all the events addressed to that citizen are retrieved, the events that contain corresponding counter-events are deduplicated and only the latest ACTIVE events are returned.
We have a use-case where past events have to be marked INACTIVE, this applies to all the BROADCAST and EVENTSONGROUND types of events which are time-capped. If a BROADCAST event is active from 1/Jan to 10/Jan, it’ll be marked inactive post 10/Jan, after which the CITIZEN stops receiving any updates to that event. This changing of the status of the events is achieved by a lazy-update technique instead of a cron job. Due to this, the search API not only returns the events but also updates the status of events before returning them to the user based on whether it has expired.
When an EMPLOYEE searches, all the EVENTSONGROUND posted in his particular ULB are returned by default irrespective of the status. He/She can perform actions on those events, which if active, are notified to the CITIZEN.
An EMPLOYEE can search event based on the date the range, whatever the event created or last modified in that range, will appear in the search response. So, to get the details about an event in a particular date range pass the value in the fromDate and toDate fields of search criteria.
fromDate and toDate fields accept epoch values only.
And to get details about Delete event, pass Status as CANCELLED and to get details about Broadcast event pass eventType as BROADCAST.
Review the code and descriptions of every method to understand the use-cases and flow-of-logic in a better way.
eGov-user-events can be integrated with any organisation or system which wants to send the events generated for the user in the system
Easy manages user events on the system, which means all the events about which the user (essentially citizen) has to be notified are stored and retrieved through this service.
An employee can create events in the system using /egov-user-event/v1/events/_create endpoint
Employees can update events in the system using /egov-user-event/v1/events/_update endpoint
Events are searched in the system using /egov-user-event/v1/events/_search endpoint
/egov-user-event/v1/events/notifications/_count API is used to fetch the count of total, unread, and read notifications.
/egov-user-event/v1/events/lat/_update API is use to update the last-login-time of the user. We store the last login time of the user through this API thereby deciding which notifications have been read.
(Note: All the APIs are in the same Postman collection therefore same link is added in each row).
mGramSeva architecture details
mGramSeva is built on top of the Platform. It consists of distinct layers listed below.
Back End
Core Services
(egov-user)
(user-otp)
(access-control)
(id-gen)
(pg-service)
(wf-service)
(data-encryption-service)
e (localization-service)
e (location-service)
(url-shortening-service)
(pdf-generator)
(notification-sms)
(notification-email)
Business Services
s (DSS)
Municipal Services
(property-services)
(ws-calculator)
(ws-service)
(echallan)
(user-event)
The sequence diagram below illustrates a typical interaction between the various services.
Tools and technologies used to setup, build and deploy mGramSeva stack
DIGIT being an open-source platform, all the tools and tech stack used to build, deploy and operate DIGIT - are also d and community edition. The tools used to set up, develop and deploy the mGramSeva stack are listed below with the specific versions used and their short description.
Integrate the below changes in vendor-persister.yml -
Every event should contain information about the event type, event category, event name, description, recipient, actions, event details etc. Based on the type of the event, the list of mandatory fields varies. MDMS configurations required for this service to work can be found here:
mGramSeva
Frontend
mGramSeva UI
frontend-mgramseva:v1.2.0-69f600e2-3
Penalty and advance features added
Confirmation pop-up added while collecting payment
Father/husband name column added in household register
Dashboard and trend graph data mismatch fixed
Receipt and bill PDF localization issue fixed
With flutter upgradation, APK not working in Android > 12 issue fixed
Enable Excel Download in Household Register
mGramSeva
Core Services
ID Gen
egov-idgen:v1.2.4-92880bb4-5
No changes
User
egov-user:v1.2.7-92880bb4-4
No changes
User OTP
user-otp:v1.1.5-92880bb4-4
No changes
SMS Notification
egov-notification-sms:v1.1.4-92880bb4-19
No changes
mGramSeva
Business Services
Billing Service
billing-service:v1.4.0-e9e27e23-36
Allowing the creation of bills for advance amount
Adding a new api to get the demand audit history
Updating the demand search api to filter for active demands
mGramSeva
Municipal Services
Water Charges
ws-services:v1.6.0-db17ce66-6
Addition of advance and penalty on consumer create
Changes in update consumer
Water Charges Calculator
ws-calculator:v1.5.0-031f636b-3
Penalty application after due date based on the penalty configured
Advance payment allowed in collect payment screen
bug fixes for penalty details api
eChallan Services
echallan-services-db:v1.2.0-001e0bce-80
the referenceId of the eChallan object is mapped to consumerCode of billing-service and collection-service
If referenceId is not passed in the request, it will get set to same as the challanNo
Decouple challan search SQL queries from billing service. (Support PSPCL event)
Vendor
vendor:v1.0.5-0cb41fed-18
No changes
mGramSeva IFIX Adaptor Integration Service
mgramseva-ifix-adapter:v1.1.0-17f8fe75-74
Penalty and advance event push changes
Bug fixes for update demand event
PSPCL changes
Property Services
property-services:v1.1.8-ee5485f1-6
No changes
User event
egov-user-event:v1.1.4-92880bb4-5
No changes
DIGIT Core Services
Encryption
egov-enc-service:v2.5-log4j-12a9331b-2
No changes
Searcher
egov-searcher:v2.5-log4j-12a9331b-2
No changes
Payment Gateway
egov-pg-service:v2.5-log4j-12a9331b-7
No changes
File store
egov-filestore:v2.5-log4j-12a9331b-4
No changes
Mail Notification
egov-notification-mail:v2.5-log4j-12a9331b-2
No changes
Localization
egov-localization:v2.5-log4j-12a9331b-2
No changes
Persist
egov-persister:v2.5-log4j-12a9331b-4
No changes
MDMS
egov-mdms-service:v2.5-log4j-12a9331b-2
No changes
URL Shortening
egov-url-shortening:v2.5-log4j-12a9331b-2
No changes
Indexer
egov-indexer:v2.5-log4j-12a9331b-2
No changes
Workflow
egov-workflow-v2:v2.5-log4j-12a9331b-9
No changes
pdf-service
pdf-service-db:v1.2.1-748014d886-41
Advance and penalty changes
Access Control
egov-accesscontrol:v2.5-log4j-12a9331b-2
No changes
Location
egov-location:v2.5-log4j-12a9331b-2
No changes
OTP
egov-otp:v2.5-log4j-12a9331b-2
No changes
Zuul - API Gateway
zuul:v2.5-log4j-12a9331b-5
No changes
DIGIT Business Services
Apportion
egov-apportion-service:v2.5-log4j-f0f010a-2
No changes
Collection
collection-services:v2.5-log4j-f0f010a-19
No changes
Dashboard Analytics
dashboard-analytics:v2.5-log4j-f0f010a-5
No changes
Dashboard Ingest
dashboard-ingest:v2.5-log4j-f0f010a-7
No changes
EGF Instrument
egf-instrument:v2.5-log4j-f0f010a-3
No changes
EGF Master
egf-master:v2.5-log4j-f0f010a-3
No changes
DIGIT Municipal Services
eChallan Calculator
echallan-calculator:v1.1.0-001e0bce-11
the referenceId of the eChallan object is mapped to consumerCode of billing-service and collection-service
If referenceId is not passed in the request, it will get set to same as the challanNo
PSPCL enhancements
mGramSeva MDMS
mGramSeva Configs
Localization v1.2
Localization is updated in the release KIT
Kafka Consumer Group
SPRING_KAFKA_CONSUMER_GROUP_ID
egov-vendor-services
kafka topic to which service push data to save new Vendor
PERSISTER_SAVE_VENDOR_TOPIC
save-vendor-application
mdms service host
EGOV_MDMS_HOST
egov-mdms-service from egov-service-host
Vehicle Service host
EGOV_VEHICLE_HOST
vehicle from egov-service-host
User service host
EGOV_USER_HOST
egov-user-service from egov-service-host
Location Service Host
EGOV_LOCATION_HOST
egov-location from egov-service-host
kafka.topics.persister.save.events
save-user-events
This is the persister topic onto which user-events pushes records for persistence. This is for creating events.
kafka.topics.persister.update.events
update-user-events
This is the persister topic onto which user-events pushes records for persistence. This is for updating events.
kafka.topics.lat.details
user-events-lat
This is the persister topic onto which user-events pushes records for persistence. This is for storing last-access-time / last-login-time of the user.
kafka.topics.save.events
persist-user-events-async
Topic to which the user-events consumer is subscribed. Producers willing to create events must push records to this topic.
kafka.topics.update.events
update-user-events-async
Topic to which the user-events consumer is subscribed. Producers willing to update events must push records to this topic
mseva.notif.search.offset
0
Default pagination offset.
mseva.notif.search.limit
200
Default pagination limit.
6.2.0
5.4.1
Apache Kafka is an open-sourced and community distributed event streaming platform capable of handling trillions of events a day.
6.2.0
5.4.1
ZooKeeper is an open-source Apache project that provides a centralized service for providing configuration information, naming, synchronization and group services over large clusters in distributed systems. When working with Apache Kafka, ZooKeeper is primarily used to track the status of nodes in the Kafka cluster and maintain a list of Kafka topics and messages.
Zuul
2.3.0
2.2.2
Zuul is an open-sourced edge service that proxies requests to multiple backing services. It provides a unified “front door” to your system, which allows a browser, mobile app, or other user interfaces to consume services from multiple hosts without managing cross-origin resource sharing (CORS) and authentication for each one.
8.0.0
6.6.2
Elasticsearch is a distributed, free and open search and analytics engine for all types of data, including textual, numerical, geospatial, structured and unstructured.
Kibana
8.0.0
6.6.2
Kibana is a free and open frontend application that sits on top of the Elastic Stack, providing search and data visualization capabilities for data indexed in Elasticsearch.
1.8.3
1.0.6
Fluent Bit is an open-source and multi-platform Log Processor and Forwarder which allows you to collect data/logs from different sources, unify and send them to multiple destinations. It's fully compatible with Docker and Kubernetes environments.
13.4
9.6 and 10.6
PostgreSQL is a powerful, open-source object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance
redis
6.2.5
3.2.6
Redis is an open-source (BSD licensed), in-memory data structure store, used as a database, cache, and message broker. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyper logs, geospatial indexes, and streams.
Jaeger
1.25.0
1.18
Jaeger is open-source software for tracing transactions between distributed services. It's used for monitoring and troubleshooting complex microservices environments.
Dev Stack
Latest Version
Used Version
Description
License
Type
OpenJDK
JDK11
8u212
OpenJDK is completely open-source and can be used freely
GPL-2
2.2.6
Spring Boot is an open-source micro-framework maintained by a company called Pivotal. It provides Java developers with a platform to get started with an auto configurable production-grade Spring application.
React
17.0.2
16.7.0
React is one of Facebook's first open-source projects that is both under very active development and is also being used to ship code to everybody on facebook.com.
MIT
16.8.0
Material-UI CE (Community Edition) has been 100% open-source (MIT) since the very beginning, and always will be. Developers can ensure Material-UI is the right choice for their React applications through Material-UI's community maintenance strategy.
MIT
NodeJS
14.0
8.4.0
Node. js is an open-source, cross-platform, JavaScript runtime environment. It executes JavaScript code outside of a browser.
MIT
DevOps Stack
Latest Version
Used Version
Description
License Type
Kubernetes
1.22
1.18.x
Kubernetes, also known as K8s, is an open-source system for automating deployment, scaling, and management of containerized applications.
Docker
19.03.14
19.x
Docker, a subset of the Moby project, is a software framework for building, running, and managing containers on servers and the cloud.
Helm
3.6.3
3.x.x
Helm helps you manage Kubernetes applications — Helm Charts help you define, install, and upgrade even the most complex Kubernetes.
1.1.0
v0.14.10
Terraform allows infrastructure to be expressed as code in a simple, human-readable language called HCL (HashiCorp Configuration Language).
Jenkins
2.306
2.289
Jenkins – an open-source automation server that enables developers around the world to reliably build, test, and deploy their software.
MIT
Go Lang
1.16.7
1.13.3
Go is an open-source programming language that makes it easy to build simple, reliable, and efficient software.
Groovy
3.0.8
3.0
Apache Groovy is a powerful, optionally typed and dynamic language, with static-typing and static compilation capabilities, for the Java platform aimed at improving developer productivity thanks to a concise, familiar and easy to learn syntax.
Python
3.9.6
v3.9.6
Python software and documentation are licensed under the PSF License Agreement. Starting with Python 3.8.6,
PSF
Sops
v3.7.1
v3.7.1
sops is an editor of encrypted files that supports YAML, JSON, ENV, INI and BINARY formats and encrypts with AWS KMS, GCP KMS, Azure Key Vault, age, and PGP.
Ansible
2.11.3
v2.9.23
Ansible is an open-source community project sponsored by Red Hat, it's the simplest way to automate IT.
GNU General Public License
yaml
1.2
1.2
YAML is a human-readable data serialization standard that can be used in conjunction with all programming languages and is often used to write configuration files.
License
mGramSeva service configuration docs
eChallan system enables employees to generate the challans for Adhoc services so that the payment can be recorded into the system along with service-specific details.
It also enables citizens to make payments online based on challan numbers.
Before you proceed with the documentation, make sure the following pre-requisites are met -
Java 8
The Kafka server is up and running
egov-persister service is running and has an eChallan persister config path added to it
PSQL server is running and a database is created to store eChallan data
Allow employees to capture service details for miscellaneous services and collect payment
Allow employees to update/cancel challan
Search, download, and print echallan / bill for miscellaneous service
Generate and view echallan / bill pdf for all miscellaneous and ad-hoc services
Send an SMS and an email bill notification to the citizen with a payment link and bill link
Role Action Mapping
Roles available:
Add MDMS configurations required for eChallan Service and calculator and restart the MDMS service.
Deploy the latest version of eChallan Service and calculator.
Add eChallan Service persister yaml path in persister configuration and restart persister service.
Add Role-Action mapping for APIs.
Add pdf configuration file for challan and bill.
The eChallan service is used to generate e-challans / bills for all miscellaneous/ad-hoc services which citizens avail from ULBs.
Can perform service-specific business logic without impacting the other module.
Allows capturing the unique identifier of the entity for which the challan is generated.
In the future, if we decide to make the application accessible to citizens, it can be done effortlessly.
Workflow or service-specific workflow can be enabled at the challan service level at any time, without the need for any design changes.
Allow employees to update/cancel challan.
To integrate, you need to overwrite the host of the echallan-services module in the Helm chart.
echallan-services/eChallan/v1/_create should be added as the create endpoint for creating eChallan in the system.
echallan-services/eChallan/v1/_search should be added as the search endpoint. This method handles all requests to search existing records depending on different search criteria.
echallan-services/eChallan/v1/_update should be added as the update endpoint. This method is used to update fields in existing records or to update the status of applications based on workflow.
Title
Link
API Swagger Documentation
(Note: All the APIs are in the same Postman collection therefore the same link is added in each row).
One of the major applications of the eGov stack is that it helps municipalities and citizens handle property tax payments and other related functions on the property such as assessments, mutation, and so on.
Prior knowledge of Java/J2EE
Prior knowledge of Spring Boot
Prior knowledge of REST APIs and related concepts like path parameters, headers, JSON etc.
Prior knowledge of Git
Prior knowledge of the demand-based systems
The following services should be up and running:
user
MDMS
Persister
Location
Localization
Id-Gen
Billing-service
URL-shortener
The Property Service provides multiple functionalities starting from serving as a central repository where property information is registered for reference of citizens and other municipality-provided services such as water connection and sewerage management. An assessment can be done to calculate and pay tax on the property. The different services provided by the property services are -
Property Registry
Assessment
Mutation
Bifurcation
Consolidation
Registry Explanation
The registry flow helps the citizen/Employee to create a property in the system with the minimal information required.
Other workflows such as assessment or mutation can be triggered on the existing ACTIVE Property in the registry.
The property can be created, updated, cancelled, and searched followed by the process of Mutation and Assessment.
The same entry in the registry can be referred to by other modules for various business purposes (Water charges).
MDMS CONFIG: https://github.com/egovernments/egov-mdms-data/tree/DEV/data/pb/PropertyTax
The persister file configuration for property services can be found in the Config repo of eGov Git, which needs to be added in the persister service - property-services-registry.yml
Each flow in the property has a workflow associated with it, which can be controlled by following configurations.
The Boolean field can enable/disable Workflow - the same field controls the update and creates the workflow.
is.workflow.enabled
true/false
enable disbale workflow
PT.CREATE
the name should match the config name in the workflow businessservice JSON
PT.LEGACY
PT.UPDATE
Workflow configuration for a property is created if the source is from the WATER CONNECTION module.
For the creation of property from the water and sewerage module, as per the use case mentioned in this ticket, a different workflow configuration is used. For each use case, to identify which workflow to use can be identified from this mdms file.
Use Case 1, which involves property creation from the Water and Sewerage module, necessitates a single-step workflow. In the MDMS file mentioned above, ensure that the businessService with PT.CREATEWITHWNS object is enabled, allowing the field to be set as true. Property creation from the Water and Sewerage module will feature a one-step workflow, for properties in an ACTIVE state.
Fields in the above MDMS file:
businessService
Name of workflow config
initialAction
Indicate the start(initial) action of the particular workflow mention in businessService.
inWorkflowStatusAllowed
This field indicate whether the property with application status as “inWorkflow” can be use with water and sewerage connection creation. If this field is true then for that particular use case, the property with “inWorkflow” status can be use with water and sewerage connection creation and vice versa
enable
If this filed is set as true, then the other fields associate with the particular object is use for property creation.
Note: Each object mentioned above represents a specific use case outlined in this ticket. Therefore, only one object (use case) enable field should be set to true at any given time.
Sample workflow config for use case 1 where property creation is from water and sewerage module with one-step workflow
Sample workflow config - (The same PT.CREATE can be used for update workflow also since both involve the same functionality)
PT.LEGACY workflow config
Notifications :
To enable or disable notifications notif.sms.enabled=true
#notif urls - makes use of the UI app host in notification service egov.notif.commonpay = citizen/egov-common/pay?consumerCode={CONSUMERCODE}&tenantId={TENANTID} egov.notif.view.property = citizen/property-tax/my-properties/property/{PROPERTYID}/{TENANTID} egov.notif.view.mutation = citizen/pt-mutation/search-preview?applicationNumber={APPID}&tenantId={TENANTID}
The current localization messages for notification -
Configs in App.props
egov.idgen.ack.format
PB-AC-[cy:yyyy-MM-dd]-[SEQ_EG_PT_ACK]
egov.idgen.mutation.format
PB-MT-[CITY]-[SEQ_EG_PT_MUTATION]
egov.idgen.assm.format
PB-AS-[cy:yyyy-MM-dd]-[SEQ_EG_PT_ASSM]
egov.idgen.ptid.format
PB-PT-[cy:yyyy-MM-dd]-[SEQ_EG_PT_PTID]
citizen.allowed.search.params
accountId,ids,propertyDetailids,mobileNumber,oldpropertyids
employee.allowed.search.params
accountId,ids,propertyDetailids,mobileNumber,oldpropertyids
Property service can be integrated with any organization or system that wants to maintain a record of the property and collect taxes with ease.
Easy to create and simple process of self-assessment to avoid the hassle.
Helps maintain property data which can be used in the integration of other essential services like asset management, water connection and so on.
provides additional functionalities like mutation and assessment of properties.
Customers can create a property using the /property/_create
Search the property using /property/_searchendpoint
/property/_update endpoint to update the property demand as needed.
Mutation can be carried out with the help of /property/_update itself, no extra API is required.
Doc Links
Title
Link
USER Service
url-shortening
MDMS
Billing-service
Location
Workflow
Persister
Localization
Id-Gen service
API LIST
Title
Link
/Property/_create
/Property/_update
/property/_search
The main objective of the billing module is to serve the Bill for all revenue Business services. To serve the Bill, Billing-Service requires demand. Demands will be prepared by Revenue modules and stored by billing based on which it will generate the Bill.
Prior knowledge of Java/J2EE.
Prior knowledge of Spring Boot.
Prior knowledge of KAFKA
Prior knowledge of REST APIs and related concepts like path parameters, headers, JSON, etc.
Prior knowledge of the demand-based systems.
The following services should be up and running:
user
MDMS
Id-Gen
URL-Shortening
notification-sms
eGov billing service creates and maintains demands.
Generates bills based on demands.
Updates the demands from payment when the collection service takes a payment.
Deploy the latest image of the billing service available.
In the MDMS data configuration, the following master data is needed for the functionality of billing
Business Service JSON
TAX-Head JSON
Tax-Period JSON
bs.businesscode.demand.updateurl
{
Each module’s application calculator should provide its own update URL. if not present then new bill will be generated without making any changes to the demand.
bs.bill.billnumber.format
BILLNO-{module}-[SEQ_egbs_billnumber{tenantid}]
IdGen format for bill number
bs.amendment.idbs.bill.billnumber.format
BILLNO-{module}-[SEQ_egbs_billnumber{tenantid}]
is.amendment.workflow.enabled
true/false
enable disable workflow of bill amendment
Billing service can be integrated with any organization or system that wants a demand-based payment system.
Easy to create and simple process of generating bills from demands
The amalgamation of bills period-wise for a single entity like PT or Water connection.
Amendment of bills in case of legal requirements.
Customers can create a demand using the /demand/_create
Organizations or system can search the demand using /demand/_searchendpoint
Once the demand is raised the system can call /demand/_update endpoint to update the demand as per need.
Bills can be generated using, which is a self-managing API that generates a new bill only when the old one expires /bill/_fetchbill.
Bills can be searched using /bill/_search.
Amendment facility can be used in case of a legal issue to add values to existing demands using /amendment/_create and /amendment/_update can used to cancel the created ones or update workflow if configured.
Interaction Diagram V1.1
Doc Links
Title
Link
Id-Gen service
url-shortening
MDMS
API List
Title
Link
/demand/_create, _update, _search
/bill/_fetchbill, _search
/amendment/_create, _update
What is apportioning?
Adjusting the receivable amount with the individual tax head.
Types of apportioning V1.1:
Default order-based apportioning(Based on apportioning order adjust the received amount with each tax head).V1.1
Types of apportioning V1.2:
Proportionate-based apportioning (Adjust total receivable with all the tax heads equally)
Order & Percentage-based apportioning(Adjust total receivable based on order and the percentage which is defined for each tax head).
Principle of apportioning:
The basic principle of apportioning is, that if the full amount is paid for any bill then each tax head should get nullified with their corresponding adjusted amount.
Example: Case 1: When there are no arrears all tax heads belong to their current purpose:
TaxHead
Amount
Order
Full Payment(2000)
Partial Payment1(1500)
Partial payment2(750)
Partial payment2 with rebate(500)
Pt_tax
1000
6
1000
1000
750
750
AdjustedAmt
1000
-250
-750
-750
RemainingAMTfromPayableAMT
0
0
0
0
Penality
500
5
500
500
AdjustedAmt
500
-500
RemainingAMTfromPayableAMT
1000
250
Interest
500
4
500
500
AdjustedAmt
500
-500
RemainingAMTfromPayableAMT
1500
750
Cess
500
3
500
500
AdjustedAmt
500
-500
RemainingAMTfromPayableAMT
2000
1250
Exm
-250
1
-250
-250
AdjustedAmt
-250
250
RemainingAMTfromPayableAMT
2250
1750
Rebate
-250
2
-250
-250
AdjustedAmt
-250
250
RemainingAMTfromPayableAMT
2500
750
Case 2: Apportioning with two years of arrear: If the current financial year is 2014-15. Below are the demands
TaxHead
Amount
TaxPeriodFrom
TaxPeriodTo
Order
Purpose
Pt_tax
1000
2014
2015
6
Current
AdjustedAmt
0
Penality
500
2014
2015
5
Current
AdjustedAmt
0
Interest
500
2014
2015
4
Current
AdjustedAmt
0
Cess
500
2014
2015
3
Current
AdjustedAmt
0
Exm
-250
2014
2015
1
Current
AdjustedAmt
0
If any payment is not done, and we generate demand in 2015-16 then the demand structure will be as follows:
TaxHead
Amount
TaxPeriodFrom
TaxPeriodTo
Order
Purpose
Pt_tax
1000
2014
2015
6
Arrear
AdjustedAmt
0
Pt_tax
1500
2015
2016
6
Current
AdjustedAmt
0
Penalty
600
2014
2015
5
Arrear
AdjustedAmt
0
Penalty
500
2015
2016
5
Current
AdjustedAmt
0
Interest
500
2014
4
Arrear
AdjustedAmt
0
Cess
500
2014
3
Arrear
AdjustedAmt
0
Exm
-250
2014
1
Arrear
AdjustedAmt
0
A quick walkthrough of mGramSeva
Detailed version -
Integration testing (also called end-to-end testing or GUI testing) is used to simulate a user interacting with your app by doing things like clicking buttons, selecting items, scrolling items, etc. Integration testing is used to test how individual pieces work together as a whole or capture the performance of an application running on a real device.
integration_test
We declared the integration_test package in pubspec.yaml as shown in the img above.
The test_driver directory contains the integration_test_driver.dart file. (The folder structure is shown in image above). The integration driver is called from this file.
The integration_test directory contains the test script files of different screens.
The Test Inputs directory contains the test_inputs.dart file. This file has the user actions inputs in json format. We can change user actions in this file.
There are two ways to start the integration testing:
To run the integration test on virtual emulator / mobile, run the command on your terminal :
cd ./frontend/mgramseva && flutter drive --driver=test_driver/integration_test_driver.dart
--target=integration_test/login_test.dart
(...or...)
Go to ./frontend/mgramseva/utils/execute_integration.sh
and run the execute_integration.sh
file on the virtual emulator / mobile. The integration test will start.
User actions Inputs - .frontend/mgramseva/integration_test/Test Inputs/test_inputs.dart
Integration Test Driver - .frontend/mgramseva/test_driver/integration_test_driver.dart
Execute Integration Test - .frontend/mgramseva/utils/execute_integration.sh
All content on this page by is licensed under a .
"PT":"
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
User service is responsible for user data management and providing functionality to log in and log out of the DIGIT system.
Before you proceed with the configuration, make sure the following pre-requisites are met -
Java 8
Kafka server is up and running
Encryption and MDMS services are running
PSQL server is running and the database
Redis is running
Store, update and search user data
Provide authentication
Provide login,logout functionality into MgramSeva platform
Store user data PIIs in encrypted form
Setup latest version of egov-enc-service and egov-mdms- service
Deploy the latest version of egov-user service
Add Role-Action mapping for API’s
Following are the properties in application.properties file in user service which is configurable.
Property
Value
Remarks
egov.user.search.default.size
10
default search record number limit
citizen.login.password.otp.enabled
true
whether citizen login otp based
employee.login.password.otp.enabled
false
whether employee login otp based
citizen.login.password.otp.fixed.value
123456
fixed otp for citizen
citizen.login.password.otp.fixed.enabled
false
allow fixed otp for citizen
otp.validation.register.mandatory
true
whether otp compulsory for registration
access.token.validity.in.minutes
10080
validity time of access token
refresh.token.validity.in.minutes
20160
validity time of refresh token
default.password.expiry.in.days
90
expiry date of a password
account.unlock.cool.down.period.minutes
60
unlock time
max.invalid.login.attempts.period.minutes
30
window size for counting attempts for lock
max.invalid.login.attempts
5
max failed login attempts before account is locked
egov.state.level.tenant.id
pb
User data management and functionality to log in and log out into the DIGIT system using OTP and password.
Providing the following functionality to citizen and employee type users
Employee:
User registration
Search user
Update user details
Forgot password
Change password
User role mapping(Single ULB to multiple roles)
Enable employees to login into the DIGIT system based on the password.
Citizen:
Create user
Update user
Search user
User registration using OTP
OTP based login
To integrate, the host of egov-user should be overwritten in the helm chart.
Use /citizen/_create
endpoint for creating users into the system. This endpoint requires the user to validate his mobile Number using OTP. The first OTP will be sent to his mobile number and then that OTP will be sent as otpReference
in the request body
Use /v1/_search
and /_search
endpoints to search users in the system depending on various search parameters
Use /profile/_update
for updating the user profile. The user will be validated (either by OTP-based validation or password validation) when this API is called
/users/_createnovalidate
and /users/_updatenovalidate
are endpoints to create user data into the system without any validations (no OTP or password required). They should be strictly used only for creating/updating user’s internally and should not be exposed outside
Forgot password: In case the user forgets the password it can be reset by first calling /user-otp/v1/_send
which will generate and send OTP on the employee’s mobile number, the password can then be updated using this OTP by calling API /password/nologin/_update
in which a new password along with the OTP has to be sent.
Use /password/_update
to update the existing password by logging in. In the request body, both old and new password has to be sent. Details of the API can be found in the attached swagger documentation
Use /user/oauth/token
for generating tokens, /_logout
for logout and /_details
for getting user information from his token
Multi-Tenant User: The Multi-tenant User functionality allows a user to perform actions across multiple ULBs. For example, an employee belonging to Amritsar can perform the role of Trade License Approver for Jalandhar by assigning a tenant level role of tenantId pb.jalandhar to him. Following is an example of such a user:
If an employee has a role with state level tenantId
he can perform actions corresponding to that role across all tenants
Refresh Token: Whenever the /user/oauth/token
is called to generate the access_token
, along with the access_token
one more token is generated called refresh_token
. The refresh token is used to generate new access_token
whenever the existing one expires. Till the time the refresh token is valid the user won’t have to log in even if his access_token
get’s expired, as it will be generated using refresh_token
. The validity time of the refresh token is configurable and can be configured using the property: refresh.token.validity.in.minutes
Title
Link
User Data encryption promotion details
Encryption Service
Link
/citizen/_create
/users/_createnovalidate
/_search
/v1/_search
/_details
/users/_updatenovalidate
/profile/_update
/password/_update
/password/nologin/_update
/_logout
/user/oauth/token
(Note: All the API’s are in the same postman collection therefore the same link is added in each row)
eChallan system enables employees to generate the challans for Adhoc services so that the payment can be recorded into the system along with service-specific details.
Before you proceed with the documentation, make sure the following pre-requisites are met -
Java 8
Kafka server is up and running
egov-persister service is running and has workflow persister config path added in it
PSQL server is running and a database is created to store workflow configuration and data
Allow employees to capture service details for miscellaneous services and mark as paid
Allow employees to update/cancel challan.
Environment Variables
Description
egov.user.event.notification.enabled
This variable is to check the event Notification enabled or not.
egov.challan.default.limit
This variable is to get the default limit value
egov.challan.max.limit
This variable to check the max limit value.
create.ws.workflow.name
This variable will give the business service name while creating the workflow.
notification.sms.enabled
This variable is to check the SMS notifications are enabled or not.
egov.localization.statelevel
This variable is used to check the localizations are state level or not.
egov.pending.collection.link
variable for collection list screen link for notifications
egov.monthly.summary.link
variable for monthly summary screen link for notifications
egov.new.Expenditure.link
variable for new expenditure screen link
egov.mark.paid.Expenditure.link
variable for paid expenditure screen link
egov.bilk.demand.failed.link
variable for mnaul bulk demand generation screen link
egov.today.collection.link
variable for today’s collection screen link
MDMS Configuration Actions & Role Action Mapping
Actions
Role Action Mapping
Roles available
Add mdms configs required for eChallan Service and calculator and restart mdms service.
Deploy the latest version of eChallan Service and calculator.
Add eChallan Service persister yaml path in persister configuration and restart persister service
Add Role-Action mapping for API’s.
Add pdf configuration file for challan and bill.
The eChallan service is used to generate e-challans / bills for all miscellaneous / adhoc services .
Can perform service-specific business logic without impacting the other module.
Provides the capability of capturing the unique identifier of the entity for which the challan is generated.
In the future, if we want to expose the application to citizens then it can be done easily.
The workflow or Service-specific workflow can be enabled at the challan service level at any time without changing the design.
Allow employees to update/cancel challan
To integrate, the host of echallan-services module should be overwritten in helm chart.
echallan-services/eChallan/v1/_create
should be added as the create endpoint for creating eChallan in the system.
echallan-services/eChallan/v1/_search
should be added as the search endpoint. This method handles all requests to search existing records depending on different search criteria.
echallan-services/eChallan/v1/_update
should be added as the update endpoint. This method is used to update fields in existing records or to update the status of application based on workflow.
/echallan-services/eChallan/v1/_expenseDashboard
Is added in echallan-service to show the data of expenses in metrix format.
/echallan-services/eChallan/v1/_chalanCollectionData
it is added to get the main monthly dashboard data for the expense.
Title
Link
API Swagger Documentation
Link
echallan-services/eChallan/v1/_create
echallan-services/eChallan/v1/_update
echallan-services/eChallan/v1/_search
echallan-services/eChallan/v1/_chalanCollectionData
echallan-services/eChallan/v1/_chalanCollectionData
(Note: All the API’s are in the same postman collection therefore the same link is added in each row)
We are using re-indexing to get all the data to the respective indexer. We have 2 steps for this. The first step is to run the connector from the playground, which is followed by legacy indexer service call from indexer service, which internally calls the respective plain search service to get the data and to send it to the respective indexer.
Access to kubectl of the environment targeted
Plain search APIs in the respective services
We have mainly 3 indexes in mGramSeva for Re-indexing -
Water-services
e-challan-services
dss-collection_v2
ws-services re-indexing - Kafka Connector Curl to be run from playground pod
Plain Search Call
EChallan-Reindexing
Kafka Connector Call to be run from Playground pod
Legacy Index call from postman
Dss collection v2 re-indexing - Kafka Connector call to be run from playground pod
payment re-indexing run from postman call
GitHub Actions enables you to create custom software development lifecycle workflows directly in your GitHub repository. This enables you to include Continuous Integration (CI) and continuous deployment (CD) capabilities. It makes it easier to automate how you build, test, and deploy your projects on any platform, including Linux, macOS, and Windows.
Run your workflows in a virtual machine and local machine as well.
It is easy to build the app in artefacts.
Analyze, build, test and deploy our applications on any platform.
Easily release the app bundle in the Play store.
The speed of GitHub Actions is good.
Primary Files - https://github.com/egovernments/punjab-mgramseva/blob/develop/frontend/mgramseva/lib/screeens/SelectLanguage/languageSelection.dart
Every command will be written in yml files and all these files will be in .github/workflows/ directory of your repository, then only git will identify our script files.
In our repository we are maintaining this file as main.yml, In this yml file we are executing the android drive job, which will run the integration testing scripts, once all the tests are passed then only it will build the app in QA ENV and store it in the artefacts as shown image.
Explained every line of main.yml file with comments below.
We can host your own runners and customize the environment used to run jobs in your GitHub Actions workflows. Self-hosted runners can be physical, virtual, in a container, on-premises, or in a cloud.
With self-hosted runners, you can choose to create a custom hardware configuration with more processing power or memory to run larger jobs, install software available on your local network, and choose an operating system not offered by GitHub-hosted runners.
On https://github.com/ navigate to the main page of the repository.
In the left sidebar, click Actions.
In the left sidebar, under "Actions", click Runners.
Click New self-hosted runner.
Select the operating system image and architecture of your self-hosted runner machine.
You will see instructions showing you how to download the runner application and install it on your self-hosted runner machine.
After completing the steps to add a self-hosted runner, the runner and its status are now listed under "Runners".
Now you will have to edit the main.yaml file for using our local machine, replace the runs on with self-hosted
as shown below.
runs-on: ubuntu-latest
>> runs-on: self-hosted
Users are redirected to this screen once they select the preferred language in the previous screen.
Link → {base url}/mgramseva/selectLanguage/login
Users enter the registered Phone Number and Password.
Click on Continue.
First-time login users navigate to Reset Password Page.
Log in with the default password
Primary Files:
Stack
1 → Language selection screen. + Login screen.
Pop → Language selection screen.
Widgets utilized from library
Users are redirected to this screen once they click on the Change Password option in the sidebar app drawer.
Link → {base url}/mgramseva/home/changepassword
Enter the Current Password
Enter and Confirm a New Password to set the login credentials for the next time login
Click the Change Password Button. The user login password is set to the new password.
This feature helps match the user password to the requirements and checks if the password contains
Minimum 6 digits
At least one special character ( !#$%^&...)
At least one letter
At least one number
Stack
1 → Home Screen. + Change Password Screen
Pop → Home Screen
Widgets utilised from Library
Users are redirected to the home page screen after successful login. This screen consists of multiple sections and user interactions. If the user is mapped to multiple tenants then a dropdown appears. The user can select the desired tenant to proceed further. Once the user selects the tenant, the feature cards are displayed on the screen based on the roles mapped for the selected tenant.
YES → WalkThrough/User Guidance Enabled
NO → Home Screen
If the user logs in for the first time a system walkthrough begins automatically.
Else, users can view walkthroughs at any time by clicking on the help icon.
Create a global key for each card.
Create placeholder cards, pointers and description widgets.
On click, the position of the card is determined and the placeholder card appears on the overlay exactly.
Primary Files
Next → Changes the active index of the global key and repeat the same process outlined in the implementation logic
skip, End → closes the overlay
Home Screen - consists of multiple feature cards
Cards are displayed based on Role Access
The home screen also consists of notifications. The notifications are customized for each user ID and user role.
Individual API calls are made with the user ID and with the user role that merges both and notifications are displayed accordingly.
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
Under your repository name, click Settings as shown in the image.
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
YES →
NO →
Primary Files:
,
Primary Files
Phone Number*
r'^[0-9]+$'
Password*
r'^(?=.*?[A-Za-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{6,}$'
/user/oauth/token
POST
username: {} password:{} scope: read grant_type: password tenantId: {} userType: EMPLOYEE
BuildTextField
Text Field
Button
Button
Current Password*
No Validation
Set a New Password*
r'^(?=.*?[A-Za-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{6,}$'
Confirm New Password*
Match with New Password
user/password/_update
POST
"userName": {}, "existingPassword": {}, "newPassword": {}, "tenantId": {}, "type": {}
BuildTextField
Text Field
Button
Button
Enables employees to add expenses - the process of onboarding the end-users. Add Expenses card is available on the home screen for defined user roles having the EXPENSE PROCESSING permission.
Link → {base url}/mgramseva/home/addExpense
Clicking the Add Expense Record tile/card on the home screen navigates the user to Add Expenses screen. The user enters the required details to add the expenses for the vendors.
If a user logs in for the first time then a walkthrough is populated following the same logic as in the home screen.
Clicking on the Submit button navigates the user to the Expenditure Added Successful acknowledgement screen.
This feature allows the user to take a picture or choose a single file. The Image Picker plugin is used to implement this.
Whenever this application is used on mobile, it prompts the user with two options - Camera and File Picker. If the application is opened on desktop or laptop browsers, the camera option is not available. The user has to select an image from the folder.
The maximum supported file size is 5 MB.
For validating the form we use the Form widget. Once the user selects a bill date the Bill Pay option is enabled. Else, the auto-validation process is enabled. Based on the bill date, the party selection date is enabled. If the user selects the party selection date first, the bill date can be selected only after entering the party date. Whenever the bill paid option is true, the paid date field is enabled and mandatory. The date selection range allows date input only after the bill date and before the current date.
Primary Files -
Vendor Name*
[A-Za-z ]
Mobile Number*
[0-9] & is mandatory only if a new vendor is added
Type of Expense*
None
Amount*
[0-9]
Bill Date*
Before Current Date and after party Bill Date.
Party Bill Date
Should be before the Bill Date
Bill Paid
None
Paid Date
After Bill date and less than current Date.
Attach Documents
Option to upload a single document, Supported files - PDF, JPEG, PNG (maximum 5MB)
Note: All fields are validated on Submit apart from the Mobile number which gets validated on change.
/egov-mdms-service/v1/_search
[{"moduleName": "Expense", "masterDetails": [{"name": "ExpenseType"},]}, {"moduleName": "BillingService", "masterDetails": [{"name": "BusinessService"}, {"name": "TaxHeadMaster"},]}]
To get the Expense Type for the Dropdown
egov.org.in/vendor/v1/_search
tenantId: {}
To get the list of vendors in the selected tenant for the suggestion text box - Vendor Name
Stack
1 → Home Screen. + Add Expense Screen
Pop → Home Screen
Widgets utilised from Library
BuildTextField
Text Field
AutoCompleteView
Suggestion Text Field
SelectFieldBuilder
(Primary File)
SearchSelectFieldBuilder
(Secondary File)
Searchable Drop down
DatePickerFieldBulder
Date Picker
CommonSuccessPage
Success Screen
BottomButtonBar
Button
Users are navigated to the Edit Profile screen once they click on the option on the sidebar app drawer.
Link - → {base url}/mgramseva/home/editProfile
User can change their profile name, gender and email on this screen
Click on the Save button triggers a Details Saved Successfully message on the screen and saves the changes to the profile.
Primary Files: punjab-mgramseva/EditProfile.dart at develop · egovernments/punjab-mgramseva
Name
r'^[a-zA-Z ]+$'
Email ID
r'^$|^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$'
/user/profile/_update
POST
"user": { "id": {}, "userName": {}, "salutation": null, "name": {}, "gender": {}, "mobileNumber": "9191919146", "emailId": {}, "altContactNumber": null, "pan": null, "aadhaarNumber": null, "permanentAddress": null, "permanentCity": null, "permanentPinCode": null, "correspondenceAddress": null, "correspondenceCity": null, "correspondencePinCode": null, "active": true, "locale": null, "type": "EMPLOYEE", "accountLocked": false, "accountLockedDate": 0, "fatherOrHusbandName": null, "relationship": null, "signature": null, "bloodGroup": null, "photo": null, "identificationMark": null, "createdBy": {}, "lastModifiedBy": {}, "tenantId": {}, "roles": [ {} ], }
Stack
1 → Home Screen. + Edit Profile Screen
Pop → Home Screen
Widgets utilised from Library
BuildTextField
Text Field
BottomButtonBar
Button
RadioButtonField
Radio Buttons for options
Users are redirected to this screen if they select the GPWSC Dashboard option on the home screen.
Link → {base url}/mgramseva/home/dashboard?tab=0
Users can select the year from the drop-down which contains the list of financial years.
From the text field, users can search for connections by using the connection ID.
Users can see the connections data based on the property type for each respective tab (Ex: All, Residential, Commercial).
Initially, only 10 connections are loaded for the selected tab. The pagination dropdown and right arrow click enable users to view more connections.
By selecting any connection ID users are navigated to the .
Primary Files:
Stack
1 → Home Screen. + Dashboard collection screen + update connection screen
Pop → Dashboard collection screen → Home Screen
2 → Home Screen. + Dashboard collection screen + update connection screen + Update Success
Pop → Home Screen
Widgets utilised from Library
The Revenue Collector uses the Collect Payment screen to collect payment against the demand generated for metered and non-metered connections or any arrears.
Collect Payment card is available on the home screen to the user role having the COLLECTION_OPERATOR
permission.
Link → {base url}/mgramseva/household/details/collectPayment
Users can pay the total due amount that is set by default.
Or, users can also pay an advance amount or partial amount by changing the value in the payment amount field to a higher or lower value. If a partial amount is to be paid, then users need to provide a lower amount than the total due amount. If the advance amount is to be paid, users need to provide a higher amount than the total due amount.
Clicking on Collect Payment opens a confirmation popup to confirm if the amount entered is correct.
Clicking on Confirm navigates the user to the Payment Success screen. The user can download the receipt or share the receipt for the collected amount.
Users can also print mini receipts with the help of Bluetooth thermal printers by selecting the option.
billing-service/demand/_search
API is used to calculate the advance amount for the current bill. The advance amount is fetched from the logic - if taxHeadMasterCode
is 'WS_ADVANCE_CARRYFORWARD'.
This has two properties - collection amount and tax amount. The tax amount is the advance amount that is added to the system and the collection amount is the amount utilised from the total advance amount. We can get the current advance from the taxAmount - collectionAmount.
ws-calculator/waterCalculator/_getPenaltyDetails
API is used to calculate the Time Penalty amount. The time penalty amount is fetched from the logic - if taxHeadMasterCode
is'WS_TIME_PENALTY'.
The time penalty amount is retrieved from the tax amount property of the latest demand.
The due date is calculated by adding the billexpirtyDate
days to the demand generation date.
If the due date is crossed, billing-service/demand/_search
API gives the Time Penalty applied.
billing-service/demand/_search
API gives the Normal Penalty. The Penalty placeholder in the bill details is visible if it is the first demand and has the taxHeadMasterCode
as 10201.
The arrears are broken into 'BL_(TaxHeadCode)' fetched from Bill Details-->Bill Account Details --> Tax Head Code. The amount of particular arrears is similar to the Bill Details--> Amount from the Fetch Bill API.
(For instance, if there are two bills with tax head codes is 10101 and 10102, then arrears break up is represented as BL_10101(Water Charges) with the corresponding amount and BL_10102(Water Charges-Arrears) with the corresponding amount
).
Note:
The “Penalty” details displayed under “Bill Details“ section is displayed only if the config flag “Penalty enabled” is set as true. If it is set as false, then the penalty details is not displayed.
The “Advance” details displayed under “Bill Details“ section is displayed only if the config flag “Advance enabled” is set as true. If it is set as false, then the advance details is not displayed.
Stack
1 → Home Screen. + Search Connection Screen + Household Results + Household Details Screen + Collect Payment Screen
Pop → Household Details Screen
Widgets utilised from Library
Users can provide their feedback by giving a rating. It's an Open URL. It doesn’t require any Authentication user.
Link → {baseURL}mgramseva/feedBack?paymentId={}&connectionno={}&tenantId={}
Users can switch to multiple languages.
After submitting the feedback, users are navigated to the feedback submitted successfully acknowledgement screen.
Users are redirected to this screen when they select the GPWSC Dashboard option on the home screen.
Link → {base url}/mgramseva/home/dashboard?tab=1
Users can select the year from the drop-down which contains the list of financial years.
From the text field, users can search for the expenses using Bill ID or vendor name.
Users can see the expense data for paid and pending with respective tabs.
Initially, only 10 expenses are loaded for the selected tab. The pagination dropdown and right arrow click enable the user to load and view more expense records.
Selecting any Bill ID navigates the users to the .
Primary Files:
Stack
1 → Home Screen. + Dashboard expenditure screen + update expense screen
Pop → Dashboard expenditure screen → Home Screen
2 → Home Screen. + Dashboard expenditure screen + update expense screen + expense update success
Pop → Home Screen
Widgets utilised from Library
Controller → ,
View → ,
Model →
Primary Files:
Model →
View →
Controller →
/ws-services/wc/_search
POST
tenantId : {}
offset ; {}
limit : {}
fromDate : {}
toDate : {}
iscollectionAmount
: {}
isPropertyCount
: {}
propertyType
: {}
connectionNumber
: {}
freeSearch
: {}
sortOrder ; {} sortBy : {}
Pagination
Pagination
BuildTextField
Text Field
BillsTable
Table
LabelText
Subtitle
Partial Amount (If Partial Amount is selected
)
r'^[0-9]+$' , Can not be 0
Payment Method
Defaulted to Cash
API EndPoint
Input Params (Modules)
Description
egov-mdms-service/v1/_search
[{"moduleName":"BillingService","masterDetails":[{"name":"BusinessService","filter":"[?(@.code=='WS')]"}]}]
To get the billGeneiURL, Calculation of Water services and collectionModesNotAllowed
billing-service/bill/v2/_fetchbill
consumerCode : {}
businessService : WS
tenantId : {}
To fetch the bills of the connection/Consumer
billing-service/demand/_search
consumerCode, businessService, tenantId
To Fetch Demand Details
ws-calculator/waterCalculator/_getPenaltyDetails
{ "tenantId": "", "consumerCodes": "", "isGetPenaltyEstimate": "true"},
{
"GetBillCriteria":
{"tenantId": "", "isGetPenaltyEstimate": true, "consumerCodes": [""] }
}
To get the Time Penalty Amount
Widgets
File Path
Description
BuildTextField
Text Field
BottomButtonBar
Button
RadioButtonField
Radio Buttons for options
ConfirmationPopUp
Dialog box to confirm and proceed to next step
CustomDetailsCard
Secondary theme color Card to display Details Eg. Penalty Card
/echallan-services/eChallan/v1/_create
POST
tenantId : {} offset ; {} limit : {} fromDate : {} toDate : {} vendorName : {} challanNo : {} toDate : {} freeSearch : {} status : {} isBillCount : {}
sortOrder ; {} sortBy : {} isBillPaid : {}
Pagination
Pagination
BuildTextField
Text Field
BillsTable
Table
LabelText
Subtitle
Currently, we are using the LetEncrypt SSL certificate which is free. However, there is a catch here. The LetsEncrypt certificate is valid only for 3 months (90 days). Post 90 days this has be renewed manually. There are few paid ones available globally.
Water Connection Penalty changes are added to get the penalty amount after the due date. The due date is configurable and penalty enable and disable are also configurable. If we want to have the penalty we can enable or we can disable it through configuration.
Before you proceed with the documentation, make sure the following pre-requisites are met -
Java 8
Kafka server is up and running
egov-persister service is running and has the water service persister configs path added to it
PSQL server is running and a database is created to store water connection/application data
The following services should be up and running:
egov-persister
egov-mdms
ws-services
billing-service
Calculate water charges and taxes based on the billing slab.
Calculate meter reading charge for water connection
Generate demand for penalty feature
Scheduler for generating the demand(for non-metered connection)
Deploy the latest version of ws-service and ws-calculator
Add water-persist.yml & water-meter.yml file in the config folder in git and add that path in persister. (The file path is to be added in the environment yaml file in a param called persist-yml-path )
Use case 1 : Fixed percentage on outstanding without penalty Use case 2 : Fixed percentage on current month Use case 3 : Fixed percentage on outstanding including penalty
Note : All above are applied to the running month only.
Use case 4 : Fixed percentage on outstanding applied for every month on the outstanding amount respectively (not implemented)
Tech configs:
Use case 1: "type": "Fixed", "subType": "outstandingWithoutPenalty"
Use case 2: "type": "Fixed", "subType": "currentMonth",
Use Case 3: "type": "Fixed", "subType": "outstanding", We have Total 4 types of penalty in the system:
Fixed - Current month: This type of penalty is applied to the current month's amount based on the rate (%) given in the configuration.
Fixed - outstanding: This is the penalty applied on the total outstanding amount including previously applied penalties based on the rate (%) given in the configuration.
Fixed - outstandingWithoutPenalty: This is the penalty applied on the total outstanding amount excluding previously applied penalties based on the rate (%) given in the configuration.
Flat - Current month: This type of penalty is applied to the current month's amount based on the amount given in the configuration.
Flat - outstanding: This type of penalty applied to the total pending amount till the current month amount based on the amount given in the configuration.
ws-services/wc/_submitfeedback
connectionno
,paymentId
,
tenantId
additionaldetails":{"CheckList":[{"code":"HAPPY_WATER_SUPPLY","type":"SINGLE_SELECT","value":"3"},{"code":"WATER_QUALITY_GOOD","type":"SINGLE_SELECT","value":"5"},{"code":"WATER_SUPPLY_REGULAR","type":"SINGLE_SELECT","value":"5"}]}
API to submit user feedback
Portable Bluetooth thermal printers are used to generate the mini receipts.
Dependencies
bluetooth_thermal_printer
js
Enable Bluetooth in the respective mobile device.
Switch the thermal printer.
Tap on the Print button from the respective screen if the printer device is connected already it will print the receipt directly or else it will show a dialogue with a list of Bluetooth devices, from their user need to a selected respective thermal printer, once the device is paired successfully it will generate a receipt in the printer.
printTicket
→ Used to write the bytes to the thermal printer if the device is connected otherwise it will show paired Bluetooth devices in a dialogue.
Required Arguments → bytes, context
getTicket
→ Used to generate the bytes from Image and also sets the paper size.
Required Arguments → Image
showMyDialog
→ Used to show the Paired Bluetooth devices
Required Arguments → bytes, context
setConnect
→ If the device is already connected it will generate the receipt or else it will show the paired devices to connect.
List of actions required to go live in the new State for the mGramSeva module
Users are redirected to this screen by selecting the Update Expense card on the home screen.
Update Expenses card is available on the home screen for defined roles that have EXPENSE PROCESSING permission.
Link → {base url}/mgramseva/home/searchExpense
Users can search the expense bills with the Vendor Name / Type of Expense / Bill ID ( Search with any one of these criteria
)
Click on Search navigates the user to the expense results screen which lists the expenditure bills matching the search criteria.
Primary Files:
Stack
1 → Home Screen. + Search Expense Bills Screen
Pop → Home Screen
Widgets utilised from Library
Users are redirected to this screen once they select the Household Register tile/card on the home screen.
The Household Register tile/card is displayed to the user with COLLECTION_OPERATOR
role.
Link → {base url}/mgramseva/home/householdRegister
From the text field, users can search for connections by using the connection ID.
Users can see all the connections data of the selected tenant till the current date based on their payment status (Ex: All, Paid, Pending).
Initially, only 10 connections are loaded for the selected tab. The pagination drop-down and right arrow click enable users to view more connections.
Selecting any connection ID redirects users to the View Consumer Details screen.
Click on the Download button to get all the household records in PDF format.
Click on Share to share the PDF on Whats App.
Primary Files:
Stack
1 → Home Screen. + Household Register Screen
Pop → Household Register Screen→ Home Screen
2 → Home Screen. + Household Register Screen + View Consumer Details Screen
Pop → View Consumer Details Screen → Household Register Screen
Widgets used from Library
Domain or subdomain registry and mapping cname
Follow the steps provided on this page to configure domains or subdomains registry and mapping CNAME.
Create a CNAME (Canonical Name) entry in your domain's DNS settings and point it to the AWS load balancer or gateway URL. The external IP for the domain is provided by the AWS load balancer or gateway.
The domain name is the address through which the internet users can access the website rather than entering the whole IP address in the search bar of the browser.
This domain name is ideally chosen by the state/client since it is a product that has to be used for/by them.
Following is the table through which the information can be shared.
Note: The data given in the table is sample data.
Since all state governments/clients prefer to host the websites on their servers, this activity is ideally done by them.
Following are the steps which are to be followed:
Download the data template attached to this page.
Get a good understanding of all the headers in the template sheet, their data type, size, and definitions by referring to the ‘Data Definition’ section of this document.
In case of any doubt, please reach out to the person who has shared this template with you to discuss and clear your doubts.
If the state agrees to host the website on their server, provide them with the 2 columns mentioned in the attached template.
If the state disagrees to host on their server, then a domain name has to be purchased by any of the external vendors and the EXTERNAL-IP address has to be mapped with them.
Verify the data once again by going through the checklist and making sure that each point mentioned in the checklist is covered.
This checklist covers all the activities that are common across the entities.
Following is the attached configurable data template in case the state is doing the required activities.
Configurable Data Template - Domain Name Configuration
Sample Configurable Data - Domain Name Configuration
After AWS installation we need to setup some services which are as follows :-
To enable any municipal service in a fresh environment and for the first time, we require a basic idea of what DIGIT does and the generic services required to set it up.
DIGIT is an open-source, customizable platform that lends itself to extensibility. New modules can be built on top of the platform to suit new use-cases or existing modules can be modified or replaced. To enable this, in addition to deploying DIGIT, a CD/CI pipeline has to be set up. CD/CI pipelines enable the end users to automate & simplify the build/deploy process.
Find more details on DIGIT and platform deployment .
DIGIT platform comprises several core services that serve as the platform backbone. Some of the key core services are listed below:
..among
Each microservice has a distinct function explained in the provided documentation links.
Developers can activate specific municipal services easily once the platform and its terminologies are well understood.
This page provides step-by-step instructions for creating a consumer in the mGramSeva system using two API calls. The first API call is for creating a property, and the second API call is for making a connection for the consumer.
Before proceeding with the given tasks, ensure the following prerequisites are met:
Authentication Token (authToken): Obtain a valid authentication token for the desired environment. This token is necessary to authenticate and authorize your requests.
API Endpoints: Ensure you have access to both APIs required for creating a property and a consumer. Make sure you have the correct API documentation or information about the endpoints, request payloads, and any required headers.
Postman: If you don't have Postman installed, download and install it. Import collection in Postman. Make sure you change the URL as per your requirements.
Follow the steps given below to create consumers using either Property Create API or Consumer Create API.
Here's a step-by-step guide:
Locate the Property Creation API:
Open the Postman collection you imported.
Find the request corresponding to the Property Creation API. It might be named something like "Create Property" or similar.
Set Request Parameters:
Review the request parameters for creating a property.
For metered connections, provide values for initialMeterReading
, meterReading
, meterId
, and previousReading
. Set them to null if not applicable.
Set ConnectionType
to "Metered" for metered connections and "Non_Metered" for non-metered connections.
Ensure that oldConnectionNo
is unique every time you create a property.
Execute the Request:
Click on the "Send" button to execute the request.
Review the response to confirm that the property has been created successfully.
Copy Property ID:
In the response, you should find the propertyId
field. Copy the value of propertyId
as this will be needed for subsequent steps.
Now, you have successfully created a property, and you have the propertyId
copied for future use. Ensure to follow any additional instructions provided in the Postman collection or the API documentation.
Follow the steps below to create a consumer using the Consumer Creation API from the Postman collection:
Locate the Consumer Creation API:
Open the Postman collection.
Find the request corresponding to the Consumer Creation API. It may be named "Create Consumer - Metered" for metered connections or "Create Consumer - Non-Metered" for non-metered connections.
Set Request Parameters:
Review the request parameters for creating a consumer.
For metered connections, provide values for initialMeterReading
, meterReading
, meterId
, and previousReading
. Set them to null if not applicable.
Set ConnectionType
to "Metered" for metered connections and "Non_Metered" for non-metered connections.
Ensure that oldConnectionNo
is unique every time you create a consumer.
Use the propertyId
obtained from creating the property as instructed in the previous step.
Execute the Request:
Click on the "Send" button to execute the request.
Review the response to ensure that the consumer has been created successfully.
By following these instructions and providing the necessary details, you should be able to successfully create a consumer with a property and connection in the mGramSeva system. Ensure that you follow any additional guidelines or instructions provided in the Postman collection or API documentation.
Model → ,
View →
Controller -> ,
NOTE - mGramSeva uses DIGIT core services and additional code is available in and .
Owner Mobile Number
r'^(?:[+0]9)?[0-9]{10}$'
Name of the Consumer
r'^[A-Za-z ]'
Old Connection ID
No Validation
New Connection ID
No Validation
/egov-mdms-service/v1/_search
[{"moduleName": "Expense", "masterDetails": [{"name": "ExpenseType"},]}, {"moduleName": "BillingService", "masterDetails": [{"name": "BusinessService"}, {"name": "TaxHeadMaster"},]}]
To get the Expense Type for the Dropdown
BuildTextField
Text Field
SelectFieldBuilder
(Primary File)
SearchSelectFieldBuilder
(Secondary File)
Searchable Drop down
BottomButtonBar
Button
/ws-services/wc/_search
POST
tenantId
: {}
offset
; {}
limit
: {}
toDate
: {}
isCollectionCount
: {}
isBillPaid
connectionNumber
: {}
freeSearch
: {}
sortOrder
: {}
sortBy
: {}
/filestore/v1/files
POST
tenantId
: {}
module
: {}
/egov-url-shortening/shortener
POST
url
: {}
Sr. No.
Domain Name
EXTERNAL-IP
1.
3.108.166.195
Domain Name
Alphanumeric
253
Yes
The name/address of the website being used to access the website/ module
EXTERNAL-IP
Alphanumeric
32
Yes
It is the IP address that has to be mapped to the domain name
Sr. No.
Checklist Parameter
Example
1
Make sure that each and every point in this reference list has been taken care of.
Sample of SMS present in mGramSeva application
This page provides details on how to register the SMS templates with the specified TEMPLATE ID for each Localization key and append the TEMPLATE ID at the end of the message in the Localization system.
To register the provided SMS templates with a specific TEMPLATE ID for each Localization key and append the TEMPLATE ID at the end of the message
The sample SMS messages in the table below have to be registered with a specific TEMPLATE ID (Eg.'100700746377980') for each Localization key.
Append the TEMPLATE ID at the end of the message.
Push the SMS templates in Localisation.
First time login OTP
RESET_PASSWORD_FIRST_TIME_OTP
OTP to reset password on NalJal is {otp}
Forgot Password OTP
RESET_PASSWORD_OTP
OTP to reset password on NalJal is {otp}
Creation login details
MGram.User.Invitation
Dear {USER}, You've been invited to NalJal Application. Please login using {LINK}. Username: {PHNO} Password: {PASSWORD}
Demand (Bulk)
mGram.GP.MonthlyDemandGenerated
Dear {ownername}, Demand for Billing Cycle {billingcycle} has been generated for {tenant -name}. Kindly plan for collection of Water Charges for this period. {LINK} DWSS
Pending Collection Reminder
mGram.GPUser.CollectionReminder
Dear {ownername}, Rs.{amount} is pending collections against Water Charges at {WIMC} as of {Date}. Click {PENDING_COL_LINK} to see more details. DWSS
New Calendar Month
mGram.GPUser.PreviousMonthSummary
Dear {user}, Rs.{PREVIOUS_MONTH_COLLECTION} has been collected in {PREVIOUS_MONTH} against water charges & Rs.{PREVIOUS_MONTH_EXPENSE} has been spent as expenditure for {WIMC}. Click {LINK} to see more details. DWSS
Fortnight
NEW_ENPENDITURE_SMS_EN_REMINDER
Please enter new expenditure bills online for {WIMC}. Click {NEW_EXP_LINK} to make an expense entry now. DWSS
Alternate Fortnight
MARK_PAID_BILL_SMS_EN_REMINDER
Expenditure bills for {WIMC} are awaiting payment confirmation. Please click {EXP_MRK_LINK} and mark them as paid, if paid already. DWSS
Demand (Bulk) - (NM & M)
mGram.Consumer.NewBill
Dear {ownername}, New water bill for Billing Cycle {Period} has been generated for Consumer Id {consumerno} for Rs.{billamount}. Click {BILL_LINK} to download latest bill. DWSS
Demand (Bulk) - (NM & M)-1
mGram.consumer.payment.message
Dear {ownername}, Pending Amount for water charges for Consumer Id {connectionno} is Rs.{billamount}. Click {PAY_LINK} to pay online. DWSS
Bill Paid
Gram.Consumer.DownloadReceipt
Dear {ownername}, Rs.{amountpaid} has been paid for Water Charges for Consumer Id {consumercode}. Pending Amount is Rs.{pendingamount}. Click {RECEIPT_LINK} to Download Receipt. DWSS
Feedback Collection
mGram.Consumer.TakeSurvey
Dear {ownername}, Thank you for paying water charges. Please take this short survey {SURVEY_LINK} and help us know more about water supply at {WIMC}. DWSS
mGramSeva's Master Data Management System (MDMS) is organized into several folders, each containing essential JSON files that define various aspects of the application's configuration. This documentation provides an overview of the key folders and their respective files, along with a description of the data contained within each file.
This folder contains the actions-test.json
file, which defines various API endpoints along with their configurations.
id
: Unique identifier for the API endpoint. Increase id with respect to id present in action-test.json file.
name
: Name of the endpoint.
url
: URL of the API endpoint.
Other things
: As per your specific requirements.
This folder contains the roleactions.json
file, which associates roles with action IDs.
rolecode
: Code representing the role.
actionid
: Action ID associated with the role, linking to entries in actions-test.json.
actioncode
: Additional code for the action if needed.
tenantId
: Tenant ID associated with the role.
This folder contains the roles.json
file, defining roles in the system.
code
: Code representing the role.
name
: Name of the role.
description
: Description of the role.
This folder contains various JSON files related to billing services.
4.1 BusinessService.json
Defines business services, such as expenses like electricity bills and salaries.
businessService
: Identifier for the business service.
code
: Code representing the business service.
collectionModesNotAllowed
: Collection modes not allowed for the service.
partPaymentAllowed
: Indicates whether part payment is allowed.
isAdvanceAllowed
: Indicates whether advance payment is allowed.
isVoucherCreationEnabled
: Indicates whether voucher creation is enabled.
isActive
: Indicates whether the service is active.
type
: Type of the service.
PaymentService.json
This file, located in the billingservice
folder, provides configurations for payment services within the Billing Service module.
tenantId
: The identifier for the tenant associated with the configuration.
moduleName
: The name of the module, in this case, "BillingService."
PaymentService
: An array containing configurations for different payment services.
Payment Service Configuration:
businessService
: Identifier for the business service.
code
: Code representing the payment service.
collectionModesNotAllowed
: Array specifying modes of payment not allowed for this service.
"DD"
: Demand Draft
"CHEQUE"
: Cheque
"CARD"
: Card
"OFFLINE_NEFT"
: Offline NEFT
"OFFLINE_RTGS"
: Offline RTGS
"POSTAL_ORDER"
: Postal Order
"ONLINE"
: Online
partPaymentAllowed
: Indicates whether part payment is allowed for this service.
isAdvanceAllowed
: Indicates whether advance payment is allowed for this service.
demandUpdateTime
: Time interval (in milliseconds) for updating demands.
isVoucherCreationEnabled
: Indicates whether voucher creation is enabled for this service.
billGineiURL
: URL for generating bills using Bill Genie.
isBillAmendmentEnabled
: Indicates whether bill amendment is enabled for this service.
This configuration specifies the payment modes not allowed for the "ws-services-calculation" business service, whether part payment and advance payment are allowed, the demand update time, voucher creation status, Bill Genie URL, and bill amendment status.
TaxHeadMaster.json
This file is responsible for defining the various charges and taxes which are going to be configured in the application.
TaxPeriod.json
This file is used to define the number of financial years which are supported in each tax head.
This folder contains various JSON files related to ws-services-masters.
6. ws-services-calculation This folder contains various JSON files related to ws-services-calculations.
This folder contains various JSON files related to property tax.
This folder contains expense type in JSON format.
All (1 to 8 points) are state-level changes.
9. Tenant Folder (City level changes for every city there is one folder in MDMS)
For each tenant, there is a unique folder containing three subfolders, each with its specific configuration files.
businessservice.json
- Billing Service ConfigurationThis file, located in the billing service
folder, provides tenant-specific configurations for the Billing Service module. It is similar to the global BusinessService.json
configuration but is specific to the tenant.
boundary-data.json
- Location Boundary Data ConfigurationThis file, located in the egov-location
folder contains boundary data specific to the tenant.
Details of the structure and content of this file would be specific to the actual data in the system. Please refer to the specific boundary-data.json
file for detailed information.
WCBillingSlab.json
- Water Connection Billing Slab ConfigurationThis file, found in the ws-services-calculation
folder defines billing slabs for water connection based on building type and connection type.
id
: Unique identifier for the billing slab.
buildingType
: Type of the building (e.g., RESIDENTIAL).
connectionType
: Type of connection (e.g., Metered).
calculationAttribute
: Attribute used for calculation (e.g., Water consumption).
minimumCharge
: Minimum charge for the billing slab.
slabs
: Array defining the billing slabs, including from
, to
, charge
, and meterCharge
.
This configuration is used to determine rates for water consumption based on the specified billing slab criteria.
There is a tenant folder in the MDMS which contains all tenants in tenants.json file.
Water Connection advance changes are added to allow the customer to pay the advance amount. This amount is adjusted when a new demand is generated. We can enable or disable advance based on the configuration.
Before you proceed with the documentation, make sure the following pre-requisites are met -
Java 8
Kafka server is up and running
egov-persister service is running and has the water service persister configs path added to it
PSQL server is running and a database is created to store water connection/application data
The following services should be up and running:
egov-persister
egov-mdms
ws-services
billing-service
ws-calculator
egov-apportion-service
Accepts advance amount during water connection creation and while collecting payment
Creates demand for consumer-type water connection-advance
Adjusts the new demand with existing advance with apportion service
Deploy the latest version of ws-service, ws-calculator, billing-service, egov-apportion-service
Billing service tax head configuration
Tax-head master service configuration
Creating a new bill for the advance amount in BillServiceV2. Removing the following line while adding the bill objects to the list if (billAmount.compareTo(BigDecimal.ZERO) >= 0)
Passing Active status filter for demand search during apportioning in DemandService. DemandCriteria searchCriteria = DemandCriteria.builder().tenantId(tenantId) .status(Demand.StatusEnum.ACTIVE.toString()).consumerCode(Collections.singleton(consumerCode)). businessService(businessService).build();
New Demand audit history API in Demandcontroller. An API that returns the audit history of demandDetails. demand/_history
Create water connection API: Adding a check for payment type advance. If advance, passing a boolean isAdvanceCollection to calculationRequest to water calculator service.
Update water connection API: Adding a check for payment type advance. If advance, passing a boolean isAdvanceCollection to calculationRequest to water calculator service. Adding a check for advance in validateUpdate method to set the current demand to CANCELLED.
Calling estimation service getEstimationMap based on isAdvanceCalculation boolean. If true, reading taxAmount from criteria.getWaterConnection().getAdvance();
Changes in getEstimatesForTax for a new taxHeadCode ADVANCE_COLLECTION with value WS_ADVANCE_CARRYFORWARD
Getting the advance amount in getCalculation with taxHeadCode ADVANCE_COLLECTION
Calling generateDemand method based on isAdvanceCalculation. If true, create a demand object with consumerType “waterConnection-advance“.
Based on the user role the following functionalities are available and displayed on the home screen:
GP Admin
Create Consumer
Edit Consumer
View HH Detail/Register
Collection Operator
Search Consumer
View HH Details/Register
Raise Bill
Collect Payment
Download Bills & Receipt
Revenue (Bulk Demand) Processing
Demand Generation
View HH Details/Register
Raise Bill
Download Bills & Receipt
Expense Processing
Expense Entry
Update Expense
Dashboard Viewer
Revenue Dashboard
Expenditure Dashboard
mGramSeva technical documents
This section contains mGramSeva technical documents.
Topics in this section:
Widgets
File Path
Description
Pagination
Pagination
BuildTextField
Text Field
BillsTable
Table
LabelText
Title
SubLabelText
Subtitle
This page provides a clear and concise guide for automating user creation in mGramSeva. It allows you to efficiently create users and manage their roles in the system.
Follow the steps provided on this page to create users for mGramSeva using a Python script. The process involves preparing an Excel sheet with user information, configuring the Python script, and executing it.
Python script for creating users for mGramSeva.The sample format of the Python script is attached below.
Excel sheet containing user data. The sample format of the Excel sheet is attached below. Make sure to populate the data in the same format.
Columns: tenant name, mobile no, father name, gender, date of birth (dd/mm/yyyy), type, and ward (fixed to "ward 1").
Types: Sarpanch, Secretory, Revenue Collector, Division User or State User
Roles for Sarpanch: COLLECTION_OPERATOR, EXPENSE_PROCESSING, BULK_DEMAND_PROCESSING, DASHBOARD_VIEWER, GP_ADMIN.
Roles for Secretory: EXPENSE_PROCESSING, BULK_DEMAND_PROCESSING, DASHBOARD_VIEWER, GP_ADMIN, COLLECTION_OPERATOR.
Roles for Revenue Collector: COLLECTION_OPERATOR, DASHBOARD_VIEWER.
Roles for Division User: HRMS_ADMIN, DIVISION_ADMIN
Roles for State User: HRMS_ADMIN, STATE_ADMIN
Prepare the Excel Sheet:
Create an Excel sheet with the following columns and data in the given format:
Tenant Name (in lowercase)
For State User tenant name will be pb
Mobile Number
Father's Name (Mandatory, use "NA" if not available)
Gender (M/F - this data is mandatory)
Date of Birth (in the format dd/mm/yyyy)
Type (Sarpanch, Secretory, Revenue Collector, Division User or State User)
Roles
Based on the User Type, set corresponding roles:
Sarpanch: COLLECTION_OPERATOR, EXPENSE_PROCESSING, BULK_DEMAND_PROCESSING, DASHBOARD_VIEWER, GP_ADMIN
Secretary: EXPENSE_PROCESSING, BULK_DEMAND_PROCESSING, DASHBOARD_VIEWER, GP_ADMIN, COLLECTION_OPERATOR
Revenue Collector: COLLECTION_OPERATOR, DASHBOARD_VIEWER
Division User: HRMS_ADMIN, DIVISION_ADMIN
State User: HRMS_ADMIN, STATE_ADMIN
The 'Boundary' should be set to "Ward 1" as per mGramSeva standards.
Run the Python Script:
Open the Python script.
Provide the following information within the script:
Host URL: Specify the target environment (prod, qa, or uat).
Username and Password: As per your host URL.
Path to the Excel file: Ensure the Excel file is in the same location as the script.
Execute the script.
Post-Execution:
Do not open the Excel file until the script has completed its task.
After the script finishes, open the Excel file to review the results.
The Excel file will contain two columns:
User ID: If successful, the ID will be present.
Status: Will indicate either "Success" or "Failure." If failed, the reason for failure will be provided.
This page provides step-by-step instructions for using a Python script to create consumers for mGramSeva. Follow these guidelines to load consumer data into the system using the Python script provided.
Before running the script, ensure you have a properly formatted Excel sheet. The sheet should include the following columns:
Consumer Name (Mandatory, use "NA" if not available)
Gender (Male/Female)
Father Name (Mandatory, use "NA" if not available)
Mobile Number (Mandatory)
Old Connection Number
Property Type
Service Type (till now in we have Non-metered only for data loading)
Ward (Always set to "Ward 1")
Meter Reading (If available, use provided date; otherwise, default to "12/01/2022")
GPWSC Name
Arrears
Previous Reading ((if arrears and previous reading are not given, write '0')
Ensure the format of the meter reading matches the provided sample format given in excel file below, as incorrect formatting may lead to loading failures.
Edit the Python script with the following details:
Set the host URL based on whether it's for production, QA, or UAT.
Provide the username and password corresponding to your host URL.
Specify the path where your Excel file is stored. It is recommended to store the Excel file in the same location as your Python script.
Execute the Python script after configuring the host URL, username, password, and file path. The script will load data into mGramSeva based on the information provided in the Excel sheet.
Do not open the Excel file until the script completes its task. After completion, open the Excel file to check the status. The status will indicate whether the operation was successful or if there was a failure. If there's a failure, refer to the provided reason for further investigation and resolution.
This page outlines the step-by-step process for using a Python script to change master rates for mGramSeva in bulk. The script reads data from an Excel file, updates the master rates, and generates a new CSV file containing the modified information. Once the script is successfully executed, changes can be pushed to the local MDMS repository on GitHub.
Python script
MDMS repository cloned on the local system
Excel file with tenant names, old master rates, and new master rates
1. Prepare Excel File:
Ensure the Excel file contains three columns: Tenant Name (in lowercase), Old Master Rate, and New Master Rate.
If the columns are not present, add them to the Excel file.
2. Clone and Create Branch:
Clone the MDMS repository to your local system.
Create a new branch from the branch where you intend to make changes.
3. Update Python Script:
Open the Python script and locate the variables:
updatedfile
: Provide the path to your Excel sheet.
localFilePath
: Specify the path where your MDMS repository is cloned.
Identify the columns in the Excel file where the Tenant Name, Old Master Rate, and New Master Rate are stored. Update the script accordingly:
Run the script.
4. Script Execution:
Do not open the Excel file during script execution.
The script will generate a new file named new_updated_file4.csv
containing information about whether rates were updated or not.
5. Verification:
Check new_updated_file4.csv
to verify if all rates were updated successfully.
6. Push Changes to Git:
If all rates are updated, the local changes will affect the MDMS repository.
Raise a pull request and merge changes from the Git repository.
Note:
It is crucial not to open the Excel file while the script is running to avoid data inconsistencies.
Ensure that the Python environment and dependencies are properly set up.
By following the steps above, you can efficiently update master rates for mGramSeva in bulk, ensuring accurate and streamlined changes to the MDMS repository.
All Gram Panchayats have a monthly billing cycle for water charges. The Scheduler automatically triggers on the “X” date of every month to generate demand and raise bills for non-metered connections.
Metered connections do not fall under bulk demand generation
For the first month of go-live, it is only the arrears and no demand that is generated hence there is no bill to collect payments.
From the second month (X date of Month 2) onwards, demand is generated.
Once the demand is generated, a notification is triggered to all mGramSeva users.
Details of Notification
“Demand for water charges has been raised for <GP>. New Bill Amount is Rs. Xyz. Overall pending amount is Rs.AbcD”
Each non-metered household also gets notifications
SMS Notification with Bill PDF
Dear “username”, A new water bill has been generated against <connection ID>. Please download the bill using <link>
SMS notification with a payment link
Dear “username”, A new water bill has been generated against <connection ID>. Please pay the bill online to avoid late payment charges<link>
Revenue collectors can see a new card (Updated card from month 2 onwards) with information related to demand and payment collection on the HH Details screen.
There is also a demand collection tile/card on the home screen.
This is used in cases when the scheduler is not run (due to technical errors) and the Gram Panchayat wants to run it manually.
The system does nothing if the manual demand generation is done in the middle of the billing cycle for which demand has already been generated.
Manual demand generation helps only when the scheduler has not generated a demand for a billing cycle.
For Demand Generation Logic refer to Bulk Demand Generation for Non-Metered
In the Bulk Demand screen -
Service Category: Defaulted to Water Charges (Module)
Service Type: Defaulted to “Non-Metered”
Billing Year: Dropdown with the list of the financial years from the master
Billing Cycle: Dropdown with the list of billing cycles for the selected financial year
Clicking on Generate Demand triggers the demand for the given billing cycle based on the logic defined above.
Once the demand is generated for metered and non-metered connections, revenue collectors come to this screen to collect payments.
Users can see the consumer billing information on the screen
Clicking on View Details expands the card and shows more details. Clicking on the Hide Details collapses the card to show only connection ID, Consumer Name & Total Due Amount.
Payment amount - can either pay
The full amount, or
Custom amount - Users can enter the custom amount in the input field - this cannot be zero or greater than the total due amount.
Payment methods
Cash - select cash and proceed to payment takes the user to the successful collection screen
Online - The online payment option displays a Q/R code on the user screen that can be scanned by another phone to pay the due.
Post payment via any mode - payment success screen is shown
Receipt ID format - RB-dd/mm/yyyy-yy/running_sequence_number
User Actions
Download receipt - download PDF version of receipt with receipt ID as the name of PDF while downloading
Share receipt via WhatsApp - opens the Phone OS sharing options
back to home - takes the user back to the home screen
SMS to HH
As soon as the amount is paid and the Revenue collector reaches the Payment success screen SMS is sent to HH.
SMS 1 - Dear ‘Username’, Paid Rs.X for water charges for bill period <Cycle>. Download receipt <link>
SMS 2 - Dear ‘Username’, Please leave a review on water supply at <GP> at <Link>
HH is able to leave a review for water charges. Refer Feedback - Post Payments
Details on the card
Connection ID
New Connection ID will be displayed here
Consumer Name
Consumer Name (Should take updated consumer name)
Bill ID number
ID of the Bill
Bill period
For non-metered connections
This is the latest billing cycle for which demand is generated
For metered connections
This is the new bill generated from the meter reading between the 2 most recent billing dates
Format
Month <space> Financial Year
Previous meter reading date - New meter reading date
Water charges
Amount for the latest billing cycle
For metered, calculate charges as per rate master between the latest 2 billing dates
Arrears
All old arrears accumulated for HH
Expansion should breakup of arrears by individual billing cycles/bill generation dates
Total Due amount
Net amount consumer has to pay
When an online payment method is selected, the “Collect Payment” option is disabled. Since HH scans the QR, the Revenue collector does not have control over the online process.
The partial amount cannot be greater than the full amount.
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
Users are redirected to the View Consumer screen from the home screen via
Collect payments → Search Screen → Consumer Details Screen
Download bills & receipts → Search screen → Consumer Details Screen
Dashboard → Collections → Click on Consumer ID
Household Register → Click on Consumer ID
This screen contains all information related to HH
Static HH card displays the following details
New Connection ID (also displayed as a heading)
Consumer name
Father's name
Phone number
Old connection ID
Address - Door Number, Street number, Ward (attached)
Property type
Service type
for metered connections - the meter number is displayed
If the bill is not generated (Post rollout until the first month)
Only the data Card is shown - No action is required
Once the first demand is generated - A new consumer bill/card gets generated and displays the following data points and actions -
Billing cycle – the latest billing cycle
Amount -
Current Amount - fixed charges applicable to the billing cycle
Arrears - Arrears from the first month (From next month onwards this field displays any unpaid dues)
Total Amount - Sum of current amount and arrears
Action Items
Download or Share Bill
Clicking on download bill prompts users to download the bill (Bill details are given in a separate user story)
Share bill (WhatsApp icon) opens sharing options to the phone OS and the user is able to share bills via WhatsApp
Message to go in WhatsApp “Please find Bill for water charges with Connection ID WS-83121-8312 generated on dd/mm/yyyy” along with bill PDF
Name of the PDF - “Bill ID”
Collect Payment
The Collect payment button takes the revenue collector to the payment collection screen
After the First payment collection is done
A receipt history block is visible only after the first payment transaction is completed through mGramSeva
A list of all the receipts is shown under this section as cards, with different data points as actions. Order of receipts is newest → oldest from top to bottom
Each receipt card contains
Receipt ID
Amount Paid
Paid Date
Actions
Download Receipt - downloads the receipt in the Revenue collectors phone as a PDF
Name of PDF - “Receipt ID”
Share (WhatsApp)
Message to go in WhatsApp “Please find the receipt for water charges with Connection ID WS-83121-8312 paid on dd/mm/yyyy” along with receipt PDF
New Connection Before First Bill Generation
First bill is generated - Payment Collection is pending
2 payments made
If a bill is not generated (Post rollout until the first month)
A data card is displayed on the screen
Below the data card - the Card to generate a new bill is also displayed
This card contains
Last bill generation date - For the first time this is picked up from data entry. Next time onwards the system captures the last bill generation date
Days from last bill generation date - indicates to the revenue collector the number of days passed since the last time a bill is generated
Previous Meter reading - Displays the last read meter units
Pending Amount
Before the first bill is generated, the arrears are captured during data entry
After the first bill is generated, the pending amount includes the entire amount due for the specific user
Generate a new bill
Clicking on Generate a New Bill initiates bill generation flow for metered connection
Note - Users have to generate a bill to start collecting payments. Arrear amount collection also is not possible till the first bill is generated.
After the first bill is generated
A new consumer bill/card gets generated with the following data points and actions
Last bill generation date - date of bill generation
Amount -
Current Amount - Volumetric charges between 2 latest meter readings according to rate master
Arrears - All previously unpaid dues
Total Amount - Sum of current amount and arrears
Action Items
Download, Share Bill
Clicking on the download bill prompts users to download the bill for the respective amount (Bill details are given in a separate user story)
Share bill (WhatsApp icon) opens the sharing options of the phone OS and the users can share bill via WhatsApp
Message to go in WhatsApp “ Please find Bill for water charges with Connection ID WS-83121-8312 generated on dd/mm/yyyy” along with bill PDF
Name of the PDF - “Bill ID”
Collect Payment
Collect payment takes the revenue collector to the payment collection screen
After the first payment collection is done
A receipt history block is visible only after the first payment happens through mGramSeva
A list of all the receipts is shown under this section as cards, with different data points as actions. Order of receipts is newest → oldest from top to bottom
Each receipt card contains
Receipt ID
Amount Paid
Paid Date
Actions
Download Receipt - downloads the receipt to the revenue collectors phone as a PDF
Name of PDF - “Receipt ID”
Share(WhatsApp)
Message to go in WhatsApp “ Please find receipt for water charges with Connection ID WS-83121-8312 paid on dd/mm/yyyy” along with receipt PDF
If a new bill is generated again by clicking on ‘Generate a new bill’ - the revenue collector goes through the bill generation flow and a single new card appears between ‘Generate bill’ and ‘Consumer receipts block’
mGramseva 1.2 Release Notes
mGramSeva 1.2 release features enhancements with a few functional changes and non-functional changes.
Create and update consumers with the option to pay penalty and advance
Allow users to collect advance payment
Penalty amount addition if the due amount is not paid before the due date
Addition of father/husband column in household register
Receipt and bill PDF changes based on advance and penalty amount and localization fixes
Dashboard data and trend graph data mismatch fixes
Non-functional: After flutter upgradation, APK was not working in Android > 12 fixes
Penalty and advance
Penalty and advance features added for consumers (Note: penalty/advance can be disabled from MDMS for a particular tenant)
Collect advance amount
Advance amount collection enabled (Note: Can be disabled from MDMS)
Father/husband column in the household register
Additional column added in Household Register screen and PDF.
Receipt and bill enhancements and fixes
Advance and penalty fields added
Localisation issue fixed
Dashboard data and graph data mismatch fixes
Due to the data mismatch, from two APIs, for both the graph and table, the data is taken from a single API
APK fixes
APK was showing a white screen in Android > 12, Fixes
The below enhancements in reports and dashboard are addressed for tracking/viewing Advance and Penalty details
Primary KPI for overall mGramSeva - mGramseva Adoption KPI
Additional: % of consumers paying and GPWSC collecting advance % of the advance amount of revenue collected month on month Outcomes: * Increased revenue * Timely payments
PFM-1699 - Reactivating the consumer and checking if it is allowing to generate the demand for previous month PFM-1761 - HH Register PDF | Consumer name in Hindi should be fetched in Hindi even if language selected is English. PFM-1671 - Bill and Receipt localization issue not displayed properly for tenant and month name
Penalty configuration change
ws-services-calculation
Penalty Change
Added new penalty taxhead
Access Control
Updated actions-test.json
Updated roleactions.json
Updated actions-test.json
Penalty and Advance Enabled
BillingService
Enabled Penalty and Advance
Role added
Added role
Enabled Time penalty
BillingService
Enabled Time penalty
Added Business service json in Billing service
BillingService
Added Business service json in Billing service for enable and disable Advance and penalty in Tenant level
Added TaxHeadMaster json in Billing service
BillingService
Added TaxHeadMaster json in billing service for enable and disable advance and penalty in tenant level
Added TaxPeriod json in Billing service
BillingService
Added TaxPeriod json in Billing service for enable and disable advance and penalty in tenant level
Penalty Type changing
ws-services-calculation
Updated the penalty type in this path - users can modify based on the requirement in tenant (verify document for penalty type)
Demand Penalty Details and action roles
Added demand penalty details and action roles
By Enabling and disabling this we can able change the payment type from state level to tenant level
By enabling and disabling this we can change the payment type from state level to tenant level
App Force Update
We need to update the version in MDMS with the latest version to be deployed in PlayStore or AppStore
Advance and Penalty changes
Code changes related to advance and penalty parameters
egov-persister
Syntax correction
pdf-service
data config changes for advance and penalty
format config changes for advance and penalty
dashboard-analytics
Create IFIX COA code for WS_TIME_PENALTY, 10201 & WS_ADVANCE_CARRYFORWARD , and run the following insert queries by replacing id & ifixcoacode.
insert into ifix_adapter_coa_map(id,clientcode,ifixcoacode,ifixid,tenantid) values(,'WS_TIME_PENALTY','0215-01-104-00-00-00',,'pb');
insert into ifix_adapter_coa_map(id,clientcode,ifixcoacode,ifixid,tenantid) values(,'10201','0215-01-104-00-00-00',,'pb');
insert into ifix_adapter_coa_map(id,clientcode,ifixcoacode,ifixid,tenantid) values(,'WS_ADVANCE_CARRYFORWARD','0215-01-799-04-00-43',,'pb');
mGramSeva is a Hybrid Application(web + App(Android + IOS)) built utilising Open Source Framework Flutter.
CrossPlatform Application
Faster
Single Codebase - Easy To Maintain
Large Community Support
Open Source
Link to Learn Flutter - Flutter - Beautiful native apps in record time
Flutter Version Utilised for Development
Flutter 2.2.3
Languages - > Dart 2.13.4
The household masters have to be created in the system to initiate the demand generation and collection process. These are consumers also referred to as the household that avails the water connection and supply on regular basis.
Select the Create Consumer option from the list of tile/cards on the home page. This redirects the user to the Create Consumer page.
Data element details for the consumer are listed in the table below -
Field Name
Type
Mandatory Y/N
Description
Consumer’s Name
Text
Y
Name of the household or connection owner.
Gender
Radio
Y
Male, Female, Transgender
Father's Name
Text
Y
Name of the father of the owner
Mobile Number
Numeric
Y
Mobile number for the consumer
Old Connection id
Alpha Numeric
Y
Old connection id or ref number for reference
Door Number
Alpha Numeric
N
Address details with door number for the connection
Street No/Street Name
Alpha Numeric
N
Street number or name of the house for the connection
Ward
Drop Down
Y
For a tenant which has a single ward, the ward field is not shown
For a tenant which has multiple wards, the ward field is shown as a single select dropdown
Gram Panchayat
Display
-
For info. the GP or tenant in which the connection master is created.
Property Type
Drop Down
Y
Dropdown with the list of property types from Master ( Ex - Residential, Commercial, Mixed, etc)
Service Type
Drop Down
Y
Dropdown with the list of service types from Master (Ex - Metered, Non-metered)
Meter Number
Alpha - Numeric
Y
Only for Metered connections - Meter number will be attached to consumer respectively
Previous meter reading date
Date selection
Y
Only for Metered connections - This field is used to tag arrears to a demand. Less than current Date.
Previous meter reading
Numeric
Y
Only for Metered connections - This field is used to attach arrears to a demand.
Last Billing Cycle Billed
Drop Down
Y
Only for Non-metered connections - Dropdown with the list of Billing Cycles prior to the current cycle. This field is used to specify the arrears or total outstanding as of the billing cycle.
Arrears as of Last Bill
Numeric
Y
Arrears as of date - This will be considered for the first Demand/Bill generation as total outstanding or arrears as of the billing period mentioned.
If no arrears are present to a HH, '0' has to be entered by the user.
Submit
Button
-
On click of Submit button, the consumer master is created with the detail entered above. The new connection id is also generated as per the configuration.
Multiple connections (HH or household records) can be created using the same phone number.
Phone numbers can be the same, but a new HH record cannot be created using the same old connection ID. The old connection ID should be different to create a new HH record.
A single HH record, cannot be registered in the system more than once. Trying to register the same record on the system again displays the error message “this connection already exists”.
Clicking on the Submit button creates the consumer master and a new consumer ID is assigned to the master. The consumer ID generated is based on logic defined as - “WS-<GP id>-<4 digit running seq No>”
If the connection ID already exists, the system displays an error message.
On first-time/new-load, all data entry fields and dropdowns are empty (since there are no records prefilled except for the default fields).
SMS is not sent to any user upon consumer (HH) creation.
Submit is disabled until all mandatory fields are entered. Once all inputs are made, the button is enabled.
Arrears demand:
Metered - The arrear demand for the period is created, where the From date is counted as the start of the Financial year and the To date as the period mentioned on the screen.
Non-metered - The arrear demand is created for the selected billing cycle.
Successful creation of consumer records displays the toast message “ Registration successful”.
Closing this toast message, using the close icon, refreshes the page and the user sees an empty consumer creation screen.
Consumer creation - non metered
Consumer creation - metered
mGramSeva functional details
The documents in this section provide the complete details of the
Unlike non-metered connections that have a billing cycle for demand & bills generated automatically, a metered connection needs more inputs, which helps in volumetric billing.
A revenue collector can see a CTA to “Generate a new Bill” on the HH details screen.
Clicking on “Generate a new Bill” takes users to the bill generation screen where new meter reading details are entered.
The field on the bill generation screen for metered connections is displayed in the table below.
Clicking on “Generate bill” takes the user to the bill generation successful screen.
Logic for Bill ID number - “RB - dd/mm/yyyy-yy/running_sequence_number”.
There are 3 user actions on the success screen
Download bill - Download bill as PDF (name of PDF is always the Bill ID by default)
Share bill on WhatsApp - Share bill as PDF on WhatsApp
Collect Payment - navigates the revenue collector to the payment collection screen
Share on WhatsApp opens the WhatsApp share popup with the option to choose contacts/groups. The bill is shared with the below text and attached PDF details -
Text “ Dear <ConsumerName>, Please find water bill for billing cycle <Cycle> attached as PDF”
Input Metric
Comments
Previous Meter reading
Only for first-time bill generation
New meter reading
For the first time and all consecutive bill generations
Previous meter reading units and previous meter reading dates will be taken from the last bill for new bill generation
Meter reading date
The default is the current date. Revenue collectors can change it to a previous date if required.
For Demand Generation Logic refer to Demand/Bill Generation for metered connection
All 5 digits in the meter reading must be entered. Show error message “ Old Meter Reading entered is Invalid” or “ New Meter Reading entered is invalid” respectively.
The New Meter reading should be greater than the Old Meter Reading.
The meter reading date is by default set to <today's date> but gives the option to change to the user.
The users receive a link via SMS. Clicking on this link redirects the users to the login page of the mGramSeva app. The users can log in from this screen or even reset their password in case they are logging in for the first time. The mGramSeva application link initiates from this screen.
The link in the SMS redirects users to this screen which is the first screen which is the language selection screen. The user selects the preferred language and clicks on Continue. English, Hindi, and Punjabi are the supported languages with Punjabi as the default language. Localization in the screens is displayed based on the language selected.
The user enters the User ID, which is the registered mobile number of the user, and the system-generated password. Clicking on the Continue button logs in the user.
The Forgot Password link navigates the user to the password reset screen.
The user is redirected to the password reset screen where they enter the OTP received on the registered mobile number. The next screen prompts the user to enter a new password and then confirm the same. This is similar to the first-time login screen. Clicking on Submit displays the acknowledgement screen. Clicking on the Continue to Login button on the acknowledgement screen takes the user to the login page.
The user is redirected to the home page of the application which displays the menu options based on the mapped user role.
The search screen is used to filter the list of consumers based on selected criteria. This is the common search screen for all the transactions such as -
Collect payments
Download bills and receipts
Update consumer information
The consumer can be searched on the following parameters -
Owner Mobile Number - Allows search of consumer records that match the entered mobile number.
OLD Mobile Number
NEW Mobile Number
The user is able to search only when he/she enters the full mobile number. A partial mobile number search is not allowed.
Name of Consumer - Allows search of consumer records that match consumer names with the input text.
OLD Name
New Name
Name search can be done with a partial name also.
Old Connection id - Allows search of consumer records that matches the old Connection id entered in the search bar.
New Connection id - Allows search of consumer records that matches the New Connection id entered in the search bar.
As the user starts entering one field, other fields are made non-editable. When the user removes text/numbers entered in the field, other fields are made accessible.
Show more & Show less option expands and contracts the view.
When the user search matches only one record, the system shows the HH detail screen directly. The intermediary search details screen is not required.
The search result set contains the below information -
Sub-Heading - Subheading text changes dynamically with the type of search carried out.
Following consumers match search criteria with
Phone Number as +91 - 7731045306
Name as ABCxyZ
New Connection ID
Old Connection ID
Consumer’s Name
Phone Number
Address - Combination of Door Number, street number, Ward (if applicable)
Clicking on the View Consumer Details button redirects the user to the HH Details screen.
Google Analytics helps you understand how people use the web and Android apps. Analytics helps you understand how the users behave, so we can make informed decisions about how to market our app.
firebase_analytics
In the Firebase console we can track the real-time user usage, Below are the main core features for tracking the user
Users in the last 30 minutes.
User's activity over time using a date picker represents inline charts.
Track the users by app version.
Track users by device Model.
User Retention.
https://github.com/misdwss/punjab-mgramseva/blob/master/frontend/mgramseva/lib/widgets/pagination.dart
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
Apportion service is used to apportion the amount paid against a bill among the different tax heads based on the implemented algorithm. The default algorithm uses the order of the tax head to apportion, the tax head with the lowest order is apportioned off first while the highest-order tax head is apportioned last.
Before you proceed with the documentation, make sure the following pre-requisites are met -
Java 8
The Kafka server is up and running
egov-persister service is running and has an apportioned persister configuration path added to it
PSQL server is running and a database is created to store apportion audit data
Apportion payment in tax heads of bill
Apportion advance amount in tax heads of demand during demand creation
Environment Variables
Description
egov.apportion.default.value.order
If set to true will apportion of negative amount first irrespective of tax head order
Deploy the latest version of the egov-apportion-service service
Add apportion persister yaml path in persister configuration
There is no separate configuration required. The TaxHead master that is configured in billing service is only used
Any payment service which wants to divide the paid amount into different tax head buckets can integrate with the apportion service.
Apportions amount in tax heads
To integrate, the host of egov-apportion-service should be overwritten in the helm chart
/apportion-service/v2/bill/_apportion should be called to apportion the bill
/apportion-service/v2/demand/_apportion should be called to apportion advance amount in demands
Title
Link
Collection Service
Billing Service
API Swagger Documentation
(Note: All the APIs are in the same Postman collection therefore the same link is added in each row)
Water Calculator Service is used to create meter readings, search meter readings, update existing meter readings, calculate water charges, generate demand, notify ULB officials using SMS & email on-demand generation and estimation of water charges (one-time cost) which involves costs like road-cutting charge, form fee, scrutiny fee, etc.
Before you proceed with the documentation, make sure the following pre-requisites are met -
Java 8
The Kafka server is up and running
egov-persister service is running and has the water service persister configs path added to it
PSQL server is running and a database is created to store water connection/application data
The following services should be up and running:
egov-perister
egov-mdms
ws-services
billing-service
Calculate water charges and taxes based on the billing slab
Calculate meter reading charge for water connection
Generate demand
Scheduler for generating the demand (for non-metered connection)
Deploy the latest version of ws-service and ws-calculator
Add water-persist.yml & water-meter.yml files in the config folder in git and add that path in persister. (Add the file path to the environment YAML file under a parameter named "persist-yml-path").
Criteria
connection type
building type
calculation attribute
property usage type
The above combination is used to define the billing slab. Billing Slab is defined in MDMS under the ws-services-calculation folder with the WCBillingSlab. Find below a sample slab.
Depending on the matching criteria for the water connection, the calculation applies the specified slab.
For the one-time fee application, the estimation will return all related tax heads based on criteria. All configurations for estimation are present in ws-services-calculation.
The above master configuration is used for estimation.
Following are the exemptions and taxes that are calculated:
Form fee
Scrutiny fee
Meter charge (For metered connection)
Other charges
Road cutting charges
One time fee
Security charges
Tax and cess
The billing slab determines the water charges. Water application charges are based on the slab and tax calculations are based on the master configuration.
Interest:
Below is a sample of the master data JSON for interest :
Penalty:
Below is a sample of the master data JSON for penalty:
Round Off:
If the fraction is greater than equal to 0.5 the number is rounded up else it’s rounded down. For example, 100.4 is rounded to 100 while 100.6 is rounded to 101.
Actions
Role Action Mapping
Once water is sent to the calculator, its tax estimates are calculated. Using these tax head estimates, demand details are created. For every tax head, the estimated demand generates a corresponding demand detail.
When the _calculate
API is called, demand is first searched based on the connection number or application number and the demand period. If demand already exists, it is updated with the new information. Otherwise, a new demand is generated for the financial year period.
During an update, if the tax head estimates change, the difference in amount for that tax head is added as a new demand detail. For example, if the initial demand has one demand detail with WATER_CHARGE equal to 120.
After updating if the WATER_CHARGE increases to 150 we add one more demand detail to account for the increased amount. The demand detail will be updated to:
Round-off in the bill is based on the total amount, ensuring that the payable amount is a whole number. Each WS_ROUNDOFF in the demand detail can be greater than 0.5, but the sum of all WS_ROUNDOFF values is always less than 0.5.
Description
To generate demand for non-metered connections, we have a feature for batch demand generation. The scheduler is responsible for generating demand based on the tenant.
The scheduler can be triggered using the scheduler API, scheduled as a cron job, or configured in Kubectl to hit the scheduler based on the configuration.
After the scheduler is triggered, we can search for the list of tenants (cities) in the database.
After obtaining the list of tenants, iterate through the list and generate the demand for specific tenants.
Load the consumer codes for the tenant and push the calculation criteria to Kafka. The calculation criteria contain minimal information, including the consumer code and one boolean variable.
After pushing the data into Kafka, the system consumes the records based on the batch configuration. For example, if the batch configuration is set to 50, the system will consume 50 calculation criteria at a time.
After consuming the records (calculation criteria), the system processes the batch to generate the demand. If the batch processing is successful, the processed consumer codes are logged.
If some records fail in the batch, the system pushes the batch into the dead letter batch topic. From there, the batch is processed one record at a time.
If the record is successful, the system logs the consumer code. If the record fails, the data is pushed into a dead-letter single topic.
Dead letter single topic contains information about failure records in Kafka.
Use cases:
If the same job triggers multiple times what will happen?
If the same job triggers multiple times the system processes it again as mentioned above but at the demand level, it checks the demand based on consumer code and billing period. In case the demand already exists then it updates the demand or else creates the demand.
Are we maintaining success or failure status anywhere?
Currently, we are maintaining the status of failed records in Kafka.
Configuration:
We need to configure the batch size for Kafka consumers. This configuration determines how much data is processed at a time.
The ws-calculator is integrated with ws-service. ws-services internally invoke the ws-calculator service to calculate and generate demand for the charges.
WS calculator application is used to calculate the water application one-time fees and meter reading charges based on the different billing slabs. That's why the calculation and demand generation logic is separated from the WS service. So in future, if calculation logic requires modification the changes can be carried out for each implementation without modifying the WS service.
Once the water connection is activated for the metered connection, the employee can add meter reading details using the API - /ws-calculator/meterConnection/_create. This generates the demand. For non-metered connections, the scheduler APIs should be called periodically to generate the demand.
For the metered connection service, the /meterConnection/_search API is used to get the previous meter reading,
To activate the Water Service application, the user has to pay the ONE_TIME_FEE for the connection. To calculate this fee, the ONE_TIME_FEE /waterCalculator/_estimate API is used.
To generate the demand for metered or non-metered water connection /waterCalculator/_calculate API is used.
Users can pay partial/full/advance amounts for the metered or non-metered connection bill. In such cases, the billing service would call back /waterCalculator/_updateDemandAPI to update the demand-generated details.
/waterCalculator/_jobscheduler API is used to generate demand for non-metered connections. This API can be called periodically.
/waterCalculator/_applyAdhocTax API is used to add a Rebate or Penalty on any bill and based on that the bill amount is adjusted.
Title
Link
API Swagger Contract
Water Service Document
(Note: All the APIs are in the same Postman collection therefore the same link is added in each row).
Water Calculator Service is used for creating meter readings, searching meter readings, updating existing meter readings, calculation of water charge, demand generation, SMS & email notification to ULB officials regarding the on-demand generation and estimation of water charges (one-time cost) which involves cost like road-cutting charge, form fee, scrutiny fee, etc.
Before you proceed with the documentation, make sure the following pre-requisites are met -
Java 8
Kafka server is up and running
egov-persister service is running and has water service persister configs path added in it
PSQL server is running and a database is created to store water connection/application data
The following services should be up and running:
egov-perister
egov-mdms
ws-services
billing-service
Calculate water charges and taxes based on the billing slab
Calculate meter reading charge for water connection
Generate demand
Scheduler for generating the demand(for non-metered connection)
Environment Variables
Description
notification.sms.enabled
This variable is to check the SMS notifications are enabled or not.
notification.email.enabled
This variable is to check the email notifications are enabled or not.
download.bill.link.path
This variable is for download bill reciept path
egov.demand.gp.user.link
This variable is to get the common link to the home page
Deploy the latest version of ws-service and ws-calculator
Add the water-persist.yml & water-meter.yml file in the config folder in git and add that path in persister. (The file path is to be added in environment yaml file in param called persist-yml-path
)
Master Config
Criteria
connection type
building type
calculation attribute
property usage type
The combination of the above can be used to define the billing slab. Billing Slab is defined in MDMS under the ws-services-calculation folder with the WCBillingSlab. The following is the sample slab.
If all criteria will match that water connection this slab will use for calculation.
Water charge is based on billing slab, for water application charge will be based on slab and tax based on master configuration.
Actions
Role Action Mapping
Charge for the given connection for a given billing cycle will be defined/identified by the system with the help of the CalculationAtrribute MDMS and WCBillngSlab MDMS.
CalcualtionAttribute helps to identify the type of calculation for the given ConnectionType below MDMS of
Metered Connection water consumption is the attribute used for the calculation of charge for the billing cycle i.e Based on the units consumed for a given billing cycle for a given connection would identify the actual charge from the WCBIllingSlab MDMS based on the propertyType, calcautionAttribute derived for a connection and ConnectionType.
Non-Metered Connection Flat is the attribute used for calculation of the charge for a given billing cycle, i.e for a Non-Metered connection, there would be a flat charge for the given billing cycle. The amount can be derived from the WCBillingSlab MDMS based on the propertyType, calcautionAttribute derived for a connection and ConnectionType.
Once water is sent to the calculator its tax estimates are calculated. Using these tax head estimates demand details are created. For every tax head, the estimated demand generates function will create a corresponding demand detail.
Whenever _calculate API is called demand is first searched based on the connection no and the demand from and to period. If demand already exists the same demand is updated else new demand is generated with consumer code as connection no and demand from and to a period equal to financial year start and end period.
In the case of the update, if the tax head estimates change, the difference in amount for that tax head is added as new demand detail. For example, if the initial demand has one demand detail with WATER_CHARGE equal to 120.
After updating if the WATER_CHARGE increases to 150 we add one more demand detail to account for the increased amount. The demand detail will be updated to:
RoundOff is bill based i.e every time bill is generated round off is adjusted so that payable amount is the whole number. Individual WS_ROUNDOFF in demand detail can be greater than 0.5 but the sum of all WS_ROUNDOFF will always be less than 0.5.
Description
For generating the demand for non metered connections we have a feature for generating the demand in batch. The scheduler is responsible for generating the demand based on the tenant.
The scheduler can be hit by scheduler API or we can schedule cron job or we can put config to kubectl which will hit scheduler based on config.
After the scheduler has been hit we will search the list of the tenant (city) present in the database.
After getting the tenants we will pick up tenants one by one and generate the demand for that tenant.
We will load the consumer codes for the tenant and push the calculation criteria to Kafka. Calculation criteria contain minimal information (We are not pushing large data to Kafka), calculation criteria contain consumer code and one boolean variable.
After pushing the data into Kafka we are consuming the records based on the batch configuration. Ex:-> if the batch configuration is 50 so we will consume the 50 calculation criteria at a time.
After consuming the record(Calculation criteria) we will process the batch for generating the demand. If the batch is successful so will log the consumer codes which have been processed.
If some records failed in batch so we will push the batch into dead letter batch topic. From the dead letter batch topic, we will process the batch one by one.
If the record is successful we will log the consumer code, If the record is failed so we will push the data into a dead letter single topic.
Dead letter single topic contains information about failure records in Kafka.
Use cases
If the same job triggers multiple times what will happen?
If the same job triggers multiple times we will process again as mentioned above but at the demand level we will check the demand based on consumer code and billing period, If demand already exists then we will update the demand otherwise we will create the demand.
Are we maintaining success or failure status anywhere?
Currently, we are maintaining the status of failed records in Kafka.
Configuration
We need to configure the batch size for Kafka consumers. This configuration is for how much data will be processed at a time.
ws-calculator will be integrated with ws-service. ws-services internally invoke the ws-calculator service to calculate and generate demand for the charges.
WS calculator application is used to calculate the water application one-time Fees and meter reading charges based on the different billing slabs that's why the calculation and demand generation logic will be separated out from the WS service. So in future, if calculation logic needs to modify then changes can be carried out for each implementation without modifying the WS service.
Once the water connection is activated for metered connection, an employee can add meter reading details using this API - /ws-calculator/meterConnection/_create
which in turn will generate the demand. For the Non-Metered connections, the scheduler APIs need to be called periodically to generate the demand.
For the Metered Connection service, to get the previous meter reading /meterConnection/_search
API is used.
To generate the demand for metered or non-metered water connection /waterCalculator/_calculate
API is used.
Users can pay partial/full/advance amount for the Metered or Non-Metered connection bill. In these cases, the Billing service would call back /waterCalculator/_updateDemand
API to update the details of the demand generated.
/waterCalculator/_jobscheduler
API is used to generate demand for Non-metered connections. This API can be called periodically.
Title
Link
API Swagger Contract
Water Service Document
Link
/ws-calculator/meterConnection/_create
/ws-calculator/meterConnection/_search
/waterCalculator/_estimate
/waterCalculator/_calculate
/waterCalculator/_updateDemand
/waterCalculator/_jobscheduler
(Note: All the API’s are in the same postman collection therefore the same link is added in each row)
Water service is a DIGIT application that helps and gives flexibility to municipalities and citizens to manage water service requirements like applying for a water connection or searching for water connections. The application goes through various steps as defined by the states. The application is passed through different users who verify and inspect the application details before moving it to the next stage. Based on the state, citizens get notifications (SMS and in-app ). Citizens can also pay application fees or employees can collect the fee for the application.
Before you proceed with the documentation, make sure the following pre-requisites are met -
Java 8
Kafka server is up and running
egov-persister service is running and has a water service persister config path added to it
PSQL server is running and a database is created to store water connection/application data
knowledge of eGov-mdms service, eGov-persister, eGov-idgen, eGov-sms, eGov-email,eGov-user, eGov-localization, eGov-workflow-service will be helpful.
Add old water connection to the system with/without arrears
Create a new Water Connection
Searching for water connections
Notification based on the application state
Environment Variables
Description
egov.waterservice.createwaterconnection
This variable contains the kafka topic name which is used to create new water connection application in the system.
egov.waterservice.updatewaterconnection
This variable contains the kafka topic name which is used to update the existing water connection application in the system.
egov.waterservice.updatewaterconnection.workflow.topic
This variable contains the kafka topic name which is used to update the process instance of the water connection application.
egov.idgen.wcapid.name
This variable contains the idgen format name for water application
egov.idgen.wcapid.format
This variable contains the idgen format for water application ex:- WS/[CITY.CODE]/[fy:yyyy-yy]/[SEQ_EGOV_COMMON]
egov.idgen.wcid.name
This variable contains the idgen format name for water connection
egov.idgen.wcid.format
This variable contains the idgen format for water connection ex:- WS_AP/[CITY.CODE]/[fy:yyyy-yy]/[SEQ_EGOV_COMMON]
MDMS configuration
mdms-mgramseva/data at DEV · egovernments/egov-mdms-data
master-config.json for water service
ConnectionType
Two connection types supported Metered and Non metered.
CheckList
A CheckList is used to define the Q & A for the feedback form and its validation.
Category
Predefined list of categories allowed.
SubCategory
A pre-defined list of subcategories is allowed.
Property creation through WNS module mdms-mgramseva/PTWorkflow.json at DEV · egovernments/egov-mdms-data
Persister configuration
Actions
Role Action Mapping
Roles available
Workflow business service config:
Create businessService (workflow configuration) using the /businessservice/_create
. Following is the product configuration for water service:
Indexer config for water service:
Provide the absolute path of the checked-in file to DevOps, to add it to the file-read path of egov-indexer. The file will be added to the egov-indexer's environment manifest file for it to be read at the start-up of the application.
Run the egov-indexer app, Since it is a consumer, it starts listening to the configured topics and indexes the data.
Notification will be sent to the property owners and connection holders based on different application states.
We can add connection holders to the water connection which will be the owner of the connection. We can fill in the connection holders' details or we can just make the property owner to the connection holder.
The connection holder will get a notification based on a different state of the application. We are pushing the data of the connection holders in the user service too.
We can add road cutting details of multiple roads to the water connection. For each road that goes undercutting process, we have to fill their road type details and road cutting area. Based on this information, the application one-time fee estimate is calculated.
Add mdms configs required for water connection registration and restart mdms service.
Deploy the latest version of ws-services service.
Add water-service and water-services-meter persister yaml path in persister configuration and restart persister service.
Add Role-Action mapping for API’s.
Create businessService (workflow configuration) according to trade water connection, modify water connection
Add ws-service indexer yaml path in indexer service configuration and restart indexer service.
This ws-service module is used to manage water service connections against a property in the system.
Provide backend support for the different water connection registration processes.
Mseva and SMS notifications on application status changes.
The elastic search index for creating visualizations and Dashboards.
Supports workflow which is configurable
To integrate, the host of ws-service module should be overwritten in helm chart.
/ws-services/wc/_create
should be added as the create endpoint for creating water application/connection in the system.
/ws-services/wc/_search
should be added as the search endpoint . This method handles all requests to search existing records depending on different search criteria.
/ws-services/wc/_update
should be added as the update endpoint. This method is used to update fields in existing records or to update the status of the application based on workflow.
Title
Link
API Swagger Documentation
Water Calculator Service
Link
/ws-services/wc/_create
/ws-services/wc/_update
/ws-services/wc/_search
/ws-services/wc/_submitfeedback
/ws-services/wc/_getfeedback
/ws-services/wc/_revenueDashboard
/ws-services/wc/_revenueCollectionData
(Note: All the API’s are in the same postman collection therefore the same link is added in each row)
The main objective of the billing module is to serve the Bill for all revenue Business services. To serve the Bill, Billing-Service requires demand. Demands will be prepared by Revenue modules and stored by billing based on which it will generate the Bill.
Prior Knowledge of Java/J2EE.
Prior Knowledge of Spring Boot.
Prior Knowledge of KAFKA
Prior Knowledge of REST APIs and related concepts like path parameters, headers, JSON, etc.
Prior knowledge of the demand-based systems.
Following services should be up and running:
user
MDMS
Id-Gen
URL-Shortening
notification-sms
eGov billing service creates and maintains demands.
Generates bills based on demands.
push created and updated bill/demand to Kafka on specified topics
Updates the demands from payment when the collection service takes a payment.
Deploy the latest image of the billing service available.
In the MDMS data configuration, the following master data is needed for the functionality of the billing
Business Service JSON
TAX-Head JSON
Tax-Period JSON
bs.businesscode.demand.updateurl
{
Each module’s application calculator should provide its own update URL. if not present then new bill will be generated without making any changes to the demand.
bs.bill.billnumber.format
BILLNO-{module}-[SEQ_egbs_billnumber{tenantid}]
IdGen format for bill number
bs.amendment.idbs.bill.billnumber.format
BILLNO-{module}-[SEQ_egbs_billnumber{tenantid}]
is.amendment.workflow.enabled
true/false
enable disable workflow of bill amendment
kafka.mgramseva.create.demand
mgramseva-create-demand
topic name to push demand created, to be consumed by mgramseva adaptor
kafka.mgramseva.update.demand
mgramseva-update-demand
topic name to push demand updated, to be consumed mgram sevaadaptor
kafka.mgramseva.create.bill
mgramseva-create-bill
topic name to push bill created, to be consumed mgram seva
kafka.mgramseva.update.bill
mgramseva-update-bill
topic name to push bill updated, to be consumed mgram seva
Billing service can be integrated with any organization or system that wants a demand-based payment system.
Easy to create and simple process of generating bills from demands
The amalgamation of bills period-wise for a single entity like Water connection.
Amendment of bills in case of legal requirements.
Customers can create a demand using the /demand/_create
Organizations or Systems can search the demand using /demand/_search
endpoint
Once the demand is raised the system can call /demand/_update
endpoint to update the demand as per need.
Bills can be generated using, which is a self-managing API that generates a new bill only when the old one expires /bill/_fetchbill.
Bills can be searched using /bill/_search.
Amendment facility can be used in case of a legal issue to add values to existing demands using /amendment/_create
and /amendment/_update
can be used to cancel the created ones or update workflow if configured.
Interaction Diagram V1.1
Title
Link
Id-Gen service
url-shortening
MDMS
Title
Link
/demand/_create, _update, _search
/bill/_fetchbill, _search
/amendment/_create, _update
Adjusting the receivable amount with the individual tax head.
Default order based apportioning(Based on apportioning order adjust the received amount with each tax head).V1.1
Proportionate based apportioning (Adjust total receivable with all the tax head equally)
Order & Percentage based apportioning(Adjust total receivable based on order and the percentage which is defined for each tax head).
The basic principle of apportioning is, if the full amount is paid for any bill then each individual tax head should get nullify with their corresponding adjusted amount.
Example: Case 1: When there are no arrears all tax heads belong to their current purpose:
TaxHead
Amount
Order
Full Payment(2000)
Partial Payment1(1500)
Partial payment2(750)
Partial payment2 with rebate(500)
WS_CHARGE
1000
6
1000
1000
750
750
AdjustedAmt
1000
-250
-750
-750
RemainingAMTfromPayableAMT
0
0
0
0
Penality
500
5
500
500
AdjustedAmt
500
-500
RemainingAMTfromPayableAMT
1000
250
Interest
500
4
500
500
AdjustedAmt
500
-500
RemainingAMTfromPayableAMT
1500
750
Cess
500
3
500
500
AdjustedAmt
500
-500
RemainingAMTfromPayableAMT
2000
1250
Exm
-250
1
-250
-250
AdjustedAmt
-250
250
RemainingAMTfromPayableAMT
2250
1750
Rebate
-250
2
-250
-250
AdjustedAmt
-250
250
RemainingAMTfromPayableAMT
2500
750
Case 2: Apportioning with two years of arrear: If the current financial year is 2014-15. Below are the demands
TaxHead
Amount
TaxPeriodFrom
TaxPeriodTo
Order
Purpose
WS_CHARGE
1000
2014
2015
6
Current
AdjustedAmt
0
Penality
500
2014
2015
5
Current
AdjustedAmt
0
Interest
500
2014
2015
4
Current
AdjustedAmt
0
Cess
500
2014
2015
3
Current
AdjustedAmt
0
Exm
-250
2014
2015
1
Current
AdjustedAmt
0
if any payment is not done, and we generating demand in 2015-16 then the demand structure will as follows:
TaxHead
Amount
TaxPeriodFrom
TaxPeriodTo
Order
Purpose
WS_CHARGE
1000
2014
2015
6
Arrear
AdjustedAmt
0
WS_CHARGE
1500
2015
2016
6
Current
AdjustedAmt
0
Penality
600
2014
2015
5
Arrear
AdjustedAmt
0
Penalty
500
2015
2016
5
Current
AdjustedAmt
0
Interest
500
2014
4
Arrear
AdjustedAmt
0
Cess
500
2014
3
Arrear
AdjustedAmt
0
Exm
-250
2014
1
Arrear
AdjustedAmt
0
The purpose of the mGramSeva IFIX adapter service is to push the demand, bill, and payment events to IFIX from the mGramSeva.
mGramSeva IFIX adapter service is a wrapper for pushing data from the mGramSeva to IFIX. When demand or payment is generated in the mGramSeva system, mGramSeva IFIX adapter service listens to those topics and it calls the IFIX reference adapter service push API to publish the data to IFIX.
Before you proceed with the configuration, make sure the following pre-requisites are met -
Java 8
Kafka
Spring boot
Pushing demand, bill and payment events to IFIX adapter
The following topics interact with the mGramSeva IFIX adapter service - When we create demand for ws-services, then it sends an event as demand for IFIX. If it is expense demand, it sends the event as a bill for IFIX. If it is ws-services payment, then it sends the event as a receipt for IFIX. If it is an expense payment, it sends the payment as an event for IFIX.
mgramseva-create-demand
mgramseva-update-demand
egov.collection.payment-create
Please deploy the following build.
ifix-adapter:v1.0.0-4e24064-14
mGramSeva IFIX adapter is integrated with the IFIX Reference adaptor service. mGramSeva IFIX adapter Application internally invokes the IFIX Reference adaptor service to push the data.
mGramSeva IFIX adapter application to call IFIX-reference-adapter/events/v1/_push to push the demand, bill, and payment events from mGramSeva to IFIX.
User OTP service is used to generate OTP for user login, user registration and user password change.
Prior Knowledge of Java/J2EE.
Prior Knowledge of Spring Boot.
Prior Knowledge of KAFKA
Prior Knowledge of REST APIs and related concepts like path parameters, headers, JSON, etc.
Following services should be up and running:
user
MDMS
Id-Gen
URL-Shortening
notification-sms
user-otp service generate validates the user details and request type and send OTP for a particular action.
Deploy the latest image of the user-otp service available.
User OTP service can be integrated with any organization or system that wants OTP-based validation for user login, registration.
Easy to create and simple process of generating bills from demands.
Easy to generate OTPs to validate mobile number for registration, login and password reset with simple API calls
OTP can be generated calling /user-otp/v1/_send
mGramSeva backend service details
This section contains the backend service docs for mGramSeva detailing the service scope, integration steps, and deployment of these services.
Browse the listed services below:
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
The purpose of the mGramSeva Rollout Dashboard Scripts to aggregate the data points from mgramseva DB and services for Rollout dashboard in Metabase.
mGramSeva Rollout Dashboard is a python script for pushing the data from the mGramSeva to a specific table in DB on a daily basis which can be loaded to Metabase and graphical dashboard built on top of this table in the Metabase.
Before you proceed with the configuration, make sure the following pre-requisites are met -
Python 3.9
mGramSeva DB
mGramseva user details who has access to MDMS service API
mGramSeva mdms service access
Collecting the data on certain data points and inserting the data into the rollout dashboard table in the DB User Story with details of the data point:
Please deploy the following build.
rollout-dashboard-cronjob:develop-2a8d6a44-3
mGramSeva Rollout Dashboard is not directly integrated with any of the services except this scripts fetch the data from the MDMS service and mGramSeva DB
please follow the steps below
The python script inserts the data into table “roll_out_dashboard
“ in mgramSevaDb for every run, it cleans the old data and creates new data.
This table has to be loaded into the metabase by adding mGramSeva DB to the metabase.
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
config-mgramseva/water-persist.yml at DEV · egovernments/configs configs/water-meter.yml at master · egovernments/configs
The indexer provides the facility for indexing the data to elastic search. config-mgramseva/water-service.yml at DEV · egovernments/config-mgramseva
Write the configuration for water service. config-mgramseva/water-service.yml at DEV · egovernments/config-mgramseva
Put indexer config file to the config repo under egov-indexer folder.(GitHub - egovernments/configs at master )
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
"WS":"
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
All content on this page by is licensed under a .
All content on this page by is licensed under a
Configure the username, tenantId and password of the user for which mdms service access is available on the environment specific yaml file in DevOps. Example below
All content on this page by is licensed under a
expiry.time.for.otp
3000
Expiry time of the otp
DSS has two sides to it. One is, the process in which the Data is pooled to ElasticSearch and the other is the way it is fetched, aggregated, computed, transformed and sent across.
As this revolves around a variety of Data Sets, there is a need for making this configurable. So that, tomorrow, given a new scenario is introduced, then it is just a configuration away from getting the newly introduced scenario involved in this process flow.
This document explains the steps on how to define the configurations for the Analytics Side Of DSS for mGramSeva.
Analytics : Micro Service which is responsible for building, fetching, aggregating and computing the Data on ElasticSearch to a consumable Data Response. Which shall be later used for visualizations and graphical representations.
Analytics Configurations: Analytics contains multiple configurations. we need to add the changes related to mGramseva in this dashboard-analytics.
Dashboard analytics link - https://github.com/misdwss/config-mgramseva/tree/QA/egov-dss-dashboards/dashboard-analytics
Below is a list of configurations that need to be changed to run mGramSeva successfully.
Chart API Configuration
Master Dashboard Configuration
Each Visualization has its own properties. Each Visualization comes from different data sources (Sometimes it is a combination of different data sources).
In order to configure each visualization and its properties, we have a Chart API Configuration Document.
In this, Visualization Code, which happens to be the key, will be having its properties configured as a part of the configuration and are easily changeable.
Here is the sample ChartApiConfiguration.json data for the mGramSeva.
Click here to check the complete configuration.
Master Dashboard Configuration is the main configuration that defines as to which are the Dashboards that are to be painted on the screen.
It includes all the Visualizations, their groups, the charts which comes within them and even their dimensions as what should be their height and width.
Click here to check the complete configuration.
Master Dashboard Configuration which was explained earlier hold the list of Dashboards that are available.
Given the instance where Role Action Mapping is not maintained in the Application Service, this configuration will act as Role - Dashboard Mapping Configuration.
In this, each role is mapped against the dashboard which they are authorized to see.
This was used earlier when the Role Action Mapping of eGov was not integrated.
Later, when the Role Action Mapping started controlling the Dashboards to be seen on the client-side, this configuration was just used to enable the Dashboards for viewing.
Click here to check the complete configuration.
Transform collection schema for V2
This transform collection v1 configuration file is used to map with the incoming data. This mapped data will go inside the data object in the DSS collection v2 index.
Click here for an example configuration
Here: $i, the variable value that gets incremented for the number of records of paymentDetails $j, the variable value that gets incremented for the number of records of billDetails.
This configuration defines and directs the Enrichment Process which the data goes through.
For example, if the Data which is incoming is belonging to a Collection Module data, then the Collection Domain Config is picked. And based on the Business Type specified in the data, the right config is picked.
In order to enhance the data of Collection, the domain index specified in the configuration is queried with the right arguments and the response data is obtained, transformed and set.
Domain configuration
Topic context configuration
transform_expense.electricity_bill_v1 configuration
transform_expense.om_v1 configuration
transform_expense.salary_v1 configuration
transform_ws_v1 configuration
Below are the list of configurations made changes or added newly for mGramSeva.
Click here to see the complete configuration
Topic Context Configuration is an outline to define which data is received on which Kafka Topic.
Indexer Service and many other services are sending out data on different Kafka Topics. If the Ingest Service is asked to receive those data and pass it through the pipeline, the context and the version of the data being received has to be set. This configuration is used to identify as in which Kafka topic consumed the data and what is the mapping for that.
Click here to see the complete configuration
Based on expense and water-service business service we added transform configurations as per below.
transform_expense.electricity_bill_v1 configuration: https://github.com/misdwss/config-mgramseva/blob/QA/egov-dss-dashboards/dashboard-ingest/transform_expense.electricity_bill_v1.json
transform_expense.om_v1 configuration: https://github.com/misdwss/config-mgramseva/blob/QA/egov-dss-dashboards/dashboard-ingest/transform_expense.om_v1.json
transform_expense.salary_v1 configuration: https://github.com/misdwss/config-mgramseva/blob/QA/egov-dss-dashboards/dashboard-ingest/transform_expense.salary_v1.json
transform_ws_v1 configuration: https://github.com/misdwss/config-mgramseva/blob/QA/egov-dss-dashboards/dashboard-ingest/transform_ws_v1.json
Note: For Kafka connect to work, Ingest pipeline application properties or in environments direct push must be disabled.
es.push.direct=false
If DSS collection index data is indexing directly ( without Kafka connector) to ES through the ingest pipeline then, make the application properties or in environments, direct push must be enabled.
es.push.direct=true
Configure the Kafka topics in the environments or Ingest pipeline application properties as shown below.
Kafka connection and re-indexing is available in this documentation. Please check from here.
mGramSeva Services Re-indexing
Main-Monthly Dashboard
For the main monthly dashboard, we are using the service API to fetch the data and to show it in the main monthly dashboard table.
Ws-services:
/ws-services/wc/_revenueCollectionData
Should be added to get the main monthly dashboard details. It is used to show the table data based on the no of months for selected financial year.
eChallan-Service:
/echallan-services/eChallan/v1/_chalanCollectionData
it is added to get the main monthly dashboard data for the expense.
Dashboard-Metrix:
To show the data in metrix format in specific month dashboard we are using service API which will fetch the data based on dash board type.
Ws-services:
/ws-services/wc/_revenueDashboard
Should be added to get the revenue dashboard metrix data. It will show the data of revenue collections information
eChallan-Service:
/echallan-services/eChallan/v1/_expenseDashboard
Is added in echallan-service to show the data of expenses in metrix format.
MDMS- changes for the dashboard:
echallan-services/eChallan/v1/_chalanCollectionData
echallan-services/eChallan/v1/_chalanCollectionData
/ws-services/wc/_revenueDashboard
/ws-services/wc/_revenueCollectionData
/dashboard-analytics/dashboard/getChartV2
Users land on the Language Selection screen.
Link → {base url}/mgramseva/selectLanguage
Users can switch to different languages that the application supports.
Click on Continue to navigate to the next screen.
Primary files:
Secondary files:
LocalStorage
states_key
State Information for From MDMS Service
ex :pn_IN
,en_IN
,hi_IN
Localization codes
egov-mdms-service/v1/_search
common-masters tenant
To fetch details State info Logo background Image Languages supported
localization/messages/v1/_search?module
={}locale
={}tenantId
={}
ALL the necessary Modules, with locale key and tenant Id
To Load the Localized data
0 → Language selection screen
Pop → Application closes
Widgets utilized from library
Button Bar
This page provides the technical details for the following features -
Users are redirected to this screen once they click on the Generate Demand card on the home screen.
This is used in cases when the scheduler is not running (due to technical errors) and the GP wants to run it manually.
Link → {base url}/mgramseva/home/billmanualgenerate
Default Values Set
The service category displays water charges by default
The service type displays a non-metered connection by default
Set the billing year from the drop-down which contains the list of financial years.
Set the Billing cycle which contains billing cycles for the selected financial year.
On clicking the Generate Demand Button, Bulk Demand is generated and the user is navigated to the success screen.
The Billing Cycle drop-down shows a list of months starting from the selected financial year from Date month till the current date month.
On selection of the desired month, the billing period value is set from the selected month’s first date to the selected month’s last date. (Eg. Selected Billing Cycle: June 2021, so Billing period: 01/07/2021 - 30/07/2021)
Billing Year*
isMandatory
Billing Cycle*
isMandatory
egov-mdms-service/v1/_search
ws-services-masters
PropertyTax
BillingService
To Fetch the Details of
connectionType
from ws-services-masters
TaxPeriod
from BillingService
where service=='WS' && @.fromDate <= $datestamp && @.toDate >= $datestamp
/ws-calculator/waterCalculator/_bulkDeman
POST
"tenantId": {}, "billingPeriod": {}
1 → Home Screen. + Generate Bulk Demand Screen
Pop → Home Screen
Widgets utilised from Library
SelectFieldBuilder
(Primary File)
SearchSelectFieldBuilder
(Secondary File)
Searchable Dropdown
CommonSuccessPage
Success Screen
BottomButtonBar
Button
Users are redirected to the Generate New Bill screen once they click on the Generate New Bill option in the household detail screen.
Link
→ {base url}/mgramseva/home/householddetails/billgenerate
Default Values Set
The service category defaults to water charges
The service type defaults to metered connection
The property type defaults to the selected property type of the consumer
Previous Meter Reading: Takes input from the user only for a first-time bill generation and if the Previous meter reading is null, else it's defaulted if the meter reading is present.
New Meter Reading: Takes input from the user
Meter Reading Date: Defaulted to today’s date, the User can change it to the desired date.
Users have the option of downloading the bill or sharing it via Whatsapp
On click of the Collect Payment button, the user is navigated to the Payment Screen
Fileds
Validations
Previous Meter Reading*
r'^[0-9]+$'
5 - digit reading
if Meter Reading < 5 digit, prepend zeroes
New Meter Reading*
r'^[0-9]+$'
5 - digit reading
if Meter Reading < 5 digit, prepend zeroes
Meter Reading Date*
Shows dates till today's date
API EndPoint
Input Params (Modules)
Description
egov-mdms-service/v1/_search
ws-services-masters
PropertyTax
BillingService
To Fetch the Details of
connectionType
from ws-services-masters
PropertyType
from PropertyTax
TaxHeadMaster
from BillingService
where service=='WS'
End Point
Request Method
Request Info
/ws-calculator/meterConnection/_create
POST
"meterReadings": { "currentReading": {}, "currentReadingDate": {}, "billingPeriod": {}, "meterStatus": "Working", "connectionNo": {}, "lastReading": {}, "lastReadingDate": {}, "generateDemand": true, "tenantId": {}
}
1 → Home Screen + Household Details Screen + Generate Bill Metered
Pop → Household Details Screen
Widgets utilised from Library
MeterReading
Meter Reading 5 digit boxes field
SelectFieldBuilder
(Primary File)
SearchSelectFieldBuilder
(Secondary File)
Searchable Drop down
DatePickerFieldBulder
Date Picker
CommonSuccessPage
Success Screen
BottomButtonBar
Button
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
Schedulers are designed to run a particular service at a scheduled time, without triggering manually. We can have multiple schedulers for an application. It will consider the GMT time format only.
The python script (name) would read the mdms-read-cronjob json from the MDMS service which users CRONJOB user for a token to access the MDMS service.
Try to identify the API's configured in this mdms with the argument passed while invoking the script.
With the identified configs from the mdms, the script calls the respective API configured there.
Total 7 schedulers are available in the mGramSeva: _schedulerTodaysCollection: This scheduler will run daily to send the day collection amount to the collection employee.
_jobscheduler/true: This is to send the notification to the ULB employee when the bulk demand auto-generation is failed.
_schedulermarkexpensebill: This scheduler is used to mark the expense as paid for the paid expenses once for every fortnight.
_schedulernewexpenditure: This is used to send the notification once for every fortnight regarding the no of expenditures created.
_schedulermonthsummary: This is to send the monthly summary details to the ULB employee. _schedulerpendingcollection: This is to send the total pending amount details to the respective ULB employee user once every fortnight.
_jobscheduler/false: This is used to generate the bulk demand automatically once every month.
As we have 7 different schedulers in mGramSeva which will be running in 4 different time slots so we have to configure, all of them run the same python scripts with the different arguments which you can see in the file under command -> args
The Time of the scheduler to run should be configured under cron-> schedule option.
Example of failedBulkDemand scheduler.
You can observe -
command->args value is failedbulkdemand ( through which python script understand to invoke only api configured in mdms-read-cronjob mdms json file with the name as “failedbulkdemand”
cron->schedule value is “ 30 3 5 * *” which define the time to kick this scheduler i.e at 3.30 on 5th day of every month. As the crontab follows GMT timezone converting this time to IST this jobs run on 9am of on 5th day of every month
PriorNote: In DevOps for every configuration app name changes according to the name of the cron job file given and the schedule will change according to the time set, and the argument will be as per the job name given in MDMS configuration.
labels: app: monthly-cronjob // This name will change based on the cronjob scheduler we are using group: mdms-read-cronjob // this is the same for all as we are using the same python script
cron: schedule: 30 3 4 * * // This depends on the time we need to run the scheduler
image: repository: api-cronjob tag: v1
command:
python3
cronJobAPIConfig.py
args:
monthly // This is the job name which differs from the requirement of scheduler type.
env:
name: JOB_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
resources: |
requests: {}
The remaining fields will be the same for all the schedulers.
Monthly: This will run and send the notification to the ULB employee or consumer on the 4th of every month morning at 9 am as per the scheduled time.
Fortnightevening: This scheduler will run on the 1st and 15th of every month evening at 6 pm to send the respective notification to the Consumer.
Failedbulkdemand: When the bulk demand generation is failed this scheduler will run and share the message to ULB employees to generate demand manually.
Dailyevening: This scheduler will run daily and send notifications to the collection operator on a daily basis.
Check the links below
MDMS object details and configuration:
{
"jobName": "monthly", // This will change based on the job name
"active": "true", // when the "active" param is set to true, the scheduler runs automatically. The scheduler does not run when set to false.
"method": "POST",
"url":http://echallan-services.mgramseva:8080/echallan-services/eChallan/v1/_schedulermonthsummary", // This is the respective service URL to call that service as per the scheduler.
"payload": {
"RequestInfo": "{DEFAULT_REQUESTINFO}" // this is common in all the schedulers used to send the request info.
},
"header": {
"Content-Type": "application/json" // This is a common property for all schedulers.
}
}
Here is the configuration for all the schedulers: Click here to see
Need to create a user with CRONJOB as name and type as SYSTEM and ROLE as SYSTEM AND EMPLOYEE here is the sample curl to create the user.
A Build ID (similar to the id given below) is created when you build the cronjob. api-cronjob:develop-c0aa08a-2
Take the id only from this instead of a complete name like develop-c0aa08a-2. This id will be used as the id for your respective yaml files and the same will be deployed to the required environment to test the cron job.
For example:
Mdms-read-cronjob:develop-c0aa08a-2,
failedbulkdemand:develop-c0aa08a-2,
Fortnightevening:develop-c0aa08a-2,
monthly:develop-c0aa08a-2 Note: develop-c0aa08a-2 is the common build id for all the files which you are using.
How to run the cronjob manually
Delete the existing cron jobs if they already exist with the same name.
kubectl delete cronjob mdms-read-cronjob -n mgramseva
Deploy these builds in QA environments, which are related to cronjob schedulers.
mdms-read-cronjob:develop-c0aa08a-2, failedbulkdemand:develop-c0aa08a-2, fortnightevening:develop-c0aa08a-2,monthly:develop-c0aa08a-2
Steps to test the cron job scheduler.
kubectl get cronjob -n mgramseva -- to check the list of cron jobs
Create the job manually to test the messages.
Here are the commands to create the jobs.
A message is received for the respective schedulers each time we run it.
We can increase the number to test again like failedbulkdemand-manually-1 next it will be failedbulkdemand-manually-2.
kubectl create job --from=cronjob/failedbulkdemand failedbulkdemand-manually-1 -n mgramseva
kubectl create job --from=cronjob/fortnightevening fortnightevening-manually-1 -n mgramseva
kubectl create job --from=cronjob/mdms-read-cronjob mdms-read-cronjob-manually-1 -n mgramseva
kubectl create job --from=cronjob/monthly monthly-manually-1 -n mgramseva
kubectl get job -n mgramseva -- to check the list of jobs
To check the cronjob image
kubectl describe cronjob mdms-read-cronjob -n mgramseva
To delete specific job
kubectl delete jobs mdms-read-cronjob-manually-1 -n mgramseva
Users are redirected to this screen once they click on the Collect Payment card or the Update Consumer Details card or the Download Bills and Receipts card on the home screen.
Link
→ {base url}/mgramseva/home/householdSearch?Mode=collect
→ {base url}/mgramseva/home/consumersearchupdate?Mode=update
→ {base url}/mgramseva/home/householdReceiptsSearch?Mode=receipts
Users can search the consumer/connection with their Mobile Number / Name / Old Connection ID / New Connection ID ( Search with any one of these
)
Click on Search to get the household details of the Consumer/Connection.
Primary Files: punjab-mgramseva/SearchConnection.dart at develop · egovernments/punjab-mgramseva
Owner Mobile Number
r'^(?:[+0]9)?[0-9]{10}$'
Name of the Consumer
r'^[A-Za-z ]'
Old Connection ID
No Validation
New Connection ID
No Validation
/ws-services/wc/_search
POST
tenantId: {}
oldConnectionNumber: {}
name: {}
connectionNumber: {}
mobileNumber: {}
1 → Home Screen. + Search Connection Screen
Pop → Home Screen
Widgets utilised from Library
BuildTextField
Text Field
BottomButtonBar
Button
Users are redirected to this screen once they click on the Forgot Password link on the home screen.
This feature allows users to request OTP by entering a valid (registered) mobile number.
Follow the steps below to set a new password -
Click on the Forgot Password link visible on the login screen
Enter the registered mobile number
The remaining steps are explained in the Reset Password section.
Primary Files punjab-mgramseva/ForgotPassword.dart at develop · egovernments/punjab-mgramseva
Fields
Validation
Phone Number*
r'^[0-9]+$'
user-otp/v1/_send
POST
"otp": { "mobileNumber": {}, "tenantId": {}, "type": "passwordreset", "userType": "Employee" }
2 → Language Selection Screen. + Login Screen + ForgotPassword
Pop → Login Screen Screen
Widgets utilised from Library
BuildTextField
Text Field
Button
Button
Users are redirected to this screen once they click on the Continue button on Forgot Password screen.
Link - → {base url}/mgramseva/selectLanguage/login/forgotPassword/resetPassword
Enter the OTP sent on the user’s 10-digit mobile number.
Set the new password for logging into the application.
Click on Change Password to apply new password credentials for the user.
This feature helps to provide the users with a clear indication of what the password should contain. Acceptable passwords must contain -
Minimum 6 digits
At least one special character ( !#$%^&...)
At least one letter
At least one number
Enter the OTP sent *
r'^[0-9]+$'
, 6 digit
Enter a New Password*
r'^(?=.*?[A-Za-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{6,}$'
Confirm New Password
Match with New Password
user/password/nologin/_update
POST
"otpReference": {}, "userName": {}, "newPassword": {}, "tenantId": {}, "type": “Employee”
1 → Language Selection Screen. + Login Screen + Forgot Password + Reset Password.
Pop → Forgot Password Screen.
Widgets utilised from Library
BuildTextField
Text Field
BottomButtonBar
Button
PasswordHint
Password Hint Card
This screen enables employees to update consumer details.
Users are redirected to this screen/page when they click on the Update Consumer Details card.
Link
→ {base url}/mgramseva/home/consumersearchupdate?Mode=update
→ {base url}/mgramseva/home/consumersearchresult
It redirects to Search Connection Page in update
mode where users enter specific consumer details to search for consumers. The search result screen has the Edit Consumer button. Clicking on this button navigates the users to the Update Consumer screen.
Fields
Validations
consumer Name*
[A-Za-z ]
Gender*
None
Spouse/Parent’s Name*
[A-Za-z ]
Phone Number*
[0-9]
Old Connection No
None
Category
None
Sub Category
None
Door Number
None
Street Name/Number
None
Gram Panchayat Name*
None- Disabled
Propert Type*
None
Service Type*
None
Meter Id
[a-zA-Z0-9]
Meter Reading
[0-9]
Billing Cycle
None
Arrears
[0-9.]
Advance
[0-9.]
Penalty
[0-9.]
Note: All fields are validated on Submit apart from the phone number which gets validated on change.
/egov-mdms-service/v1/_search
[{"moduleName":"ws-services-masters","masterDetails":[{"name":"connectionType"}]},{"moduleName":"PropertyTax","masterDetails":[{"name":"PropertyType"}]},{"moduleName":"BillingService","masterDetails":[{"name":"TaxPeriod","filter":"[?(@.service=='WS' && @.fromDate <= 1631989800000 && @.toDate >= 1631989800000)]
To get the Property Type and service Type and billing cycle values for the Dropdown
egov-location/location/v11/boundarys/_search?
hierarchyTypeCode=REVENUE&boundaryType=Locality&tenantId={tenantID}
To get the values for Locality Dropdown
billing-service/demand/_search
consumerCode
, businessService
, tenantId
To Fetch Demand Details
property-services/property/_search
propertyIds
, tenantId
To Fetch Property Type
ws-services/wc/_search
connectionNumber
, tenantId
On Demand this API is Made
Components utilised from Widgets Library
Components
File Path
TextField Builder
RadioButtonField Builder
SearchSelectField Builder
DatePicker Builder
Enables employees to create new Consumers or Connections - The process of onboarding the end-users.
Link
→ {base url}/mgramseva/home/consumercreate
The Create Consumer card is available on the home screen as per the defined user role.
Click on the Consumer Create card navigates the user to the consumer creation screen.
Users enter the required details for the creation of a consumer.
If a user logs in for the first time then a walkthrough is populated following the same logic as in the home screen.
Primary Files - punjab-mgramseva/WalkFlowContainer.dart at develop · egovernments/punjab-mgramseva , punjab-mgramseva/walkthrough.dart at develop · egovernments/punjab-mgramseva
Fields
Validations
consumer Name*
[A-Za-z ]
Gender*
None
Spouse/Parent’s Name*
[A-Za-z ]
Phone Number*
[0-9]
Old Connection No
None
Category
None
Sub Category
None
Door Number
None
Street Name/Number
None
Gram Panchayat Name*
None- Disabled
Propert Type*
None
Service Type*
None
Meter Id
[a-zA-Z0-9]
Meter Reading
[0-9]
Billing Cycle
None
Arrears
[0-9.]
Advance
[0-9.]
Penalty
[0-9.]
Note: All fields are validated on Submit except the Phone number which gets validated on change.
/egov-mdms-service/v1/_search
[{"moduleName":"ws-services-masters","masterDetails":[{"name":"connectionType"}]},{"moduleName":"PropertyTax","masterDetails":[{"name":"PropertyType"}]},{"moduleName":"BillingService","masterDetails":[{"name":"TaxPeriod","filter":"[?(@.service=='WS' && @.fromDate <= 1631989800000 && @.toDate >= 1631989800000)]
To get the Property Type and service Type and billing cycle values for the Dropdown
egov-location/location/v11/boundarys/_search?
hierarchyTypeCode=REVENUE&boundaryType=Locality&tenantId={tenantID}
To get the values for Locality DropDow
Consumer creation involves 2 sequential processes
Property Creation
Water connection Creation
After creating a property, the Property ID is linked to the WaterConnection Request JSON.
Water connection creation is of two types:
A metered connection that requires Meter ID and meter installation Date/ Last Meter Reading Date and an optional field to capture meter reading.
Non-Metered Connection which requires the last billing cycle as mandatory params captured in the field as shown below.
Users can switch between connection types by selecting a desired value from the Service Type DropDown.
Advance and Penalty
For consumers, users can give either Advance or Arrears along with a Penalty by selecting the respective option using the radio buttons. If a user selects Advance, the field is shown or else Arrears and Penalty will be shown where the user can enter the required amount.
The radio button “Advance” will be displayed only if the config flag “Advance enabled” is activated in the MDMS billing service.
The “Penalty” field (displayed along with arrears) on selecting the Arrears radio button, will be displayed only if the config flag “Penalty enabled” is activated in the MDMS billing service. The user will be able to see the arrears field and can enter the arrears amount.
billing-service/demand/_search API is used for calculating the advance amount for the current bill. We can get the advance amount if taxHeadMasterCode contains 'WS_ADVANCE_CARRYFORWARD'. Here we have two properties - collection amount and tax amount. The tax amount is the advance amount that is added to the system and the collection amount is how much we utilised from the total advance amount. We can get the current advance from the taxAmount - collectionAmount
billing-service/demand/_search API is used to calculate the Penalty amount. We can get the penalty amount if taxHeadMasterCode contains 'WS_TIME_ADHOC_PENALTY'. We get the penalty amount from the tax amount property.
The due date is calculated by adding the billexpirtyDate days with the demand generation date.
If it is the first demand and it is having the taxHeadMasterCode 10201, we show the Penalty place holder in the bill details.
property-services/property/_create
Property Creation Request JSON
ws-services/wc/_create
Components utilised from Widgets Library
Components
File Path
TextField Builder
RadioButtonField Builder
SearchSelectField Builder
DatePicker Builder
Users are redirected to the Update Password screen once they log in successfully the first time.
Link: → {base url}/mgramseva/selectLanguage/login/updatepassword
Enter the OTP sent on the user’s 10-digit mobile number.
Set the new password for logging into the application.
Click on Change Password to apply new password credentials for the user.
Users can see the allocated Gram Panchayat name and code in the table.
This feature helps match the user’s password and check if the password contains
Minimum 6 digits
At least one special character ( !#$%^&...)
At least one letter
At least one number
Primary Files
Fetch the tenants from MDMS, based on the user roles in the user request filtering the tenants by comparing tenant Id.
1 → Language selection screen + Login screen + Update password + Update password success
Pop → Login
Widgets utilized from library
View →
Controller →
Events push is used to manually push data from the mGramSeva Adapter to the iFIX Adapter. Make sure the existing events are cleared or deleted to ensure reliable data transfer. Refer to the documentation here to find details on how to clean up the event data - . Post events clean up the system loads the project code for all the tenants. Then it pushes the data to the iFIX adapter.
Access to Kubectl of the environment targetted
Postman scripts
The Postman script fetches the data from the existing mGramSeva database and passes it to the mGramSeva adapter, from where it is pushed to the iFIX adapter.
Pass the offset and limits based on the total transactions present in the database.
Here, TenantId is mandatory. Limit and offset can vary based on the requirement. Business service is not required.
This fetches all payment records irrespective of tenant based on the limit and offset. The data is passed to the IFIX adapter one after the other.
The above curl fetches the demands based on the tenant ID and business service passed. Business service can be ‘WS' or ‘EXPENSE.SALARY’ or 'EXPENSE.MISC’ or 'EXPENSE.OM’ etc. For WS it is saved as demand and for EXPENSE it is saved as bill.
crontab.guru - The cron schedule expression editor helps to define the pattern for the schedule cron.
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
defined in
Water Connection Request JSON defined in
Model → punjab-mgramseva/property.dart at develop · egovernments/punjab-mgramseva , punjab-mgramseva/water_connection.dart at develop · egovernments/punjab-mgramseva
Controller → punjab-mgramseva/consumer_details_repo.dart at develop · egovernments/punjab-mgramseva , punjab-mgramseva/consumer_details_provider.dart at develop · egovernments/punjab-mgramseva
Enter the OTP sent *
r'^[0-9]+$'
, 6 digit
Enter a New Password*
r'^(?=.*?[A-Za-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{6,}$'
Confirm New Password
Match with New Password
user/password/nologin/_update
POST
"otpReference": {}, "userName": {}, "newPassword": {}, "tenantId": {}, "type": “Employee”
egov-mdms-service/v1/_search
POST
"MdmsCriteria": { "tenantId": tenantId, "moduleDetails": [ { "moduleName": "tenant", "masterDetails": [ {"name": "tenants"} ], }, ] }
BuildTextField
Text Field
BottomButtonBar
Button
PasswordHint
Password Hint Card
Make sure the below-mentioned permissions are allowed or accepted:
Internet access
FileStore read and write
Bluetooth connection
Request packages
Query all packages
Download the flutter sdk from
Install for setting the IDE.
Open Android Studio. Open plugin preferences (File > Settings > Plugins) and select Marketplace. Select the Flutter plugin and click Install as shown in the image below. Click Yes when prompted to install the Dart plugin.
Set the Flutter SDK path in android studio by navigating to (File > Settings > Plugins > Language & Frameworks >>flutter) flutter as shown in the image below.
Add the flutter path to the system path variable for running the flutter commands as shown in the image below.
Open a new terminal and run the flutter doctor command. This downloads the respective Dart SDK version and runs flutter doctor--android-licenses to accept the android licenses.
Select the AVD manager from the right-side top corner as shown in the image. Now, select any device by tapping on the play button. The Android Studio launches the emulator and the device is auto-selected. There are two modes for running the application - play and debug. Tap on any one of the modes to launch the mGramSeva application in the emulator as shown in the image.
Select the chrome option from the device selection and tap on the play button. This launches the application on a chrome window.
Navigate to mgramseva folder → cd punjab-mgramseva/frontend/mgramseva
+3 => version code (increment by +1 every time)
Execute the flutter clean command → flutter clean
Execute the flutter pub get command → flutter pub get
2. Connect your Phone to the system and enable File transfer.
3. Select the AVD manager(your Phone) from the right side top corner in Android Studio
4. Go to the frontend/mgramseva/utils/execute_integration.sh file and run it.
5. Integration test will start on your device.
Enables employees to modify/edit the expenses based on the status of the payment.
Link → {base url}/mgramseva/home/searchExpense/result/updateExpense
Update Expenses card is visible on the home screen for defined user roles that have EXPENSE PROCESSING permission. Clicking on the Update Expenditure card in the expense search results screen navigates the user to the Edit Expense Bills screen.
Users can edit the previously populated expense details for the vendors.
Clicking on the Submit button navigates the users to the Modified Expenditure Success screen.
Use Case1: When the status is “Unpaid”
Allows modification of all the details except the Bill Id. Users can Mark the Bill as “Cancelled” by checking on the option.
Use Case2: When the status is “Paid”
Cannot modify any details. But the users can Mark the Bill as “Cancelled” by checking the option.
Stack
1 → Home Screen. + Search Expense Screen + Expense Results Screen + Edit Expense Bills Screen
Pop → Expense Results Screen
Widgets utilised from Library
Users are redirected to this screen if they select the GPWSC Dashboard option on the home screen.
Link → {base url}/mgramseva/home/dashboard
Users can select the year from the drop-down which contains the list of the last 5 Financial years, on tap of any year respective months will be displayed.
Users can see the user satisfaction average scores of the selected month.
Users can see the Trend line graph plotted based on both Revenue and Expenditure.
By selecting any Month from the table, users are navigated to the and Dashboard screen.
Users can see the WhatsApp Share button, by tapping on it users can share the Monthly dashboard as a screenshot via WhatsApp.
Primary Files:
Secondary Files:
Stack
1 → Home Screen + Monthly Dashboard + Revenue Dashboard + update connection screen
Pop → Revenue Dashboard screen → Home Screen
2 → Home Screen + Monthly Dashboard + Expenditure Dashboard + update expenditure screen
Pop → Expenditure Dashboard Screen → Home Screen
3 → Home Screen + Monthly Dashboard + Revenue Dashboard + update connection screen + Update Success
Pop → Home Screen
4 → Home Screen + Monthly Dashboard + Expenditure Dashboard + update expenditure screen + Update Success
Pop → Home Screen
Widgets utilised from Library
Model →
View →
Controller →
The steps below guide us to run the project on both Web and Mobile 1. Clone the project from the . 2. Open the project in android studio by selecting (File > open), select the flutter project (punjab-mgramseva/frontend/mgramseva) from the cloned path as shown in the image below.
Note: To resolve the cors error follow the steps provided in this
Clone the Repo → git clone
Upgrade the version in the (version: 1.0.2+3) 1.0.2 => version name (which is displayed in play store)
Replace the base Url with Prod Url File → _baseUrl: window.location.origin + "/", => _baseUrl: " "
Comment the below line File → export 'dart:js' show allowInterop, allowInteropCaptureThis;
Download the key-store from the below link Add this properties file to the android app folder as shown in the image below - android → key.properties
Download the google service json from the link below Add this json file to the android app folder as shown in the image below android → app → google-services.json
Build the prod app bundle → flutter build appbundle Check the attached drive link below which includes the key-store, and version tracker. Update the version and release date in the sheet. Path → D:\mgramseva_prod\punjab-mgramseva\frontend\mgramseva\build\app\outputs\bundle\release\app-release.aab
1. Enable the USB debugging option on your Mobile Phone. ( )
Primary Files -
Vendor Name*
[A-Za-z ]
Mobile Number*
[0-9] & is mandatory only if a new vendor is added
Type of Expense*
None
Amount*
[0-9]
Bill Date*
Before Current Date and after party Bill Date
Party Bill Date
Should be before the Bill Date
Bill Paid
None
Paid Date
After Bill date and less than current Date
Attach Documents
Option to upload a single document, Supported files - PDF, JPEG, PNG (maximum 5MB)
Mark this Bill as Cancelled
None
/egov-mdms-service/v1/_search
[{"moduleName": "Expense", "masterDetails": [{"name": "ExpenseType"},]}, {"moduleName": "BillingService", "masterDetails": [{"name": "BusinessService"}, {"name": "TaxHeadMaster"},]}]
To get the Expense Type for the Dropdown
egov.org.in/vendor/v1/_search
tenantId: {}
To get the list of vendors in the selected tenant for the suggestion text box - Vendor Name
BuildTextField
Text Field
AutoCompleteView
Suggestion Text Field
SelectFieldBuilder
(Primary File)
SearchSelectFieldBuilder
(Secondary File)
Searchable Drop down
DatePickerFieldBulder
Date Picker
CommonSuccessPage
Success Screen
BottomButtonBar
Button
dashboard-analytics/dashboard/getChartV2
POST
aggregationRequestDto
: {}
requestDate
: {}
headers
: {}
RequestInfo
: {}
ws-services/wc/_revenueCollectionData
POST
tenantId : {} fromDate : {} toDate : {}
RequestInfo
: {}
echallan-services/eChallan/v1/_chalanCollectionData
POST
tenantId : {} fromDate : {} toDate : {}
RequestInfo
: {}
/filestore/v1/files
POST
tenantId
: {}
module
: {}
/egov-url-shortening/shortener
POST
url
: {}
Pagination
Pagination
BuildTextField
Text Field
BillsTable
Table
LabelText
Subtitle
NestedDatePicker
Nested Date Picker
These all steps need to be done-:
Localization is the process of adapting a software application, website, or content to different languages and regions, making it accessible and user-friendly for diverse audiences. It involves translating text, adapting graphics, and configuring settings to suit the cultural and linguistic preferences of a specific locale.
To retrieve localization messages in mGramSeva, use the Search API given below. This API allows you to search for messages based on parameters like locale, tenantId, and apiId. Here is an example using cURL:
You can customize the parameters such as locale (en_IN, hi_IN, pn_IN) and tenantId to search for messages in different languages and environments. Change the URL to search in any other environment. The current API is specific for UAT environment.
The Upsert API allows users to update or insert new localization messages into mGramSeva. This involves refreshing the authentication token and providing details like code, message, module, and locale. Here is an example using cURL:
In this example, you can customize the "code," "message," "module," and "locale" parameters to specify the localization details you want to upsert. Make sure to update the authentication token for security purposes.
Note: The provided APIs are for the UAT environment, and you may need to modify the URLs accordingly for other environments.
This doc provides the steps to create and add users on mgramseva platform post-installation.
Follow the steps provided on this page to create and add users on the mGramSeva platform once the installation is complete.
Ensure the Postman utility is installed to run the following scripts. If not, Install Postman on the local machine.
There are two methods to create users - either through API or through port-forwarding. To create users through port-forwarding refer here.
Follow the steps given below to create different types of users through the API.
There are primarily three different types of users as listed below:
Super User
Anonymous User
System User
Super User - A superuser is a privileged user account with elevated access rights in a computer system or application. It is typically reserved for administrators or trusted personnel and grants them full control and unrestricted access to all system resources. Superusers are necessary to manage and maintain the system, perform critical tasks, and troubleshoot issues efficiently.
A Superuser is created using the createnovaildate API. Below is the curl given for creating a superuser.
Steps to follow:
Import the curl given below in Postman.
Refresh the authorisation token.
Provide User data as per requirements. This API will create a Super User in production. To add users in any other environment change the URL.
The parameters - userName , name , gender, mobileNumber , tenantId , and password can be changed as per requirements.
Anonymous User -An anonymous user is a generic or unauthenticated user account that does not require login credentials to access certain parts of a system or website. These accounts are essential for providing basic access to public information or services without requiring user registration. They are commonly used to ensure accessibility for a wide audience and encourage user interaction while preserving user privacy. These are used when the system is accessing non-authentication links such as bills and payment receipts.
Creating an anonymous user is the same as creating a superuser. The only difference is to change the name and code in roles. The API below is used to create an Anonymous User in production.
System User - Creating a system user is the same as creating a superuser and anonymous user. The only difference is to change the name and code in roles.
While creating any user make sure your roles are present in ACCESSCONTROL-ROLES.
Here, 'pb' is used as tenantId since we are creating users at the state-level.
This page provides the steps to follow to create a workflow in mGramSeva.
Here is the reference to workflow service of DIGIT. You can refer here and understand more.
For creating workflow in mgramseva below are the steps-
Follow these steps to create a workflow in mGramSeva:
Check Existing Workflow:
Utilize the provided Postman collection that includes workflow create and search APIs.
Use the search API to check if the workflow for the specified state already exists.
Workflow Creation:
If the workflow is not present, proceed to create it using the create API.
Ensure to provide the necessary details in the userInfo section, give superuser information.
Adjust parameters like tenantId and roles according to your specific requirements.
Port Forwarding:
Execute port forwarding to the workflow service using the following kubectl command:
Replace <pod-name>
with the appropriate pod name.
Create Workflow:
After port forwarding, initiate the workflow creation process.
Search Through API:
Use the search API to verify that the workflow has been successfully created.
Adjust the search parameters as needed.
These steps ensure a smooth workflow creation process in mGramSeva. Make sure to follow each step in sequence for a seamless experience.
This page provides a comprehensive guide on using the CreateNovaildate API to create users with specific roles based on their responsibilities within the system. Adjust the parameters and roles as needed for your specific requirements.
The CreateNovaildate API allows users to create a new user with specified details that include username, name, gender, mobile number, activation status, user type, tenant ID, and password. Refer to the Request Parameters details available below.
Additionally, users can be assigned specific roles based on their responsibilities.
username (string): User's unique username.
name (string): Full name of the user.
gender (string): Gender of the user.
mobileno (string): User's mobile number.
active (boolean): User's account status (true for active, false for inactive).
type (string): It will be EMPLOYEE only.
tenantid (string): User's tenant ID.
password (string): User's password.
Roles: Roles determine the permissions and responsibilities assigned to a user.
The available roles are as follows:
COLLECTION_OPERATOR
EXPENSE_PROCESSING
BULK_DEMAND_PROCESSING
DASHBOARD_VIEWER
GP_ADMIN
EXPENSE_PROCESSING
BULK_DEMAND_PROCESSING
DASHBOARD_VIEWER
GP_ADMIN
COLLECTION_OPERATOR
COLLECTION_OPERATOR
DASHBOARD_VIEWER
HRMS_ADMIN
DIVISION_ADMIN
HRMS_ADMIN
STATE_ADMIN
To assign roles to a user, include the desired roles in the roles
section of the request.
PROFILE_UPDATE role is available for every user to update existing roles.
This documentation outlines the process of setting up a new tenant in MDMS (Master Data Management System). To achieve this, it involves cloning the MDMS repository locally and utilizing a Python script that interacts with an Excel file containing essential information for the new tenant setup.
Clone the MDMS repository to your local machine.
Have the Excel file ready for reference. The structure of the Excel file is critical, and any changes must align with the specified columns. The reference to the Excel file is given below.
Locate the Python script for adding a new tenant. The script can either be placed in the "tenants" folder locally or specify the full path where your "tenants.json" folder is present within the script.
Open the script and edit the following lines to match your requirements:
Replace "Book2.xlsx" with the name of your Excel file containing tenant information.
Specify the sheet name in your Excel file where the required data is stored.
Ensure your Excel file adheres to the specified format. The columns must match the template provided, and any deviation may result in script failure.
Do not modify the column structure in the Excel sheet, as the script relies on a consistent format.
Execute the Python script after configuring it according to your needs. The script will process the Excel file, and upon completion, a new file named "tenants_new.json" will be generated.
Deploying to MDMS:
Copy the generated tenants_new.json
file to the MDMS repository or select and apply the updated data within MDMS as needed.
After creating a tenant in the tenants.json file we need to make a separate folder in MDMS for each tenant.
Consumer information can be edited under certain conditions -
Before the first demand is generated in the system
After the first demand is generated in the system
Users with permission to edit consumer records can click on the Edit Consumer info tile on the home screen. This navigates them to the consumer search screen.
Users can navigate from the search screen or the search results screen (Case when multiple search results are displayed) to the Consumer Edit Screen.
On the successful load of the consumer edit screen, all data parameters of the consumer are shown (with editable and non-editable fields).
By Default - New consumer ID is shown on the top of the screen and is non-editable.
The table below lists the editable field details -
Data Field
Before First Demand
After First Demand
Comments
New Consumer ID
NO
NO
Consumer ID is generated while user creation and is not editable
Consumer’s Name
YES
YES
bills, receipts, bill generation screens etc starts displaying the newly entered consumer name
Gender
YES
YES
Father’s Name
YES
YES
Phone number
YES
YES
Use Cases
After the phone number is changed, searching with the old/new phone number in the connection search screen leads to the same HH screen
SMS notifications are sent to the new mobile number of the user from the date of the change
Old Connection ID
YES
NO
Validated for unique IDs in the system for the GPWSC
Door Number
YES
YES
Street Number / Name
YES
YES
Ward Number / Name
YES
YES
Gram Panchayat Name
NO
NO
Property Type
YES
YES
Charges applicable as per rate master. Effects take place from the next billing cycle
Service Type
YES
YES
Effects take place from the next billing cycle
The last date of the current billing cycle is taken as the last meter reading date
Previous meter reading is captured while generating the demand
Meter Number
YES
YES
Previous meter reading Date
YES
NA
This field is not shown on screen after the first demand is generated
Previous Meter Reading
YES
NA
This field is not shown on the screen after the first demand is generated
Last Billing Cycle Billed
YES
NA
This field is not shown on the screen after the first demand is generated
Arrears as of Last Bill
YES
NA
This field is not shown on the screen after the first demand is generated. When changed the arrear demand is deleted and updated accordingly based on the selected service type.
Mark Connection as inactive
YES
YES
If a connection is marked inactive, it is not considered for demand generation for future billing cycles.
An inactive connection can be reactivated later from this screen.
In case there are arrears, demand is generated. If there are no arrears, demand is not generated.
Users can modify the arrear value. In such a case, demand is generated with the updated value.
Users can add arrear to the connection, for which arrear was zero at the time of creating the connection. In such a case, new demand is generated.
Clicking on the Submit button shows a nudge saying Details Submitted Successfully. Closing the nudge navigates the user back to the home screen.
The CTA is activated only when any field is changed or updated. Else, it is in an inactive state.
This page provides step-by-step details on setting up a git repo for code, configs, V1 MDMS, and Infra As Code.
Fork the following repos that contain the master data and default configurations. Customize the data (master data, ULB, Tenant details, Users, etc) as per specific implementation requirements in the respective GitHub organization accounts.
Follow the steps given below to setup the git repository,
both the , and repos into your GitHub organization account.
Create a , and generate an ssh authentication key (and .
Enable new GitHub users to access the forked repos.
Add the ssh private key generated in the previous step to the within the git-sync section.
Update the services in the git-sync repository by specifying the forked repository and branch in the file.
Update the deployment configuration details for the below as per your specifications:
Number of replicas/scale of each service (depending on whether dev or prod load)
You must update the SMS gateway, email gateway, and payment gateway details for the notification and payment gateway services, etc.
Update the config and MDMS GitHub repos wherever marked.
Update GMap key (In case you are using Google Map services in your PGR, PT, TL, etc)
Create one private S3 bucket for Filestore and one public bucket for logos. Add the bucket details respectively and create an IAM user with the s3 bucket access. Add IAM user details to .
URL/DNS on which DIGIT will be exposed.
SSL certificate for the above URL.
Any specific endpoint configurations (Internal/external).
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
This page provides the steps to follow to create a Git account in the client name.
To create a Git account in the client name, follow the steps below:
Register the client on a Git hosting platform such as GitHub, GitLab, or Bitbucket by providing their email address, choosing a username, and setting a secure password.
Once the account is set up, they can start using Git to manage their code repositories and collaborate on software development projects with ease.