An easy way to orchestrate your Api's
This project is an easy way to use an API Orchestrator to your project. A simple way to manipulate request/response and uncouple your business domain, providing more flexibilities and personalize your API.
- imagem 1
- imagem 2
- imagem 3 completa.
Heimdall was decomposed into six modules where three of they are principal (Config, Api, Gateway), built in around certain business domains.
Spring Cloud Config is horizontally scalable centralized configuration service for distributed systems. It uses a pluggable repository layer that currently supports local storage, Git, and Subversion.
In this project, We use native profile
, which simply loads config files from the local classpath. You can see shared
directory in Config service resources. Now, when Heimdall-api requests it's configuration, Config service responses with shared/application-api.yml
.
In this project we built our algorithm over the Netflix Zuul. We put some steroids on the Zuul Filters, add some criterias to make the match routes more rigid (like the HTTP Verb on the match). And to manager the request/response and Zuul Filters flow we put a message broker (RabbitMQ) to communicate with the API.
To provide a easy way to manage the gateway we put an Api to make more easy add new routes, interceptors, rate limit and others things to manipulate the gateway at runtime.
Keep in mind, that you are going to start 3 Spring Boot applications, 1 Database instance and RabbitMq. Make sure you have 4 Gb
RAM available on your machine.\
$ git clone --depth=1 https://github.com/getheimdall/heimdall.git heimdall
$ cd heimdall
- Docker https://www.docker.com/
- Docker Compose https://docs.docker.com/compose/
If you'd like to build images yourself (with some changes in the code, for example), you have to clone all repository and build artifacts with maven. Then, run:
$ docker-compose -f docker-compose.yml -f docker-compose.dev.yml up
docker-compose.dev.yml
inherits docker-compose.yml
with additional possibility to build images locally and expose all containers ports for convenient development.
Access Heimdal on: http://localhost:3000
- Nodejs https://nodejs.org/
- Maven https://maven.apache.org/
- Java 8 http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
- PostgresSQL https://www.postgresql.org/
- Erlang http://www.erlang.org/downloads
- RabbitMQ https://www.rabbitmq.com/download.html
- Redis https://redis.io/download or https://github.com/MicrosoftArchive/redis/releases
Open your favorite Terminal and run these commands.
First tab to start config:
$ cd /heimdall-config
$ mvn spring-boot:run
Second tab to start gateway (require CONFIG alredy started):
$ cd /heimdall-gateway
$ mvn spring-boot:run
Third tab to start api (require CONFIG alredy started):
$ cd /heimdall-api
$ mvn spring-boot:run
(optional) Fourth tab to start front-end (require API alredy started)
With Yarn
$ cd /heimdall-frontend
$ yarn
$ yarn run
Withou Yarn
$ cd /heimdall-frontend
$ npm install
$ npm run start
- http://localhost:8080 - Gateway
- http://localhost:8888 - Config
- http://localhost:9090 - Api
- http://localhost:3000 - frontend
All Spring Boot applications require already running Config Server for startup. But we can start all containers simultaneously because of depends_on
docker-compose option.
Heimdall app can easily be deployed to Heroku clicking on button:
or executing the commands:
$ heroku login
$ heroku create
$ git push heroku master
$ heroku open
Heimdall is open source, and we appreciate your help. Feel free to contribute.
Only Heimdall subteam members should create new issues in this repo. If you believe a project should be added within the tracker, please leave a comment on the appropriate "parent" issue, i.e. one of the issues linked below. And in general, feel free to use comments to ask questions, pitch ideas, or mention updates that need to be made!
There are issues for each of the vision statements: