The attendance registry allows creation of an attendance register, enrollment of staff and attendees and capture of attendance records with entry/exit times. To compute attendance based on the logs, a calculator service should be built with specific business logic.
Pre-requisites
DIGIT backbone services
Idgen
Persister
Project Service
Boundary Service
Functionalities
Allows creation/updation/search of an attendance register
Allows mapping of staff and attendees to a register and enforces permissions.
Log entry and exit timestamps in epoch time for a referenced entity
Staff members can be added or removed from the Attendance Register, with roles (Editor, Approver, Owner) defining permissions: Editors modify records, Approvers validate records, and Owners have full administrative control.
Setup
1
Clone or download the code from the GitHub repository
The source code for the Attendance registry is located in the Git repository here. Clone or download the code from this repository before proceeding.
2
Add the Lombok extension/plugin
The Attendance module is a Spring Boot application that uses Lombok, a Java library. Add the Lombok extension/plugin to open and build the project in your IDE (like IntelliJ or Eclipse).
3
Setup Lombok in IDEs
Install the Lombok plugin directly from the IntelliJ plugins marketplace.
Download the Lombok jar file.
Add the following line to your eclipse.ini file (replace lombok.jar with the correct path to your Lombok jar):
4
Run application
Once Lombok is set up and the application is running (using your IDE or command line), you can start making API requests to the Attendance service’s endpoints.
5
Generate IDs
When you send API requests, the system will generate the required IDs automatically as part of its normal operation.
API Details
API Reference
The complete API specifications for the Attendance Service are documented in the Swagger YAML file:
Add new actions in the MDMS actions configuration (e.g., action-test.json). Each action represents an API endpoint you wish to secure and manage: actions-test.json
Assign Actions to Roles
Configure which user roles can access which API actions in roleaction.json. Map each action ID to the required roles: Roleaction.json. Refer example below: