/golang-tokoku-app

Primary LanguageGoApache License 2.0Apache-2.0

Tokoku App

Tokoku is a CLI based point-of-sales app built with Golang and MySQL.

Table Of Content

Features of the App

There are 2 level users, Admin and Staff, each level user has different menu, here are the features of each level user :

  • Staff menu :
    ✅ Login as Staff
    ✅ Insert a new transaction
    ✅ Show history transactions
    ✅ Insert a new product
    ✅ Show all the products
    ✅ Update product information and stock
    ✅ Insert a new customer
    ✅ Show all customers data
    ✅ Update customer information

  • Admin menu :
    ✅ Login as Admin
    ✅ Register a new staff account
    ✅ Update staff account information
    ✅ Show and delete a staff
    ✅ Show and delete a product
    ✅ Show history transaction and delete transaction
    ✅ Show and delete a customer

Simple Demo

run

Future Improvements

  • A better deleting system
  • Product & transaction price

Entity Relationship Diagram (ERD)

run

Folder Structure Pattern

├── config
│   └── config.go
└── customer
│   └── customer.go
└── product
│   └── product.go
└── staff
│   └── staff.go
└── transaction
│   └── transaction.go
├── .gitignore
├── ERD.png
├── go.mod
├── go.sum
├── LICENSE
├── local.env.example
├── main.go
├── README.md
└── tokoku-script.sql

Requirements

  • Go v1.19
  • MySQL v8.x

External packages :

How to Install

  • Clone it
$ git clone [https://github.com/teamseven-dev/tokoku.git]
  • Go to directory
$ cd tokoku
  • Delete .git
$ rm -rf .git
  • Create a new database and execute sql-script.sql on it

  • Rename local.env.example to local.env and adjust the content of it as your environment settings

  • Run the project

$ go run .

Credit

Indra Darmawan

Kharisma Januar Muhammad JN

Muhammad Habibullah

BACK TO TOP