Passage Indexer is a powerful and efficient blockchain data processing solution designed specifically for the Passage Marketplace ecosystem. This monorepo houses two main components: a high-performance blockchain indexer and a flexible API for querying the indexed data.
- Comprehensive Indexing: Captures and processes all relevant data from Passage Marketplace smart contracts.
- Real-time Data Access: Provides up-to-date information through a dedicated API.
- Scalable Architecture: Built as a monorepo for easy maintenance and scalability.
- Efficient Data Storage: Utilizes PostgreSQL with Drizzle ORM for optimized data management.
- Developer-Friendly: Includes detailed setup instructions and Docker support for quick deployment.
Whether you're building dApps, conducting market analysis, or integrating Passage Marketplace data into your projects, Passage Indexer offers a robust foundation for accessing and utilizing blockchain data efficiently.
- Clone the repository
- Install dependencies:
pnpm install - Create a postgresql database
- Set up environment variables (see
.env.samplefiles in each app) - Build the project:
pnpm run dev
.
├── apps
│ ├── indexer
│ └── api
├── packages
│ └── database
├── docker
└── README.md
apps/indexer: The main indexer applicationapps/api: API for querying indexed datapackages/database: Shared database package using Drizzle ORM
- Node.js
- TypeScript
- PostgreSQL
- Drizzle ORM
- Turbo
- Docker
- Webpack
The indexer is the core application of this project. It processes blockchain data and stores it in a PostgreSQL database using Drizzle ORM.
Key features:
- Indexes blockchain data efficiently
- Uses a caching mechanism for block data
- Supports multiple message types
- Handles validator information
The API provides access to the indexed data stored in the PostgreSQL database. It's built using Hono, a lightweight web framework for Node.js.
The shared database package uses Drizzle ORM for database operations. It includes schema definitions and utility functions for database interactions.
The project includes Docker configurations for both the indexer and API. To build Docker images:
pnpm run dc:build
This project uses Turbo for managing the monorepo. Common commands:
pnpm run dev: Run all applications in development modepnpm run build: Build all applicationspnpm run lint: Lint all applicationspnpm run db:check: Check database schemapnpm run db:generate: Generate database migrations
Contributions are welcome! Please read our contributing guidelines and code of conduct before submitting pull requests. Please refer to the guidelines outlined in the CONTRIBUTING.md file.
This project is licensed under the Apache License 2.0.