A backend API for managing tasks, setting deadlines, and marking tasks as completed. This project focuses on robust error handling, secure user authentication, and scalability to support a growing number of users and tasks efficiently.
- Features
- Project Structure
- Getting Started
- Running the API
- API Endpoints
- Error Handling
- Authentication
- Scalability
- License
- Task Management: Create, Update, Delete and Retrieve tasks.
- Deadlines: Assign deadlines to tasks for effective tracking
- Task Completion: Mark tasks as completed and filter by completion status.
- Authentication: Secure login and authentication to protect user data and tasks.
To be added.
- Java 17+
- Maven for dependency managment
- MySQL as primary database
- Git for version control
- Clone the repository:
git clone https://github.com/lurldgbodex/task-management-system.git
cd task-management-system- Configure Environment Variables. Create a .env file in the root directory and specify the required environment variables like below.
DATABASE_URL=jdbc:mysql://localhost:3306/taskdb
DATABASE_USERNAME=your-datbase-username
DATABASE_PASSWORD=your-database-password- Install dependencies
mvn install- Set up Database:
- make sure mysql is running.
- create a new database named
taskdb(or as specified in your .env)
- Start the Application
mvn spring-boot:run
- Access the API: The API should be running on http://localhost:8000. You can test the endpoints using a tool like postman or curl.
The full API documentation is written using OpenAPI specifications on the endpoint /docs
| HTTP Method | Endpoint | Description |
|---|---|---|
| POST | /tasks |
Creates a new task |
| GET | /tasks |
Retrieves all tasks with pagination |
| GET | /tasks/:id |
Retrieves a task by its ID |
| PUT | /tasks/:id |
Update an existing task by ID |
| DELETE | /tasks/:id |
Delete a task by ID |
The API provides descriptive error messages for common issues, such as:
- 400 Bad Request: Missing or invalid input
- 401 Unauthorized: Access denied due to missing or invalid token
- 404 Not Found: Task or resources not found
The API uses JWT(JSON Web Tokens) for authentication:
- login: users login using their email and password and receive a jwt
- Authentication Endpoints: Include the token in the Authorization header as Bearer for authorized actions.
Authorization: Bearer your_jwt_token
To ensure that the API can handle increased loads:
This project is licensed under the MIT License. see the LICENSE file for more information