Skip to content

DawnSiro/TikTok

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5803218 · Sep 18, 2023

History

4 Commits
Sep 4, 2023
Sep 17, 2023
Sep 17, 2023
Sep 17, 2023
Sep 17, 2023
Sep 17, 2023
Sep 17, 2023
Sep 4, 2023
Sep 17, 2023
Sep 17, 2023

Repository files navigation

TikTok

引入

极简抖音项目微服务版本(按照领域划分模块,其中 Video 接口过多故再拆一个 Comment 模块出来)

服务名 主要功能 技术栈 协议 路径 IDL 文件
api HTTP 接口 kitex/hertz http cmd/api idl/api.thrift
comment 评论模块逻辑 kitex/gorm thrift cmd/comment idl/comment.thrift
message 消息模块逻辑 kitex/gorm thrift cmd/message idl/message.thrift
video 视频模块逻辑 kitex/gorm thrift cmd/publish idl/publish.thrift
user 用户模块逻辑 kitex/gorm thrift cmd/user idl/user.thrift

项目目录介绍

主要功能
handler HTTP handler
service business logic
rpc RPC call logic
dal DB operation
pack data pack
pkg/mw RPC middleware
pkg/consts constants
pkg/errno customized error number
pkg/configs SQL and Tracing configs

快速开始

配置基本运行环境

使用 docker-compose 拉取环境的镜像

docker-compose up

运行 Comment RPC 服务

cd cmd/comment
sh build.sh
sh output/bootstrap.sh

运行 Message RPC 服务

cd cmd/message
sh build.sh
sh output/bootstrap.sh

运行 Video RPC 服务

cd cmd/video
sh build.sh
sh output/bootstrap.sh

Run User RPC Server

cd cmd/user
sh build.sh
sh output/bootstrap.sh

运行 HTTP API 服务

cd cmd/api
go run .

Jaeger

Visit http://127.0.0.1:16686/ on browser

Grafana

Visit http://127.0.0.1:3000/ on browser

About

TikTok 后端

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published