Skip to content

vishnuajithg/voting-app-reactjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎉 Voting App - Web2 Based

📜 Overview

The Voting App is a full-stack web application designed to facilitate elections. Built with React for the frontend, Express and Node.js for the backend, and MongoDB for the database, this application allows users to register as candidates or voters, participate in elections, and view results. The entire project has been Dockerized for simplified deployment and management.

🛠️ Tech Stack

  • Frontend: React, React Router, Tailwind CSS
  • Backend: Node.js, Express.js
  • Database: MongoDB

📁 Project Structure

  • ui/: Contains the React frontend application, including all components, pages, and styling.
  • server/: Contains the Express backend application, including API routes, server configuration, and middleware.
  • Dockerfile: Configures Docker for the backend service, specifying build and runtime instructions.
  • docker-compose.yml: Manages multi-container Docker applications, orchestrating the deployment of both frontend and backend services.

✨ Features

  • 🔐 User Authentication and Authorization: Secure login for officials, candidates, and voters.

  • 📝 User Registration: Registration forms for both candidates and voters.

  • 🗳️ Candidate Management: Approval and rejection of candidate applications by officials.

  • ✅ Voter Management: Approval and rejection of voter registrations by officials.

  • 🎯 Vote Casting: Interface for voters to cast their votes during an active election.

  • ⚙️ Election Control: Features for officials to create, start, and stop elections.

  • 📊 Result Viewing: Tabs for candidates, voters, and officials to view election results.

  • Candidate Registration: Register with details such as name, student ID, DOB, and email.

  • Voter Registration: Register and await approval from officials to participate in elections.

  • Election Participation: Approved voters can view candidates and cast their votes.

  • Results Viewing: View election results after the election period ends.

🚀 Getting Started

Prerequisites

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd <repository-directory>
  2. Build and start the application:

    docker-compose up --build

    This command builds the Docker images and starts the containers for both frontend and backend services.

🖥️ Usage

⚙️ Configuration

  • Environment Variables: Configure any required environment variables in the .env file.

    Create a .env file in the root directory with the following variables:

    • MONGO_URI: URI of your MongoDB database
    • JWT_SECRET: Secret key for JWTs

🧪 Testing

  • Run Tests: Implement and run tests as needed for your application.

🤝 Contributing

Feel free to submit issues, fork the repository, and create pull requests. Contributions are welcome!

📹 Video Demonstration & Flowchart

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages