A backend social media project using Kitex + Hertz + RPC + Kubernetes,supporting functionalities for publishing posts, adding comments, liking posts, and dynamically retrieving them in a feed-like manner
Using Kitex as micro services framework and Hertz as HTTP Api gateway(both open sourced by bytedance)
Using AWS S3 as object storage
Using rabbitmq as message queue
Using Docker and Kubernetes as deployment
| Service | Description | Techniques | Protocol | service registry |
|---|---|---|---|---|
| api | Routing HTTP request to RPC Services | Gorm Kitex Hertz |
http |
CoreDNS |
| user | User Management | JWT |
proto3 |
CoreDNS |
| relation | User Following Management | - | - | CoreDNS |
| feed | Posts Stream | - | - | CoreDNS |
| favorite | Favorite Management | - | - | CoreDNS |
| comment | Comment Management | rabbitmq |
- | CoreDNS |
| publish | Posts Publish Management | AWS S3 |
- | CoreDNS |
| dal | Data Access Layer | MySQL gorm |
- | CoreDNS |


| Directory | Sub Directory | Description | Remarks |
|---|---|---|---|
| cmd | api | api gateway | |
| comment | comment service | ||
| favorite | favorite service | ||
| feed | feed service | ||
| publish | publish service | ||
| relation | relation service | ||
| user | user service | ||
| config | Config file for services and infrastructure | ||
| dal | db | Including Gorm operations and initialization | |
| pack | Packing Gorm struct into RPC struct | ||
| idl | protobuf idl file | ||
| kitex_gen | Code generated by Kitex | ||
| util | mq | Message queue used in comment service(could be expanded to other services) | |
| errno | error code | ||
| jwt | Using SHA256 and BASE64 | ||
| oss | AWS S3 oss, compatible with minio | ||
| config | Viper Reading configurations | ||
| config | Config file for each service and infrasctructures | ||
| kubernetes | Kubernetes description yaml files | ||
| script | Shell Scripts for kubernetes deployment, setting up Kind cluster and executing some needed sql operations(not creating database or tables) | ||
| kubernetes | Shell files that create and deploy kubernetes cluster, building and loading images, etc | ||
| ## 5.Logical Architecture | |||
![]() |




shell
go install github.com/swaggo/swag/cmd/swag@latest
Verify
shell
swag --version
Init Api file
shell
swag init -g cmd/api/main.goFor Mac
Shell
brew install kind
For Ubunut
Shell
sudo apt install kind
Verify Installation
shell
kind --version
3. Grant executable permission to the .sh files
shell
chmod -R +x script/*
4. Create Kubernetes Cluster
shell
kind create cluster --config ./config/kubernetes/cluster-bloomblog.yaml
Verify creating cluster
shell
kubectl cluster-info --context kind-bloomblog
You should see output like
5. Build Docker images
shell
./script/kubernetes/build_images.sh
6. Loading images into Kubernetes cluster
shell
./script/kubernetes/kind/load_images.sh
7. Deploy Infra(Mysql,Rabbitmq)
shell
./script/kubernetes/deploy-infra.sh
8. Deploy Services
shell
./script/kubernetes/deploy.sh
Start a kubernetes job
shell
kubectl apply -f config/kubernetes/infra/jobs/add_casscade.yaml
Verify Deployment
Verify Pods
shell
kubectl get pod
Verify Services
shell
kubectl get service
For Publish service, Swagger doesn't support multi files upload, youcan use this postman link
$ claude mcp add BloomBlog \
-- python -m otcore.mcp_server <graph>