/MedicinesforLK

This is the repo for Elixir, initiated in May 2022 in response to the Sri Lanka economic crisis and severe medicine shortages. The project is in collaboration with the Sri Lanka Red Cross and Ministry of Health, Sri Lanka.

Primary LanguageTypeScriptApache License 2.0Apache-2.0

Elixir - Medicines for LK

This is the repo for Elixir - Medicines for LK application.

Setup Development Environment Locally

Please make sure you have all the listed prerequisites tools installed locally.

  1. Node - Latest
  2. npm - Latest

Steps

  • Clone your forked repository
  • Move in to cloned repository
    cd MedicinesforLK
    

Admin Portal

  • Change Directory to Admin Portal

    cd admin-portal
    
  • Add .env.local file to the level where package.json exist

  • Add following properties to the .env.local file

    REACT_APP_CLIENT_ID = <Choreo Application Client ID>
    REACT_APP_CLIENT_SECRET = <Choreo Application Client Secret>
    REACT_APP_SIGN_IN_REDIRECT_URL = http://localhost:3000
    REACT_APP_SIGN_OUT_REDIRECT_URL = http://localhost:3000
    REACT_APP_ADMIN_BACKEND_URL=https://9d2b57ae-4349-44f2-971c-106ae09d244d-dev.e1-us-east-azure.choreoapis.dev/qmov/admin-api/1.0.0
    REACT_APP_DONOR_BACKEND_URL=https://9d2b57ae-4349-44f2-971c-106ae09d244d-dev.d.e1-us-east-azure.choreoapis.dev/qmov/donor-api/1.0.0
    
    

    Note: REACT_APP_SIGN_IN_REDIRECT_URL and REACT_APP_SIGN_OUT_REDIRECT_URL are the URL that the application is running on. So in local it is http://localhost:3000. Always better keep the local development to this URL as we have whitelisted only this.

  • Install all the dependencies

    npm install
    
  • Build the application using

    npm run build
    
  • Start the server with

    npm start
    
  • Visit your app at http://localhost:3000

Donor Portal

  • Change Directory to Donor Portal

    cd donor-portal
    
  • Add .env.local file to the level where package.json exist

  • Add following properties to the .env.local file

    REACT_APP_CLIENT_ID = <Choreo Application Client ID>
    REACT_APP_CLIENT_SECRET = <Choreo Application Client Secret>
    REACT_APP_SIGN_IN_REDIRECT_URL = http://localhost:3000
    REACT_APP_SIGN_OUT_REDIRECT_URL = http://localhost:3000
    
    

    Note: REACT_APP_SIGN_IN_REDIRECT_URL and REACT_APP_SIGN_OUT_REDIRECT_URL are the URL that the application is running on. So in local it is http://localhost:3000. Always better keep the local development to this URL as we have whitelisted only this.

  • Install all the dependencies

    npm install
    
  • Start the server with

    npm start
    
  • Visit your app at http://localhost:3000