dcsil / Klear-Backend

Managing DB, S3, business logic, and communicating with ML service
0 stars 1 forks source link
w2023

Setup

  1. Ensure .env's information is correct from bootstrap for db connection. Follow instructions under "Authentication Service Set Up" to get ACCESS_TOKEN_SECRET
  2. Run ./script/bootstrap.
  3. Make sure you have a MySQL username and password, and make sure the MySQL server is running.
  4. Ensure a database/config/dev.json file is created with the correct information to connect to your local db. This file is used to run db migrations.
    • ONLY IF NOT CREATED PROPERLY: Follow instructions under "Migrations" to set up properly. And then run db-migrate up --config ./database/config/dev.json
  5. Start the mysql server mysql start
  6. Run npm start

Database

Prod database

Dev database

Migrations

Set up

To run migrations

To run the CV/ML service

Testing User

Authentication Serivce Set up

For authentication, we use jwt to create an access token. For dev purposes, each dev will need to set up their own ACCESS_TOKEN_SECRET in their .env file. To do so:

Miscellaneous

Debugging:

Production

To start or stop the server from running:

Demo information

Testing User