# README
wonjinsin/go-web-boilerplate(pikachu)
Simple rest api server with Echo framework
Features
- Gorm : For mysql ORM
- Zap : Go leveled Logging
- Viper : Config Setting
- Makefile : go build, test, vendor using Make
Project structure
Clean Architecture with DDD(Domain Driven Design) pattern
Getting started
Set infra
$ docker-compose -f infra-docker.yml up -d
Initial action
$ make all && make build && make start
Migration initial data
$ make migrate-up ENV=local
If you have error when Init Please use below command and do Inital action again
make clean
MakeFile Command
migrate up
# e.g make migrate up ENV=local
$ make migrate-up ENV=${ENV}
migrate down
# e.g make migrate down ENV=local
$ make migrate-down ENV=${ENV}
Build vendors
$ make vendor
Build and start
$ make build && bin/pikachu
Test
$ make vet && make fmt && make lint && make test
// or
$ make test-all
Clean
$ make clean
Docs
Specification
https://github.com/upsidr/coding-test/blob/main/web-api-language-agnostic/README.ja.md
Api docs
-
Use this with post man, swagger etc
How to use
-
Set initial datas at Getting Started
-
Get access token with /auths/signin api, mock user is already created
-
Put access token to Bearer token, and call other apis(need create with post api/invoices first to get invoices)
todo
- todo. add test code for service logic, e2e
- todo. consider library gorm to sqlc because of reflect performance problem
- todo. refactoring code with writing test code
- todo. consider about in-memory or caching for perfomance
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author