How mosip/registration-client works
Major Components
a. Registration Client (Desktop Application):
• Located in the “registration-client” folder.
• Implements the UI elements (using JavaFX and FXML – see abundant FXML and CSS files) and handles user interaction.
• Connects to other modules (e.g., authentication, document scanning interfaces, and packet upload processes).
b. Registration API:
• Found in “registration-api” – this module defines RESTful APIs (and/or other service interfaces) for downstream communication.
• Acts as a façade to the client and abstracts out business calls.
c. Registration Services:
• This is the heavy lifting in “registration-services”. It houses business logic, DAO (data access objects), service implementations, batch jobs, integration with MDM modules, and even scheduled jobs (look at “jobs” packages).
• It connects with data repositories (SQL scripts under “db_scripts” and “db_release_scripts” for schema/deployment) to persist and retrieve registration data.
d. Database:
• The deployment and release scripts indicate the existence of a relational database that is managed by the provided SQL scripts.
e. Integration/Reference Implementations:
• “ref-impl” modules such as “ref-document-scanner” and “ref-geoposition-rxtx” indicate specialized integrations to handle biometric scanning and geo-positioning.
f. Design and Testing Artifacts:
Relationships and Data Flow
• From the API, there should be a clear “service layer” connection (Registration Services) where the majority of the business logic executes.
• The Services layer communicates with the Database (persistent store) and may also interact with external modules (e.g., Pre-Registration module data input, Document Scanner, and GeoPosition modules).
Architectural Patterns & Design Principles
• Layered Architecture: Emphasize separation among the UI (client), API/Controller layer, service/business logic, and the repository/data access layer.
• Modularity: Break down the system into multiple Maven modules (client, API, services, test), and show integration with external services (ref-impl modules).
• Integration Points: Mark distinct components for device integration (e.g., document scanning and biometric capture) and external pre-registration data.
• Testing: Optionally, indicate that there is a comprehensive test suite (registration-test) ensuring quality across components.
• Registration Client:
– Contains UI controllers, FXML layouts, and a preloader.
– Handles authentication, document scanning, biometric capture, and user navigation.
• Registration API:
– Serves as a façade that exposes endpoints consumed by the client.
– Routes requests to the business logic.
• Registration Services:
– Contains business logic organized into packages (authentication, audit, packet handling, remapping, synchronization, configuration).
– Leverages DAO modules which interact with the database.
– Includes scheduled jobs (sync jobs, deletion, key policy jobs) and external integration (MDM, Remap Services).
• Database and Deployment:
– Represented by DB scripts and database release scripts.
• External Integration Modules:
– Document scanner (ref-document-scanner).
– Geo-positioning (ref-geoposition-rxtx).
– Pre-registration module integration providing input data.
• Testing and Design Documentation: