https://github.com/dtg-lucifer/go-ecommerce-server
Demo ecommerce backend with full fledged authentication with mysql and jwt
https://github.com/dtg-lucifer/go-ecommerce-server
backend ecommerce golang jwt mux-router
Last synced: over 1 year ago
JSON representation
Demo ecommerce backend with full fledged authentication with mysql and jwt
- Host: GitHub
- URL: https://github.com/dtg-lucifer/go-ecommerce-server
- Owner: dtg-lucifer
- Created: 2024-10-27T15:41:53.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-21T15:02:46.000Z (over 1 year ago)
- Last Synced: 2025-02-21T16:22:27.305Z (over 1 year ago)
- Topics: backend, ecommerce, golang, jwt, mux-router
- Language: Go
- Homepage:
- Size: 12.7 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GO Ecommerce Server
This is a pretty simple backend for an Ecommerce site. This is made with Go lang and built with **Std** library and **Mux** router.
Note: This repository is a good starting point for anyone who wants to transition from a library based language like Node.js or Python to something barebon like Go or Rust, where they dont need anything more that the **std** library.
---
## Features
- Full Fledged token based authentication (JWT)
- Full CRUD for Products and User accounts
- Mysql database handling with raw SQL queries
- Migration Sql scripts
- Followed by the best architecture from the trending projects.
---
## Endpoints
#### Users
#### Products
GET - /api/v1/products (Get all products)
POST - /api/v1/products (create product, NOTE - Requires the JWT token to be passed as well in the headers)
```bash
curl -X POST http://localhost:8080/api/v1/products \
-H "Content-Type: application/json" \
-H "Authorization: JWT_TOKEN" \
-d '{"name": "Demo", "description": "Demo description for the demo product", "image": "", "price": 69.00, "quantity": 5 }
```
---
~ Piush - Copyright 2025