=======
This is a monorepo for the Holy Grail webapp consisting of a few services: Celery task runner, Redis broker, Postgres database, FastAPI backend and React Frontend.
- Run your Python on the shell and type in this, copy the result and paste into the
.env_example
for yourSECRET_KEY
.
import secrets
secret_key = secrets.token_hex(32)
- Run the following command (For backend and frontend development)
cp .env.example .env
make build
make migrate
- Run the following command (For frontend development only)
cp .env.example .env
cd holy-grail-frontend
yarn --frozen-lockfile
yarn local
- To set up your virtualenv for pre-commit hooks
make venv
source holy-grail-backend/backend/app/.venv/bin/activate
pre-commit install
You should be able to see (holy-grail-py1.0) in your terminal beside your name, this means you're accessing all the packages required for development of the app now. If your pre-commit hook is failing, please check the error and make sure you re-add and commit the changed files.
NOTE: You can also run the make build
instructions and yarn local
instructions, but your frontend will be
in http://localhost:5174, it will still connect to the backend API correctly.
Go to http://localhost:8005/docs
to access the endpoints from the Swagger UI. (We don't use /api/v1/ in local anymore.)
Go to http://localhost:5173/
or http://localhost:5175/
to access the web application.
You can also run make runserver
to access the same application connected to the same database in port 9005, this is
purely for debugging purpose with pdb
. In this way, you have to access http://localhost:9005/docs
.
You can run make check
to run your code through mypy, pylint and pytest as a pre-hook commit for your own projects.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure that all backend contributions are updated with appropriate tests and passed
with make tests
first.