A powerful and scalable task management system built with NestJS, TypeORM, and MySql. This API allows users to manage their tasks efficiently, with features like authentication, task creation, updates, deletions, and pagination.
- Authentication & Authorization: Secure user registration and login with JWT authentication.
- User Management: Role-based access control, profile management, and admin functionalities.
- Task Management:
- Create, read, update, and delete personal tasks.
- Attachment upload support with secure file storage.
- Ownership validation to prevent unauthorized modifications.
- Pagination: Optimized pagination for retrieving users and tasks.
-
Clone the repository:
git clone https://github.com/Hossein-Falah/task-management.git
-
Navigate to the project directory:
cd task-management
-
Install dependencies:
npm install
-
Create a .env file and configure your environment variables:
APP_PORT=3000 DOC_PATH=/api/docs APP_URL=http://localhost:3000 DB_PORT=3306 DB_HOST=localhost DB_NAME=task_management DB_USERNAME=root DB_PASSWORD=****** JWT_ACCESS_SECRET=your-secret-key JWT_ACCESS_EXPIRES_IN=1h JWT_REFRESH_SECRET=your-secret-key JWT_REFRESH_EXPIRES_IN=7d
-
Start the application:
npm run start:dev
Swagger API documentation is available at:
http://localhost:3000/api/docs
- User Registration & Authentication: Register new users and generate access tokens.
- Task CRUD Operations:
POST /tasks
- Create a new taskGET /tasks
- Retrieve user's tasks with paginationGET /tasks/:id
- Retrieve a specific task (ownership validated)PUT /tasks/:id
- Update a taskDELETE /tasks/:id
- Delete a task
- Fork the repository.
- Create a new feature branch:
git checkout -b feature/your-feature
- Commit your changes:
git commit -m 'feat: add new feature'
- Push the branch:
git push origin feature/your-feature
- Open a pull request.
This project is licensed under the MIT License. Feel free to use and modify it.
Developed by Hossein-Falah 🚀