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
- Install dependencies:
pnpm install- Start PostgreSQL and Redis:
docker compose up -d postgres redisThis 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
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.