Go Shop REST API

Lightweight e-commerce backend written in Go using Gin and GORM. It delivers JWT-based authentication, secure user lifecycle (register, login, password change, delete), product CRUD with category linkage, cart item management (add, edit, remove, list), and order creation from cart with cancellation and cleanup workflows. MySQL is used as the persistence layer with UUID-based identifiers, structured models, and auto-migrations. The code is organized into clear layers (configs, middleware, models, controllers, routes) for maintainability and extension.

Technologies Used

GoREST APIGinGORMMySQLJWTE-commerce

Key Features

  • JWT authentication & authorization
  • User registration, deletion & password change
  • Product CRUD with category support
  • Cart item add / edit / delete / list
  • Convert cart to order transaction
  • Order listing, detail & cancellation
  • UUID-based entity identifiers
  • Auto database migration
  • Structured error responses
  • Environment-based DB configuration (.env)

Technical Stack

Go
Gin
GORM (MySQL driver)
jwt (appleboy/gin-jwt)
go-playground/validator
godotenv
UUID (satori/go.uuid)