Old Corea-milestone centralized backend now obsolete as everything is decentralized.
Streamr Core API
RESTful API containing the backend for Streamr Core. With the Streamr Network now fully decentralized, the only remaining features in this centralized API are related to the Marketplace:
- Creating and listing products on the Streamr Marketplace
- Managing the mapping between products and streams (what streams are in what products)
The application uses the Grails web framework and runs on Java VM.
Dependencies
Tools
- Java 8
- Grails 2.5.6
- node.js ^16.0.0 (for e2e tests)
- npm
Service dependencies
Additional services are required to run this web application. The easiest way to get them all up and running (for development purposes) is to use the streamr-docker-dev tool we provide.
- MySQL
- Redis
- A Streamr Network consisting of broker nodes
Building and running
- Ensure you have the dependencies listed under Dependencies > Tools installed.
- Clone this repo
- Run
make startif you are using the recommended tool streamr-docker-dev.
- Start the backend application
make run
CI
The project uses GitHub Actions to automatically run tests for each commit to main and pull requests.
Docker
A Docker image is automatically built and pushed to DockerHub when commits are pushed to branch main.
IDE
We provide sensible default configurations for IntelliJ IDEA but project can be developed with other IDEs as well.
Testing
- To run unit tests only, use
make test-unit - To run integration tests only, use
make test-integration - To run end-to-end REST API tests, do
make test-e2e - To run unit, integration, and e2e tests use
make test
Core API
This codebase comprises two logical parts:
- API which allows users to create and manage streams, products, and other Streamr resources. The API
When you run the app with grails run-app, most changes to source code files are automatically hot reloaded into the running JVM process.
Useful resources
- Grails 2.5.6 Framework Reference Documentation (single page)
- Spock Framework Reference Documentation (single page)
- Grails Database Migration Plugin Documentation
- Spock Concurrency Tools
License
This software is open source, and dual licensed under AGPLv3 and an enterprise-friendly commercial license.