Skip to content

kpole/tiktok

Repository files navigation

offer_tiktok

A simple hertz server that provides user, video, interactive, and social backend services for tiktok app.

How to run

1. Local environment

Download ffmpeg package && add ffmpeg to system path or user path

# Install other services
docker-compose up

go build -o offer_tiktok && ./offer_tiktok

2 Docker environment

# Compile in docker image && Packaged with ffmpeg
docker build -t tiktok:latest -f ./docker-build/Dockerfile .

# Start all service
cd docker-build 
docker-compose up -d

Description

Technology Architecture

arch image

Catalog Introduce

.
├── biz              #  Business logic
│   ├── dal          #  Interaction with the database                             
│   ├── handler      #  Handle request and response
│   ├── model        #  Model definition
│   ├── mw           #  Middleware
│   ├── router       
│   └── service      #  Service implementation
├── docker-build     #  dockerfile 
├── idl              #  Interface definition file
├── pkg 
│   ├── configs      #  Component config
│   ├── constants    #  Common constant
│   ├── data         #  Data Persistence Directory
│   ├── errno        
│   └── utils        
├── docker-compose.yml 
├── Makefile         #  Command to generate code by IDL 
├── hz_gen.sh
├── go.mod
├── go.sum
├── README.md
├── main.go
├── router_gen.go
└── router.go

Service Introduce

Service Function
user User register / Get user information
relation Follow / Get follow list / Get friend (mutual follow) list
publish Publish video
feed Get the last few of all videos as a feed stream
favorite Like the video
comment Comment on a video
message Send message with friends / Get message list with friends

maintained by: leeeezp Kpole zztaki BourneHUST meyoung512

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages