MCPcopy Index your code
hub / github.com/douyu/jupiter-layout

github.com/douyu/jupiter-layout @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
72 symbols 227 edges 31 files 26 documented · 36%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Jupiter Project Layout

GoTest codecov Go Report Card license

Concepts

  • Support HTTP/gRPC with Protobuf
  • Single Repo and Multiple Applications
  • High Cohesion and Low Coupling
  • Dependency Injection
  • Auto Code Generation
  • Unit Test with Mock
  • E2E Test with Docker
  • Define errors in Proto
  • Define validate rules in Proto
  • Auto generate Swagger API Documentation
  • Builtin Swagger UI

Quick Start with Kubernetes

  • Deploy Juno
kubectl apply -f https://github.com/douyu/juno/releases/download/latest/install.yml
  • Wait for ready
kubectl wait --for=condition=available --timeout=600s deployment/juno-admin -n default
  • Deploy Jupiter-Layout
kubectl apply -f https://github.com/douyu/jupiter-layout/releases/download/latest/install.yml
  • Wait for ready
kubectl wait --for=condition=available --timeout=600s deployment/exampleserver -n default
  • Expose Jupiter-Layout Deployment
kubectl port-forward deployments/exampleserver 9527:9527 9528:9528 9529:9529 -n default

Test

  • HTTP
curl "http://localhost:9527/v1/helloworld.Greeter/SayHello/bob"
{"error":0,"msg":"","data":{"name":"hello bob","ageNumber":0,"sex":0,"metadata":null}}
  • GRPC
buf curl --schema api --protocol grpc --http2-prior-knowledge --data '{"name":"bob"}' http://localhost:9528/helloworld.v1.GreeterService/SayHello
{"data":{"name":"hello bob"}}

DEVELOPER Guide

Bugs and Feedback

For bug report, questions and discussions please submit an issue.

Contributing

Contributions are always welcomed!

You can start with the issues labeled with good first issue.

Contact

Extension points exported contracts — how you extend this code

ExampleInterface (Interface)
ExampleInterface ...
internal/pkg/grpc/interface_grpc.go
ExampleInterface (Interface)
ExampleInterface ...
internal/pkg/mysql/interface_mysql.go
ExampleInterface (Interface)
ExampleInterface ...
internal/pkg/redis/interface_redis.go
ExampleInterface (Interface)
ExampleInterface ...
internal/pkg/rocketmq/interface_rocketmq.go
ExampleInterface (Interface)
ExampleInterface ...
internal/pkg/resty/interface_resty.go

Core symbols most depended-on inside this repo

Info
called by 3
internal/pkg/redis/interface_redis.go
SayHello
called by 3
internal/pkg/resty/interface_resty.go
NewExample
called by 1
internal/pkg/grpc/grpc.go
NewMockExampleInterface
called by 1
internal/pkg/grpc/mock_ExampleInterface.go
NewExample
called by 1
internal/pkg/mysql/mysql.go
NewMockExampleInterface
called by 1
internal/pkg/mysql/mock_ExampleInterface.go
Migrate
called by 1
internal/pkg/mysql/interface_mysql.go
NewExample
called by 1
internal/pkg/redis/redis.go

Shape

Function 26
Struct 22
Method 19
Interface 5

Languages

Go100%

Modules by API surface

internal/app/exampleserver/service/service_test.go6 symbols
internal/app/exampleserver/service/service.go6 symbols
internal/pkg/resty/resty.go4 symbols
internal/pkg/mysql/mysql.go4 symbols
internal/pkg/rocketmq/rocketmq.go3 symbols
internal/pkg/rocketmq/mock_ExampleInterface.go3 symbols
internal/pkg/resty/mock_ExampleInterface.go3 symbols
internal/pkg/redis/redis.go3 symbols
internal/pkg/redis/mock_ExampleInterface.go3 symbols
internal/pkg/mysql/mock_ExampleInterface.go3 symbols
internal/pkg/grpc/mock_ExampleInterface.go3 symbols
internal/pkg/grpc/grpc.go3 symbols

For agents

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

⬇ download graph artifact