A modern, full-featured voting platform built with Laravel 10 and Livewire. Submit ideas, vote, engage in threaded discussions, and receive real-time notifications - all in a beautiful, responsive interface.
- Idea Management - Submit, edit, and categorize ideas with status tracking
- Smart Voting System - Upvote/downvote with duplicate prevention
- Unlimited Nested Comments - Full threaded discussions with infinite nesting
- Status Workflow - Track ideas through: Open → Considering → In Progress → Implemented → Closed
- User Profiles - Customizable profiles with activity tracking
- Follow System - Follow users and see their contributions
- Avatar System - Auto-generated avatars (Laravolt) with upload support (Spatie Media Library)
- Username URLs - Clean, SEO-friendly URLs like
/users/@username
- Dual Delivery System:
- 📡 Real-time - Instant updates via Pusher WebSockets
- 💾 Database Polling - Fallback for environments without WebSockets
- 🔄 Hybrid Mode - Best of both worlds (recommended)
- Notification Types: New votes, comments, status changes, mentions
- Admin Control Panel - Switch delivery methods on-the-fly
- Social Login - OAuth integration with Facebook & Google
- CSRF Protection - Built-in Laravel security
- XSS Prevention - Automatic output escaping
- Role-Based Access - Admin/User permissions
- Dark Mode - Toggle between light/dark themes
- Responsive Design - Mobile-first approach
- Real-time Updates - Live UI updates without page refresh
- Spam Prevention - Rate limiting and duplicate detection
- Polls - Attach polls to ideas for community input
- Search & Filters - Find ideas by status, category, or popularity
- Activity Feed - Track all platform activity
- Email Notifications - Digest emails for important updates
Live Demo: https://vote-app.on-forge.com/
Test Credentials:
Email: [email protected]
Password: Pa$$w0rd!
Ensure the following are installed:
| Requirement | Version | Required |
|---|---|---|
| PHP | >= 8.0 | ✅ |
| Composer | 2.x | ✅ |
| MySQL / PostgreSQL | 5.7+ / 12+ | ✅ |
| Node.js | >= 16.x | ✅ |
| npm | >= 8.x | ✅ |
| Redis | Latest | ⭕ Optional |
| Pusher Account | - | ⭕ Optional |
# Clone repository
git clone https://github.com/fabyo0/vote-app.git
cd vote-app
# Install dependencies
composer install
npm install
# Setup environment
cp .env.example .env
php artisan key:generateUpdate .env with your database credentials:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=vote_app
DB_USERNAME=root
DB_PASSWORD=your_passwordRun migrations and seed data:
php artisan migrate --seed
php artisan storage:linkSet up queue for background jobs:
QUEUE_CONNECTION=databaseCreate jobs table:
php artisan queue:table
php artisan migrate# Build frontend assets
npm run build
# Start development server
php artisan serve
# In separate terminal - Start queue worker
php artisan queue:workVisit: http://localhost:8000 🎉
Choose your notification delivery method:
No additional setup required. Polls database every 30 seconds.
- Create account at pusher.com
- Update
.env:
BROADCAST_DRIVER=pusher
PUSHER_APP_ID=your-app-id
PUSHER_APP_KEY=your-app-key
PUSHER_APP_SECRET=your-app-secret
PUSHER_APP_CLUSTER=your-cluster
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"- Clear cache and rebuild:
php artisan config:clear
npm run buildNavigate to /admin/settings to switch between:
- 💾 Database Only
- 📡 Pusher Only
- 🔄 Both (Recommended)
-
Create OAuth Apps:
-
Update
.env:
FACEBOOK_CLIENT_ID=your-id
FACEBOOK_CLIENT_SECRET=your-secret
GOOGLE_CLIENT_ID=your-id
GOOGLE_CLIENT_SECRET=your-secret- Set Callback URLs:
- Facebook:
http://yourdomain.com/auth/facebook/callback - Google:
http://yourdomain.com/auth/google/callback
- Facebook:
# Start all services
php artisan serve # Laravel server (port 8000)
npm run dev # Vite HMR server
php artisan queue:work # Queue worker
# Database
php artisan migrate:fresh --seed # Fresh start with data
php artisan db:seed # Re-seed only
# Livewire
php artisan make:livewire ComponentName
php artisan livewire:publish --assets
# Cache management
php artisan optimize:clear # Clear all caches
php artisan config:cache # Cache config
php artisan route:cache # Cache routes
php artisan view:cache # Cache viewsRun test suite:
# All tests
php artisan test
# Specific suites
php artisan test --testsuite=Feature
php artisan test --testsuite=Unit
# With coverage
php artisan test --coverage
php artisan test --coverage-html coverageConfigure test database in .env:
DB_DATABASE_TESTING=vote_app_testUpdate .env for production:
APP_ENV=production
APP_DEBUG=false
APP_URL=https://yourdomain.com
# Performance optimization
CACHE_DRIVER=redis
QUEUE_CONNECTION=redis
SESSION_DRIVER=redis
# Mail configuration
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=587
MAIL_USERNAME=your-username
MAIL_PASSWORD=your-password# Install production dependencies
composer install --optimize-autoloader --no-dev
# Optimize application
php artisan config:cache
php artisan route:cache
php artisan view:cache
php artisan event:cache
# Build assets
npm run buildCreate /etc/supervisor/conf.d/vote-app-worker.conf:
[program:vote-app-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /path/to/artisan queue:work --sleep=3 --tries=3 --max-time=3600
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=www-data
numprocs=2
redirect_stderr=true
stdout_logfile=/path/to/storage/logs/worker.log
stopwaitsecs=3600Start supervisor:
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start vote-app-worker:*php artisan optimize:clearsudo chown -R $USER:www-data storage bootstrap/cache
chmod -R 775 storage bootstrap/cache# Check failed jobs
php artisan queue:failed
# Retry all
php artisan queue:retry all
# Monitor queue
php artisan queue:work --verbose- Check browser console (F12) for errors
- Verify credentials in
.env - Check Pusher Dashboard for activity
- Clear config:
php artisan config:clear - Rebuild assets:
npm run build
npm run build
php artisan storage:link- Laravel 10 - PHP Framework
- Livewire 3 - Full-stack framework
- MySQL/PostgreSQL - Database
- Redis - Caching & Queues
- Alpine.js - Lightweight JS framework
- Tailwind CSS - Utility-first CSS
- Vite - Build tool
- Spatie Media Library - File uploads
- Laravolt Avatar - Avatar generation
- Laravel Socialite - OAuth
- Pusher - WebSockets
app/
├── Http/
│ ├── Controllers/ # HTTP Controllers
│ └── Livewire/ # Livewire Components
├── Models/ # Eloquent Models
├── Notifications/ # Notification Classes
└── Providers/ # Service Providers
resources/
├── views/
│ ├── livewire/ # Livewire Views
│ └── layouts/ # Layout Templates
└── js/ # Frontend Assets
database/
├── migrations/ # Database Schema
├── seeders/ # Data Seeders
└── factories/ # Model Factories
tests/
├── Feature/ # Feature Tests
└── Unit/ # Unit Tests
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature- Commit your changes (use Conventional Commits)
git commit -m "feat: add amazing feature"- Push to your branch
git push origin feature/amazing-feature- Open a Pull Request
feat:New featurefix:Bug fixdocs:Documentationstyle:Formattingrefactor:Code restructuringtest:Adding testschore:Maintenance
- Bug Reports: Open an issue
- Feature Requests: Request a feature
- Discussions: GitHub Discussions
This project is licensed under the MIT License - see the LICENSE file for details.
- Laravel - The PHP Framework
- Livewire - Full-stack Framework
- Tailwind CSS - CSS Framework
- Pusher - Real-time Infrastructure
- Spatie - Amazing Laravel Packages
- GitHub: @fabyo0
- Issues: Report here
- Discussions: Join here
Built with ❤️ using Laravel & Livewire




