Table of Contents
About The Project
Complementary Access Management System for JTracer - a contact-tracing application that provides a safe and easy way to record interactions in public spaces by scanning QR codes. The purpose is of the access management system is to help the response team to identify and notify people who may have been exposed to the virus. The earlier we can reach people who might have been exposed to COVID-19, the faster we may avoid the transmission of the virus. The access management system provides features such as the generation and management of QR codes, reconstruction of infection chains, and many more.
Docker is one of the prerequisites to make the application up and running. Make sure to install on your machine. Follow this tutorial to install Docker on your Linux machine.
It will run the client(ReactJS), server(Express.js), and database(MongoDB) containers in the background. Follow this tutorial to install Docker Compose on your Linux machine.
Node.js and npm
Install Node.js and npm
npm install -g typescript
Create a file
.env in the root direcotry with the following variables:
API_PORT=8000 API_CONTAINER_NAME=api DB_CONTAINER_NAME=jtracer_mongodb MONGO_HOSTNAME=mongo MONGO_INITDB_ROOT_USERNAME=root MONGO_INITDB_ROOT_PASSWORD=root_password DB_NAME=jtracer CLIENT_CONTAINER_NAME=client
.env file in the
API_PORT=8000 MONGO_INITDB_ROOT_USERNAME=root MONGO_INITDB_ROOT_PASSWORD=root_password APP_USER=jtracer_user APP_PWD=fne4njg7 DB_NAME=jtracer JTRACER_ROOT_EMAILemail@example.com JTRACER_ROOT_PWD=Qwerty12345 JTRACER_ROOT_FIRST_NAME=Admin JTRACER_ROOT_LAST_NAME=Admin MONGO_HOSTNAME=mongo MONGO_PORT=27017 API_CONTAINER_NAME=api DB_CONTAINER_NAME=jtracer_mongodb ACCESS_TOKEN_SECRET= ACCESS_TOKEN_LIFE=600 REFRESH_TOKEN_SECRET= REFRESH_TOKEN_LIFE=86400 MAILGUN_API_KEY= ENCRYPTION_KEY= SIGNING_KEY=
Obviously, feel free to change any of these variables according to your preferences.
- Clone the repo
git clone https://github.com/taiyrbegeyev/jtracer_acs.git
- Run the setup script
cd scripts ./setup.sh
yarn start in the
jtracer directory to run the app in a development mode. The app is not containerized since JTracer was not a part of the scope. So, you will have to run it manually.
- The client application is exposed at http://localhost:1337
- The server application is exposed at http://localhost:API_PORT
In case you want to run the
server apps in a development mode, then you will have to change the configurations in the
MONGO_HOSTNAME should be set to
127.0.0.1 in order to be accessed from the localhost.
How to access the MongoDB Database?
Execute the following command to access the MongoDB as an admin:
docker exec -it DB_CONTAINER_NAME mongo -u MONGO_INITDB_ROOT_USERNAME --authenticationDatabase admin -p MONGO_INITDB_ROOT_PASSWORD
Execute the following command to access the MongoDB as a user:
docker exec -it DB_CONTAINER_NAME mongo -u APP_USER --authenticationDatabase admin -p APP_PWD
Taiyr Begeyev - firstname.lastname@example.org
Project Link: https://github.com/taiyrbegeyev/jtracer_acs