- Have
npm
andpython3
installed and accessible from the terminal.- Installation guide for npm
- Installation for python
- Have MySQL server runned either remotely or locally. Installation Guide
- To use the book meeting functionality, follow the steps here and place the
credentials.json
underbackend/wellbeing/utility
.
-
Download and unzip the downloaded source code
-
Install dependencies for the frontend
- Under the frontend directory, run
npm install
- Under the frontend directory, run
-
Install dependencies for the backend
-
Under the backend directory, runs the following commands in terminal
python3 -m venv venv source venv/bin/activate pip3 install -r requirements.txt
-
-
Create a
.env
file under the backend root folder. Fill in the required information using the following template:- DATABASE_URL: The database connection string. Detail found at the SQLAlchemy Doc.
- JWT_SECRET_KEY: The key used to sign the token issued. Genreate one by running
python -c 'import os; print(os.urandom(16))'
in the terminal.
# Environment variable overrides for local development FLASK_APP=autoapp.py FLASK_DEBUG=1 FLASK_ENV=development DATABASE_URL="" GUNICORN_WORKERS=1 LOG_LEVEL=debug JWT_SECRET_KEY=""
-
Initialize the database
- Ensure your MySQL server is up and running
- Navigate to the backend directory in the terminal
- Run
flask createdb
- Run
flask seed
Ensure that you have followed the Installation steps before starting the system.
-
Under the backend directory
Visionaries/backend
, runsource venv/bin/activate flask run
-
Under the frontend directory
Visionaries/frontend
, runnpm start
-
After running
npm start
, a url will be printed in the terminal, go to that link using any web browser to use our system.
To be run under
/Visionaries/backend
- Start the server:
flask run
- Create database tables:
flask createdb
- Drop database:
flask dropdb
- Seed the database:
flask seed
- After starting the backend via
flask run
. - Go to the backend URL printed in the terminal.
- The Wellbeing website can be accessed at: https://main.df2q30aos58ji.amplifyapp.com
- For the deploy convience, the frontend and backend were deployed separately, the frontend is deployed based on the this repository: https://github.com/Echooooo-zhn/Visionaries-Wellbeing.git (A separated version of the frontend which is same as the group repository: https://github.com/lplsz/Visionaries.git)