Skip to content

Commit

Permalink
MOS-221 - Refactored the ReadMe files for Pre-Reg
Browse files Browse the repository at this point in the history
  • Loading branch information
nayakrounak committed Feb 25, 2020
1 parent a69d309 commit 8097971
Show file tree
Hide file tree
Showing 11 changed files with 84 additions and 178 deletions.
2 changes: 0 additions & 2 deletions design/pre-registration/pre-registration-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@
This is the technical flow including UI and server.

![pre-registration-technical-flow](_images/preregd_tech_flow.png)

![pre-registration-data-synch-flow](_images/preregd_tech_flow.png)
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
# Multi-Language Feature.

**Background**
- Mosip Support multi-language feature.

**Solution**
1. Id object mapping would be changed to support translation.
2. User could select primary language at first time log in.
3. From second time onward it would be the same language.
4. All error messages and information messages would be shown in primary language.
5. Secondary language would be one time and could not be changed.
6. Primary and secondary language would be persisted in DB
7. Multiple language translation file would be generated at design time.
8. Run time new languages could not be added.

**Transliteration**

- We would use virtual keyboard provided by angular to capture user preferred language input.

- We are Exposing the REST API to transliterate based on language code and value.

- Create the REST API to transliterate the value based on language, which internally call the ICU4j library.

- Internally call an ICU4j API to generate transliterated value, If it transliterated successfully send the response otherwise throw an respective exception.

**Sequence Diagram**
![pre-registration transliterate](_images/_sequence_diagram/transliteration-transliterate.png)
**Error Code**

Code | Type | Message
-----|----------|-------------
PRG-TRA-001 | Error | Failed to transliterate


**Dependency Modules**

Component Name | Module Name | Description |
-----|----------|-------------|
ICU4j | Library | To transliterate.
Exception Manager | Kernel | To prepare the user defined exception and render to the user.
Log | Kernel | To log the process.
# Multi-Language Support & Transliteration Service

**Background**
- Mosip Support multi-language feature.

**Solution**
1. Id object mapping would be changed to support translation.
2. User could select primary language at first time log in.
3. From second time onward it would be the same language.
4. All error messages and information messages would be shown in primary language.
5. Secondary language would be one time and could not be changed.
6. Primary and secondary language would be persisted in DB
7. Multiple language translation file would be generated at design time.
8. Run time new languages could not be added.

**Transliteration**

- We would use virtual keyboard provided by angular to capture user preferred language input.

- We are Exposing the REST API to transliterate based on language code and value.

- Create the REST API to transliterate the value based on language, which internally call the ICU4j library.

- Internally call an ICU4j API to generate transliterated value, If it transliterated successfully send the response otherwise throw an respective exception.

**Sequence Diagram**
![pre-registration transliterate](_images/_sequence_diagram/transliteration-transliterate.png)
**Error Code**

Code | Type | Message
-----|----------|-------------
PRG-TRA-001 | Error | Failed to transliterate


**Dependency Modules**

Component Name | Module Name | Description |
-----|----------|-------------|
ICU4j | Library | To transliterate.
Exception Manager | Kernel | To prepare the user defined exception and render to the user.
Log | Kernel | To log the process.
4 changes: 4 additions & 0 deletions pre-registration/pre-registration-batchjob/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# pre-registration-batchjob

## Design
[Design](https://github.com/mosip/pre-registration/blob/master/design/pre-registration/pre-registration-batch-job.md)
4 changes: 2 additions & 2 deletions pre-registration/pre-registration-booking-service/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# pre-registration-booking-service

## Design
[Design](https://github.com/mosip/pre-registration/pre-registration-booking-service.md)
[Design](https://github.com/mosip/pre-registration/blob/master/design/pre-registration/pre-registration-booking-service.md)

## Default Port and Context Path
```
server.port=9095
server.servlet.context-path=/preregistration/v1
```
## Url
## URL
```https://{dns-name}:9095/preregistration/v1/appointment/swagger-ui.html```
22 changes: 5 additions & 17 deletions pre-registration/pre-registration-datasync-service/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
# Pre-Registration-datasync-service:
# pre-registration-datasync-service:

[Background & Design](https://github.com/mosip/mosip/blob/SPRINT11_PREREG_TEAM_BRANCH/docs/design/pre-registration/pre-registration-data-sync-service.md)
## Design
[Design](https://github.com/mosip/pre-registration/blob/master/design/pre-registration/pre-registration-data-sync-service.md)

This service enables Pre-Registration to a registration client , request to retrieve all pre-registration ids based on registration client id, appointment date and a user type.

[Api Documentation](https://github.com/mosip/mosip/wiki/Pre-Registration-Services#datasync-service-external)

### Default Port and Context Path
## Default Port and Context Path
```
server.port=9094
server.servlet.context-path=/preregistration/v1
```
#### Url
## URL
```https://{dns-name}:9094/preregistration/v1/sync/swagger-ui.html```

[Application Properties](https://github.com/mosip/mosip/blob/master/config/pre-registration-dev.properties)

The following are the Api name use in this service.

1. POST /sync - This is used by registration client to retrieve all the pre-registration Ids by date range and registration center Id from the authorize token.

2. POST /sync/consumedPreRegIds - This is used by registration processor to fetch all processed pre-registration ids and store in
pre-registration database.
3. GET /sync/{preRegistrationId} - This request is used by registration client to retrieve particular pre-registration data based on a pre-registration id.

38 changes: 6 additions & 32 deletions pre-registration/pre-registration-demographic-service/README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,12 @@
# Pre-Registration-demographic-service:
# pre-registration-demographic-service:

[Background & Design](https://github.com/mosip/mosip/blob/SPRINT11_PREREG_TEAM_BRANCH/docs/design/pre-registration/pre-registration-demographic-service.md)
## Design
[Design](https://github.com/mosip/pre-registration/blob/master/design/pre-registration/pre-registration-demographic-service.md)

This Api can be use to create and store the demographic details of the citizen for a pre-registration.

[Api Documentation](https://github.com/mosip/mosip/wiki/Pre-Registration-Services#demographic-service-public)

### Default Port and Context Path
## Default Port and Context Path
```
server.port=9092
server.servlet.context-path=/preregistration/v1
```
#### Url
```https://{dns-name}:9092/preregistration/v1/applications/swagger-ui.html```

[Application Properties](https://github.com/mosip/mosip/blob/master/config/pre-registration-dev.properties)

The following are the Api name use in this service.

1. POST /applications - This Api is used to create new pre-registration by demographic details by providing the demographic details in request body.

2. PUT /applications/{preRegistrationId} - This Api is use to update the pre-registration details by providing pre-registration id in the path parameter and updated demographic details in request body.

3. GET /applications/{preRegistrationId} - This Api is use to
retrieve demographic details by providing the pre-registration id.

4. GET /applications - This Api is use to fetch all the applications created by user.

5. GET /applications/status/{preRegistrationId} - This Api is use to fetch the status of the application by providing the pre-registration id.

6. DELETE /applications/{preRegistrationId} - This Api is use to delete the Individual applicant and documents associated with the provided Pre-RegistrationId.

Following are the APIs which are using internally in this service.

1. PUT /applications/status/{preRegistrationId} - This Api is use to update the status of the application by providing the pre-registration id.

2. POST /applications/updatedTime - This Api is use to fetch updated Date Time for List of Pre-Registration Id.
## URL
```https://{dns-name}:9092/preregistration/v1/applications/swagger-ui.html```
27 changes: 5 additions & 22 deletions pre-registration/pre-registration-document-service/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,12 @@
# Pre-Registration-document-service:
[Background & Design](https://github.com/mosip/mosip/blob/SPRINT11_PREREG_TEAM_BRANCH/docs/design/pre-registration/pre-registration-document-service.md)
# pre-registration-document-service:

This service enables Pre-Registration portal to request for uploading the document for a particular pre-registration.
## Design
[Design](https://github.com/mosip/pre-registration/blob/master/design/pre-registration/pre-registration-document-service.md)

[Api Documentation](https://github.com/mosip/mosip/wiki/Pre-Registration-Services#document-service-public)

### Default Port and Context Path
## Default Port and Context Path
```
server.port=9093
server.servlet.context-path=/preregistration/v1
```
#### Url
## URL
```https://{dns-name}:9093/preregistration/v1/documents/swagger-ui.html```

[Application Properties](https://github.com/mosip/mosip/blob/master/config/pre-registration-dev.properties)

The following are the Api name use in this service.
1. POST /documents/{preRegistrationId} - This Api is use to upload the document for a pre-registration Id by providing file and file details.

2. PUT /documents/{preRegistrationId} - This Api is use to copy the document from source pre-registration Id in request parameter to destination pre-registration Id provided in the path variable.

3. GET /documents/preregistration/{preRegistrationId} - This get api is use to fetch list of meta data of document for provided pre-registration Id.

4. GET /documents/{documentId}?preRegistrationId=:preRegistrationId - This get api is use to fetch the content of the document for document Id.

5. DELETE /documents/{documentId}?preRegistrationId=:preRegistrationId - This Api is use to delete the document for provide document Id.

6. DELETE /documents/preregistration/{preRegistrationId} - This Api is use to delete all the document associated with the provided pre-registration Id.
19 changes: 5 additions & 14 deletions pre-registration/pre-registration-generateqrcode-service/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
# Pre-Registration-Generate-QRcode-service:
# pre-registration-generate-QRcode-service:

[Background & Design](https://github.com/mosip/mosip/blob/SPRINT11_PREREG_TEAM_BRANCH/docs/design/pre-registration/pre-registration-generate-qr-code-service.md)
## Design
[Design](https://github.com/mosip/pre-registration/blob/master/design/pre-registration/pre-registration-generate-qr-code-service.md)

This service details is use by Pre-Registration portal to generate QR Code.

[Api Documentation](https://github.com/mosip/mosip/wiki/Pre-Registration-Services#generate-qr-code-service-public)

### Default Port and Context Path
## Default Port and Context Path
```
server.port=9091
server.servlet.context-path=/preregistration/v1
```
#### Url
## URL
```https://{dns-name}:9091/preregistration/v1/qrCode/swagger-ui.html```

[Application Properties](https://github.com/mosip/mosip/blob/master/config/pre-registration-dev.properties)

The following are the Api name use in this service.

1. POST /generate -This request is used to generate QR Code for the pre-registration acknowledgement.
24 changes: 6 additions & 18 deletions pre-registration/pre-registration-login-service/Readme.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
# Pre-Registration-login-service:
# pre-registration-login-service:

[Background & Design](https://github.com/mosip/mosip/blob/SPRINT11_PREREG_TEAM_BRANCH/docs/design/pre-registration/pre-registration-login-service.md)
## Design
[Design](https://github.com/mosip/pre-registration/blob/master/design/pre-registration/pre-registration-login-service.md)

This service details used by Pre-Registration portal to authenticate user by sending OTP to the user, validating with userid and OTP.

[Api Documentation](https://github.com/mosip/mosip/wiki/Pre-Registration-Services#login-service-public)

### Default Port and Context Path
## Default Port and Context Path
```
server.port=9090
server.servlet.context-path=/preregistration/v1
```
#### Url
```https://{dns-name}:9090/preregistration/v1/login/swagger-ui.html```

[Application Properties](https://github.com/mosip/mosip/blob/master/config/pre-registration-dev.properties)

The following are the Api name use in this service.

1. POST /login/sendOtp - This Api is use to send the otp to the provided userId in the request body.
2. POST /login/validateOtp - This request will validate the OTP with respect to userid and provide the authorize token in the browser cookies.
3. POST /login/invalidateToken - This request will invalidate the authorization token when force logout is done.
4. GET /login/config - This request will load the configuration parameters while loading the pre-registration portal page.
## URL
```https://{dns-name}:9090/preregistration/v1/login/swagger-ui.html```
21 changes: 5 additions & 16 deletions pre-registration/pre-registration-notification-service/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
# Pre-Registration-notification-service:
# pre-registration-notification-service:

[Background & Design](https://github.com/mosip/mosip/blob/SPRINT11_PREREG_TEAM_BRANCH/docs/design/pre-registration/pre-registration-notification-service.md)
## Design
[Design](https://github.com/mosip/pre-registration/blob/master/design/pre-registration/pre-registration-notification-service.md)

This service is used by Pre-Registration portal to trigger notification via SMS or Email and get QRCode.

[Api Documentation](https://github.com/mosip/mosip/wiki/Pre-Registration-Services#notification-service-public)


### Default Port and Context Path
## Default Port and Context Path
```
server.port=9099
server.servlet.context-path=/preregistration/v1
```
#### Url
## URL
```https://{dns-name}:9099/preregistration/v1/notification/swagger-ui.html```

[Application Properties](https://github.com/mosip/mosip/blob/master/config/pre-registration-dev.properties)

The following are the Api name use in this service.

1. POST notification/notify -
This request is used to notify the pre-registration acknowledgement via Email and SMS.
19 changes: 5 additions & 14 deletions pre-registration/pre-registration-translitration-service/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
# Pre-Registration-translitration-service:
# pre-registration-translitration-service:

[Background & Design](https://github.com/mosip/mosip/blob/SPRINT11_PREREG_TEAM_BRANCH/docs/design/pre-registration/pre-registration-transliteration-service.md)
## Design
[Design](https://github.com/mosip/pre-registration/blob/master/design/pre-registration/pre-registration-transliteration-service.md)

This service is used by Pre-Registration portal to transliterate given value from one language to another language. In this API transliteration is using IDB ICU4J library , so accuracy will be less.

[Api Documentation](https://github.com/mosip/mosip/wiki/Pre-Registration-Services#transliteration-service-public)

### Default Port and Context Path
## Default Port and Context Path
```
server.port=9098
server.servlet.context-path=/preregistration/v1
```
#### Url
## URL
```https://{dns-name}:9098/preregistration/v1/transliteration/swagger-ui.html```

[Application Properties](https://github.com/mosip/mosip/blob/master/config/pre-registration-dev.properties)

The following are the Api name use in this service.

1. POST /transliteration/transliterate
This request is used to transliterate one value to another based on given valid language code.

0 comments on commit 8097971

Please sign in to comment.