A Simple API built using Clean Architecture.
This project is a web application designed to provide an API for managing products in a system. The project is structured based on Clean Architecture, promoting a modular and maintainable organization that facilitates upkeep and expansion.
The project structure is organized as follows:
.
│
├── cmd/
│ └── main.go
│
├── internal/
│ ├── domain/
│ ├── infrastructure/
│ └── use_cases/
│
├── interfaces/
│ └── api/
│ └── controllers/
│
├── tests/
│ ├── use_cases/
│ ├── infrastructure/
│ └── controllers/
│
├── migrations/
│
├── docs/
│
├── go.mod
└── go.sum
- Go (version 1.23.0 or higher)
- Docker (for container setup)
-
Clone the repository:
git clone https://github.com/mateus-dev-me/ama-api.git cd ama-api
-
Configure environment variables:
Create a
.env
file based on the.env.example
file and configure your database credentials and parameters. -
Install dependencies:
go mod tidy
-
Run database migrations:
go generate
go run ./cmd/main.go
The API will be available at http://localhost:8080/api/v1