Skip to content

menegasso/taskmanager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Task Manager - Clean Architecture

Overview

This project implements a Task Manager following the principles of Clean Architecture. The goal is to maintain organized, decoupled, and easy-to-maintain code.

Architecture

The application is structured in layers, each with a specific responsibility:

  • Domain: Contains the core business entities and repository interfaces.
  • Application: Implements the use cases, converting data and orchestrating business logic.
  • Infrastructure: Handles data persistence, configurations, and interactions with external technologies.
  • Interfaces: Defines the REST API endpoints and other ways to interact with the system.

Project Structure

task-manager/
├── src/main/java/com/example/taskmanager
│   ├── domain
│   │   ├── entity
│   │   │   └── Task.java
│   │   └── repository
│   │       └── TaskRepository.java
│   ├── application
│   │   ├── dto
│   │   │   └── TaskDTO.java
│   │   └── service
│   │       └── TaskService.java
│   ├── infrastructure
│   │   ├── persistence
│   │   │   ├── TaskEntity.java
│   │   │   ├── TaskRepositoryImpl.java
│   │   │   └── SpringTaskRepository.java
│   │   └── configuration
│   │       └── PersistenceConfig.java
│   └── interfaces
│       └── rest
│           └── TaskController.java
└── pom.xml

Technologies Used

  • Java 17
  • Spring Boot
  • Spring Data JPA
  • H2 Database (for development/testing environment)
  • Maven

Setup and Execution

Prerequisites

Make sure you have installed:

Steps to Run

  1. Clone the repository:
    git clone https://github.com/your-username/task-manager.git
  2. Navigate to the project directory:
    cd task-manager
  3. Compile and run the application:
    mvn spring-boot:run
  4. The API will be available at:
    http://localhost:8080
    

API Endpoints

The REST API exposes the following endpoints:

Create a new task

POST /tasks

Example Payload:

{
  "title": "New Task",
  "description": "Task description",
  "status": "PENDING"
}

Get all tasks

GET /tasks

Get a task by ID

GET /tasks/{id}

Update a task

PUT /tasks/{id}

Example Payload:

{
  "title": "Updated Task",
  "description": "Updated description",
  "status": "COMPLETED"
}

Delete a task

DELETE /tasks/{id}

Contribution

If you want to contribute to the project:

  1. Fork the repository.
  2. Create a branch for your feature (git checkout -b feature-new).
  3. Make the changes and commit (git commit -m 'Add new feature').
  4. Push your changes (git push origin feature-new).
  5. Open a Pull Request.

License

This project is distributed under the MIT license. See the LICENSE file for more details.

About

TaskManager With Clean Architecture

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages