Hi there, Welcome to voteTrack project documentation! This guide will help you understand the project, set it up locally, and explore its features. Feel free to contribute and make the documentation even better!
voteTrack is a Node.js application for managing polls, it enables admins to create polls valid for a specified period of time, and registered voters to participate in the polls, it also provides live and final results at the end of the poll period. The admin specifies whether the poll is open to anyone or invited voters only.
- User authentication and authorization
- Creation and management of polls
- Support for invite-only and open participation polls
- Invitation-based voting system
- Real-time & final voting results
|--src\
|--controllers\ # Route controllers (controller layer)
|--models\ # Mongoose models (data layer)
|--routes\ # API Routes
|--types\ # custom types
|--utils\ # Utility classes and functions
|--config\ # Environment variables and configuration-related things
|--db.ts # database configurations
|--app.ts # Express app
|--index.ts # App entry point
|--tests\
- Node.js: Server-side JavaScript runtime environment.
- Express: Web application framework for Node.js.
- TypeScript: Typed superset of JavaScript
- MongoDB & Mongoose: NoSQL database & Object Data Modeling (ODM) library for MongoDB.
- JSON Web Tokens (JWT): Used for user authentication and authorization.
- Environment variables: using dotenv
- Bcryptjs: Password hashing and validation.
- Node-cron: Task scheduling library
- MailTrap: Mailing service
- CORS: Cross-Origin Resource-Sharing enabled using cors
- Express-session: managing server session
- Testing: unit and integration tests using Jest
To run the project locally, follow these steps:
-
Clone the repository: git clone
https://github.com/iam-benjamen/voteTrack.git
-
Install dependencies:
npm install
-
Create a .env file at the root of the project and configure the environment variables
PORT= DB_URL= JWT_SECRET= JWT_EXPIRES_IN= SESSION_SECRET= SMTP_HOST= SMTP_PORT= XAPP_KEY=
-
Start the server:
npm run dev
Contributions to voteTrack are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
This project is licensed under the MIT License.