VibePoll is a real-time interactive polling application that allows administrators to create polls and users to vote in them with live results visualization.
- Real-time polling with automatic updates via Server-Sent Events
- Admin panel with Google OAuth authentication for secure access
- Interactive voting interface for participants
- Dynamic results page with animated visualization
- Time limit options including unlimited time polls
- IP-based vote tracking to prevent duplicate votes
- Mobile-responsive design for all devices
- Node.js 18.17 or later
- npm or yarn
-
Clone the repository
git clone https://github.com/yourusername/vibepoll.git cd vibepoll/app
-
Install dependencies
npm install
-
Create a
.env.local
file in the app directory with the following:# NextAuth.js Configuration NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your-nextauth-secret-key # Google OAuth GOOGLE_CLIENT_ID=your-google-client-id GOOGLE_CLIENT_SECRET=your-google-client-secret # Admin Emails (comma-separated list) ADMIN_EMAILS=your-email@gmail.com
-
Start the development server
npm run dev
-
Open http://localhost:3000 in your browser
- Go to the Google Cloud Console
- Create a new project or select an existing one
- Navigate to "APIs & Services" > "Credentials"
- Click "Create Credentials" > "OAuth client ID"
- Configure the OAuth consent screen:
- Select "External" user type
- Add scopes for
email
andprofile
- Add your email as a test user
- Create OAuth client ID:
- Application type: Web application
- Name: VibePoll
- Authorized JavaScript origins:
http://localhost:3000
- Authorized redirect URIs:
http://localhost:3000/api/auth/callback/google
- Copy the Client ID and Client Secret to your
.env.local
file
Navigate to /admin
and sign in with your Google account (must be in the ADMIN_EMAILS list).
- From the admin panel, create a new poll with:
- Question title
- Multiple answer options
- Time limit (1 minute, 2 minutes, custom, or unlimited)
- Start the poll when ready
- View live results directly from the admin panel
- Navigate to
/vote
or share this URL with participants - Select an option and submit vote
- Each IP address can only vote once per poll
- Navigate to
/results
to see real-time poll results - Results update automatically without refreshing the page
- Engaging animations show new votes as they arrive
- Frontend: Next.js 14 with App Router, React, and Tailwind CSS
- Authentication: NextAuth.js with Google provider
- Real-time Updates: Server-Sent Events (SSE)
- State Management: Singleton service pattern with in-memory storage
- Styling: TailwindCSS for responsive design
The application is optimized for deployment on Vercel:
- Push your code to a GitHub repository
- Connect your repository to Vercel
- Configure the environment variables in Vercel dashboard
- Deploy!
This project is licensed under the MIT License - see the LICENSE file for details.