A robust RESTful API for managing tasks and users, built with the Gin framework. Features include user authentication with JWT, user management, and task management. This API follows Clean Architecture principles for modularity and maintainability.
Welcome to the Task Management RESTful API built with the Gin framework. This API provides features for user authentication, user management, and task management, following the principles of Clean Architecture.
The project is organized into the following directory structure:
This project follows the principles of Clean Architecture to ensure that the code is modular, maintainable, and scalable. The architecture is divided into layers with clearly defined responsibilities:
bootstrap/
โโโ app.go
โโโ database.go
โโโ env.go
Delivery/
โโโ controllers/
โ โโโ login.controller.go
โ โโโ promote_user.controller.go
โ โโโ sign_up.controller.go
โ โโโ task.controller.go
โโโ main.go
โโโ routers/
โ โโโ login.router.go
โ โโโ promote.route.go
โ โโโ router.go
โ โโโ sign_up.router.go
โ โโโ task.router.go
โโโ tmp/
โโโ build-errors.log
โโโ main
doc/
โโโ api_documentation.md
Domain/
โโโ auth.middleware.go
โโโ error_response.go
โโโ jwt_custome.go
โโโ jwt.service.go
โโโ login.go
โโโ password.service.go
โโโ promote.go
โโโ sign_up.go
โโโ task.go
โโโ user.go
โโโ validate.go
Infrastructure/
โโโ auth.middleware.go
โโโ jwt.service.go
โโโ password.service.go
mocks/
โโโ mock_auth_middler.go
โโโ mock_jwt_service.go
โโโ mock_login_usecase.go
โโโ mock_password_service.go
โโโ mock_promote_usecase.go
โโโ mock_signup_repository.go
โโโ mock_task.go
โโโ mock_user_repository.go
Repositories/
โโโ task_repository.go
โโโ user_repository.go
tests/
โโโ constants/
โ โโโ user.go
โโโ controllers/
โ โโโ login_controller_test.go
โ โโโ promote_controller_test.go
โ โโโ signup_controller_test.go
โ โโโ task_controller_test.go
โโโ Repositories/
โ โโโ task_repository_test.go
โ โโโ user_repository_test.go
โโโ UseCases/
โโโ login_usecase_test.go
โโโ promote_user_usecase_test.go
โโโ sign_up_usecase_test.go
โโโ task_usecase_test.go
UseCases/
โโโ login.usecase.go
โโโ promote.usecase.go
โโโ sign_up.usecase.go
โโโ task.usecase.go
go.mod
go.sum
makefile
README.md
To get started with the project:
Clone the Repository:
git clone https://github.com/solo21-12/task_management_API_gin.git
cd task_management_API_gin
Run the Application:
make run
stop the Application:
make stop
Run Tests:
make test
Run Tests with Coverage:
make test-coverage
logs for the Application:
make logs
Testing is crucial for maintaining the quality of the application. To run tests, use the following commands:
Run Tests:
make test
Run Tests with Coverage:
make test-coverage
For detailed API documentation, please refer to Task Management API Documentation
For more information, please visit the GitHub repository.