Monorepo scaffold for a Stellar blockchain analytics platform with a data pipeline, GraphQL API, React dashboard, and shared TypeScript package.
.
+-- indexer/
� +-- src/
� +-- ingester.ts
� +-- transformer.ts
� +-- loader.ts
� +-- websocket.ts
� +-- index.ts
� +-- database/schema.sql
+-- api/
� +-- src/
� +-- schema.ts
� +-- resolvers/
� +-- index.ts
+-- frontend/
� +-- src/
� +-- components/
� +-- hooks/
� +-- pages/
� +-- App.tsx
� +-- main.tsx
+-- shared/
� +-- src/
� +-- config/networks.ts
� +-- types/
� +-- utils/
+-- docker-compose.yml
+-- package.json
+-- pnpm-workspace.yaml
Shared network configuration is in shared/src/config/networks.ts:
mainnetHorizon:https://horizon.stellar.orgtestnetHorizon:https://horizon-testnet.stellar.org
indexer/src/database/schema.sql initializes these tables:
blockstransactionsoperationsledgers
New to the project? See DEVELOPMENT.md for a complete step-by-step guide covering prerequisites, environment variables, mock mode, port map, and troubleshooting.
- Install dependencies:
pnpm install- Start PostgreSQL and Redis:
docker compose -f docker-compose.dev.yml up -d postgres redis- Copy and configure environment files:
cp indexer/.env.example indexer/.env
cp packages/api/.env.example packages/api/.env- Run migrations:
pnpm db:migrate- Start all services:
pnpm devSet STELLAR_MOCK=true in indexer/.env to run the indexer fully offline
using deterministic generated data. See DEVELOPMENT.md § Mock mode for details.
This repository includes GitHub Actions workflows for:
- PR validation with lint and build checks
- automated E2E testing for feature branches
- staging and production container deployment pipelines
- manual rollback via workflow dispatch
Backups are automated by the postgres-backup service when running full compose (docker compose up -d), and you can run backup operations manually:
pnpm backup:run
pnpm backup:verify
pnpm backup:health- Run services in separate terminals:
pnpm --filter @stellar-analytics/indexer dev
pnpm --filter @stellar-analytics/api dev
pnpm --filter @stellar-analytics/frontend dev- API GraphQL + playground:
http://localhost:4000/graphql - Frontend (Vite):
http://localhost:5173
Ready-to-run GraphQL examples for the dashboard, account and
network analytics endpoint families (with cURL invocations and
expected responses) live in docs/api-examples.md.
See also:
docs/graphql-query-standards.md— naming & linting rulesdocs/graphql-query-limits.md— depth and complexity limitsdocs/query-performance.md— DataLoader batching & slow-query monitoring
Schema changes are managed with node-pg-migrate:
pnpm db:migrate
pnpm db:migrate:downSee docs/database-migrations.md for the full migration workflow.
Slow-query monitoring, DataLoader batching, Redis caching, and index review guidance are documented in docs/query-performance.md.
Backup/restore/PITR runbook is documented in docs/backup-disaster-recovery.md.
Each service area has a designated owning team that is automatically requested for review on relevant PRs.
See docs/code-ownership.md for the ownership table, per-area acceptance criteria, and escalation guidelines.
Third-party packages are updated automatically each week via Dependabot. Security advisories are handled immediately.
See docs/dependency-management.md for the full update policy and review checklist.