Skip to content

Latest commit

 

History

History
95 lines (86 loc) · 2.29 KB

README.md

File metadata and controls

95 lines (86 loc) · 2.29 KB

Book Shop

Introduction

An e-commerce demo built with Kitex and Hertz.

Service Name Usage Framework protocol Path IDL
facade HTTP interface kitex/hertz http app/facade
cwg.bookshop.user user service kitex/gorm thrift app/user idl/user.thrift
cwg.bookshop.order order service kitex/gorm thrift app/order idl/order.thrift
cwg.bookshop.item item service kitex/gorm thrift app/item idl/item.thrift
  • components used
    • ElasticSearch
    • Kibana
    • MySQL
    • Redis
    • ETCD
  • Hertz middlewares used

Architecture

Technology Architecture

Service Calling Relations

Quick Start

Setup Environment

$ make start

Run Services

$ make user
$ make item
$ make order
$ make facade

Stop Environment

$ make stop

Get Documents & Run Test

browse to http://localhost:8080/swagger/index.html

Examples

pprof

$ go tool pprof -http=:1234 http://localhost:8080/debug/pprof/heap

User Service

User Register

User Login

Shop Login

JWT Auth

Item Service

Add Item

Edit Item

Delete Item

Offline Item

Online Item

Get Item

List Items

Batch Get Items (2C Interface)

Search Items (2C Interface)

Order Service

Create Order

Cancel Order

List Orders

Get Order