Skip to content

lurldgbodex/task-management-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Task Management System Task Management CI

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.

Table of Contents

  1. Features
  2. Project Structure
  3. Getting Started
  4. Running the API
  5. API Endpoints
  6. Error Handling
  7. Authentication
  8. Scalability
  9. License

Features

  • 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.

Project Structure

To be added.

Getting Started

Prerequisites

  1. Java 17+
  2. Maven for dependency managment
  3. MySQL as primary database
  4. Git for version control

Setup Instructions

  1. Clone the repository:
git clone https://github.com/lurldgbodex/task-management-system.git
cd task-management-system
  1. 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
  1. Install dependencies
mvn install
  1. Set up Database:
  • make sure mysql is running.
  • create a new database named taskdb (or as specified in your .env)

Running The API

  1. Start the Application
    mvn spring-boot:run
  2. Access the API: The API should be running on http://localhost:8000. You can test the endpoints using a tool like postman or curl.

API Endpoints

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

Error Handling

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

Authentication

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.

Example Authorization Header

Authorization: Bearer your_jwt_token

Scalability

To ensure that the API can handle increased loads:

License

This project is licensed under the MIT License. see the LICENSE file for more information

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages