https://github.com/douyu/jupiter-layout
Jupiter Project Layout
https://github.com/douyu/jupiter-layout
buf douyu framework go golang golangci-lint jupiter layout mit-license mockery wire
Last synced: 6 months ago
JSON representation
Jupiter Project Layout
- Host: GitHub
- URL: https://github.com/douyu/jupiter-layout
- Owner: douyu
- License: apache-2.0
- Created: 2022-05-11T03:34:51.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-05T03:24:15.000Z (over 1 year ago)
- Last Synced: 2025-03-27T12:47:01.022Z (7 months ago)
- Topics: buf, douyu, framework, go, golang, golangci-lint, jupiter, layout, mit-license, mockery, wire
- Language: Go
- Homepage:
- Size: 22 MB
- Stars: 37
- Watchers: 5
- Forks: 7
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[Jupiter](https://github.com/douyu/jupiter) Project Layout
===[](https://github.com/douyu/jupiter-layout/actions)
[](https://codecov.io/gh/douyu/jupiter-layout)
[](https://goreportcard.com/report/github.com/douyu/jupiter-layout)
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 UIQuick Start with Kubernetes
---* Deploy Juno
```bash
kubectl apply -f https://github.com/douyu/juno/releases/download/latest/install.yml
```* Wait for ready
```bash
kubectl wait --for=condition=available --timeout=600s deployment/juno-admin -n default
```* Deploy Jupiter-Layout
```bash
kubectl apply -f https://github.com/douyu/jupiter-layout/releases/download/latest/install.yml
```* Wait for ready
```bash
kubectl wait --for=condition=available --timeout=600s deployment/exampleserver -n default
```* Expose Jupiter-Layout Deployment
```bash
kubectl port-forward deployments/exampleserver 9527:9527 9528:9528 9529:9529 -n default
```Test
---* HTTP
```bash
curl "http://localhost:9527/v1/helloworld.Greeter/SayHello/bob"
``````json
{"error":0,"msg":"","data":{"name":"hello bob","ageNumber":0,"sex":0,"metadata":null}}
```* GRPC
```bash
buf curl --schema api --protocol grpc --http2-prior-knowledge --data '{"name":"bob"}' http://localhost:9528/helloworld.v1.GreeterService/SayHello
``````json
{"data":{"name":"hello bob"}}
```DEVELOPER Guide
---* [DEVELOPER.md](DEVELOPER.md)
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
---* [Wechat Group](https://jupiter.douyu.com/join/#%E5%BE%AE%E4%BF%A1)