This example demonstrates the following features:
- internal communication (between microservices) using multiplexed endpoints ;
- statically typed Scala.js and JVM communication ;
- assets fetched by the Scala.js client can be cached for an infinite duration ;
- HATEOAS ;
- Human-readable generated documentation.
The application allows users to monitor meters (like electricity meter, for instance). Users can register meters, report their evolution over time, and visualize these data.
The project is broken down into the following sub-projects:
+-----------------+ +--------------------+ +----------+
| public-endpoints| | commands-endpoints +-----+ commands |
+----+--------+---+ +------+-----------+-+ +----------+
/ \ / \
/ \ / \
+----+-------+ +-+-------+-----+ \
| web-client | | public-server | \
+------------+ +--------+------+ \
\ \
\ \
+------+------------+ +-+-------+
| queries-endpoints +-----+ queries |
+-------------------+ +---------+
public-serverprovides the public HTTP server ;commandsandqueriesare internal microservices used by the public server ;web-clientis a web based client for the service.
Each sub-project named xxx-endpoints provides a description of HTTP API
implemented by the sub-project xxx.