Hi, folks! this is a backend application for laundry bussines who can make the owner more easier to manage. In this app I using golang with fiber framework to build API service and gorm to get data from Postgres. The owner will be have admin account who have previledge to all endpoint and his employee only doing add transaction. I use JWT token and session to create authorization and authentication.
You can pull the latest Docker image for GoLaundry from Docker Hub:
docker pull kymmsenpai/golaundry:latest
- Clone the Repository
git clone https://github.com/dzakimaulana/golaundry.git
- Docker Compose
docker compose up
Will be saved in a cookie
with name my-session
Method | Endpoint | Admin |
---|---|---|
POST | /api/customer/add |
YES |
GET | /api/customer/get/:id |
NO |
GET | /api/customer/get |
NO |
Method | Endpoint | Admin |
---|---|---|
POST | /api/item/add |
YES |
GET | /api/item/get/:id |
NO |
GET | /api/item/get |
NO |
UPDATE | /api/item/update |
YES |
DELETE | /api/item/delete |
YES |
Method | Endpoint | Admin |
---|---|---|
POST | /api/transaction/add |
NO |
GET | /api/transaction/get/:id |
NO |
GET | /api/transaction/get |
NO |
Method | Endpoint | Admin |
---|---|---|
POST | /api/item/login |
YES |
POST | /api/item/create-user |
NO |
GET | /api/item/get |
NO |
GET | /api/item/get/:id |
YES |
PUT | /api/item/reset-password |
YES |
POST | /api/item/reset-password |
YES |
In my project development practices, the adoption of the Repository Pattern plays a pivotal role in enhancing the modularity, maintainability, and testability of our codebase.
golaundry/
├───.github
│ └───workflows
├───bin
├───cmd
│ └───golaundry
│
├───internal
│ ├───customers
│ ├───items
│ ├───transactions
│ ├───transitems
│ └───users
├───pkg
│ ├───database
│ ├───middlewares
│ ├───models
│ ├───routes
│ └───utils
└───servers.json