Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hirofumi/protoroutes
Protocol Buffers based RPC between Play Framework and Scala.js
https://github.com/hirofumi/protoroutes
playframework protocol-buffers sbt-plugin scala scalajs scalapb
Last synced: 29 days ago
JSON representation
Protocol Buffers based RPC between Play Framework and Scala.js
- Host: GitHub
- URL: https://github.com/hirofumi/protoroutes
- Owner: hirofumi
- Created: 2017-12-17T15:12:41.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-07T17:42:13.000Z (almost 2 years ago)
- Last Synced: 2024-09-27T21:05:22.988Z (about 1 month ago)
- Topics: playframework, protocol-buffers, sbt-plugin, scala, scalajs, scalapb
- Language: Scala
- Homepage:
- Size: 135 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# protoroutes
[![Build Status](https://travis-ci.org/hirofumi/protoroutes.svg?branch=master)](https://travis-ci.org/hirofumi/protoroutes)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.hirofumi/sbt-protoroutes/badge.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.github.hirofumi%22%20protoroutes)Protoroutes is an sbt plugin which can generate the following from .proto file.
* Play Framework's `Router` which handles Protocol Buffers and JSON requests
* Scala.js client which communicates with the `Router````
++---------------++
|| || protoroutes +-----------------+
|| || =============> | Scala.js client |
|| || +-----------------+
|| || ^ +-----------------+
|| || | +----------------->| REST API client |
|| || | | +-----------------+
|| || REST API (PB) \ / REST API (JSON)
|| service.proto || |
|| || v
|| || protoroutes +----------------+
|| || =============> | Play Router |
|| || +----------------+
|| || | Your own |
|| || | implementation |
|| || | of `service` |
|| || ScalaPB +----------------+
|| || =============> | gRPC Interface |
|| || +----------------+
++---------------++ ^
gRPC | +-----------------+
+------------------>| gRPC client |
+-----------------+
```The idea of protoroutes is based on [btlines/grpcgateway](https://github.com/btlines/grpcgateway).
## Examples
* [a fork](https://github.com/hirofumi/Full-Stack-Scala-Starter/tree/protoroutes) of [Full-Stack-Scala-Starter](https://github.com/Algomancer/Full-Stack-Scala-Starter)
* [scripted tests](./modules/plugin/src/sbt-test/sbt-protoroutes)