Skip to content

fredmfarias/heimdall

Repository files navigation

Heimdall

An easy way to orchestrate your Api's

What's Heimdall

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.

Features

  • imagem 1
  • imagem 2
  • imagem 3 completa.

Infrastructure

Heimdall was decomposed into six modules where three of they are principal (Config, Api, Gateway), built in around certain business domains.

Config

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.

Gateway

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.

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.

Usage

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.\

First clone the project

$ git clone --depth=1 https://github.com/getheimdall/heimdall.git heimdall
$ cd heimdall

Docker mode

Requirements

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

Developer mode

Requirements

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

Important endpoints

Notes

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.

Deploy on Heroku

Heimdall app can easily be deployed to Heroku clicking on button:

Deploy to Heroku

or executing the commands:

$ heroku login
$ heroku create
$ git push heroku master
$ heroku open

Feedback welcome

Heimdall is open source, and we appreciate your help. Feel free to contribute.

Roadmap

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:

About

An easy way to orchestrate your Api's

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published