A real-time, collaborative ranked-choice voting application built with modern web technologies. Make group decisions easier by ranking options collaboratively with friends!
- Real-time Collaboration: Instantly see updates as participants join and vote using WebSocket connections
- Ranked Choice Voting: Participants can rank their preferences, leading to more democratic outcomes
- User-Friendly Interface: Modern, responsive design with intuitive controls
- Live Results: Watch results update in real-time as votes are cast
- Secure: JWT-based authentication and secure WebSocket connections
- Frontend: React with Vite, TypeScript, and TailwindCSS
- Backend: NestJS with WebSockets (Socket.IO)
- Database: Redis with RedisJSON for real-time data storage
- State Management: Valtio for simple and efficient state management
- Testing: Storybook for component development and testing
- Containerization: Docker and Docker Compose for easy deployment
- Node.js (v16 or higher)
- Docker and Docker Compose
- npm or yarn package manager
- Clone the repository:
git clone https://github.com/albertbyiringiro/vote-fusion.git
cd vote-fusion
- Install dependencies:
npm install
- Create a
.env
file in the server directory with the following variables:
PORT=3000
CLIENT_PORT=5173
REDIS_HOST=localhost
REDIS_PORT=6379
JWT_SECRET=your-secret-key
CORS_ORIGIN=http://localhost:5173
- Start Redis using Docker Compose:
npm run docker:compose
- Start the development servers:
# Start both client and server in development mode
npm run start
# Or run them separately:
npm run client:dev # Start client
npm run server:dev # Start server
- Access the application:
- Frontend: http://localhost:5173
- Backend: http://localhost:3000
-
Create a Poll:
- Enter a poll topic
- Set the number of votes per participant (1-5)
- Enter your name
- Share the generated poll ID with participants
-
Join a Poll:
- Enter the poll ID
- Enter your name
- Start participating!
-
Voting Process:
- Add nominations for the poll topic
- Rank your preferred options
- Submit your votes
- View real-time results
- Run Storybook for component development:
npm run storybook
- Project Structure:
/client
: React frontend application/server
: NestJS backend application/shared
: Shared TypeScript types and utilities/docker-compose.yml
: Docker configuration for Redis
Albert Byiringiro