The backend is a Django server that exposes graphql APIs to return data from blockchain and database. The backend is connected with Mongo database.
Please refer to doc for more information about the APIs.
cd backend
python -m venv yourEnv
- Activate the virtual environment
For Windows:
.\yourEnv\Scripts\activate
For macOS and Linux:
source yourEnv/bin/activate
- Install dependencies
pip install -r requirements.txt
- Modify the
.env
file with the following information:
ALCHEMY_API_KEY=yourAPIKey
Alchemy is the provider used to connect with a blockchain node, to get a free API key, follow this guide: Alchemy Key
-
If not already done, run the database as explained in main page and deploy the smart contract as explained in blockchain
-
Run server
python manage.py runserver
To run the tests:
python manage.py test