A simple short video software microservice backend with basic media stream functions and social functions support, made by Toktik-Team in The 5th Bytedance Youth Training Camp. |
---|
English | 简体中文
- constant
- biz - Business logic related constants
- config
- env.go - Environment variables
- service.go - Service name and port
- idl
- auth.proto - RPC definition of auth service
- comment.proto - RPC definition of comment service
- favorite.proto - RPC definition of favorite service
- feed.proto - RPC definition of feed service
- publish.proto - RPC definition of publish service
- relation.proto - RPC definition of relation service
- user.proto - RPC definition of user service
- wechat.proto - RPC definition of chat service
- kitex_gen - Generated code by kitex
- logging - Logging middleware
- manifests-dev - Kubernetes manifests for development
- repo - Database schema and generated code by gorm gen
- service
- storage - Storage middleware, s3 and local storage supported
- test
- Run the following command to install the required tools:
apt-get update && \
apt-get install -yq git ffmpeg libavcodec-dev libavutil-dev libavformat-dev libswscale-dev && \
apt-get clean && \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false && \
rm -rf /var/lib/apt/lists/*
brew install protobuf
go install github.com/cloudwego/kitex/tool/cmd/kitex@latest
- Run
./build-all.sh
in your Linux environment to compile all services.
- Go
./constant/config/env.go
to see the environment variables. - The following software/service is required to run the project:
- PostgreSQL
- Redis
- HashiCorp Consul
- FFMPEG
- The following software/service is optional:
- A web server, such as Nginx.
- Amazon S3, or local storage.
- OpenTelemetry
- Jaeger
- Victoriametrics
- Grafana
- Run
start.sh --service <service_name>
to start a service. - See
./service
to get the service name.
- Run
./unit-test.sh
Compile and run the following files:
./test/e2e/base_api_test.go
for basic API test./test/e2e/interact_api_test.go
for interaction API test./test/e2e/social_api_test.go
for social API test
- Please following the HowToAddServices to create your own service.
- Create a new branch and make your changes.
- Create a pull request to the
main
branch. - Wait for review and merge.
Toktik is licensed under the MIT License.