Backend is a core backend for Usecase2B. Wrote by Go and deployed by Dwarves Foundation
- Language: Go
- Source control: Github
Our system following clean architecture with some customizations
Below we describe the conventions or tools specific to golang project.
├── .gitignore
├── .env.sample
├── Makefile
├── k8s
├── Dockerfile
├── docker-compose.yaml
├── go.mod
├── go.sum
├── README.md
├── cmd
│ ├── server
│ │ └── main.go
├── migrations
│ ├── schema
│ └── seed
├── docs
├── pkg
│ ├── app
│ ├── config
│ └── errors
│ └── logger
│ └── mw
│ └── util
│ └── routes
│ └── handler
│ └── repo
│ └── model
A brief description of the layout:
.env.sample
environment variable samples.k8s
k8s config.Makefile
is used to build the project. You need to tweak the variables based on your project.README.md
detailed description of the project.cmd
contains main packages.migrations
contains migrations sql files.docs
contains swagger.pkg
places most of project business logic and locateapi
package.app
contain application information (app version,...)config
load/read config moduleerrors
defines error messagelogger
defines logger off applicationmv
defines middlewares (authentication, authorization)util
contains utils function which are used through serverroutes
contain routing definitions, it represent delivery layer in our systemhandler
represent usecase layer in our system where implement business logicrepo
represent repository layer in our system which contains function used for communicate with databasemodel
represent entity layer in our system which contain model definitions
- Init database -
make init
- Migrate database -
make migrate-up
- Start server -
make run
- Seed data for local -
make seed
To start testing process, please try the following cmd - make test
Documentation of backend
-
Field Technician:
- email: jon@gmail.com
- password: password
-
Field Technician Manager:
- email: daenerys@gmail.com
- password: password
Manager dashboard site status
Daily task for a Field Technicain
Variation of in_stock(inventory) in spare parts table
Create issue process
Create purchase request process
- Swagger version: 2.0
- Swagger URL: Swagger