MCPcopy Index your code
hub / github.com/Toktik-Team/toktik

github.com/Toktik-Team/toktik @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
2,907 symbols 5,895 edges 123 files 187 documented · 6%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Toktik

logo 集成 ChatGPT 的短视频微服务应用,使用 Kitex 和 Hertz 构建,由 Toktik-Team 开发,作为第五届字节跳动青训营大作业。

English | 简体中文

第五届字节跳动青训营大作业汇报文档: https://qrggpk56b9.feishu.cn/docx/Djwpdm8oZo3JyRx0JwkcZhRDnVd

Recommend

现在推荐使用 GuGoTik!

TokTik 目前不再维护且尚未有维护计划,推荐查看 GuGoTik。GuGoTik 秉承 TokTik 的核心思想并扬长避短,匠心改进了几乎所有的模块并加入了更丰富的功能。为了让您得到更好的实验体验,请移玉步到 GuGoTik

如果你喜欢我们的项目的话,请给我们 Stars ~

Awards

获得 第五届字节跳动青训营 码如磐石奖(一等奖) 奖项.

示例

此处 下载抖声 app 后, 填入以下地址来体验 demo。

https://toktik.xctra.cn/

项目结构

准备环境

本项目不支持 Windows 操作系统,见 Kitex

  • Linux / MacOS
  • Go
  • FFmpeg
  • PostgreSQL
  • Redis
  • OpenTelemetry Collector

推荐使用以下可观测性基础设施:

  • Jaeger All in one
  • Victoria Metrics
  • Grafana

构建

执行 ./build-all.sh 一次性构建所有服务.

配置

constant/config/env.go

运行

  • 执行 start.sh --service <service_name> 启动任一服务.
  • service_name 可以是 ./service 目录下任一子目录名称.

测试

单元测试

运行 ./unit-test.sh

端到端测试

执行 go test toktik/test/e2e -tags="e2e"

如何贡献

  1. 请遵循 HowToAddServices 文件说明以创建新的服务。
  2. 创建一个新的分支并做出更改。
  3. 提交一个 Pull Request 到 main 分支。
  4. 等待 review 和合并。

贡献者

协议

Toktik is licensed under the MIT License.

Extension points exported contracts — how you extend this code

Querier (Interface)
Querier Dynamic SQL [4 implementers]
repo/gen/gormGen.go
Option (Interface)
Option opts for opentelemetry tracer provider
service/web/mw/auth.go
Client (Interface)
Client is designed to provide IDL-compatible methods with call-option parameter for kitex framework.
kitex_gen/douyin/auth/authservice/client.go
HttpRequestOptClosure (FuncType)
(no doc)
rpc/http.go
Client (Interface)
Client is designed to provide IDL-compatible methods with call-option parameter for kitex framework.
kitex_gen/douyin/wechat/wechatservice/client.go
Client (Interface)
Client is designed to provide IDL-compatible methods with call-option parameter for kitex framework.
kitex_gen/douyin/user/userservice/client.go
Client (Interface)
Client is designed to provide IDL-compatible methods with call-option parameter for kitex framework.
kitex_gen/douyin/relation/relationservice/client.go
Client (Interface)
Client is designed to provide IDL-compatible methods with call-option parameter for kitex framework.
kitex_gen/douyin/feed/feedservice/client.go

Core symbols most depended-on inside this repo

WithFields
called by 193
constant/biz/gwerror.go
LaunchError
called by 52
constant/biz/gwerror.go
WithCause
called by 36
constant/biz/gwerror.go
FastRead
called by 15
kitex_gen/douyin/relation/relationservice/relationservice.go
FastWrite
called by 15
kitex_gen/douyin/relation/relationservice/relationservice.go
Size
called by 15
kitex_gen/douyin/relation/relationservice/relationservice.go
Marshal
called by 15
kitex_gen/douyin/relation/relationservice/relationservice.go
Unmarshal
called by 15
kitex_gen/douyin/relation/relationservice/relationservice.go

Shape

Method 2,395
Function 289
Struct 193
Interface 26
FuncType 2
TypeAlias 2

Languages

Go100%

Modules by API surface

kitex_gen/douyin/relation/relationservice/relationservice.go172 symbols
kitex_gen/douyin/relation/relation.pb.fast.go132 symbols
kitex_gen/douyin/favorite/favoriteservice/favoriteservice.go130 symbols
kitex_gen/douyin/relation/relation.pb.go127 symbols
kitex_gen/douyin/favorite/favorite.pb.fast.go114 symbols
repo/videos.gen.go113 symbols
repo/users.gen.go113 symbols
repo/user_tokens.gen.go113 symbols
repo/comments.gen.go113 symbols
repo/relations.gen.go111 symbols
repo/favorites.gen.go111 symbols
kitex_gen/douyin/favorite/favorite.pb.go109 symbols

For agents

$ claude mcp add toktik \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page