https://github.com/alainncls/bunny-universe
Bunny Universe dashboard and points system
https://github.com/alainncls/bunny-universe
linea nft the-graph wagmi web3
Last synced: 6 months ago
JSON representation
Bunny Universe dashboard and points system
- Host: GitHub
- URL: https://github.com/alainncls/bunny-universe
- Owner: alainncls
- Created: 2024-12-26T14:17:20.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-12-20T20:51:25.000Z (7 months ago)
- Last Synced: 2025-12-22T16:37:12.410Z (7 months ago)
- Topics: linea, nft, the-graph, wagmi, web3
- Language: TypeScript
- Homepage: https://earncarrot.bunnyuniverse.xyz/
- Size: 1.2 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Bunny Universe 🐇
Earn $CARROT 🥕
[](https://app.netlify.com/sites/bunny-universe/deploys)
This monorepo groups the components of the Bunny Universe points system.
The system is designed to reward users with $CARROT 🥕 for holding Bunny Universe NFTs and contributing to the Bunny
Universe ecosystem.
## Components
### Subgraph 🔎
In the `packages/subgraph` directory, you can find the subgraph that indexes Bunny Universe smart contract events.
It keeps track of all the events relevant to the points system, specifically the `Transfer` events.
The subgraph is hosted
on [The Graph Studio](https://thegraph.com/explorer/subgraphs/E99RzE1iK71GUk1qndxGTwZgpqYaF3boA1faZ4pCjrSw?view=Query&chain=arbitrum-one).
You can query it using
the [GraphQL Playground](https://api.studio.thegraph.com/query/67521/bunny-universe/version/latest).
### Backend ⚙️
The backend for the points system API is in the `packages/functions` directory.
It is hosted on [Netlify](https://app.netlify.com/).
It includes two main endpoints:
- `GET /api?address=0x...`: Computes and returns the points of a given address.
- `POST /api-admin`: Computes and updates the scores of all addresses holding Bunny Universe NFTs.
### Dashboard 🖥️
The dashboard, located in `packages/dashboard`, displays the points of Bunny Universe users.
It is hosted on [Netlify](https://app.netlify.com/) and accessible
at [earncarrot.bunnyuniverse.xyz](https://earncarrot.bunnyuniverse.xyz/).
Once users connect their wallet, they can view their points, and the leaderboard.
The dashboard also provides a detailed breakdown of points per NFT.
## Development
### Prerequisites
- **Node.js** (22.21.1 - see `.nvmrc`)
- **pnpm** (10.26.1 - enforced via `packageManager` field)
- **MongoDB instance** (can be a free tier on [MongoDB Atlas](https://www.mongodb.com/cloud/atlas))
### Installation
Install dependencies using `pnpm`:
```bash
pnpm i
```
### Running the project
1. Add backend secrets:
Copy packages/functions/.env.example to packages/functions/.env and fill in the secrets.
2. Start the backend
```bash
cd packages/functions && pnpm run functions:serve
```
3. Add frontend secrets:
Copy packages/dashboard/.env.example to packages/dashboard/.env and fill in the secrets.
4. Start the dashboard:
```bash
cd packages/dashboard && pnpm run dev
```
5. Open the dashboard in your browser: [localhost:3000](http://localhost:3000)