Best simple, lightweight, powerful and really fast Api with Golang (Fiber, Sqlc, Dbmate) PostgreSqL Database using Clean Architecture
status: WIP
LAYERS
- App: this directory has main setup files
- Interface
- route handler here
- midlewares
- presenters
- response configuration
- validators
- use case this directory has application use cases (controllers)
- infraestructure this directory has database configuration, schemas, and repositories
- Domain folder domain folder contain entities and rules
API of an order flow inventory system built for the "Versatil Print shop".
It is created with golang (fiber,Sqlc)
golderserver requires go 1.17+ postgres and dbmate installed to run.
Step 1 configure env file
- create .env file
- copy .envexample content
- set your postgresql variables
touch .env
Step 2 create database
to create database in postgres check "infraestructure/database/base" folder
dbmate up
Step 3 Install sqlc cli
go install github.com/kyleconroy/sqlc/cmd/sqlc@latest
Step 4 Sqlc generate model check sqlc.yaml file
sqlc generate
Step 4 Install the dependencies and start the server.
make download
make run
then, check
127.0.0.1:3000
APACHE LICENSE 2.0