A real-time voting application with public chat functionality for election discussions.
├── backend/
│ ├── database/
│ │ ├── migrations.ts # Database schema setup
│ │ └── queries.ts # Database query functions
│ ├── routes/
│ │ ├── votes.ts # Voting API endpoints
│ │ └── chat.ts # Chat API endpoints
│ └── index.ts # Main Hono server
├── frontend/
│ ├── components/
│ │ ├── App.tsx # Main application component
│ │ ├── VotingPanel.tsx # Voting interface
│ │ └── ChatRoom.tsx # Chat interface
│ ├── index.html # Main HTML template
│ └── index.tsx # Frontend entry point
└── shared/
└── types.ts # Shared TypeScript types
GET /
- Serve the main applicationGET /api/votes
- Get current vote resultsPOST /api/votes
- Cast a vote and countGET /api/chat/messages
- Get chat messagesPOST /api/chat/messages
- Send a chat messageGET /api/chat/stream
- SSE stream for real-time chat updates