A RESTful API service built with Hono and MongoDB to interact with Nouns DAO data.
This API provides endpoints to access various aspects of the Nouns DAO ecosystem, including proposals, candidates, votes, feedback, and updates.
- Node.js
- MongoDB instance
- Environment variables:
MONGODB_URI=your_mongodb_connection_string
Endpoint | Description |
---|---|
GET /api/nouns |
Get all Nouns NFTs |
GET /api/nouns/:nounId |
Get specific Noun NFT details |
Endpoint | Description |
---|---|
GET /api/props |
List all proposals (paginated) |
GET /api/props/latest |
Get the latest proposal |
GET /api/props/:propId |
Get specific proposal details |
GET /api/props/:propId/feedback |
Get feedback for a specific proposal |
GET /api/props/:propId/votes |
Get votes for a specific proposal |
Endpoint | Description |
---|---|
GET /api/propdates |
Get all proposal updates (paginated) |
GET /api/propdates/:propId |
Get updates for a specific proposal |
Endpoint | Description |
---|---|
GET /api/candidates |
List all proposal candidates (paginated) |
GET /api/candidates/:slug |
Get specific candidate details |
GET /api/candidates/:slug/feedback |
Get feedback for a specific candidate |
GET /api/candidates/:slug/signatures |
Get signatures/sponsors for a specific candidate |
Parameter | Description | Default | Max |
---|---|---|---|
page |
Page number | 1 | - |
limit |
Items per page | 10 | 50 |
summary |
Summary view flag | false | - |
{
"id": 1,
"proposer": "0x...",
"description": "Proposal description",
"calldatas": [],
"targets": [],
"values": [],
"startBlock": 123,
"endBlock": 456,
"txHash": "0x...",
"blockNumber": 789
}
{
"id": 1,
"proposer": "0x...",
"description": "Candidate description",
"slug": "candidate-slug",
"proposalIdToUpdate": null,
"encodedProposalHash": "0x..."
}
Status Code | Description |
---|---|
500 | Database connection error |
404 | Resource not found |
400 | Bad request |
- Clone the repository
git clone <repository-url>
- Install dependencies
pnpm install
- Set up environment variables
cp .env.example .env
- Run development server
npm run dev
Deploy to Vercel:
vercel deploy
- Fork the repository
- Create your feature 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