This project consists of three main components:
- Graph Node (Docker)
- Subgraph
- Front-end (Next.js)
The Graph Node runs in Docker and requires PostgreSQL and IPFS
# Navigate to the graph node directory
cd graph-node/docker
# Start the containers
docker-compose -f docker-compose-worldchain.yml up -d
This will start three containers:
docker-graph-node-1
: The Graph Node servicedocker-postgres-1
: PostgreSQL databasedocker-ipfs-1
: IPFS node
You can check if they're running with:
docker ps
The Graph Node explorer will be available at http://localhost:8000/
Once the Graph Node is running, deploy the subgraph:
# Navigate to the subgraph directory
cd subgraph
# Make the deployment script executable (if needed)
chmod +x deploy-local-worldchain.sh
# Deploy the subgraph
./deploy-local-worldchain.sh
The subgraph will be deployed to the local Graph Node and will be available at:
- Explorer: http://localhost:8000/subgraphs/name/oro-token-claims
- GraphQL endpoint: http://localhost:8000/subgraphs/name/oro-token-claims/graphql
# Navigate to the front-end directory
cd front-end
# Install dependencies (if not already done)
npm install
# or
pnpm install
# Start the development server
npm run dev
# or
pnpm dev
The front-end will be available at http://localhost:3000/ (or http://localhost:3001/ if port 3000 is already in use).
If you encounter Docker errors:
# Stop all containers
docker stop $(docker ps -q)
# Remove all containers
docker rm $(docker ps -aq)
# Remove volumes (if needed)
docker-compose -f docker-compose-worldchain.yml down -v
If the subgraph deployment fails with connection errors, ensure the Graph Node container is fully initialized. This might take a minute or two after starting the containers.
graph-node/
: Contains the Graph Node Docker configurationsubgraph/
: Contains the subgraph code and deployment scriptsfront-end/
: Contains the Next.js front-end application