https://github.com/hrz8/go-pos-mini
https://github.com/hrz8/go-pos-mini
crud-application domain-driven-design echo-framework golang mysql rest-api
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hrz8/go-pos-mini
- Owner: hrz8
- Created: 2021-10-29T07:43:18.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-10-30T07:15:47.000Z (over 4 years ago)
- Last Synced: 2025-01-18T04:26:59.636Z (over 1 year ago)
- Topics: crud-application, domain-driven-design, echo-framework, golang, mysql, rest-api
- Language: Go
- Homepage: https://documenter.getpostman.com/view/6786432/UV5f9EWr
- Size: 505 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# go-pos-mini
## api documentation đ
Postman: https://documenter.getpostman.com/view/6786432/UV5f9EWr
## stacks đĨ
- MySQL
- Golang
- Echo Framework
- GORM
## setup up âī¸
### clone đž
Clone this repo using `Download` button or bash đ¨âđģ
```bash
$ git clone https://github.com/hrz8/go-pos-mini.git
```
### environtment setup đ
Required to create `config.yml` file for the development purpose, can refer the `config.sample.yml` file.
`config.yml` file should be look like this:
```yml
SERVICE:
RESTPORT: 3000
JWTSECRET: yoursecret
ADMINPASSWORD: password123
DATABASE:
HOST: localhost
PORT: 3306
USER: root
PASSWORD: toor
NAME: pos_mini
```
Details:
| Config | Details |
|-----------------------|-------------------------------------------------------------------------------------------|
| SERVICE.RESTPORT | This will be a rest server port |
| SERVICE.JWTSECRET | A secret for JWT token that apps will generate from |
| SERVICE.ADMINPASSWORD | This will be default password for dummy user (will be use to do a login to request token) |
| DATABASE.HOST | The used database host/address |
| DATABASE.PORT | Port of database |
| DATABASE.USER | Username for database access credentials |
| DATABASE.PASSWORD | Password for database access credentials |
| DATABASE.NAME | Database name that will be use to store the data |
### database schema (erd) đ

### activity diagram âŗī¸
Login:

CRUD:

### usecase diagram đļ

### data manipulation language used đ§Ž
| Command | Details |
|---------|---------------------------------------------------------------------------|
| UPDATE | To update the record based on user or product id |
| INSERT | To add new record |
| WHERE | Especially in UPDATE, it used to determine which record need to be update |
## run đââī¸
### cli đģ
```bash
$ go run main.go
```
Once this command executed, the migration will run automatically.
### vscode debug đĩī¸ââī¸
Debug app using VsCode Debugger Tool
- Select your debugger to be set as `Launch to The Moon đđ`
- Press `F5` to run the debugging
- Done!
Once this executed, the migration will run automatically.
## author âšī¸
Hirzi Nurfakhrian