Skip to content

Mayank-Tripathi32/online-voting-system-backend

Repository files navigation


Online Voting System Backend API

◦ Make your own Polls whenever

◦ Developed with the software and tools listed below.

TypeScript esbuild Prettier HTML5 JavaScript Nodemon ESLint Markdown JSON

GitHub top language GitHub code size in bytes GitHub commit activity GitHub license


📒 Table of Contents


📍 Overview

The project is an Online Voting System / Poll Voting System backend based on TypeScript (TS). It provides a robust and secure backend infrastructure for conducting online voting or polling activities. The codebase includes components for managing user authentication, handling voting processes, storing data securely, and providing an API interface for interacting with the system. The project aims to ensure the integrity and confidentiality of voting data while allowing authorized users to participate in the voting process conveniently and efficiently. It leverages TypeScript's strong typing and scalability to create a reliable and scalable backend solution for online voting or polling systems.


⚙️ Features

Feature Description
⚙️ Architecture The codebase follows a modular architecture, with separate folders for different components and functionalities such as background, popup, content, and components. The background script listens to events, while the popup and content scripts handle UI interactions. The communication between these components is done through the messaging system provided by Chrome extensions.
📖 Documentation The repository lacks comprehensive documentation. While some files have brief comments and explanations, there is no dedicated documentation detailing the system's usage, design patterns, or architectural decisions.
🔗 Dependencies The codebase relies on various external packages, including React, ReactDOM, Sass, esbuild, archiver, and react-toggle. These libraries provide support for UI rendering, CSS styling, package bundling, and toggle functionality. The OpenAI API is used for the ChatGPT integration.
🧩 Modularity The system is organized into smaller, interchangeable components, making it easier to understand and maintain. Each component has a specific responsibility, such as handling background events, rendering UI, managing settings, and communicating with third-party APIs.
✔️ Testing There is no explicit mention of testing in the repository. The absence of testing files or scripts indicates that testing may not be practiced extensively in this codebase.
⚡️ Performance Performance cannot be fully assessed without analyzing the entire codebase. However, based on the provided summaries, the codebase seems to handle speech recognition, speech synthesis, and chat interactions efficiently using Web Speech API and OpenAI's ChatGPT.
🔐 Security The codebase does not explicitly detail security measures, but it handles authentication with the OpenAI API. It's important to ensure that user data is handled securely, especially for a chat assistant that may process sensitive information.
🔀 Version Control The codebase is hosted on GitHub, suggesting the use of Git for version control. However, further analysis is required to evaluate the specific version control strategies or practices implemented.
🔌 Integrations The codebase interacts with Chrome extensions' APIs for browser events and UI rendering. It also integrates with the OpenAI API for natural language processing and the Web Speech API for speech recognition and synthesis.
📶 Scalability Scalability cannot be determined without a more detailed analysis. However, the use of modular components and external APIs allows for flexibility and potential scalability in handling additional features or expanding the system's functionality.

📂 Project Structure

  repo
    ├── controllers
    │   ├── postController.ts
    │   └── AuthController.ts
    ├── libs
    │   └── mongo_client.ts
    ├── middleware
    │   └── auth.ts
    ├── routes
    │   ├── auth
    │   │    └── authenticate.ts
    │   └── index.ts
    ├── package.json
    ├── package-lock.json
    ├── LICENSE
    ├── .env
    ├── readme.md
    └── server.ts

3 directories

🚀 Getting Started

✔️ Prerequisites

Before you begin, ensure that you have the following prerequisites installed:

  • ℹ️ Nodejs 18+
  • ℹ️ Npm
  • ℹ️ Docker

💻 Installation

  1. Clone the assistant-chat-gpt repository:
git clone https://github.com/Leave-it-blank/online-voting-system-backend
  1. Change to the project directory:
cd online-voting-system-backend
  1. Install the dependencies:
npm install

🎮 Using assistant-chat-gpt

npm run dev

🧪 Running Tests

npm test

🗺 Roadmap

  • ℹ️ Task 1: Implemented User Auth using Jwt
  • ℹ️ Task 2: Implemented Poll System
  • ℹ️ Task 3: Implement & Refactor using Hashing

🤝 Contributing

Contributions are always welcome! Please follow these steps:

  1. Fork the project repository. This creates a copy of the project on your account that you can modify without affecting the original project.
  2. Clone the forked repository to your local machine using a Git client like Git or GitHub Desktop.
  3. Create a new branch with a descriptive name (e.g., new-feature-branch or bugfix-issue-123).
git checkout -b new-feature-branch
  1. Make changes to the project's codebase.
  2. Commit your changes to your local branch with a clear commit message that explains the changes you've made.
git commit -m 'Implemented new feature.'
  1. Push your changes to your forked repository on GitHub using the following command
git push origin new-feature-branch
  1. Create a new pull request to the original project repository. In the pull request, describe the changes you've made and why they're necessary. The project maintainers will review your changes and provide feedback or merge them into the main branch.

📄 License

This project is licensed under the ℹ️ INSERT-LICENSE-TYPE License. See the LICENSE file for additional info.


👏 Acknowledgments

  • Made By Leaveitblank

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published