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.
Follow the steps below to run the project locally.
git clone https://github.com/CodeWizard-404/Presidential-Elections.git
cd Presidential-ElectionsNavigate to the frontend directory and install the Angular dependencies:
cd Front-End
npm installGo to the backend directory and install the necessary Node.js modules:
cd ../Back-End
npm installMake sure MongoDB is installed and running. You can use a local MongoDB instance or a cloud database like MongoDB Atlas.
- Start MongoDB locally or configure it via your MongoDB Atlas connection string.
- start a connection on port 27017.
Import your election data (e.g., candidates, voter records) from the provided JSON files into the database.
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:
# For importing elections data:
mongoimport --db GEP --collection elections --file GEP.elections.jsonMake sure that the structure in the JSON matches your database schema (e.g., elections, candidates).
Once dependencies are installed and data is imported, you’re ready to run the project!
From the Back-End folder, start the server:
npm startBy default, the backend will run on http://localhost:3005.
In the Front-End folder, run:
ng serveNow, open your browser and go to http://localhost:4200. You should see the application running!
- 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.
- 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.
This project is licensed under the MIT License - see the LICENSE.md file for details.
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!








