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...
The users receive a link through SMS. Clicking on this link redirects the users to the login page of 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.
This link will navigate 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 screens in DIGIT. On Submit, the acknowledgement screen is displayed. 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 that displays the menu options based on the mapped user role.
Multiple reference applications built on the iFIX platform demonstrate its potential capabilities. These applications or exemplars facilitate the resolution of issues related to fiscal management of projects and enable real-time, fiscal visibility across the projects.
The current exemplars have been developed in collaboration with the Punjab State Government - Department of Water Supply and Sanitation (DWSS).
DWSS has developed more than 8500 water projects across Punjab. After the construction of these projects, the operations and maintenance of these are done by the GPWSC (Gram Panchayat Water Scheme Committee) consisting of members from the local bodies. For the projects that are handed over, GPWSCs are responsible for setting up the water charges, collecting the water charges from the households and managing the expenditure (O&M) for the project.
Due to various reasons, if a GPWSC is unable to fiscally manage the project - the asset deteriorates, water supply to the household is adversely impacted and vendors are unpaid - arrears pile up. For example, the electricity bill which is 75% of the O&M expenses is unpaid. Eventually, these arrears are presented to the State Finance Department for clearance.
The scenario above exemplifies some of the pivotal challenges addressed by the reference applications built on iFIX.
- A mobile-based application that will enable GPWSC members and collection agents to collect & manage revenue and expenditure.
- Transforms the Demand, Receipt, Bill and Payment information entered in mGramSeva into anonymized and standardized fiscal events. These are then posted on the iFIX Platform.
- stores micro-level fiscal data and provides secure standard APIs for source systems to post and query fiscal data in raw and aggregated form.
- provides a dashboard for the department to have a real-time view of the fiscal sustainability of various projects.
mGramSeva is an application that has been developed as part of the iFIX in Punjab. It enables rural local bodies to manage revenue and expenditures related to water supply projects using a mobile app. The app will be used by members of the water management committee and collection agents. The collection agent will be able to add consumers (or households), generate bill and receipt acknowledgements.
All content on this page by is licensed under a .
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 GPs have a monthly billing cycle for water charges. The Scheduler automatically triggers on “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 is generated and hence 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 get 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 collector when on HH Details screen sees a new card (Updated card from month 2 onwards) with information related to demand and payment collection.
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 GP wants to run it manually.
If the manual demand generation is done in the middle of the billing cycle for which demand has already been generated this will do nothing.
Only when the scheduler has not generated a demand for a billing cycle, manual demand generation helps.
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.
On Click of Generate Demand, demand for the given billing cycle gets generated based on the logic defined above.
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 which 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 meter number is also displayed
When Bill is not generated (Post rollout until the first month)
Only Data Card is shown - No action required
After the first demand is generated - A new consumer bill/Card gets generated with 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 will display any unpaid dues.
Total Amount - Sum of current amount and arrears
Action Items
Download, Share Bill
Clicking on download bill prompts to download bill (Bill details is given in a separate user story)
Share bill (WhatsApp icon) opens sharing options to 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
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 - download receipt in 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
When Bill is not generated (Post rollout until the first month)
Data Card is shown
Below the data card - the Card to generate a new bill is also shown.
This card contains
Last bill generation date - For the first time this will be picked up from data entry. Next time onwards systems latest bill generation date will be captured.
Days from last bill generation Date - this is to indicate revenue collector how many days have passed by since last time bill is generated
Previous Meter reading - Units of the meter that is the last read will be displayed here.
Pending Amount
Before the first bill is generated this will just be arrears that are captured during data entry
After the first bill is generated, this pending amount includes the whole pending amount by the 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, Without the first generation of bills, collection cant happen even for arrears entered in data entry.
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 download bill will prompt to download bill for the respective amount (Bill details is given in separate user story)
Share bill (WhatsApp icon) will open sharing options of phone OS and the user should be able to 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 should take 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 - should download receipt in 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’ revenue collector goes through bill generation flow and a new single card appears between ‘Generate bill’ and ‘Consumer receipts block’
After 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
When online is selected for payment method, the “Collect Payment” option is disabled. Since HH scans the QR, the Revenue collector does not have control over the online process.
A partial amount can’t be greater than the full amount.
Unlike Non-Metered connections which 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
Field on bill generation screen for metered connections are 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”
On the success screen there are 3 user actions
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”
For Demand Generation Logic refer to Demand/Bill Generation for metered connection
All 5 Digits in the meter reading has to be entered. Show error message “ Old Meter Reading entered is Invalid”, “ 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 give the option to change to the user.
Based on the user role the following functionality will be available and displayed on the home screen
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
Consumer information can be edited under certain conditions -
Before the first demand is generated from the system
After the first demand is generated from the system
Users with permissions 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 -
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 this case, the 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.
The household masters need to be created in the system to initiate the demand generation and collection process. These are consumers also referred to as the household that will be issued the water connection and supplied on regular basis.
On selecting the option Create consumer from the list of tile/cards on the home page, the user is navigated to the Create Consumer page.
Data elements for the consumer listed in the table below -
Multiple connections (HH records) can be created with the same phone number.
Phone numbers can be the same, but the old connection ID should be different to create a new HH record.
A single HH record, can't be registered in the system more than once. Trying to register on the system again displays the error message “this connection already exists”.
On Submit, the consumer master is created and the 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, an error message is shown accordingly.
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 in the screen.
Non metered - The arrear demand is created for the selected billing cycle.
On the successful creation of consumer records, a toast message “ Registration successful” is shown.
Closing this toast message, using the close icon, refreshes the page and the user sees an empty consumer creation screen.
The expense entry for the O&M on regular basis is captured on this screen.
On selecting the option “Add Expense Record” from the list of tile/cards on the home page, the user is navigated to the expense entry screen. The screen displays the following fields.
On Submitting, the Expense entry gets created with a Bill number assigned. The Bill number generated would be based on logic defined as - “EB-<FY>-<4 digit running seq No>”
On Successful creation of expense entry, an acknowledgement screen is shown “Expense Entry successful” along with the Bill Number.
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 expands and contracts the view.
When the user search matches with only one record, show HH detail screen directly. No need to show the intermediary search details screen.
The search result set contains 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)
Click on the View Consumer Details button redirects the user to the HH Details screen.
The user of the GP system is onboarded by loading user records in bulk as a backend activity. The system enables the loading of user records in bulk and create the profiles with a mobile number as login id and with a random password.
On loading user profiles - The GP users are sent a link and login credentials over SMS required to login to the Mgramseva application. The link navigates to this screen and takes the user through the flow of logging in and resetting the password in case of first-time login.
The web link, too, initiates from the same screen.
All content on this page by is licensed under a .
Various SMS notifications are sent to different users on different actions. Below is a consolidated list of all SMS notifications required.
All content on this page by is licensed under a .
Expense modification is allowed based on the status of the Payment as given in below scenarios -
1: When the status is “Unpaid”
Should allow users to modify all the details except the Bill id. Users are able to Mark the Bill as “Cancelled” using the option provided.
2: When the status is “Paid”
Would not allow users to modify any details. But the user is able to Mark the Bill as “Cancelled” using the option provided.
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 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.
All content on this page by is licensed under a .
Detail
Comments
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
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.
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.
Consumer creation - non metered
Consumer creation - metered
Expenditure Entry
Expenditure entry Successful
Bulk Demand would be generated in 2 methods -
Auto (scheduler based)
Manual
Auto: The demand is generated at end of the month or the first day of next month or as scheduled for the recently completed billing cycle. Use cases are as below -
First demand generated in system: The demand is generated for the recently completed billing cycle considering the arrears in the master data. The arrears are tagged to the previous billing cycle of the current demand.
Consecutive demands: The demand is generated for all the months pending from the most recent to the last billing cycle completed.
The demand is generated for the recently completed billing cycle.
Manual: The demand is generated for the billing cycle that is selected by the user. If the demand is already generated, then the demand would be generated only for those consumers for whom demand does not exist for the selected month.
First demand generated in the system: The demand would be generated for the selected billing cycle. considering the arrears in the master data. The arrears would be tagged to the previous billing cycle of the current demand.
Consecutive demand: The demand for the selected month is generated only if the previous billing cycle demand exists. If the demand for the previous cycle does not exist, it gives an error message “Demand generation is pending from billing cycle - <Name of cycle>. please generate demand from this cycle in sequence”. This validation is done considering the most recent billing cycle that exists in the system.
Charges/Heads and Calculation Logic
As part of V1, only the water charges head is only the head that is applicable. Rate Master is defined at the GPWSC level.
Water Charges - Charges are applicable as defined in the Rate Masters based on - Validity, Property Type, Service Type where calculation type is “Per Bill Cycle” for the given billing period.
Bill Period - The billing periods are monthly as standard across GPWSC. In future, GPWSC may switch to bi-monthly to reduce the processing effort. The sample billing period data is given in the MDMS data.
Exclusion
Reversion of Demand is not allowed. This has to be done in the backend.
Exception reporting for every batch processing should be accessed from the backend only.
mGramSeva is built on top of the DIGIT Platform. It consists of the following layers
Back End
Core Services
User Service (egov-user)
User OTP (user-otp)
Access Control (access-control)
ID Generation Service (id-gen)
Payment Gateway (pg-service)
Workflow Service (wf-service)
Encryption Service (data-encryption-service)
Localization Service (localization-service)
Boundary Service (location-service)
URL Shortening Service (url-shortening-service)
PDG Generation Service (pdf-generator)
SMS Notifications (notification-sms)
notification-email
Business Services
Dashboard Analytics (DSS)
Municipal services:
Property Service (property-services)
Water Service Calculator (ws-calculator)
Water Service (ws-service)
eChallan (echallan)
User Events (user-event)
The sequence diagram below illustrates a typical interaction between the various services.
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.
Role
Functionality
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
Field Name
Type
Mandatory Y/N
Description
Vendor Name
Text (With Suggestions dropdown)
Y
Name of the Vendor. The suggestion list is shown as the user entry is done for every character. The new Name will also create a Vendor Register.
Type of Expense
Drop Down
Y
Type of expense list From Master
Amount
Numeric
Y
Expense amount for the Bill
Bill Date
Date
Y
Date on which the bill is to be recorded in the registers. Validation - Before Current Date and after party Bill Date.
Party Bill Date
Date
N
Date on which the Party/vendor bill was issued. Validation - Before the Bill Date.
Bill Paid
Radio Buttons
N
With option Yes/No. To update status if it is paid. If yes, “Paid Date” is captured.
Paid Date
Date
N
Date on which the bill is paid. Displayed if the Bill paid option is selected as “Yes”. Validation - After Bill date and less than current Date.
Attach Documents
Doc Attachments
N
Option to upload documents (Max of 5). Supported files - PDF, JPEG, PNG. Should show required validation for other types of files.
Submit
Button
-
On click, the consumer master gets created with the detail entered above. The new connection id also should get generated as per the configuration.
Event Type | Target user Type | Message | Comments |
On boarding - Creation login details | EMP/GP Users | Dear <user>, You've been invited to mGramSeva Application of Punjab. Please login using <Link>. Username: <Phone Number> Password: <Password> |
On boarding - First time login OTP | EMP/GP Users | OTP for resetting password on mGramSeva is <OTP> |
Forgot Password OTP | EMP/GP Users | OTP for resetting password on mGramSeva is <OTP> |
Demand (Bulk) | EMP/GP Users | Dear <user>, Demand for Billing Cycle <Cycle> has been generated for <GPWSC>. Kindly plan for collection of water charges for this period. <Link> | 1st of each month |
Pending Collection Reminder | EMP/GP Users | Dear <user>, Rs. <Amount> is pending collections against water charges at <GPWSC> as of <Date>. Click <Link> to see more details | fortnight |
On Collection Day | EMP/GP Users | Dear <user>, Rs. <Amount> has been collected today <Date> against water charges from <number> consumers in Cash for <GPWSC>. |
On Collection Day | EMP/GP Users | Dear <user>, Rs. <Amount> has been collected today <Date> against water charges from <number> consumers Online for <GPWSC>. |
New Calendar Month | EMP/GP Users | Dear <user>, Rs. <Amount> has been collected in <previous month> against water charges & Rs. <Amount> has been spent as expenditure for <GPWSC>. Click <link> to see more details |
Fortnight | EMP/GP Users | Please enter new expenditure bills online for <GPWSC>. Click <link> to make an expense entry now |
Alternate Fortnight | EMP/GP Users | Expenditure bills for <GPWSC> are awaiting payment confirmation. Please click <link> and mark them as paid, if paid already |
Demand (Bulk) - (NM & M) | Consumer | Dear <user>, water bill for <cycle> has been generated for consumer id <new consumer id> for Rs. <Amount>. Click <link> to download latest bill. | Dear <user>, water bill for <cycle> has been generated for consumer id <new consumer id> for Rs. <Amount>. Click <link> to download latest bill. Please make payment to your GPWSC. |
Demand (Bulk) - (NM & M) | Consumer | Dear <user>, pending amount for water charges for consumer id <new consumer id> is Rs. <Amount>. Click <link> to pay online. |
Bill Paid | Consumer | Dear <user>, Rs. <Amount> has been paid for water charges for consumer id <new consumer id>. Pending Amount is Rs. <Amount>. Click <link> to download receipt |
Feedback Collection | Consumer | Dear <user>, Thank you for paying water charges. Please take this short survey and help us know more about water supply at <GPWSC> |
Whatspp Message - Bill share | Consumer | x |
Whatsapp Message - Bill Payment | Consumer | Dear <user>, Rs. <Amount> has been paid for water charges for consumer id <new consumer id>. Pending Amount is Rs. <Amount>. Click <link> to download receipt |
mGramSeva users can edit their basic information like name, add gender, email and change password using the hamburger menu on any screen.
Users can click on the hamburger menu from any screen. A slider from the left opens up.
Users are able to
Change Language
Edit profile
Logout
Changing language changes localization as per standards
Edit profile takes users to the next screen where changes can be made to the user profile
Name - Can be changed
Phone number - Cannot be changed
Gender - This field is not present by default. Whatever user enters is stored and saved
Email ID - It is an empty field. User input is stored as the user’s email id
Change Password - This takes users to the password changing screen where the old password, new password and confirm new password has to be entered as per given standards.
Dynamic password validation happens the same as in the registration flow.
Until all fields are entered, the primary CTA is disabled.
Changing the password shows a nudge to the user “Password updated successfully” and closing this nudge takes the user to the user profile screen.
Clicking on save shows a nudge to the user” Details saved successfully”. Upon closing, this user remains on the screen but the fields show as edited.
For mGramSeva users, different notifications are displayed on the home screen based on various system triggers.
A new card is used for each notification displayed below.
Cards have a countdown timer - today, 1 day ago, 2 days ago, 3 days ago, and so on.
Cards have a close icon on the right top corner. Upon closing, the card view is removed from the screen. Cards, by default, do not have an expiry date.
A “New” text is shown to the user whenever there is a new notification after the user last time login.
The Notifications header shows the number of notifications in brackets.
Bill and Receipt PDFs can be sent to consumers at multiple touchpoints
When bulk demand is generated through SMS
When meter reading is done for metered connections, via SMS
When revenue collector goes to HH screen and clicks on download PDF (into his mobile)
When revenue collector goes to HH screen and clicks on WhatsApp share PDF (Share PDF’s on WhatsApp)
Bill PDF
Receipt PDF
Clicking on the Dashboard on the home screen takes the user directly to the revenue dashboard of the current month. From here, the user can switch to the expenditure tab to get a view of expenses. This provides a tabular view of all expenses incurred in that month.
Following are the data points/actions needed on the screen
The table on the screen is a horizontal scrollable one with the left-most column fixed.
Context
Users can click on the HouseHold Register on the home screen and navigate to this screen. This provides a single view snapshot of all pending collections by consumers till date.
Clicking back takes the user back to the home screen.
As soon as the revenue collector marks the bill as paid by the consumer, he/she receives one SMS with the link to receipt in PDF format and another SMS with a link to collect feedback.
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
On selection of “Modify Expense” Option, below search screen is shown for the users to search the Bill/s -
Search Criteria -
Vendor Name
Expense Type
Bill D
Search Result - Lists all the Expense bills matching the above search criteria
Bill ID
Type of Expense
Vendor Name
Amount
Bill Date
Status
On Click of Bill id, the Expense Bill is displayed in edit mode based on the validations.
Product Documents & Resources
Bills and Receipts can be downloaded by clicking on the card/tile named Download Bills & Receipts on the home page.
Clicking on this card takes the user to the consumer search page. Searching by a phone number/ connection ID redirects to the Household Detail page.
This is an option to download bills without clicking on collect payment.
Clicking on the Dashboard on the home screen navigates the user to the revenue dashboard view for the current month. This provides a tabular view with the list of consumer records.
Following are the data points/actions needed on the screen
For Metered connection, the demand is generated for the Billing period (defined based on the meter reading date) that is selected by the user at the time of recording the meter reading.
The 2 uses cases to be handled are -
First demand generated in system: The demand would be generated for the selected billing period. The demand period would be from “Previous meter reading date” from the consumer master or the demand created as part of master TO the date entered in the billing screen. The arrears are tagged to the previous billing period of the current demand, and the period is from the start of FY to the “Previous meter reading date” from the consumer master.
Consecutive demand: The demand is generated for the period defined based on
From Date: Meter reading date from last demand generated for the Consumer.
To Date: Is the selected meter reading date in the bill generation screen
Charges/Heads and Calculation Logic
As part of V1, only the water charges head is only the head that is applicable. Rate Master is defined at the GPWSC level.
Water Charges - Charges are applicable as defined in the Rate Masters based on - Validity, Property Type, Service Type where calculation type is “Unit Rate” for the given number of units.
Bill Period - Is as per the date range selected for the bill generation.
Exclusion
Reversion of demand is not allowed. This has to be taken up in the backend.
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
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 open-sourced and community edition. The various tools used for this platform are listed below with the specific versions used and their short description.
A step-by-step guide to using the mGramSeva App
mGramSeva is a standalone app-based module that enables the GPWSC committee to create new consumers, generates demand, revenue collection and recording the expenditure transaction etc.
mGramSeva enables GPWSCs to maintain financial records of GPWSCs following established procedures and practices.
This section of the user manual guides you through the user login process.
Sarpanch, Treasurer, Secretary and Revenue Collector as the first time user can log in to the mGramSeva app following the steps given in the section.
Click on the preferred language button. The app functions and screens will be available in the selected language.
Enter the registered mobile number and the Password received via SMS.
The user receives an OTP on the registered mobile number. Enter the OTP. Enter a New Password and retype the password to confirm in the Confirm New Password field. Follow the Password Hint on the screen while setting up the password.
Click on the Confirm button. The user password is now updated. Click on the Continue to Login button to log in with the new password.
Click on the relevant village tenant assigned to the user from the screen.
This redirects the user to the relevant mGramSeva functionalities available for the selected tenant.
Users can edit their profiles and change passwords as and when required. Click on the User icon on the top section of the screen. Click on Edit Profile to make profile changes.
Update Name, Gender, or Email ID as required. Make note that the registered Mobile Number cannot be changed. Save the changes.
Click on the Change Password button to change the password.
Click on the Create Consumer icon on the screen to create a new consumer.
This opens the Consumer Details screen. Enter the requested consumer details.
Name
Gender
Father Name
Phone Number
Old Connection ID
Door Number
Street Name/Number
Ward Name/Number
Property Type
Service Type
Previous Billing cycle
Arrears
Previous meter reading (if it is a metered connection)
Users can also edit the consumer details if any changes need to be made in the consumer record. Click on the Edit Consumer Details icon on the home screen to make necessary changes.
Check the option Mark this connection as Inactive to indicate that the given consumer connection is inactive.
Click on the Submit button to save these changes.
Search Consumer and Generate Payment: Metered and Non-Metered Connection.
Click on the Generate Demand icon on the home page to search for a consumer record once the consumer is created. The application enables the users to search a consumer record by Consumer’s Phone Number or Name of the Consumer or Old Connection ID or New Connection ID.
Click on the Search button to view the consumer records. Click on the View Consumer Details button to perform the necessary action.
Users can see the relevant information of a particular consumer. Click on Generate a New Bill button to create a fresh bill. Enter the Previous Meter Reading, New Meter Reading and Meter Reading Date. Click on Generate Bill. A fresh bill is generated for the consumer.
Once the bill is generated, the user can collect payment for the particular bill. Click on the Collect Payment button to collect the payment via cash or online payment.
Click on the phone icon in green to share the bill with the consumer via SMS.
Select Full Payment or Partial Payment to indicate whether the consumer is paying the bill amount in full or making a partial payment. Enter the Amount that is being paid by the consumer in case it is a Partial Payment.
Select the applicable Payment Method as either Cash or Online. Users can also provide the consumers with a scannable QR code to make the payment online.
Click on the Download button to download the payment receipt.
Click on the Share icon to send the receipt to the consumer via SMS.
Click on the Collect Payment icon on the home page to search for a consumer record by Consumer’s Phone Number or Name of the Consumer or Old Connection ID or New Connection ID.
Click on the Search button to view the consumer records. Click on the View Consumer Details button to perform the necessary action.
Click on the Collect Payment button to collect the payment via cash or online payment. Click on the Share Bill button to send the bill to the consumer on the registered mobile number via SMS.
Select Full Payment or Partial Payment to indicate whether the consumer is paying the bill amount in full or making a partial payment. Enter the Amount that is being paid by the consumer in case it is a Partial Payment.
Select the applicable Payment Method as either Cash or Online. Users can also provide the consumers with a scannable QR code to make the payment online.
Click on the Download button to download the payment receipt. Click on the Share icon to send the receipt to the consumer via SMS.
Once the payment is completed an SMS is sent to the consumer to take the survey on the water service.
Users can enter the expenses details as and when incurred. Click on the Add Expense icon on the home page.
Enter expense information like Type of Expense from the drop-down list available. Type of expenses can be Electricity, O&M, Salary & MISC etc.
Enter Vendor Name, Amount, Bill Date, Party Bill Date. Select Yes or No to indicate if the bill is paid or not. Click on Choose File button to attach a supporting document.
Enter the Payment Date if the bill is already paid before recording it into the system. Click on Submit to register the expense details.
The expenditure entry is saved successfully.
Click on the Modify Expenses icon on the home page to modify expense details. Enter the Vendor Name, or Type of Expense or Bill ID details to search for the specific expense record which needs to be modified.
The system shows the expense records filtered by the search parameter. Click on the Update Expenditure button to modify a particular bill.
Make the necessary modifications to the bill. Update the expense type, or vendor name, amount, or bill date details as required.
Click on Submit to save the changes. Check the Mark this Bill as Cancelled box to indicate that the bill is cancelled.
The Dashboard provides the stakeholders at the department level with a consolidated view of the information on Revenue and Expenditure trends month wise.
The Sarpanch, Treasurer and Secretary at the GPWSC level can view the collection details like Demand, Pending Collection, Actual Collection, Collection from Residential, Collection from Commercial and Collection from Others. The consumer wise collection details view is also available.
The Sarpanch, Treasurer and Secretary at the GPWSC level can view the expenditure details like total expenditure, amount unpaid, the amount paid, total bills, pending bills, bills paid, Electricity bills, O&M and salary. The individual expense wise details view is also available.
UI Mockups on Figma
→ {base url}/mgramseva/selectLanguage
User will be Landed/ Navigated to Language Selection Screen
APP → Initial Screen
Users can switch to different languages which the application supports
LocalStorage
0 → Langage Selection Screen
Pop → Application closes
Widgets Utilised from Library
Demo Video
A quick walkthrough of mGramseva
Detailed version -
All content on this page by is licensed under a .
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 below image and also 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 below image.
Open a new terminal and run the flutter doctor command, this will download the respective Dart sdk version, run 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. Thus, 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 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)
Executing 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.
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.
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 is licensed under a .
Link to Learn Flutter -
All content on this page by is licensed under a .
Click on to navigate to the next screen
Primary Files
Secondary Files
All content on this page by is licensed under a .
The steps below will guide us to run the project in both Web and Mobile 1. Clone the project from . 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 cors error follow the steps provided in this
Clone the Repo → git clone
.upgrading the version in the ( version: 1.0.2+3) 1.0.2 => version name (which displayed in playstore)
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 below image android → key.properties
Download the google service json from below link Add this json file to the android app folder as shown in below image android → app → google-services.json
Build the prod app bundle → flutter build appbundle Kindly check the attached drive link below which includes key-store, version tracker and also updated 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. ( )
All content on this page by is licensed under a .
Trigger
When
Text
Action
Data criteria
New Demand Generation
Monthly
Demand Generated
Demand for <billing cycle> has been generated. X bills have been raised and sent to X/X+Y households. Y bills have to be raised. Click here to see details
Take to a filtered view of household register with “Pending” selected
<billing cycle> - new billing cycle for which demand is generated - Demand will be generated on the 1st of each month
Use - Case 1
If GP has all non-metered connections then, all X/X bills are generated using bulk demand. Notification change as following
Demand Generated
Demand for <billing cycle> has been generated. X bills have been raised and sent to X/X households. Click here to see details
Take to a filtered view of household register with “Pending” selected
<billing cycle> - new billing cycle for which demand is generated
Demand will be generated on the 1st of each month
Use - Case 2
If GP has all metered connections then, all 0/Y bills are generated using bulk demand. Notification changes as following
New Billing Cycle
New billing cycle will start today. Y bills have to be raised for last month. Click here to see details
Take to a filtered view of household register with “All” selected
<billing cycle> - new billing cycle for which demand is generated
Demand will be generated on the 1st of each month
Every fortnight
Pending Collections
Rs.X is pending collection as of <Today's Date>. Click here to view dashboard
Take to current months revenue Dashboard
In the current financial year, for each consumer, demand raised minus receipt generated will be pending collections for that HH
When collection happens
Collection Day
Send only on the days when a collection has happened either online or offline methods
Todays Collections
Rs. P has been collected today for water charges from <number> consumers in Cash.
Rs. Q has been collected today for water charges from <number> consumers online.
Take to current months revenue Dashboard
Sum of receipts value generated that day in that GP via cash.
New Calendar Month
1st day of month
Month Summary
Rs. X has been collected in <previous month> for water charges and Rs. Y has been spent as expenditure. Click here to view more details
Go to the most recent completed month's dashboard
X - Sum of receipts value generated that day in that GP via cash.
Y - Expense Bills marked as paid last month (paid date is previous month)
Every fortnight
Enter a New Expenditure
Please enter new expenditure bills online. Click here to make an expense entry now.
Take to expense entry screen
Alternate fortnight
Mark expense bills as paid
This should only be sent when there is a pending bill is there. If all bills are paid already on the date of notification, do not send this.
<N> expenditure bills are awaiting payment confirmation. Click here to search & mark as paid, if paid already.
Bulk Demand generation doesn't happen as per schedule
Generate Demand
We couldn't generate demand automatically for billing cycle <cycle>. Click here to generate demand manually.
Take to demand generation screen.
Data Parameter
Explanation
Title
Gram Panchayat Water Supply and Sanitation
Heading
Water Bill
Name of GPWSC
Connection ID
Consumer Name
Consumer Mobile Number
Consumer Address
As per user details (use mockups for reference)
GPWSC Name should be highlighted
Phone number should be partially masked
Service Type
Bill ID
Bill Period
Bill Date
Service Type - As per Bill generated - Metered or Non metered.
Bill Id - For metered connections, after service type - metered, add meter number, meter reading and meter reading date as additional fields before bill ID
Bill Period - For non- metered - As per Billing cycle for which demand was generated. For metered, will based on the previous meter reading date of last bill and current meter reading date of the corresponding Bill.
Bill Issue Date - Date on which the demand was generated.
Text Above breakup of charges
Below is the breakup of pending water charges for the connection ID <New Connection ID>
Breakup of Charges
Expansions of the amount to be paid.
For non metered connections
Current water charges is the most recent billing cycle completed
Arrears are the previous billing cycles pending dues arranged in decreasing order by months
For metered connections
Current charges are the amounts levied for the most recent bill read, previous bill read.
Arrears are the previous dues in similar fashion
Total Amount Due
Total Amount to be paid by consumer until time of bill generation (Also display in words)
Previous Billing Cycle Summary
Under this section we’ll display data collected from user, along with collection and expenditure done by GP
Example: If the bill is generated in November for October and previous months(arrears), all data shown will be w.r.t October.
Text: Below is the User Feedback, Collections and Expenditure summary of <GPWSC>
User ratings
Irrespective of service type, ratings of how many ever users, given in the last billing cycle, is shown.
Collections
New Demand - Latest Demand generated
Actual Collections - Actual collections made in the previous billing cycle
Total pending Collections (cumulative) - Total pending collections for GP until the last date of the previous billing cycle
If the same bill is downloaded by a user after n days and more collections are made by GP by that date, pending collections number should go down.
Expenditure
New Expenditure - Expenses logged in the previous billing month
Actual Payments - actual payments made in the previous billing month
Total Pending Expenditure (cumulative)- total pending expenses until last date of the previous billing month
If the bill is downloaded again after few expenses are marked paid, the cumulative figures will go down.
Data Parameter
Explanation
Title
Gram Panchayat Water Supply and Sanitation
Heading
Water Bill
Name of GPWSC
Connection ID
Consumer Name
Consumer Mobile Number
Consumer Address
As per user details (use mockups for reference)
GPWSC Name should be highlighted
Phone number should be partially masked
Service Type
Receipt ID
Receipt Period
Receipt Issue Date
As per the Receipt generated -
For metered connections, after service type - metered, add meter number and meter reading as additional fields before Receipt ID
Text
Below is the breakup of the amount paid for water charges for connection ID <New Connection ID>
Breakup of Charges
Expansions of amount to be paid.
For non metered connections
Current water charges is the most recent billing cycle completed
Arrears are the previous billing cycles pending dues arranged in decreasing order by months
For metered connections
Current charges are the amounts levied for the most recent bill read, the previous bill read.
Arrears are the previous dues in a similar fashion
Amount Paid
Total Amount paid by the consumer for the receipt to get generated
Show amount paid in words also
Due Amount
As of date, time (day receipt is generated)
The total amount yet to be paid
Previous Billing Cycle Summary
Under this section we’ll display data collected from user, along with collection and expenditure done by GP
Example: If the bill is generated in November for October and previous months(arrears), all data shown will be w.r.t October.
Text: Below is the User Feedback, Collections and Expenditure summary of <GPWSC>
User ratings
Irrespective of service type, ratings of how many ever users, given in the last billing cycle, is shown.
Collections
New Demand - Latest Demand generated
Actual Collections - Actual collections made in the previous billing cycle
Total pending Collections (cumulative) - Total pending collections for GP until the last date of the previous billing cycle
If the same bill is downloaded by a user after n days and more collections are made by GP by that date, pending collections number should go down.
Expenditure
New Expenditure - Expenses logged in the previous billing month
Actual Payments - actual payments made in the previous billing month
Total Pending Expenditure (cumulative)- total pending expenses until last date of the previous billing month
If the bill is downloaded again after few expenses are marked paid, these cumulative figures will go down.
Platform Tools
Latest Version
Used Version
Description
License Type
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
SL No | Key | Stored Data |
1 |
| State Information for From MDMS Service |
2. | ex : | Localisation codes |
API EndPoint | Input Params (Modules) | Description |
|
| To Fetch the Details State Info
|
| ALL the necessary Modules, with locale key and tenant Id | To Load the Localised data |
SL No | Widgets Library |
1 | Button Bar |
Item
Explanation
1
Search Expense Bills
Search by Bill ID or Vendor
The Vendor Name should be a partial match. As the user starts typing a consumer name, respective vendors get filtered in the table displayed below
Bill ID should be a partial match. As the user starts typing a New Bill ID, respective Bills should get filtered in the table displayed below
1.1
Filters
Default is “All” View. Switching to Paid or Pending filters the table accordingly. Alongside the filter, how many Bills fall into that filter is shown in numbers
The table also has sort options for each column (ascending, descending)
1.2
Columns
Bill ID - Vendor Name
Bill ID is assigned to each bill while creating an expense entry record
Sort happens on the Bill ID
Expense Type
Under which expense head the bill is tagged to
Amount
Bill Date
Paid Date
If Bill is not paid, this should show pending in RED
Title
Explanation
Heading
HouseHold Register
As of Date
As of <Todays Date>
Search
Search by consumer name or connection id
Partial match should be allowed.
Filters
Default is “All” selected
User can switch to “Pending” or “Paid” view. Based on selection, results are displayed in the table
Download PDF
Download PDF should download PDF format of Household Register with name of document as HH_Register_<Date>
WhatsApp Share
Should trigger same PDF as Whatsapp share
Columns
Connection ID
New Connection ID of the consumer. If there is a metered connection, an “M” in ⭕️ is shown alongside connection ID
Name
Name of the consumer - Similar to Revenue dashboard truncate it to 20 characters and show 3 dots
Pending Collections
Total pending collections of the consumer till date.
The table has sort options by all columns.
The sorted and filtered table, as in the screen view, is exported into the PDF format dynamically on printing.
1
Search Consumer records
Search by name or connection ID
Name should be a partial match. As the user starts typing a consumer name, respective consumers get filtered in the table displayed below
Connection ID should be a partial match. This is the new connection ID. As the user starts typing a New connection ID, respective consumers get filtered in the table displayed below
1.1
Filters
Default is “All” View. Switching to Residential or commercial filters table accordingly. Alongside the filter, how many consumers fall into that filter is shown in numbers
The table also has sort options for each column (ascending, descending)
1.2
Columns
Connection ID
New Connection ID of the consumer- this should be clickable, and take users to the HH details page
A metered connection should have “M” in a ⭕️ that is followed across as standard for metered connection
Name
name of the consumer. Show until 20 Characters and truncate by showing 3 dots if the name is longer
Collections - Amount paid by the user in that month
Users are redirected to this 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 features 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 any time by clicking on the help icon.
Create a global key for each card.
Create placeholder cards, pointer 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 repeats the same process outlined in the implementation logic
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.
Users are redirected to this screen if they click on the Forgot Password link on the home screen.
This feature allows users to request OTP by entering a valid (the registered) mobile number.
Follow the steps below to set a new password -
Click on the Forgot Password link visible on the login screen
Enter a valid mobile number
Other steps are explained in the Reset Password Section.
2 → Language Selection Screen. + Login Screen + ForgotPassword
Pop → Login Screen Screen.
Widgets Utilised from Library
→ {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
1 → Language Selection Screen. + Login Screen + Forgot Password + Reset Password.
Pop → Forgot Password Screen.
Widgets Utilised from Library
→ {base url}/mgramseva/home/changepassword.
Enter the Current Password
Enter and Confirm a New Password to set the login credentials for 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
Atleast one number
1 → Home Screen. + Change Password Screen
Pop → Home Screen
Widgets Utilised from Library
→ {base url}/mgramseva/selectLanguage/login
Users are redirected to this screen once they select the preferred language in the previous screen
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
YES → Reset Password/ Update Password Screen
NO → Home Screen
1 → Language Selection Screen. + Login Screen.
Pop → Language Selection Screen.
Widgets Utilised from Library
→ {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.
1 → Home Screen. + Edit Profile Screen
Pop → Home Screen
Widgets Utilised from Library
Link
→ {base url}/mgramseva/home/billmanualgenerate.
Users are redirected to this screen if they click on the Generate Demand card on the home screen.
This will be used in cases when the scheduler is not run (due to technical errors) and GP wants to run manually.
The service category displays water charges by default
The service type displays 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 Click of 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 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)
1 → Home Screen. + Generate Bulk Demand Screen
Pop → Home Screen
Widgets Utilised from Library
→ {base url}/mgramseva/home/householddetails/billgenerate.
Users are redirected to the Generate New Bill screen if they click the Generate New Bill option in the household detail screen.
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 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
1 → Home Screen + Household Details Screen + Generate Bill Metered
Pop → Household Details Screen
Widgets Utilised from Library
→ {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
1 → Home Screen. + Search Connection Screen
Pop → Home Screen
Widgets Utilised from Library
→ {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 Grama Panchayat name and code in the table.
This feature helps to Match with 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
Fetching 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 Utilised from Library
Enables employees to create new Consumers or Connections - The process of onboarding the end-users.
→ {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 Consumer.
If a user logs in for the first time then a walkthrough is populated following the same logic as in the home screen.
Note: All fields are validated on Submit except the Phone number which gets validated on change.
Consumer creation involves 2 sequential Process
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.
Components utilised from Widgets Library
→ {base url}/mgramseva/home/searchExpense/result/updateExpense
Enables employees to modify/edit the expenses based on the status of the payment.
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.
1 → Home Screen. + Search Expense Screen + Expense Results Screen + Edit Expense Bills Screen
Pop → Expense Results Screen
Widgets Utilised from Library
Enables employees to update consumer details.
Users are redirected to this screen/page when they click on the Update Consumer Details card
→ {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.
Note: All fields are validated on Submit apart from the phone number which gets validated on change.
Components utilised from Widgets Library
→ {base url}/mgramseva/home/addExpense
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.
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 -
Note: All fields are validated on Submit apart from the Mobile number which gets validated on change.
1 → Home Screen. + Add Expense Screen
Pop → Home Screen
Widgets Utilised from Library
→ {base url}/mgramseva/household/details/collectPayment
After the demand is generated for Metered and non-metered connections or if any arrears are present, the Revenue collector uses this screen to collect payments.
Collect Payment card is available on the home screen to the user role having COLLECTION_OPERATOR
permission.
Users can pay the total due amount by selecting the Full Amount option below Payment Amount.
Or, Users can also pay a partial amount by selecting Partial Amount from the Payment Amount options. If Partial Amount is selected, users have to provide the amount that he wants to pay.
Clicking on Collect Payment navigates the user to the Payment Success screen. The user can download the receipt or share the receipt for the collected amount.
The Arrears is broken into 'BL_(TaxHeadCode)' which we get from Bill details-->Bill Account details ---> Tax Head Code and the amount of particular arrears is similar to the Bill details--> amount from the Fetch Bill API.
(Eg. 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
)
1 → Home Screen. + Search Connection Screen + Household Results + Household Details Screen + Collect Payment Screen
Pop → Household Details Screen
Widgets Utilised from Library
→ {base url}/mgramseva/home/searchExpense
Update Expenses card is available on the home screen for defined roles that have EXPENSE PROCESSING permission.
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:
1 → Home Screen. + Search Expense Bills Screen
Pop → Home Screen
Widgets Utilised from Library
Link → {base url}/mgramseva/home/householdRegister
Users are redirected to this screen if 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.
From the text field, users can search connections by using 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.
By selecting any connection ID users are navigated 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 in 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
Role Access Mapping
Portable Bluetooth thermal printers are used to generate the mini receipts.
bluetooth_thermal_printer
js
Enable the 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.
Users can provide their feedback by giving a rating.
It's an Open URL. It doesn’t require any Authentication user.
→ {baseURL}mgramseva/feedBack?paymentId={}&connectionno={}&tenantId={}
User can able to switch to multiple Languages
After submitting the feedback, users are navigated to the feedback submitted successfully acknowledgement screen.
→ {base url}/mgramseva/home/dashboard?tab=0.
Users are redirected to this screen if they select the GPWSC Dashboard option on the home screen.
Users can select the year from the drop-down which contains the list of financial years.
From the text field, users can search connections by using 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.
Primary Files:
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
Link. → {base url}/mgramseva/home/dashboard
Users are redirected to this screen if they select the GPWSC Dashboard option on the home screen.
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.
Users can see the WhatsApp Share button, by tapping on it users can share the Monthly dashboard as a screenshot via WhatsApp.
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
skip, End → closes the overlay
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
Users are redirected to this screen if they click on the Continue button on Forgot Password screen.
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
Users are redirected to this screen if they click on the Change Password option in the Side Bar app Drawer.
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.
Users are navigated to this screen if they click on the Edit Profile option on the Side Bar app Drawer.
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.
Users are redirected to this screen once they click on the Collect Payment Card or the Update Consumer Details Card or Download Bills and Receipts Card on Home Screen.
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
Users are redirected to the Update Password screen once they log in successfully the first time.
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
Primary Files - punjab-mgramseva/WalkFlowContainer.dart at develop · egovernments/punjab-mgramseva , punjab-mgramseva/walkthrough.dart at develop · egovernments/punjab-mgramseva
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
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.
Users can also print mini receipts with the help of Bluetooth thermal printers by selecting the option.
Primary Files:
All content on this page by is licensed under a .
Users are redirected to this screen by selecting the Update Expense card on the home screen.
All content on this page by is licensed under a .
Model → ,
View →
Controller → ,
All content on this page by is licensed under a .
All content on this page by is licensed under a .
All content on this page by is licensed under a .
By selecting any connection ID users are navigated to the .
Model →
View → ,
Controller → ,
All content on this page by is licensed under a .
By selecting any Month from the table, users are navigated to the and Dashboard screen.
Primary Files:
Secondary Files: ,
Model →
View → ,
Controller → , https://github.com/misdwss/punjab-mgramseva/blob/develop/frontend/mgramseva/lib/providers/revenuedashboard_provider.dart
All content on this page by is licensed under a .
SL
Fields
Validation
1
Phone Number*
r'^[0-9]+$'
SL
End Point
Request Method
Request Info
1
user-otp/v1/_send
POST
"otp": { "mobileNumber": {}, "tenantId": {}, "type": "passwordreset", "userType": "Employee" }
SL
Fileds
Validations
1
Enter the OTP sent *
r'^[0-9]+$'
, 6 digit
2
Enter a New Password*
r'^(?=.*?[A-Za-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{6,}$'
3
Confirm New Password
Match with New Password
SL
End Point
Request Method
Request Info
1
user/password/nologin/_update
POST
"otpReference": {}, "userName": {}, "newPassword": {}, "tenantId": {}, "type": “Employee”
SL
Fileds
Validations
1
Current Password*
No Validation
2
Set a New Password*
r'^(?=.*?[A-Za-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{6,}$'
3
Confirm New Password*
Match with New Password
SL
End Point
Request Method
Request Info
1
user/password/_update
POST
"userName": {}, "existingPassword": {}, "newPassword": {}, "tenantId": {}, "type": {}
SL
Fileds
Validations
1
Phone Number*
r'^[0-9]+$'
2
Password*
r'^(?=.*?[A-Za-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{6,}$'
SL
End Point
Request Method
Request Info
1
/user/oauth/token
POST
username: {}
password:{}
scope: read
grant_type: password
tenantId: {}
userType: EMPLOYEE
SL
Fileds
Validations
1
Name
r'^[a-zA-Z ]+$'
2
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,}))$'
SL
End Point
Request Method
Request Info
1
/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": [ {} ], }
SL
Fileds
Validations
1
Billing Year*
isMandatory
2
Billing Cycle*
isMandatory
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
TaxPeriod
from BillingService
where service=='WS' && @.fromDate <= $datestamp && @.toDate >= $datestamp
SL
End Point
Request Method
Request Info
1
/ws-calculator/waterCalculator/_bulkDemand
POST
"tenantId": {}, "billingPeriod": {}
SL
Fileds
Validations
1
Previous Meter Reading*
r'^[0-9]+$'
5 - digit reading
if Meter Reading < 5 digit, prepend zeroes
2
New Meter Reading*
r'^[0-9]+$'
5 - digit reading
if Meter Reading < 5 digit, prepend zeroes
3
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'
SL
End Point
Request Method
Request Info
1
/ws-calculator/meterConnection/_create
POST
"meterReadings": { "currentReading": {}, "currentReadingDate": {}, "billingPeriod": {}, "meterStatus": "Working", "connectionNo": {}, "lastReading": {}, "lastReadingDate": {}, "generateDemand": true, "tenantId": {}
}
SL
Fileds
Validations
1
Owner Mobile Number
r'^(?:[+0]9)?[0-9]{10}$'
2
Name of the Consumer
r'^[A-Za-z ]'
3
Old Connection ID
No Validation
4
New Connection ID
No Validation
SL
End Point
Request Method
Request Info
1
/ws-services/wc/_search
POST
tenantId: {}
oldConnectionNumber: {}
name: {}
connectionNumber: {}
mobileNumber: {}
SL
Fileds
Validations
1
Enter the OTP sent *
r'^[0-9]+$'
, 6 digit
2
Enter a New Password*
r'^(?=.*?[A-Za-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{6,}$'
3
Confirm New Password
Match with New Password
SL
End Point
Request Method
Request Info
1
user/password/nologin/_update
POST
"otpReference": {}, "userName": {}, "newPassword": {}, "tenantId": {}, "type": “Employee”
2
egov-mdms-service/v1/_search
POST
"MdmsCriteria": { "tenantId": tenantId, "moduleDetails": [ { "moduleName": "tenant", "masterDetails": [ {"name": "tenants"} ], }, ] }
Fields
Validations
consumer Name*
[A-Za-z ]
Gender*
None
Spouse/Parent’s Name*
[A-Za-z ]
Phone Number*
[0-9]
Old Connection No
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.]
API
Params
Description
/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
Fields
Validations
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 (maximun 5MB)
Mark this Bill as Cancelled
None
API
Params
Description
/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
Fields
Validations
consumer Name*
[A-Za-z ]
Gender*
None
Spouse/Parent’s Name*
[A-Za-z ]
Phone Number*
[0-9]
Old Connection No
None
Door Number
None
Street Name/Number
None
Gram Panchayat Name*
None- Disabled
Property Type*
None
Service Type*
None
Meter Id
[a-zA-Z0-9]
Meter Reading
[0-9]
Billing Cycle
None
Arrears
[0-9.]
API
Params
Description
/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
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
Fields
Validations
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)
API
Params
Description
/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
Fields | Validations |
Payment Amount : Full Amount or Partial Amount | None |
Partial Amount ( |
|
Payment Method | None |
API EndPoint | Input Params (Modules) | Description |
| | To get the billGeneiURL, Calculation of Water services and collectionModesNotAllowed |
|
| To fetch the bills of the connection/Consumer |
Fileds | Validations |
Owner Mobile Number |
|
Name of the Consumer |
|
Old Connection ID |
|
New Connection ID |
|
API | Params | Description |
|
| To get the Expense Type for the Dropdown |
End Point | Request Method | Request Info |
/ | POST |
|
| POST |
|
| POST |
|
SL | API | Params | Description |
1 |
|
| API to Submit user feedback |
End Point | Request Method | Request Info |
/ | POST | tenantId : {}
offset ; {}
limit : {}
fromDate : {}
toDate : {}
sortOrder ; {} sortBy : {} |
End Point | Request Method | Request Info |
| POST |
|
| POST | tenantId : {} fromDate : {} toDate : {}
|
| POST | tenantId : {} fromDate : {} toDate : {}
|
| POST |
|
| POST |
|
SL No
Widgets
File Path
Description
1
BuildTextField
Text Field
2
Button
Button
SL No
Widgets
File Path
Description
1
BuildTextField
Text Field
2
BottomButtonBar
Button
3
PasswordHint
Password Hint Card
SL No
Widgets
File Path
Description
1
BuildTextField
Text Field
2
Button
Button
SL No
Widgets
File Path
Description
1
BuildTextField
Text Field
2
Button
Button
SL No
Widgets
File Path
Description
1
BuildTextField
Text Field
2
BottomButtonBar
Button
3
RadioButtonField
Radio Buttons for options
SL No
Widgets
File Path
Description
1
SelectFieldBuilder
(Primary File)
SearchSelectFieldBuilder
(Secondary File)
Searchable Dropdown
2
CommonSuccessPage
Success Screen
3
BottomButtonBar
Button
SL No
Widgets
File Path
Description
1
MeterReading
Meter Reading 5 digit boxes field
2
SelectFieldBuilder
(Primary File)
SearchSelectFieldBuilder
(Secondary File)
Searchable Drop down
3
DatePickerFieldBulder
Date Picker
4
CommonSuccessPage
Success Screen
5
BottomButtonBar
Button
SL No
Widgets
File Path
Description
1
BuildTextField
Text Field
2
BottomButtonBar
Button
SL No
Widgets
File Path
Description
1
BuildTextField
Text Field
2
BottomButtonBar
Button
3
PasswordHint
Password Hint Card
API
Description
property-services/property/_create
Property Creation Request JSON
ws-services/wc/_create
Components
File Path
TextField Builder
RadioButtonField Builder
SearchSelectField Builder
DatePicker Builder
Widgets
File Path
Description
BuildTextField
Text Field
AutoCompleteView
Suggestion Text Field
SelectFieldBuilder
(Primary File)
SearchSelectFieldBuilder
(Secondary File)
Searchable Drop down
DatePickerFieldBulder
Date Picker
CommonSuccessPage
Success Screen
BottomButtonBar
Button
Components
File Path
TextField Builder
RadioButtonField Builder
SearchSelectField Builder
DatePicker Builder
Widgets
File Path
Description
BuildTextField
Text Field
AutoCompleteView
Suggestion Text Field
SelectFieldBuilder
(Primary File)
SearchSelectFieldBuilder
(Secondary File)
Searchable Drop down
DatePickerFieldBulder
Date Picker
CommonSuccessPage
Success Screen
BottomButtonBar
Button
Widgets | File Path | Description |
| Text Field |
| Button |
| Radio Buttons for options |
Widgets | File Path | Description |
| Text Field |
(Primary File)
(Secondary File) | Searchable Drop down |
| Button |
Widgets | File Path | Description |
| Pagination |
| Text Field |
| Table |
| Title |
| Subtitle |
Widgets | File Path | Description |
| Pagination |
| Text Field |
| Table |
| Subtitle |
Widgets | File Path | Description |
| Pagination |
| Text Field |
| Table |
| Subtitle |
| Nested Date Picker |
Water service is a DIGIT application that helps and gives flexibility to municipalities and citizens to manage water service requirements like apply for a water connection or search 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 for 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
Table UML Diagram
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
CheckList is used to define the Q & A for the feedback form and its validation.
Category
Predefined list of categories allowed.
SubCategory
Predefined list of subcategories 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.
(Note: All the API’s are in the same postman collection therefore the same link is added in each row)
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.
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 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 ULB’s. For example, an employee belonging to Amritsar can perform the role of say 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
(Note: All the API’s are in the same postman collection therefore the same link is added in each row)
Water Calculator Service is used for creating meter reading, searching meter reading, updating existing meter reading, calculation of water charge, demand generation, SMS & email notification to ULB officials on-demand generation and estimation of water charge(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
Following services should be up and running:
egov-perister
egov-mdms
ws-services
billing-service
Calculate water charges and taxes based on 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 file in 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 ws-services-calculation folder with the WCBillingSlab. The following is the sample slab.
If all criteria will match for 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 billing cycle i.e Based no 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 NonMetered 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 trigger multiple time 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.
(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
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
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:
Case 2: Apportioning with two years of arrear: If the current financial year is 2014-15. Below are the demands
if any payment is not done, and we generating demand in 2015-16 then the demand structure will as follows:
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 OTP to validate mobile number for registration, login and password reset with simple API calls
otp can be generate calling /user-otp/v1/_send
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.
iFIX Adapter enables existing or new source systems to integrate seamlessly with iFIX. iFIX Adapter has been developed as a reference implementation for developers of source systems who want to integrate their departmental system with iFIX.
iFix Adapter works as a mediator between iFIX and its clients. This system will receive requests from the client system and converts the data into the iFIX fiscal event or associated formats.
Before you proceed with the configuration, make sure the following pre-requisites are met -
Java 8
Kafka server is up and running
PSQL server is running
Redis
Following services should be up and running:
Client Service Like mgramseva-ifix-adapter
Target service IFIX- fiscal-event-service
Target Service IFIX-keycloak
iFIX client requests pushed to IFIX
Auth token is fetched from keycloak and cached. Token will be re-fetched 5 minutes before expiry
Every push to iFIX is recoded with http status
status series 200 series considered success
status 400 are marked client error and reported back to client
status 500 resubmitted by scheduler
Update the keycloak credentials client-id and secrets in the environment file
Map the coa in HeadCodeToCoaMapping.yml
Map project in ProjectMapping.yml
Deploy the latest version of ifix-reference-adapter
Update Key cloak credentials in dev.yaml, qa.yaml, prod.yaml according to environment
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.1
The test_driver directory, contains the integration_test_driver.dart file. (The folder structure is shown in img. 2). Inside this file, the integration driver is called.
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 eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
Google Analytics helps you understand how people use the web and Android apps. Analytics helps you understand how your users behave, so we can make informed decisions about how to market our app.
Plugin used
firebase_analytics
About Firebase Console
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.
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
→ {base url}/mgramseva/home/dashboard?tab=1.
Users are redirected to this screen when they select the GPWSC Dashboard option on the home screen.
Users can select the year from the drop-down which contains the list of financial years.
From the text field, users can search 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 Expense update screen.
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
GitHub Actions enables you to create custom software development lifecycle workflows directly in your GitHub repository. This enables you to include Continues Integration (CI) and continuous deployment (CD) capabilities. 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
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 GitHub.com, navigate to the main page of the repository.
Under your repository name, click Settings as shown in the image.
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
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.
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.
(Note: All the API’s are in the same postman collection therefore the same link is added in each row)
Objective
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 s 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.
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 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 argument 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 observer
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 helps to define the pattern for the schedule cron.
PriorNote: In Devops for every configuration app name will change according to the name of the cron job file given and the schedule will change according to the time set, and argument will be as per job name given in mdms configuration.
labels: app: monthly-cronjob // This name will change based on the cronjob schedular we are using group: mdms-read-cronjob // this is same for all as we are using same python script
cron: schedule: 30 3 4 * * // This depends on the time we need to run the schedular
image: repository: api-cronjob tag: v1
command:
python3
cronJobAPIConfig.py
args:
monthly // This will be the job name which will differ with the requirement of scheduler type.
env: |
name: JOB_NAME
valueFrom:
fieldRef:
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 schedular will run daily and send notifications to the collection operator on a daily basis. Here are the links
MDMS Object details and Configuration: {
"jobName": "monthly", // This will change based on the job name
"active": "true", // when it is true schedular will run automatically and when it is false schedular won’t run.
"method": "POST",
"payload": {
"RequestInfo": "{DEFAULT_REQUESTINFO}" // this is common in all the schedulers to send the request info
},
"header": {
"Content-Type": "application/json" // This is one of the common property for all the schedulers
}
}
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.
When you build the cronjob you will get the build id like below. api-cronjob:develop-c0aa08a-2 From this you will take the only id instead of complete name like develop-c0aa08a-2. This will be used as the id for your respective yaml files and will be deployed the same to you 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
Please delete the existing cron jobs if they are already exists with same name.
kubectl delete cronjob mdms-read-cronjob -n mgramseva
Please deploy these builds in QA environments, which are related to cronjob schedulars.
mdms-read-cronjob:develop-c0aa08a-2,failedbulkdemand:develop-c0aa08a-2,fortnightevening:develop-c0aa08a-2,monthly:develop-c0aa08a-2
Steps to test the cron job schedular.
kubectl get cronjob -n mgramseva -- to check the list of cron jobs
We will create the job manually to test the messages.
Here are the commands to create the jobs.
Will receive a message for the respective schedular each time we run it.
We can increase the no 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
mGramsev-DSS Documentation
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. Here is the location: 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.
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.
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.
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.
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
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.
Based on expense and water-service business service we added transfororm configurations as per below.
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.
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:
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 legacyindexer 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 targetted
Postman scripts
Plain search apis in the respective services
We have mainly 3 indexes in mGramSeva for Re-indexing.
Water-services
Echallan-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
Water Connection Request JSON defined in punjab-mgramseva/water_connection.dart at develop · egovernments/punjab-mgramseva
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.
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 is licensed under a .
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.
Primary Files: punjab-mgramseva/Dashboard.dart at develop · egovernments/punjab-mgramseva punjab-mgramseva/search_expense.dart at develop · egovernments/punjab-mgramseva
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.
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 .
fieldPath:
"url": "", // This is the respective service url to call that service as per the scheduler
Here is the Configuration for all the schedulers:
All content on this page by is licensed under a .
.
transform_expense.electricity_bill_v1 Configuration:
transform_expense.om_v1 Configuration :
transform_expense.salary_v1 Configuration:
transform_ws_v1 Configuration:
Kafka connection and re-indexing is available in this documentation. Please check from here.
All content on this page by is licensed under a .
All content on this page by is licensed under a .
End Point
Request Method
Request Info
/echallan-services/eChallan/v1/_create
POST
tenantId : {} offset ; {} limit : {} fromDate : {} toDate : {} vendorName : {} challanNo : {} toDate : {} freeSearch : {} status : {} isBillCount : {}
sortOrder ; {} sortBy : {} isBillPaid : {}
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]
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
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
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
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
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
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
Link
/ws-calculator/meterConnection/_create
/ws-calculator/meterConnection/_search
/waterCalculator/_estimate
/waterCalculator/_calculate
/waterCalculator/_updateDemand
/waterCalculator/_jobscheduler
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
Title
Link
Id-Gen service
url-shortening
MDMS
Title
Link
/demand/_create, _update, _search
/bill/_fetchbill, _search
/amendment/_create, _update
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
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
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
expiry.time.for.otp
3000
Expiry time of the otp
Widgets
File Path
Description
Pagination
Pagination
BuildTextField
Text Field
BillsTable
Table
LabelText
Subtitle
Title
Link
API Swagger Contract
Water Service Document
echallan-services/eChallan/v1/_chalanCollectionData |
echallan-services/eChallan/v1/_chalanCollectionData |
/ws-services/wc/_revenueDashboard |
/ws-services/wc/_revenueCollectionData |
/dashboard-analytics/dashboard/getChartV2 |
Ifix-Adapter is a system that works as a mediator between iFix and its clients. This system will receive requests from the client system and convert the data in the Ifix required format. This document contains the details about how to set up ifix-adapter service and describes the functionalities it provides.
Before you proceed with the configuration, make sure the following pre-requisites are met -
Java 8
Kafka server is up and running
PSQL server is running
Redis
Following services should be up and running:
Client Service Like mgramseva-ifix-adapter
Target service IFIX- fiscal-event-service
Target Service IFIX-keycloak
IFIX master-data-service
IFIX client requests are pushed to IFIX
The authentication token is fetched from keycloak and cached. Token will be re-fetched 5 minutes before expiry
project id is fetched from IFIX and cached
COA id fetched from IFIX and cached
Every push to IFIX is recorded in the table with HTTP status
status series 200 considered success
status 400 are marked client error and reported back to the client
status 500 resubmitted by the scheduler
Deploy the latest version of ifix-reference-adapter
Map clientcode, ifixcoacode, ifixid in ifix_adapter_coa_map table
“clientcode” is the tax head like “WATER_CHARGES” or ‘10011’ used in IFIX client like mgramseva
“ifixcoacode” is the 16 digit glcode in IFIX. 16 digit code is mapped then this can be ported to any environment like dev to qa ,or qa to uat or from uat to prod. Prefer mapping ifixcoacode
Another way is to map the IFIX COA ID itself. Since these are generated ids you cant port to other environments. ID mapping has to be done for every environment.
Preference is given to COA Code, if it is null ID will be used
example is INSERT INTO public.ifix_adapter_coa_map( id, clientcode, ifixcoacode, ifixid, tenantid) VALUES (1,'10101', '0215-01-102-00-00-01', '6cbcb4a1-2431-4f78-89d7-b4f0565aba37', 'pb');
If client “project code” and IFIX project code are the same then no need for mapping. If it is different then map clientprojectcode, ifixprojectid in ifix_adapter_project_map table. Ideally, you should keep both codes the same for getting meaningful data on the dashboard. This way you don't have to do any mapping for project code for any environment. But if for any reason you have different project codes in IFIX and its client or has multiple projects having the same project code then only go for this mapping. The adapter will first check in the IFIX for the supplied “projectCode”, If found it will use it and caches it. If multiple projects or not found it will look into this table for mapping
example is INSERT INTO public.ifix_adapter_project_map( id, clientprojectcode, ifixprojectid, tenantid) VALUES (1, '7374', 'e42db9bb-8427-40a6-9939-4f2189d032bf','pb');
state.goverment.code
set this value to the clients top level tenantid
iFix Adapter
Post infra setup (Kubernetes Cluster), We start with deploying the Jenkins and kaniko-cache-warmer.
Sub Domain to expose CI/CD URL
GitHub Oauth App
Docker hub account details (username and password)
SSL Certificate for the sub-domain
Prepare an <ci.yaml> master config file and <ci-secrets.yaml>, you can name this file as you wish which will have the following configurations.
credentials, secrets (You need to encrypt using sops and create a ci-secret.yaml separately)
Check and Update ci-secrets.yaml details (like github Oauth app clientId and clientSecret, GitHub user details gitReadSshPrivateKey and gitReadAccessToken etc..)
To create Jenkins namespace mark this flag true
Add your env's kubconfigs under kubConfigs like https://github.com/misdwss/iFix-DevOps/blob/mgramseva/deploy-as-code/helm/environments/ci-secrets.yaml#L19
KubeConfig env's name and deploymentJobs name from ci.yaml should be the same
Update the CIOps and DIGIT-DevOps repo name with your forked repo name and provide read-only access to github user to those repo's.
SSL Certificate for the sub-domain
You have launched the Jenkins. You can access the same through your sub-domain which you configured in ci.yaml.
The Jenkins CI pipeline is configured and managed 'as code'.
Example URL - https://<Jenkins_domain>
Since there are many services and the development code is part of various git repos, you need to understand the concept of cicd-as-service which is open-sourced. This page also guides you through the process of creating a CI/CD pipeline.
As a developer - To integrate any new service/app to the CI/CD below is the starting point:
Once the desired service is ready for the integration: decide the service name, type of service, whether DB migration is required or not. While you commit the source code of the service to the git repository, the following file should be added with the relevant details which are mentioned below:
Build-config.yml –It is present under the build directory in each repository
This file contains the below details which are used for creating the automated Jenkins pipeline job for your newly created service.
While integrating a new service/app, the above content needs to be added in the build-config.yml file of that app repository. For example: If we are onboarding a new service called egov-test, then the build-config.yml should be added as mentioned below.
If a job requires multiple images to be created (DB Migration) then it should be added as below,
Note - If a new repository is created then the build-config.yml should be created under the build folder and then the config values are added to it.
The git repository URL is then added to the Job Builder parameters
When the Jenkins Job => job builder is executed the CI Pipeline gets created automatically based on the above details in build-config.yml. Eg: egov-test job will be created under the core-services folder in Jenkins because the “build-config was edited under core-services” And it should be the “master” branch only. Once the pipeline job is created, it can be executed for any feature branch with build parameters (Specifying which branch to be built – master or any feature branch).
As a result of the pipeline execution, the respective app/service docker image will be built and pushed to the Docker repository.
Job Builder – Job Builder is a Generic Jenkins job that creates the Jenkins pipeline automatically which are then used to build the application, create the docker image of it and push the image to the docker repository. The Job Builder job requires the git repository URL as a parameter. It clones the respective git repository and reads the build/build-config.yml file for each git repository and uses it to create the service build job.
Check git repository URL is available in ci.yaml
If git repository URL is available build the Job-Builder Job
If the git repository URL is not available ask the Devops team to add it.
The services deployed and managed on a Kubernetes cluster in cloud platforms like AWS, Azure, GCP, OpenStack, etc. Here, we use helm charts to manage and generate the Kubernetes manifest files and use them for further deployment to the respective Kubernetes cluster. Each service is created as charts which will have the below-mentioned files in them.
To deploy a new service, we need to create the helm chart for it. The chart should be created under the charts/helm directory in iFix-DevOps repository.
We have an automatic helm chart generator utility that needs to be installed on the local machine, the utility prompts for user inputs about the newly developed service (app specifications) for creating the helm chart. The requested chart with the configuration values (created based on the inputs provided) will be created for the user.
Name of the service? test-service Application Type? NA Kubernetes health checks to be enabled? Yes Flyway DB migration container necessary? No, Expose service to the internet? Yes, Route through API gateway [zuul] No Context path? hello
The generated chart will have the following files.
This chart can also be modified further based on user requirements.
The Deployment of manifests to the Kubernetes cluster is made very simple and easy. We have Jenkins Jobs for each state and are environment-specific. We need to provide the image name or the service name in the respective Jenkins deployment job.
Enter a caption for this image (optional)
Enter a caption for this image (optional)
The deployment Jenkins job internally performs the following operations,
Reads the image name or the service name given and finds the chart that is specific to it.
Generates the Kubernetes manifests files from the chart using the helm template engine.
Execute the deployment manifest with the specified docker image(s) to the Kubernetes cluster.
Ifix-Adapter is a system that works as a mediator between iFIX and its clients. This system will receive requests from the client system and convert the data in the iFIX required format This document contains the details on how to set up the iFIX-adapter service and describes the functionalities it supports. It supports multiple events (Event Array) in a single request.
Before you proceed with the configuration, make sure the following pre-requisites are met -
Java 8
Kafka server is up and running
PSQL server is running
Redis
Following services should be up and running:
Client Service Like mgramseva-ifix-adapter
Target service IFIX- fiscal-event-service
Target Service IFIX-keycloak
Adapter master data service
IFIX client requests are pushed to IFIX.
The authentication token is fetched from keycloak and cached. Token is re-fetched 5 minutes before expiry.
project_id from request data is getting treated as Department Entity Code to fetch Department Entity.
COA Code fetched from COA Mapping table by client code and cached it in Redis Server.
Every push to IFIX is recorded in the table with HTTP status
status series 200 considered success
status 400 are marked client error
It collects projectId form request data and treats it as department_entity_code and calls search API to Department Entity Service. It always expects it will receive only one Department Entity against a single department_entity_code, if it finds multiple raise an error message.
One project can have multiple department entities but vice-versa cannot be true. In case of multiple projects for one department entity - the system will raise an error message.
Deploy the latest version of the ifix-reference-adapter.
Map clientcode, ifixcoacode, ifixid in ifix_adapter_coa_map table
“clientcode” is the tax head like “WATER_CHARGES” or ‘10011’ used in IFIX client like mgramseva
“ifixcoacode” is the 16 digit glcode in IFIX. 16 digit code is mapped then this can be ported to any environment like dev to qa ,or qa to uat or from uat to prod. Prefer mapping ifixcoacode
example is INSERT INTO public.ifix_adapter_coa_map(id, clientcode, ifixcoacode, ifixid, tenantid) VALUES (1,'10101', '0215-01-102-00-00-01', '6cbcb4a1-2431-4f78-89d7-b4f0565aba37', 'pb');
state.goverment.code
set this value to the clients top level tenant_id
Adapter master data service maintains information on Department, Expenditure and Projects. We can create these details and search for the same details based on the given parameters/request data.
Current version : 1.0.0
Before we proceed with the configuration, make sure the following pre-requisites are met
Java 8
MongoDB instance
Required service dependency - Department entity service
It creates secure endpoints for the master data service. The access token is required to create any master data. The subsequent sections on this page discuss the service details maintained by the master data service.
Maintains the create and search department details. The following information is passed while creating the department - the Government ID, department code, department name, parent department if any. Searching the department details is on given parameters like IDs, Government ID, department code, department name.
Maintains the expenditure details And provide create and search functionality. For creating the expenditure, the following details are required - the Government ID, the department ID, code, name, type (can be "SCHEME", "NON_SCHEME") details. While searching the expenditure details, pass the given parameters like IDs, Government IDs, names, code.
Maintains the project details and provide create and search functionality. The following details are required to create the project - Government, name, code, expenditure ID, the department entity ID(s), location IDs. While searching, pass the IDs, Government ID, name, code, expenditure ID, location ID.
No environment-specific variables are required for the environment (migration).
Update the DB and URI configurations in the dev.yaml, qa.yaml, prod.yaml file.
Project Create API creates the project when the Master data details (COA, Government, Expenditure, Department) and Department Entity have been created. COA And Government have to be created in iFIX core Master data service.
Project Create API takes the below attributes in request :
tenantId: This is the Id that will be defined while creating the Ifix core Master Government Service.
expenditureId: This is the Id that will be generated while creating the Adapter Master Expenditure Service.
code: This is the project code that needs to be created.
name: This is the project name that needs to be created.
departmentEntityIds: This is the Department Entity Ids. If we have to create a project at hierarchy level 1 then we need to pass the Department Entity Id of that corresponding level. It depends on the Department hierarchy level on which the project has to be created and hence the same level Department Entity Id. You can pass a list of departmentEntityIds and can create the same project.
For reference, Below is a Dummy project create example:
Request :
Response:
iFix Adapter
Essentially, there are 2 stages that should allow you to use the full potential of DeploymentConfig and pipeline-as-code.
Stage 1: Clone the DevOps repo, choose your iFix product branch as iFix-adapter.
Prepare an <env.yaml> master config file, you can name this file as you wish which will have the following configurations, this env file need to be in line with your cluster name.
each service global, local env variables
credentials, secrets (You need to encrypt using sops and create a <env>-secret.yaml separately)
Number of replicas/scale of individual services (Depending on whether dev or prod)
mdms, config repos (Master Data, ULB, Tenant details, Users, etc)
sms g/w, email g/w, payment g/w
GMap key (In case you are using Google Map services in your PGR, PT, TL, etc)
S3 Bucket for Filestore
URL/DNS on which the DIGIT will be exposed
SSL Certificate for the above URL
End-points configs (Internal/external)
Stage 2: Run the iFix_Adapter_setup deployment script and simply answer the questions that it asks.
Date/Time Filter
The date & time filter on the dashboard defaults to the current financial year since most of the calculations and visualizations makes sense when viewed from a fiscal year perspective rather than an individual week/month view. However, users can change to respective dates and most charts will be filtered to the selected time range.
Department Hierarchy Filter
Currently, there are 6 levels of hierarchy as per administration set up by the Department of Water supply and Sanitation Punjab. These are State, Zone, Circle, Division, Sub Division, Section, Gram Panchayat.
All these filters are independent and work on the dashboard irrespective of whether other filters in the hierarchy are selected or not.
Surplus/Deficit
This number shows whether the selected Administrative entity is financially surplus or not. It also compares with the previous year using the “trend” visualization in Metabase.
Pending Collections
For selected Administrative boundary what is the pending collections through water charges is represented in this card. If the pending amount is null. Then this card should display zero.
Outstanding Electricity Bills
Since electricity bills create a major component of the expenditure for all projects, it is important to show how much electricity bills are pending at each administrative entity. The total amount of pending bills filtered by electricity under COA gives us pending electricity bills
GPWSCs at Risk
Risky GPWSCs are divided into 3 types
High Risk: Demand is less than Bill. Medium Risk: Demand is more than bill but pending collections is less than pending bills.
Low Risk: Demand is more than bill and also pending collections is more than pending bills.
It is important to identify the risky GPWSCs and keep the officials of DWSS informed, for them to take the right actions before it’s too late.
Collections & Expenditure Time Series Graphs
These charts represent the Demand, Net Collections, Bills and Net Payments across time(month-on-month) so that officials get a fair idea of how the amount that is getting collected is being spent.
Any abnormalities in the graphs (Low collections or excessive spending) is something that needs to be paid attention to.
Expenditure by Chart of Accounts
Expenditure is currently divided into 4 broad categories - Electricity Bills, Salaries, Operations and Maintenance and Miscellaneous. How these 4 categories accumulate to total expenditure for the selected entity over time is presented on the chart. Usually, 75% of the expenditure should be of type electricity
Department Hierarchy Table
Here, we represent Total Demand, Receipt, Bills and Payments by all levels of the hierarchy so that officials at any point, instead of just viewing the charts, trends from the visualizations can also see the tables and compare best performing entities.
iFix Dashboard
Essentially, there are 2 stages that should allow you to use the full potential of DeploymentConfig and pipeline-as-code.
Stage 1: Clone the DevOps repo, choose your iFix product branch as iFix-adapter.
Prepare an <env.yaml> master config file, you can name this file as you wish which will have the following configurations, this env file need to be in line with your cluster name.
each service global, local env variables
credentials, secrets (You need to encrypt using sops and create a <env>-secret.yaml separately)
Number of replicas/scale of individual services (Depending on whether dev or prod)
mdms, config repos (Master Data, ULB, Tenant details, Users, etc)
sms g/w, email g/w, payment g/w
GMap key (In case you are using Google Map services in your PGR, PT, TL, etc)
S3 Bucket for Filestore
URL/DNS on which the DIGIT will be exposed
SSL Certificate for the above URL
End-points configs (Internal/external)
Stage 2: Run the iFix_Dashboard_setup deployment script and simply answer the questions that it asks.
Fiscal Event Aggregator is a java standalone application, which runs as Cron Job to aggregate the fiscal event data from the Druid data store to Postgres DB.
Current Version : 2.0.0
Before you proceed with the configuration, make sure the following pre-requisites are met
Java 8
Druid DB & Postgres DB should be up and running
Fiscal-Event-Aggregator computes the aggregate of data over a selected time period. Aggregator will apply the time range filter according to the following approach :
Fiscal periods will be picked up as per the current system time. The current year will be the current fiscal period starting from 1st of April of the current year to 31st March of (current year+1). And it will also aggregate the data of one previous fiscal year starting from 1st of April of (current year -1) to 31st March of the current year.
Follow the steps below to aggregate the final fiscal event data as per the fiscal time periods.
Group the sum of the amount based on department entity ancestry[6] id (attributes.departmentEntity.ancestry[6].id
) that is GP (Gram Panchayat), COA (chart of account) id, and event type.
Difference of the sum of amount of "DEMAND" and "RECEIPT" event type with respect to distinct department entity ancestry[6] id (attributes.departmentEntity.ancestry[6].id
) that is GP (Gram Panchayat).
Difference of the sum of amount of "BILL" and "PAYMENT" event type with respect to distinct department entity ancestry[6] id (attributes.departmentEntity.ancestry[6].id
) that is GP(Gram Panchayat).
Upsert the final aggregated fiscal event data into the Postgres DB.
Note: Below environment variables need to be configured with respect to the environment
Update the configurations in the dev.yaml, qa.yml, prod.yaml file.
Post infra setup (Kubernetes Cluster), there starts the deployment process.
Pipeline as code is a practice of defining deployment pipelines through source code, such as Git. Pipeline as code is part of a larger “as code” movement that includes infrastructure as code. Teams can configure builds, tests, and deployment in code that is trackable and stored in a centralized source repository. Teams can use a declarative YAML approach or a vendor-specific programming language, such as Jenkins and Groovy, but the premise remains the same.
A pipeline as code file specifies the stages, jobs, and actions for a pipeline to perform. Because the file is versioned, changes in pipeline code can be tested in branches with the corresponding application release.
The pipeline as code model of creating continuous integration pipelines is an industry best practice, but deployment pipelines used to be created very differently.
The deployment process has got 2 stages and 2 modes. We can see the modes first and then the stages.
Essentially, iFix adapter deployment means that we need to generate Kubernetes manifests for each individual service. We use the tool called helm, which is an easy, effective and customizable packaging and deployment solution. So depending on where and which env you initiate the deployment there are 2 modes that you can deploy.
From Local machine - whatever we are trying in this sample exercise so far.
Advanced: Setup CI/CD System like Jenkins - Depending on how you want to setup your CI/CD and the expertise the steps will vary, however here you can find how we eGov has set up a exemplar CI/CD on Jenkins and the pipelines are created automatically without any manual intervention.
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
Follow the steps below to create the Adapter Master Data. Individual Adapter Service documents can be accessed here.
Enter valid details along with Tenant ID to create the Department. Once the tenant ID is created, the user receives a response with an ID and related details. This ID is the Department ID.
Enter valid details along with Tenant ID to create the Expenditure. Once the tenant ID is created, the user receives a response with an ID and related details. This ID is the Expenditure ID.
Enter valid hierarchy details of the Master Department to create Department Hierarchy. Check this document for more information.
Provide valid details to create Department Entity. Check this document for more information.
On successful completion of steps 1 to 4, enter valid details to create a project. Check this document for more information.
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
Fiscal Event services flatten each fiscal event line item and post them into Druid via the Kafka Druid connector. The raw events are stored in the fiscal-events dataset in Druid. Metabase is used for visualisations.
The flattened fiscal event consists of the following attributes
iFIX Dashboard is built on Metabase and can be easily configured to develop various dashboards.
The below dashboard provides information about the fiscal position of various projects. The dashboard can be filtered for various date ranges and departmental hierarchies.
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
Tools used to create the OLAP system for the iFix
iFix dashboard is developed using the opensource tools that included the complete OLAP system that streams the data from various sources, transform and process data and visualize the data using dashboards
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
Post infra setup (Kubernetes Cluster), the deployment has got 2 stages and 2 modes. We can see the stages first and then the modes.
Essentially, iFix dashboard deployment means that we need to generate Kubernetes manifests for each individual service of the required OLAP components like a druid, metabase. We use the tool called helm, which is an easy, effective and customizable packaging and deployment solution. So depending on where and which env you initiate the deployment there are 2 modes that you can deploy.
From Local machine - whatever we are trying in this sample exercise so far.
Advanced: Setup CI/CD System like Jenkins - Depending on how you want to set up your CI/CD and the expertise the steps will vary, however here you can find how we eGov has set up an exemplar CI/CD on Jenkins and the pipelines are created automatically without any manual intervention.
You can choose the infra type and the env to either single fat server or distributed setup on Docker compose or Kubernetes.
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
iFix Dashboard
Post infra setup (Kubernetes Cluster), We start with deploying the Jenkins and kaniko-cache-warmer.
Sub Domain to expose CI/CD URL
GitHub
With
(username and password)
SSL Certificate for the sub-domain
Prepare an <> master config file and <>, you can name this file as you wish which will have the following configurations.
credentials, secrets (You need to encrypt using and create a ci-secret.yaml separately)
Check and Update details (like github Oauth app clientId and clientSecret, GitHub user details gitReadSshPrivateKey and gitReadAccessToken etc..)
To create Jenkins namespace mark this true
Add your env's kubconfigs under kubConfigs like
KubeConfig env's name and deploymentJobs name from ci.yaml should be the same
Update the and repo name with your forked repo name and provide read-only access to github user to those repo's.
SSL Certificate for the sub-domain
You have launched the Jenkins. You can access the same through your sub-domain which you configured in ci.yaml.
The Jenkins CI pipeline is configured and managed 'as code'.
Example URL - https://<Jenkins_domain>
Since there are many services and the development code is part of various git repos, you need to understand the concept of cicd-as-service which is open-sourced. This page also guides you through the process of creating a CI/CD pipeline.
As a developer - To integrate any new service/app to the CI/CD below is the starting point:
Once the desired service is ready for the integration: decide the service name, type of service, whether DB migration is required or not. While you commit the source code of the service to the git repository, the following file should be added with the relevant details which are mentioned below:
Build-config.yml –It is present under the build directory in each repository
This file contains the below details which are used for creating the automated Jenkins pipeline job for your newly created service.
While integrating a new service/app, the above content needs to be added in the build-config.yml file of that app repository. For example: If we are onboarding a new service called egov-test, then the build-config.yml should be added as mentioned below.
If a job requires multiple images to be created (DB Migration) then it should be added as below,
Note - If a new repository is created then the build-config.yml should be created under the build folder and then the config values are added to it.
The git repository URL is then added to the Job Builder parameters
When the Jenkins Job => job builder is executed the CI Pipeline gets created automatically based on the above details in build-config.yml. Eg: egov-test job will be created under the core-services folder in Jenkins because the “build-config was edited under core-services” And it should be the “master” branch only. Once the pipeline job is created, it can be executed for any feature branch with build parameters (Specifying which branch to be built – master or any feature branch).
As a result of the pipeline execution, the respective app/service docker image will be built and pushed to the Docker repository.
If git repository URL is available build the Job-Builder Job
If the git repository URL is not available ask the Devops team to add it.
The services deployed and managed on a Kubernetes cluster in cloud platforms like AWS, Azure, GCP, OpenStack, etc. Here, we use helm charts to manage and generate the Kubernetes manifest files and use them for further deployment to the respective Kubernetes cluster. Each service is created as charts which will have the below-mentioned files in them.
To deploy a new service, we need to create the helm chart for it. The chart should be created under the charts/helm directory in iFix-DevOps repository.
We have an automatic helm chart generator utility that needs to be installed on the local machine, the utility prompts for user inputs about the newly developed service (app specifications) for creating the helm chart. The requested chart with the configuration values (created based on the inputs provided) will be created for the user.
Name of the service? test-service Application Type? NA Kubernetes health checks to be enabled? Yes Flyway DB migration container necessary? No, Expose service to the internet? Yes, Route through API gateway [zuul] No Context path? hello
The generated chart will have the following files.
This chart can also be modified further based on user requirements.
The Deployment of manifests to the Kubernetes cluster is made very simple and easy. We have Jenkins Jobs for each state and are environment-specific. We need to provide the image name or the service name in the respective Jenkins deployment job.
Enter a caption for this image (optional)
Enter a caption for this image (optional)
The deployment Jenkins job internally performs the following operations,
Reads the image name or the service name given and finds the chart that is specific to it.
Generates the Kubernetes manifests files from the chart using the helm template engine.
Execute the deployment manifest with the specified docker image(s) to the Kubernetes cluster.
Reference Dashboard
This section contains details and information about the iFIX Reference Dashboard. Click on the links below to learn more.
All content on this page by is licensed under a .
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.
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 eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
Job Builder – Job Builder is a Generic Jenkins job that creates the Jenkins pipeline automatically which are then used to build the application, create the docker image of it and push the image to the docker repository. The Job Builder job requires the git repository URL as a parameter. It clones the respective git repository and reads the file for each git repository and uses it to create the service build job.
Check git repository URL is available in
All content on this page by is licensed under a .
Environment Variables
Description
kafka.topics.ifix.adaptor.mapper
Topic in which client requests are put . From this further listen and posting happens
keycloak.host
Host name of the key cloak authentication token provider
keycloak.token.url
key cloak authentication token url
keycloak.credentials.clientid
userid of for authentication token
keycloak.credentials.clientsecret
password for authentication token
ifix.host
host name of IFIX server
ifix.event.url
IFIX post URL
spring.redis.host
Host name of the redis server
state.goverment.code
top level tenant id of the client
ifix.coa.search.url
url for COA search in IFIX
ifix.project.search.url
Url for the project code search in IFIX
spring.jpa.properties.hibernate.dialect
dialect for JPA. you can change this to oracle or my sql etc
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation
will generate the required tables in the respective database . This feature is used instead of flyway to get database in-dependency
API
Description
events/v1/_push
API for receiving data from the client (mgram). This is the only API present in the adapter
Environment Variables
Description
kafka.topics.ifix.adaptor.mapper
Topic in which client requests are put. From this further listen and posting happens
keycloak.host
Host name of the key cloak authentication token provider
keycloak.token.url
key cloak authentication token url
keycloak.credentials.clientid
userid of for authentication token
keycloak.credentials.clientsecret
password for authentication token
ifix.host
host name of IFIX server
ifix.event.url
IFIX post URL
spring.redis.host
Host name of the redis server
state.goverment.code
top level tenant id of the client
spring.jpa.properties.hibernate.dialect
dialect for JPA. you can change this to oracle or my sql etc
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation
will generate the required tables in the respective database . This feature is used instead of flyway to get database in-dependency
Link
Api Swagger document
Postman
API
Description
events/v1/_push
Api for receiving data from client (mgram). This is the only api present in adapter
Title
Link
/department/v1/_create
/department/v1/_search
Title
Link
/expenditure/v1/_create
/expenditure/v1/_search
Title
Link
/project/v1/_create
/project/v1/_search
Title
Link
Swagger Yaml
Postman collection
Attribute
Description
version
string example: 1.0.0
Version of the Data Model Definition
id
string example: 51c9c03c-1607-4dd5-9e0e-93bbf860f6f7
System generated UUID of Line Item
eventId
string example: fecbbf1d-d6e3-4f24-9935-02c33b9248e0
Fiscal Event Reference Id
tenantId
string nullable: false example: pb
Tenant Id
government.id
string example: pb
government.name
string example: Punjab
department.id
string example: 5d664a9f-9367-458a-aa5f-07fb18b90adc
Unique system generated UUID
department.code
string example: DWSS
Unique department code
department.name
string example: Department of Water Supply & Sanitation
Name of the department
expenditure.id
string example: d334d99a-b5c1-426c-942b-f11b5b5454fe
Unique system generated UUID
expenditure.code
string example: JJM
Unique Expenditure code
expenditure.name
string example: Jal Jeevan Mission
Name of the Expenditure
expenditure.type
string
Type of the Expenditure Enum: Array [ 2 ]
project.id
string example: 6ab1b1d2-e224-46fa-b53b-ac83b3c7ce95
Unique system generated UUID
project.code
string example: PWT
Unique Project code
project.name
string example: Peepli Water Tank
Name of the Project
eventType
string nullable: false example: Appropriation
Captures the event type e.g Demand, Receipt, Bill, Payment
eventTime
integer($int64) example: 1628177497000
when the event occurred at source system level
referenceId
string example: 013e9c56-8207-4dac-9f4d-f1e20bd824e7
reference unique id(transaction id) of the caller system
parentEventId
string nullable: true example: 7d476bb0-bc9f-48e2-8ad4-5a4a36220779
If this is a follow up event then it will refer to the parent event using this reference id.
parentReferenceId
string nullable: true example: 77f23efe-879d-407b-8f23-7b8dd5b2ecb1
If this is a follow up event then it will refer to the parent event in source system using this reference id.
amount
number example: 10234.5
Transaction Amount
coa.id
string example: e9f940d4-69aa-4bbb-aa82-111b8948a6b6
Unique system generated UUID
coa.coaCode
string example: 1234-123-123-12-12-12
Chart of account concatenated string
coa.majorHead
string example: 1234
Major head code
coa.majorHeadName
string
Major head name
coa.majorHeadType
string example: Revenue
Major head code type
coa.subMajorHead
string example: 123
Sub-Major head code
coa.subMajorHeadName
string
Sub-Major head name
coa.minorHead
string example: 123
Minor head code
coa.minorHeadName
string
Minor head name
coa.subHead
string example: 12
Sub-Head code
coa.subHeadName
string
Sub-Head name
coa.groupHead
string example: 12
Group head code
coa.groupHeadName
string
Group head name
coa.objectHead
string example: 12
Object head code
coa.objectHeadName
string
Object head name
fromBillingPeriod
integer($int64) example: 1622907239000
Start date of the billing period for which transaction is applicable
toBillingPeriod
integer($int64) example: 1628177643000
Start date of the billing period for which transaction is applicable
Key | Value | Description |
|
| This is a hardcoded value And won’t change w.r.t environment. And It depends upon the druid broker’s protocol that is getting used to connect. |
|
| This is a hardcoded value And won’t change w.r.t environment. It depends upon the druid broker protocol that we are using and the corresponding port of that druid broker. |
|
| this is kept under |
|
| This is the data Source present in Druid DB. It is the same as defined in Druid DB. |
Link
Api Swagger document
Postman
Platform Tools
Latest Version
Used Version
Description
License Type
v0.40.4
v0.40.2
Metabase is an open-source business intelligence tool. It lets you ask questions about your data, and displays answers in formats that make sense, whether that's a bar graph or a detailed table.
0.21.1
0.21.1
Apache Druid is a real-time analytics database designed for fast slice-and-dice analytics ("OLAP" queries) on large data sets. Druid is most often used as a database for powering use cases where real-time ingest, fast query performance, and high uptime is important. As such, Druid is commonly used for powering GUIs of analytical applications, or as a backend for highly concurrent APIs that need fast aggregations. Druid works best with event-oriented data.
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.
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
Users can walk through the application for a better understanding of different user actions available on key screens.
Home Screen
Note:
For first-time users after login, the walkthrough automatically starts on the home page.
For multi-tenant users, the walkthrough starts after selecting the tenant and landing on the home screen
Consumer creation screen
Expense Entry Screen
Dashboard
All content on this page by is licensed under a .
Step No. | Element | Note |
1 | Tenant selection | Click here to switch to other Gram Panchayats |
2 | Household Register | Household Register contains a list of all consumers and their pending amounts |
3 | Collect Payments | Use collect payments to search for consumers, generate bills and collect payments |
4 | Download Bills and Receipts | Search by consumer details such as name or phone number to download bills & receipts |
5 | Add Expense Record | Use this to make a new expenditure entry into the system |
6 | Update Expenses |
7 | Generate Demand |
8 | Create Consumer | Create consumers records by adding details |
9 | Update Consumer Details |
10 | GPWSC Dashboard | View daily, monthly collection and expenditure summary |
11 | Notifications | Any new notifications that require your action regarding collections and expenditure will be shown here |
Step No. | Element | Note |
1 | Consumer’s Name | Start creating a consumer record by entering the consumer name |
2 | Gender | Select gender of the consumer |
3 | Father's Name | Add father’s name of the consumer |
4 | Mobile Number | Enter the mobile number of the consumer |
5 | Old Connection id | Enter OLD Connection ID Number. Eg.105 |
6 | Door Number |
7 | Street No/Street Name |
8 | Ward | Select the ward where the consumer resides |
9 | Gram Panchayat |
10 | Property Type | Select one from residential/commercial type of property |
11 | Service Type | Select if the connection is metered or non-metered |
12 | Meter Number | Add meter number of the connection of the consumer |
13 | Previous meter reading date | Add the date of the last meter reading |
14 | Arrears | Add amount the household has to pay until today |
Step No. | Element | Note |
1 | Type of Expense | Select the category of expenditure |
2 | Vendor Name | Mention the name of the vendor who raised the bill |
3 | Amount | Add the amount that is mentioned in the bill |
4 | Bill Date | Add date on which bill is entered into records |
5 | Party Bill Date | Add date on which the bill is raised |
6 | Attach Bill | Attach JPEG/ PDF formats of the bill here |
7 |
Step No. | Element | Note |
1 | User feedback section | Feedback provided by consumers is shown here |
2 | Collections Snapshot | Summary of collections made in the selected time period |
3 | Search field | You can search for the consumer by Name or connection ID |
4 | Filters | Use filters to drill down by property type |
5 | Connection ID Column | These are new Connection IDs of consumers. Clicking on a consumer ID takes you to the respective Consumer Detail screen |
6 | Name | Name of the consumer |
7 | Collections | Collections made by the consumers in the selected time period |