Code Monkey home page Code Monkey logo

simple-douyin's Introduction

simple-douyin

简介: gorm+gin+go-micro+mysql+redis 极简版抖音,实现了基础功能,互动功能和社交功能。侧重于互动功能。

队号: 1122233

开发接口文档: https://bytedance.feishu.cn/docs/doccnKrCsU5Iac6eftnFBdsXTof#6QCRJV

项目答辩文档: https://dzs47lqpfu.feishu.cn/docx/Q48XdJaBxosEwSxCtWNc2pCLnQc

线上演示视频: https://www.bilibili.com/video/BV16D4y1G7Ca/?vd_source=140298c09a850b3c5413933606102807

项目地址: 43.138.51.56:4000


运行

  1. git clone https://github.com/anapple929/simple-douyin
  2. 进入每个微服务go mod tidy
  3. etcd 运行起来
  4. 运行每个微服务的main.go
  5. postman或前端项目测试,网关端口:4000

微服务

微服务 对网关暴露的接口 为其他微服务提供的接口
user 注册
登录
根据用户id查询用户信息
通过批量用户id查询批量user
修改关注数
修改粉丝数
修改发布数
修改获赞数
修改点赞数
publish 视频发布
视频列表
通过批量视频id查询视频信息
修改点赞数
修改评论数
feed 视频流
favorite 点赞
取消点赞
点赞列表
根据 用户id 和 视频id 判断是否有点赞关系
根据 用户id 视频id 点赞关系 构成的结构体,批量查询点赞关系
comment 评论
删除评论
评论列表
relation 关注
取消关注
关注列表
粉丝列表
好友列表
根据 用户id 和 用户id 判断是否有关注关系
根据 用户id1 用户id2 关注关系 构成的结构体,批量查询关注关系
message 聊天记录
发消息
根据用户id1和用户id2,查找二人聊天最新一条消息实体

mysql

拥有权限的微服务
user user
comment comment
favorite favorite
relation relation
video publish,feed
message message

redis

热点数据

  • db0: userid -> user
  • db1: videoid -> video
  • db2: userid+videoid -> bool 是否点赞

实现的接口

基础接口,互动接口,社交接口

  • /douyin/user/login/

  • /douyin/user/register/

  • /douyin/user/

  • /douyin/publish/action/

  • /douyin/publish/list/

  • /douyin/feed/

  • /douyin/favorite/action/

  • /douyin/favorite/list/

  • /douyin/comment/action/

  • /douyin/comment/list/

  • /douyin/relation/action/

  • /douyin/relation/follow/list/

  • /douyin/relation/follower/list/

  • /douyin/relation/friend/list/

  • /douyin/message/chat/

  • /douyin/message/action/

simple-douyin's People

Contributors

anapple929 avatar zhudaoren avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.