Skip to content

mosip/pre-registration-ui

Repository files navigation

Maven Package upon a push Quality Gate Status

Overview

MOSIP provides a reference implementation of the pre-registration portal that customized as per country needs. This repository contains UI code for Pre-Registration portal.

Features

The Pre-Registration portal Features are :

  1. Resident can login into PreRegistration with email id / phone number
  2. Resident can create multiple PreRegistration application.
  3. For each PreRegistration application, resident can give demographic data in multiple languages.
  4. For each PreRegistration application, resident can upload various proof documents.
  5. For each PreRegistration application, resident can search for a Registration Center and search for suitable appointment slots.
  6. For each PreRegistration application, resident can book an appointment at suitable Registration Center
  7. For every appointment booking, resident can get the acknowledgement as well as a notification via email id / phone number.
  8. Resident can cancel the appointment or reschedule it as well.

Prerequisites

Before you begin, ensure you have the following installed:

The code is written in Angular JS.

  • Install node.js – To build the angular code using angular cli that runs on node. We recommend Node: 14.17.3, Package Manager: npm 6.14.13

  • Install angular cli – To install angular cli for building the code into deployable artifacts. Follow the following steps to install angular cli on your system.

    • npm install -g @angular/cli (to install angular cli)
    • ng --version (to verify angular is installed in system) We recommend Angular CLI: 13.3.2
  • Check out the source code from GIT – To download the source code from git. Follow the following steps to download source code on your system.

For Production build:

  • Build the code – Follow the following steps to build the source code on your system.

    • Navigate to the pre-registration-ui directory inside the cloned repository. Then run the following command in that directory
    • ng build "--prod" "--base-href" "." "--output-path=dist" (to build the code)
  • Build Docker Image – Follow the following steps to build docker image on your system.

    • docker build -t name . (to build the docker image, replace name with the name of the image you want, "." Signifies the current directory from where the docker file has to be read.
    • Example: docker build -t preregui .
  • Run the docker image – Follow the following steps to build docker image on your system.

    • docker run –d –p 80:80 --name container-name image-name (to run the docker image created with the previous step,-d signifies to run the container in detached mode, -p signifies the port mapping left side of the":" is the external port that will be exposed to the outside world and right side is the internal port of the container that is mapped with the external port. Replace container-name with the name of your choice for the container, replace image-name with the name of the image specified in .the previous step)
    • Example: docker run -d -p 8080:8080 --name nginx preregui
  • Now you can access the user interface over the internet via browser.

For Local build:

  • Build & deploy the code locally – Follow the following steps to build the source code on your system.
    • Navigate to the pre-registration-ui directory inside the cloned repository. Then run the following command in that directory
    • ng serve
  • Now you can access the user interface via browser.
  • But this will give you CORS issue in accessing backend prereg services. To get around the CORS issue, angular CLI proxy can be used.
    • Update the API services BASE_URL in config.json
    {  
      "BASE_URL": "https://localhost:4200/proxyapi/",    
      "PRE_REG_URL": "preregistration/v1/"  
      }
    
    • Create a new file named proxy.conf.json. Replace ${servicesUrl} with correct url.
    {
      "/proxyapi": {
        "target": ${servicesUrl},
        "secure": true,
        "changeOrigin": true,
        "pathRewrite": {
          "^/proxyapi": ""
        }
      }    
    }
    
    • Now start the server by typing ng serve --proxy-config proxy.conf.json --ssl true
    • Open the browser, load the app with https://localhost:4200

Deployment

Kubernetes

To deploy Pre-Registration services on a Kubernetes cluster, refer to the Sandbox Deployment Guide.

Documentation

For more detailed documents for repositories, you can check here.

Product Documentation

To learn more about Pre-Registration portal from a functional perspective and use case scenarios, refer to our main documentation: Click here.

Contribution & Community

• To learn how you can contribute code to this application, click here.

• If you have questions or encounter issues, visit the MOSIP Community for support.

• For any GitHub issues: Report here

License

This project is licensed under the Mozilla Public License 2.0.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 99