Skip to content

NahidHassanOfficial/Pollux

Repository files navigation

Pollux - Online Voting System 🗳️

Pollux is a feature-rich online voting system that allows users to create polls and share them publicly or privately. With real-time notifications, advanced security measures, and a robust admin panel, Pollux ensures a seamless and secure voting experience.


🚀 Features

  • User Registration & Authentication: Secure login and registration using Laravel Sanctum.
  • Create & Manage Polls: Users can create polls and choose between public or private access.
  • Signed URL for Private Polls: Share private polls with a unique signed link.
  • Public Poll Feed: Discover and vote on polls created by other users.
  • User Profiles: View all polls created by a specific user.
  • Real-time Notifications: Users receive instant alerts when a poll ends.
  • Email Result Delivery: Poll results are sent via email once a poll concludes.
  • Fraud Prevention: Prevents duplicate votes using FingerprintJS, IP tracking, and User-Agent filtering.
  • Admin Panel with Analytics: Built with Filament, featuring role-based access control.
  • Scheduled Tasks & Queue Management: Automates updates and triggers events when polls end.
  • Localization Support: Multi-language support for a global audience.

🛠️ Technologies Used

Frontend

  • Blade & Alpine.js: Dynamic UI components
  • Tailwind CSS: Clean and modern styling
  • Axios: Efficient API requests

Backend

  • Laravel (Sanctum, RESTful API): Secure and structured backend
  • Event, Listener, Queue, Jobs: Optimized event-driven architecture
  • Notifications & Mail: Real-time user engagement
  • Reverb & Observer Pattern: Ensuring smooth event handling
  • Database Caching: Optimized performance
  • Filament Admin Panel: Role-based access and analytics
  • FingerprintJS & Custom Filtering: Prevent duplicate voting

Additional Features

  • Social Authentication (Laravel Socialite)
  • Scheduled Commands for Auto-Updates

📦 Installation

  1. Clone the repository:
    git clone https://github.com/your-username/pollux.git
    cd pollux
  2. Install dependencies:
    composer install
    npm install && npm run build
  3. Set up the environment:
    cp .env.example .env
    php artisan key:generate
  4. Update the database configuration
    • sqlite might fail in some queries. Better if you use MySQL
    • If you want Redis-based caching, make sure you have that installed on your machine. If you don't have then change the following .env configuration to database
      SESSION_DRIVER=database
      QUEUE_CONNECTION=database
      CACHE_STORE=database
  5. After configuring the database, run migrations:
    php artisan migrate --seed
  6. Ensure the following PHP extensions are enabled in your local environment:
    extension=intl
    extension=zip
  7. Update mail credentials in .env to enable email notifications.
  8. Update Reverb credentials in .env before starting.
  9. Start the development server:
    php artisan serve
  10. Run the queue worker for real-time notifications and job processing:
php artisan queue:work
  1. Start Reverb for real-time event broadcasting:
reverb:start
  1. Start frontend development server:
npm run dev
  1. Run scheduled tasks for poll updates:
php artisan schedule:work

About

An online public voting system

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages