A React + TypeScript based Nouns DAO governance dashboard for viewing and browsing Nouns DAO proposal information.
Nouns DAO Dashboard is a modern web application specifically designed to display Nouns DAO governance proposals. The project reads data directly from the Ethereum blockchain, ensuring real-time and accurate information.
- Proposal List: Display the latest 5 Nouns DAO proposals
- Proposal Details: View complete proposal information including descriptions, voting statistics, timelines, etc.
- Real-time Data: Fetch latest data directly from Ethereum mainnet
- Responsive Design: Support for desktop and mobile access
- Markdown Support: Support for Markdown format rendering in proposal descriptions
- 🔗 On-chain Data: Read data directly from Nouns DAO contracts
- 📊 Voting Statistics: Real-time display of for votes, against votes, and abstain votes
- ⏰ Timeline: Display proposal creation, start, and end block times
- 🎨 Modern UI: Modern interface design based on Tailwind CSS
- 📱 Responsive: Perfect adaptation to various device sizes
- Frontend Framework: React 18 + TypeScript
- Build Tool: Vite
- Styling Framework: Tailwind CSS
- Blockchain Interaction: Wagmi + Viem
- Routing: React Router
- State Management: TanStack Query
- Markdown Rendering: react-markdown + remark-gfm
- Node.js >= 18.0.0
- pnpm >= 8.0.0
# Install dependencies using pnpm
pnpm install# Start development server
pnpm devThe project will start at http://localhost:3000.
# Build production version
pnpm build
# Preview production build
pnpm previewnouns-dashbord/
├── src/
│ ├── components/ # React components
│ │ ├── Header.tsx # Page header
│ │ ├── ProposalHeader/ # Proposal header component
│ │ ├── Proposals/ # Proposal list component
│ │ └── ProposalStatus/ # Proposal status component
│ ├── pages/ # Page components
│ │ ├── Dashboard.tsx # Dashboard page
│ │ └── Detail/ # Detail page
│ ├── hooks/ # Custom Hooks
│ │ ├── useOnChainProposals.ts # On-chain proposal data
│ │ └── useProposal.ts # Single proposal data
│ ├── contracts/ # Smart contract related
│ │ └── nounsDAO.ts # Nouns DAO contract ABI
│ ├── config/ # Configuration files
│ │ ├── constants.ts # Constants configuration
│ │ └── wagmi.ts # Wagmi configuration
│ ├── types/ # TypeScript type definitions
│ │ └── index.ts # Type definitions
│ └── utils/ # Utility functions
│ └── constants.ts # Utility constants
├── public/ # Static assets
├── package.json # Project configuration
├── vite.config.ts # Vite configuration
├── tailwind.config.js # Tailwind configuration
└── tsconfig.json # TypeScript configuration
The project connects to Ethereum mainnet by default with the following configuration:
- RPC Endpoint: Through Vite proxy to
https://eth.llamarpc.com - Contract Address:
0x6f3e6272a167e8accb32072d08e0957f9c79223d(Nouns DAO)
The project uses Vite proxy to resolve CORS issues:
// vite.config.ts
server: {
proxy: {
'/api/eth': {
target: 'https://eth.llamarpc.com',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/eth/, ''),
}
}
}- Get Proposal Count: Call
proposalCount()function - Calculate Latest Proposals: Calculate the latest 5 proposal IDs based on total count
- Query Proposal Details: Query detailed information for 5 proposals in parallel
- Get Proposal State: Call
state()function to get accurate state - Query Proposal Description: Get complete description through historical event logs
- Display the latest 5 proposals
- Each proposal shows title, status, countdown
- Support clicking to jump to detail page
- Complete proposal information display
- Voting statistics and timeline
- Markdown format proposal description
- Responsive layout design
- Create new components in
src/components/ - Add custom Hooks in
src/hooks/ - Define related types in
src/types/ - Update routing configuration (if needed)
- Use browser developer tools to view network requests
- Check console logs to understand data flow
- Use React DevTools to debug component state
# Development
pnpm dev # Start development server
# Build
pnpm build # Build production version
pnpm preview # Preview production build
# Code Quality
pnpm lint # Run ESLint check
pnpm lint:fix # Auto-fix ESLint issues
# Type Check
pnpm type-check # Run TypeScript type check