https://github.com/codewizard-404/presidential-elections
A secure online voting system for presidential elections.
https://github.com/codewizard-404/presidential-elections
angular jwt-auth mongodb nodejs
Last synced: 8 months ago
JSON representation
A secure online voting system for presidential elections.
- Host: GitHub
- URL: https://github.com/codewizard-404/presidential-elections
- Owner: CodeWizard-404
- Created: 2024-11-20T20:09:30.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-11T17:14:33.000Z (over 1 year ago)
- Last Synced: 2025-03-22T14:16:08.666Z (about 1 year ago)
- Topics: angular, jwt-auth, mongodb, nodejs
- Language: TypeScript
- Homepage:
- Size: 10.3 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Presidential Elections - Secure Online Voting System
A dynamic, full-stack **online voting system** for presidential elections, built with **Angular**, **Node.js**, and **MongoDB**. The system allows secure and transparent voting, ensuring integrity and privacy for all users.
---
## π **Installation and Setup**
Follow the steps below to run the project locally.
### 1. **Clone the repository**
```bash
git clone https://github.com/CodeWizard-404/Presidential-Elections.git
cd Presidential-Elections
```
### 2. **Install dependencies**
#### Frontend (Angular)
Navigate to the frontend directory and install the Angular dependencies:
```bash
cd Front-End
npm install
```
#### Backend (Node.js)
Go to the backend directory and install the necessary Node.js modules:
```bash
cd ../Back-End
npm install
```
### 3. **Set up MongoDB**
Make sure MongoDB is installed and running. You can use a local MongoDB instance or a cloud database like **MongoDB Atlas**.
1. **Start MongoDB** locally or configure it via your **MongoDB Atlas** connection string.
2. start a connection on port 27017.
### 4. **Import Election Data**
Import your election data (e.g., candidates, voter records) from the provided **JSON files** into the database.
#### Example: Importing Election Data
You can use **MongoDB Compass** or a script to load the JSON files.
In the **`Database`** section of your MongoDB setup, import the data into the appropriate collections:
```bash
# For importing elections data:
mongoimport --db GEP --collection elections --file GEP.elections.json
```
Make sure that the structure in the JSON matches your database schema (e.g., elections, candidates).
---
## π§ **Running the Application**
Once dependencies are installed and data is imported, youβre ready to run the project!
### 1. **Start the Backend Server**
From the **Back-End** folder, start the server:
```bash
npm start
```
By default, the backend will run on [http://localhost:3005](http://localhost:3005).
### 2. **Start the Frontend Application**
In the **Front-End** folder, run:
```bash
ng serve
```
Now, open your browser and go to [http://localhost:4200](http://localhost:4200). You should see the application running!
---
## βοΈ **Features**
- **User Authentication**: Secure login system for voters and administrators.
- **Election Management**: Admin can create and manage elections, set candidates, and track voting progress.
- **Voting Mechanism**: Voters can cast their votes securely.
- **Real-Time Results**: Election results are automatically updated and shown to authorized users.
---
## π **Technologies Used**
- **Angular**: Powerful framework for dynamic, single-page applications.
- **Node.js**: Asynchronous event-driven JavaScript runtime for the backend.
- **MongoDB**: NoSQL database for flexible, scalable storage.
---
## π **License**
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.
---
## πΈ **Screenshots**









---
## π¬ **Contributing**
We welcome contributions! Feel free to fork this repository and submit pull requests. If you have any suggestions or find any bugs, open an issue!