Video To my Presentation: https://drive.google.com/file/d/1pH_kQ6RLqXeqxULWkuyRdiJ7mdPdhrDX/view?usp=drive_link
TaskMaster is a web-based task management application designed to help users efficiently manage their tasks. The platform allows users to create, view, update, delete, and filter tasks with ease. A robust search feature enables finding tasks using specific keywords. The application uses MongoDB for secure and scalable data storage, with user authentication powered by JWT and bcrypt, ensuring strong security. Input validation is handled by Express Validator, while protection against XSS and SQL injection ensures data safety and system integrity. TaskMaster delivers a secure and seamless task management experience.
- Features
- Tech Stack
- Getting Started
- Installation
- Environment Variables
- API Endpoints
- Usage
- Testing
- Security
- Deployment
- Contributing
- License
- User Authentication: Users can register, log in, and authenticate securely.
- Task Management:
- Create, update, and delete tasks.
- Each task includes attributes such as title, description, due date, and priority.
- Task Filtering: Filter tasks by priority or due date.
- Search Functionality: Search tasks based on keywords in the title or description.
- Responsive UI: A user-friendly and responsive front-end interface.
- Frontend: HTML, CSS, JavaScript
- Backend: Node.js, Express
- Database: MongoDB
- Authentication: JWT, bcrypt
- Security: Helmet, express-validator, sanitize-html
- Testing: Mocha, Chai, Sinon, Supertest
Follow these instructions to get a copy of TaskMaster up and running on your local machine.
-
Clone the repository:
git clone https://github.com/your-username/TaskMaster.git cd TaskMaster -
Install dependencies:
npm install
-
Create a
.envfile in the root directory and configure the necessary environment variables (see below).
Set up the following variables in your .env file:
PORT=3000
MONGODB_URI=<Your MongoDB URI>
JWT_SECRET=<Your JWT Secret Key>
- POST
/users/signup- Register a new user - POST
/users/login- Login with existing credentials
- POST
/tasks- Create a new task - GET
/tasks- Retrieve all tasks (with filtering and search options) - GET
/tasks/:id- Retrieve a task by ID - PUT
/tasks/:id- Update a task by ID - DELETE
/tasks/:id- Delete a task by ID
- Create a Task:
- POST
/tasks - Body:
{ "title": "Complete project report", "description": "Finish the report for project XYZ", "dueDate": "2024-12-31", "priority": "high", "userId": "<User ID>" }
- POST
To run the application locally:
npm startThe server will start on http://localhost:5500 (or the port you set in .env).
TaskMaster includes unit tests for key functions. Run tests using:
npm testTaskMaster includes basic security features to ensure data integrity and protection against common attacks:
- Input Validation: Uses
express-validatorto validate user inputs. - XSS Protection: Uses
sanitize-htmlto prevent cross-site scripting. - SQL Injection Protection: MongoDB inherently protects against SQL injection, and user inputs are sanitized.
- Secure Headers: Uses
helmetto set secure HTTP headers.
- Push your code to GitHub or another repository.
- Connect your repository to Vercel and configure environment variables.
- Deploy the application via Vercel.
I deployed to render
- Set up a render account, connect with GitHub and select the repository
- Select web services on your dashboard and ensure you put your root folder after selecting this repository
- Enter the build command and start command like you do in your terminal and deploy.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch). - Commit your changes (
git commit -m "Add new feature"). - Push the branch (
git push origin feature-branch). - Open a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for more information.
Happy task management with TaskMaster!