Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/solo21-12/task_management_api_gin
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.
https://github.com/solo21-12/task_management_api_gin
cicd clean-architecture docker docker-compose gin-gonic github-action go golang makefile mongodb testify testify-mocking testing
Last synced: 2 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/solo21-12/task_management_api_gin
- Owner: solo21-12
- Created: 2024-08-15T04:59:54.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-08-27T07:48:51.000Z (4 months ago)
- Last Synced: 2024-10-01T01:01:28.869Z (3 months ago)
- Topics: cicd, clean-architecture, docker, docker-compose, gin-gonic, github-action, go, golang, makefile, mongodb, testify, testify-mocking, testing
- Language: Go
- Homepage:
- Size: 9.1 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Task Management RESTful API
![Go](https://img.shields.io/badge/Go-1.18+-blue.svg)
![Gin](https://img.shields.io/badge/Gin-1.7+-green.svg)
![MongoDB](https://img.shields.io/badge/MongoDB-5.0+-brightgreen.svg)
![Docker](https://img.shields.io/badge/Docker-20.10+-blue.svg)
![License](https://img.shields.io/badge/License-MIT-yellow.svg)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.
## ๐ Folder Structure
The project is organized into the following directory structure:
## ๐ Features
- **Authentication with JWT**: Secure authentication using JSON Web Tokens (JWT).
- **User Management**: Manage user sign-up, login, and user role promotion.
- **Task Management**: Create, retrieve, update, and delete tasks.## ๐๏ธ Clean Architecture
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:
- **Delivery**: Handles the HTTP requests and responses, including routing and controllers.
- **Domain**: Contains the core business logic and domain models.
- **Infrastructure**: Manages the interaction with external services and systems.
- **Repositories**: Manages data access and persistence.
- **UseCases**: Implements the application's use cases and business rules.```
bootstrap/
โโโ app.go
โโโ database.go
โโโ env.goDelivery/
โโโ 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.mdDomain/
โโโ 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.goInfrastructure/
โโโ 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.goRepositories/
โโโ task_repository.go
โโโ user_repository.gotests/
โโโ 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.goUseCases/
โโโ login.usecase.go
โโโ promote.usecase.go
โโโ sign_up.usecase.go
โโโ task.usecase.gogo.mod
go.sum
makefile
README.md
```## ๐ Getting Started
To get started with the project:
1. **Clone the Repository**:
```sh
git clone https://github.com/solo21-12/task_management_API_gin.git
cd task_management_API_gin
```2. **Run the Application**:
```sh
make run
```3. **stop the Application**:
```sh
make stop
```4. **Run Tests**:
```sh
make test
```5. **Run Tests with Coverage**:
```sh
make test-coverage
```
6. **logs for the Application**:
```sh
make logs
```## ๐งช Testing
Testing is crucial for maintaining the quality of the application. To run tests, use the following commands:
- **Run Tests**:
```sh
make test
```- **Run Tests with Coverage**:
```sh
make test-coverage
```## ๐ Documentation
For detailed API documentation, please refer to [Task Management API Documentation](https://documenter.getpostman.com/view/22911710/2sA3s7j8v6)
For more information, please visit the [GitHub repository](https://github.com/solo21-12/task_management_API_gin).
---