Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oguzhantasimaz/shopping-cart-rest-api
Shopping Cart Rest API with Golang
https://github.com/oguzhantasimaz/shopping-cart-rest-api
clean-architecture clean-code example go golang rest rest-api shopping-cart
Last synced: 10 days ago
JSON representation
Shopping Cart Rest API with Golang
- Host: GitHub
- URL: https://github.com/oguzhantasimaz/shopping-cart-rest-api
- Owner: oguzhantasimaz
- Created: 2022-03-29T22:08:42.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-04-11T07:01:16.000Z (over 2 years ago)
- Last Synced: 2024-06-19T04:25:17.417Z (5 months ago)
- Topics: clean-architecture, clean-code, example, go, golang, rest, rest-api, shopping-cart
- Language: Go
- Homepage:
- Size: 223 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Shopping-Cart-REST-API
Shopping Cart Rest API with Golang## Introduction
This is E-commerce API app implementations and written in Golang using gin web framework.
This is not a finished project by any means, but it is a starting point for learning and understanding the concepts.
I tried to implement clean architecture and code in a way that it is easy to understand and maintain.## Features
- Authentication / Authorization
- JWT middleware for authentication
- SHA512 hashing and base64 encoding for password
- GORM ORM for database
- CRUD operations on products, carts, orders, categories, users
- Orders, users may place an order
- Graceful shutdown## Project structure:
- CMD: Main application file
- Config: Configuration files
- Repositories: CRUD operations handling
- Models: Mvc, it is our domain data.
- Controllers: This is the Model-View-Controller, they receive the request from the user, they ask the services to perform an action for them on the database.
- Services: contains some business logic for each model, and for authorization
- Middlewares: it contains middlewares(golang functions) that are triggered before the controller action, for example, a middleware which
reads the request looking for the Jwt token and trying to authenticate the user before forwarding the request to the corresponding controller
action
- PKG: it contains the packages that are used by the application## TODO:
- [ ] Fix known bugs
- [ ] Heroku deployment
- [ ] GithubActions (CI/CD) for deployment
- [ ] Swagger Integration
- [ ] Unit Tests
- [ ] Integration Tests
- [ ] Create Bulk Category with CSV
- [ ] Pagination
- [ ] Add query params to get all products' endpoint for filtering