LeaderPort is an open-source project, transforming and visualizing data into insights across sports, markets, and competitive landscapes. Through blockchain integration, achievements and records are permanently immortalized, ensuring legendary performances live forever in Web3.
The LeaderPort Core API provides data for the leaderport-core-ui and employs a hybrid storage architecture, utilizing the Sui blockchain for secure, real-time score management and Walrus decentralized storage for efficient handling of media assets and large binary files.
By leveraging Hono's efficient routing, Bun's superior runtime performance, and Sui's parallel transaction processing, LeaderPort enables instant updates and retrieval of leaderboard data, making it ideal for applications requiring real-time ranking and score tracking across millions of users.
- TypeScript: Enhanced code quality and developer experience with static typing
- Bun: Superior runtime performance for JavaScript/TypeScript applications
- Hono: Ultrafast web framework with clean endpoint definitions and middleware architecture
- Upstash Redis: Redis client for caching and rate limiting
- Drizzle ORM: Type-safe database interactions and efficient querying
- Sui Blockchain: Secure on-chain storage for scores and achievements
- Walrus Storage: Decentralized storage for media assets and large binary files
- Blockchain Layer: Sui-powered storage for scores, rankings, and achievements
- Decentralized Storage: Walrus integration for media assets and binary files
- Caching Layer: Redis-based caching for high-performance data access
- Hybrid State Management: Combined on-chain and off-chain data handling
- Bun >= 1.0.0 installed on your system
- Interest in Web3, Sui, Walrus, dApps, and leaderboards
-
Clone the repository:
git clone https://github.com/zanuka/leaderport-core-api.git cd leaderport-core-api
-
Install dependencies:
bun install
bun run dev
- Start the development server with hot reloadbun run start
- Start the production serverbun run test
- Run testsbun run test:watch
- Run tests in watch modebun run test:coverage
- Run tests with coverage reportbun run lint
- Run ESLintbun run format
- Format code with Prettier
Once running you can make requests and get output that looks like this if successful. Here's an example of the console log generated when making the following request:
curl http://localhost:3000/api/v1/nba/teams/POR/players/4351851/stats | jq
🚀 Server running at http://localhost:3000
Started development server: http://localhost:3000
--> GET /api/v1/nba/teams/POR/players/4351851/stats 200 150ms
- Detailed implementation examples can be found in Back-end Details
- Infrastructure setup guide is available in Back-end Setup
- Web3 vision including blockchain and tiered service model Web3 Visions
- Repository structure strategy Public / Private Repo Strategy
- API testing notes and endpoints API Testing
- Example of sports data support Sports Stats Examples
- Various deployment strategies Deployment Details
- TanStack usage details TanStack Details
We welcome contributions from developers interested in Web3, Sui blockchain development, and real-time data visualization!
- Fork the repository
- Create a new branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Node.js 18+
- Bun runtime
- Basic understanding of Hono, TypeScript, and Web3 concepts
- (Optional) Familiarity with Sui Move programming and Walrus
We believe in fostering an inclusive and welcoming environment for all contributors. Whether you're fixing a bug, improving documentation, or adding a new feature, your help is appreciated!
This project is licensed under the Apache License, Version 2.0.
Copyright (c) 2024-present, Mike Delucchi - Zanuka Labs LLC.