The site. Oldest codebase, and it shows.
The site is built on FastAPI, with data stored in a MongoDB replicaset with 3 members for data redundancy. Data is fetched from 2 sets of Concordium nodes (2 for mainnet, 2 for testnet), using its GRPC interface. It retrieves data using a custom Python GRPC SDK.
- MongoDB (successfully tested on version 6+). You will need to know the Mongo URI and place that in an ENV.
- Concordium Nodes for mainnet and testnet (you will need to know the IP and ports for both mainnet and testnet)
- Git clone, make a venv (
python3 -m venv .venv
) and activate it. - Install dependencies (in the venv)
pip install -r requirements.txt
- Set ENV variables
Copy the
.env.sample
to.env
and adjust the MongoDB and GRPC values if needed. These defaults assume MongoDB and a mainnet and testnet node are running on your local machine. - Start FastAPI process
uvicorn app.main:app --loop asyncio --host 0.0.0.0 --port 8000
- Open a browser window at http://localhost:8000.
- [CAVEAT]: This site depends heavily on data being present in the expected collections. With an ampty DB, the above runs the frontpage of the site. Still working on a feasible way to deliver a pre-filled test db or script to generate this.
A Dockerfile is supplied that builds the project into a Docker image (this is the image that is being used on CCDExplorer.io).