A simple hertz server that provides user, video, interactive, and social backend services for tiktok app.
Download ffmpeg package && add ffmpeg to system path or user path
# Install other services
docker-compose up
go build -o offer_tiktok && ./offer_tiktok
# 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
.
├── 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 | 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