A backend-focused RESTful web service built with Go, Gin, layered architecture and in-memory business logic.
The project demonstrates CRUD operations, service-layer separation, handlers, models, utility functions, unit tests and a simple HTML frontend for different roles.
- REST API built with Gin
- CRUD for users
- CRUD for products
- CRUD for categories
- CRUD for orders
- Order status updates
- Courier assignment
- Chat messages inside orders
- Layered architecture
- In-memory data storage
- Unit tests
- Simple frontend pages for admin, client and courier flows
- Go
- Gin
- REST API
- In-memory storage
- HTML/CSS frontend
- Unit testing
volt-service/
├── frontend/
│ ├── admin.html
│ ├── client.html
│ ├── courier.html
│ ├── login.html
│ └── register.html
├── handlers/
├── models/
├── services/
├── tests/
├── utils/
├── main.go
├── go.mod
├── go.sum
└── README.md
API Endpoints
Users
POST /users
GET /users
GET /users/:id
DELETE /users/:id
Products
POST /products
GET /products
GET /products/:id
GET /products/category/:categoryID
PUT /products
DELETE /products/:id
Categories
POST /categories
GET /categories
GET /categories/:id
PUT /categories
DELETE /categories/:id
Orders
POST /orders
GET /orders
GET /orders/:id
PUT /orders/:id/status
PUT /orders/:id/assign
PUT /orders/:id/chat
GET /orders/:id/chat
DELETE /orders/:id
How to Run
Install dependencies:
go mod tidy
Run the server:
go run main.go
The API runs on:
http://localhost:8080
How to Run Tests
go test ./...
What I Practiced
Designing REST API routes
Separating handlers, services and models
Implementing CRUD operations
Working with in-memory storage
Adding business logic for orders and couriers
Writing unit tests
Structuring a Go backend project
Status
Academic backend project focused on Go, REST API design, CRUD operations, service-layer architecture and unit testing.