The Task Management API is a powerful tool designed to streamline project-related operations. It offers a set of RESTful endpoints for managing projects, users, tags, stages, tickets, comments, and more. This README provides essential information to get started with the API.
This is our project for the Software Engineering course for HCMIU. Our front-end can be found here
For our Swagger Documentation, you can found it here
For our deployed server, you can found it here, since we are using a free instance on Render, it can take a while to reach the server if remained unactive.
- Features
- Prerequisites
- Installation
- Configuration
- Usage
- API Documentation
- Testing
- Deployment and Dockerization
- Full CRUD functionality for projects, users, tags, stages, tickets, and comments.
- Secure authentication using JSON Web Tokens (JWT).
- Robust request validation using Zod.
- Scalable and flexible MongoDB as the database backend.
Before you begin, ensure you have the following prerequisites:
- Node.js: Install Node.js
- Yarn: Install Yarn
- Clone the repository:
git clone https://github.com/your-username/project-management-api.git
- Install dependencies:
cd task_manager_be
yarn install
Create a .env file in the project root:
PORT=3001
MONGODB_URL=your_mongodb_database
SECRET_KEY=your_jwt_secret_key
Adjust the values according to your preferences.
Start the API server:
- Run yarn to install dependencies
yarn
- Start the server
Your server should run on port 3001
yarn run dev
- Format the code
yarn prettier --write "src/**/*.ts"
- Build Container
docker build -t tasking .
- Run Container
Your server should run on port 3001
docker run -p 3001:3001 -d tasking
For detailed API documentation, refer to the Swagger documentation.
Most of the testing was done on Postman, the workplace can found here Postman Workspace
We also implemented basic intergration test via Mocha, which tests all of the basic functionalities of the API:
yarn run integration-test
For the deployment we have a very simple CI/CD pipeline:
- First, we would run an integration test whenever a pull request is created.
- Build and Push our Docker's Image to the repository. Our Docker's Repo can be found here
- Push the Image to the cloud. We are using Render for our cloud hosting solution, we chose it mainly because it is free. This free instance types will spin down with inactivity, therefore it might take a while for our deployment to run (30s)
Our deployed instance can be found here