Monorepo for the Filecoin Pay ecosystem: subgraph, shared types/configs, UI library, and frontend apps.
- apps/
- packages/
- Node >= 22
- pnpm >= 9
Follow these steps to set up and run the applications:
Install all dependencies for the monorepo:
pnpm installSet up environment variables for the apps you want to run. You'll need the GraphQL endpoint URL for your Filecoin Payments Subgraph. If you need to deploy your own subgraph, see the subgraph deployment guide.
For Explorer app:
cd apps/explorer
cp .env.example .envEdit apps/explorer/.env and configure:
NEXT_PUBLIC_GRAPHQL_ENDPOINT=https://api.thegraph.com/subgraphs/name/your-username/filecoin-paymentsReplace the placeholder URL with your actual Filecoin Payments Subgraph endpoint.
NEXT_PUBLIC_GRAPHQL_ENDPOINT is required for the Explorer app to function.
For Metrics app:
cd apps/metrics
cp .env.example .envEdit apps/metrics/.env and configure:
VITE_GRAPHQL_ENDPOINT=https://api.thegraph.com/subgraphs/name/your-username/filecoin-paymentsReplace the placeholder URL with your actual Filecoin Payments Subgraph endpoint.
Note: VITE_GRAPHQL_ENDPOINT has a default fallback (http://localhost:8000/subgraphs/name/filecoin-payments) but should be configured for production use.
Return to root directory:
cd ../..- Explorer app depends on:
@filecoin-pay/typesand@filecoin-pay/ui - Metrics app depends on:
@filecoin-pay/types
Build all shared packages (recommended):
pnpm build --filter @filecoin-pay/types --filter @filecoin-pay/uiOr build only what you need:
# For Explorer only
pnpm build --filter @filecoin-pay/types --filter @filecoin-pay/ui
# For Metrics only
pnpm build --filter @filecoin-pay/typesThis step is required for both development and production environments.
Run all apps:
pnpm devRun Explorer only:
pnpm dev --filter @filecoin-pay/explorerRun Metrics only:
pnpm dev --filter @filecoin-pay/metrics1. Build the application(s):
# Build everything (recommended)
pnpm build
# Or build specific apps
pnpm build --filter @filecoin-pay/explorer
pnpm build --filter @filecoin-pay/metrics2. Start the production server(s):
# Start Explorer (runs on http://localhost:3000)
pnpm start --filter @filecoin-pay/explorer
# Start Metrics (runs on http://localhost:4173)
cd apps/metrics
pnpm preview
cd ../..- Build all:
pnpm build - Build specific app:
pnpm build --filter @filecoin-pay/explorerorpnpm build --filter @filecoin-pay/metrics - Lint:
pnpm lint - Format:
pnpm format - Type check:
pnpm type-check - Test:
pnpm test - Clean:
pnpm clean(removes build artifacts and node_modules)
- Use Node/pnpm versions from root
package.jsonengines. - Run
pnpm lint,pnpm format, andpnpm type-checkbefore committing. - See per-package READMEs for details.
- Contracts: https://github.com/FilOzone/filecoin-pay
- Explorer: https://github.com/FilOzone/filecoin-pay-explorer
Dual-licensed: MIT, Apache Software License v2 by way of the Permissive License Stack.