https://github.com/felipeagger/go-boilerplate
Golang service boilerplate using best practices
https://github.com/felipeagger/go-boilerplate
Last synced: 3 months ago
JSON representation
Golang service boilerplate using best practices
- Host: GitHub
- URL: https://github.com/felipeagger/go-boilerplate
- Owner: felipeagger
- License: bsd-2-clause
- Created: 2021-09-29T23:04:25.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-06T21:19:52.000Z (over 3 years ago)
- Last Synced: 2025-03-28T11:39:45.112Z (4 months ago)
- Language: Go
- Size: 604 KB
- Stars: 10
- Watchers: 1
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## go-boilerplate
Golang API Service boilerplate using best practices of Clean Architecture.Responsibility: CRUD and Login Users with JWT.
# Dependencies
- Gin-Gonic
- Swaggo
- go-redis
- GORM (MySQL)
- Golang-Migrate
- Snowflake
- OpenTelemetry
- JWT-Go
- Crypto## Documentation & Routes
**Swagger**
http://localhost:8000/auth/swagger/index.html
**Jaeger UI**
http://0.0.0.0:16686/search
_**On Error**_
_**SQL**_
## Compose Stack
- API REST
- MySQL
- Redis
- Jaeger## Execution / Compilation
Set Env. variables of .env-sample:
Compile with:
```
make run
```Update Swagger Doc:
```
make doc
```## Tests
```
make test
```## Path's Organization
_**Clean Arch**_
- _**assets**_: static files
- _**cmd**_: binaries entrypoint
- _**internal**_: private packages
- _**configs**_: env. variables
- _**usecase**_: business logical/rules
- _**delivery**_: delivery layer -> http, grpc, messaging
- _**entity**_: entities / schemas
- _**repository**_: storage operations, database interface
- _**service**_: external services call's
- _**pkg**_: public packages
- _**docs**_: Swagger Documentation