A comprehensive online voting platform built with TypeScript, Hono, React, and SQLite.
āāā backend/
ā āāā database/
ā ā āāā migrations.ts # Database schema setup
ā ā āāā queries.ts # Database query functions
ā āāā routes/
ā ā āāā auth.ts # Authentication routes
ā ā āāā polls.ts # Poll management routes
ā ā āāā votes.ts # Voting routes
ā āāā index.ts # Main server entry point
āāā frontend/
ā āāā components/
ā ā āāā App.tsx # Main application component
ā ā āāā Auth.tsx # Login/Register forms
ā ā āāā PollList.tsx # Display all polls
ā ā āāā PollDetail.tsx # Individual poll view
ā ā āāā CreatePoll.tsx # Poll creation form
ā ā āāā Results.tsx # Vote results visualization
ā āāā index.html # Main HTML template
ā āāā index.tsx # Frontend entry point
āāā shared/
āāā types.ts # Shared TypeScript interfaces
POST /api/auth/register - User registrationPOST /api/auth/login - User loginGET /api/auth/me - Get current userGET /api/polls - List all pollsPOST /api/polls - Create new pollGET /api/polls/:id - Get specific pollDELETE /api/polls/:id - Delete poll (admin only)POST /api/votes - Cast a voteGET /api/polls/:id/results - Get poll results