Coder Social home page Coder Social logo

markoarsenovic / springcloudstarter Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 1.48 MB

Spring Cloud Native Starter Project - showcase of general architecture setup using Spring Cloud, Angular, Docker, Kubernetes, AWS and etc..

License: MIT License

Dockerfile 0.79% Java 31.10% JavaScript 0.50% TypeScript 48.55% HTML 12.77% SCSS 6.29%
spring-cloud kubernetes docker spring-boot angular cloud-native cloud-architecture microservice spring-microservices cloud-native-applications

springcloudstarter's Introduction

PanonIT Spring Cloud Starter Project

Home UI

Microservices UI

Users UI

A simple Spring Cloud Starter Project created with basic functionalities ready to use in every microservices based project.
It provides ready to use Config Server, Service Discovery service, Central API Gateway, IAM Service and Client Application.

Components

Client Application

  • Angular 10 single-page web application provides a single interface to the whole backend with modules mentioned below. Client application provides user-friendly UI which helps users to easier usage of the backend functionalities.

IAM Microservice (Identity and Access Management)

  • IAM microservice provides functionalities for users to register, authenticate, and see content based on permissions. Admin user has full permissions and he can execute every operation in the system, he can change permissions for other users.

  • IAM microservice connects to the Postgres database where all user credentials, services, roles, and permissions are stored. Each microservice communicates with this service due to the need to evaluate the user's permission for each endpoint.

Core Microservices:

  • Config Server - Microservice responsible for the centralized configuration of the whole system based on the git configuration repository.
  • Consul Service Discovery - Service Discovery Server which is used as a name server for all microservices, responsible for service registry and discovery.
  • API Gateway : Spring Cloud Gateway hides the complexity of the whole system and serves as a proxy for communication with individual microservices. Also provides request filtering, performs checks if the user is authenticated. The rest of the security is handled in the targeted microservice.
Services Container Port Host Port
Consul Service Registry 8500 8500
Config Server 8888 8888
Web API Gateway 8765 8765
IAM Service 8010 8010
Hello World Service 8020 8020
Hello World Service-1 8035 8035
Example Service 8030 8030
Databases Container Port Host Port
Postgres 5432 5000
Rabbit (Spring Bus) 5672 5672
Databases Credentials UI Access
Postgres postgres / postgres /
Rabbit (Spring Bus) rabbitmq / rabbitmq localhost:15672
  • Spring Bus - provides functionality to refresh configuration for services without restarting, to refresh you need to send POST request to
    {API-Gateway}/{MicroserviceRoute}/actuator/bus-refresh

Technology

Technology Stack used for development:

  • Spring Boot - Spring Boot is a project built on the top of the Spring Framework. It provides a simpler and faster way to set up, configure, and run simple or web-based applications.
  • Spring Cloud - Spring Cloud (Hoxton.SR8 version) provides tools for developers to quickly build some of the common patters in distributed systems (e.g. configuration management, service discovery, routing,..). Using Spring Cloud developers can quickly stand up services and applications that implement those patterns.
  • RabbitMQ - RabbitMQ is lightweight and easy to deploy on premises and in the cloud. It supports multiple messaging protocols. RabbitMQ can be deployed in distributed and federated configurations to meet high-scale, high-availability requirements.
  • PostgreSQL-11 - PostgreSQL is a powerful, open source object-relational database system.
  • Angular 10 - Angular is a platform and framework for building single-page client applications using HTML and TypeScript. It implements core and optional functionality as a set of TypeScript libraries that you import into your apps.

Installation

In order to run this starter application locally you need to have Docker and Docker-Compose installed on your machine.

In order to run the Cloud Starter development application, you need to provide in host environment variables your GitHub repo credentials for config server to pull configuration for microservices.

  • GITHUB_EMAIL
  • GITHUB_PASSWORD
    Also, you can replace env placeholders with credentials in docker-compose file.

After docker is installed and you configured credentials for Config Server, you can start everything up by executing the following commands:

git clone https://github.com/MarkoArsenovic/SpringCloudStarter.git
cd SpringCloudStarter/source
docker-compose up --build

In order to stop development application and all related containers, press Ctrl + C command and after that execute following command in cmd:

docker-compose down

For the development IDEs we use Spring Tools 4 and Visual Studio Code.

Contributors

springcloudstarter's People

Contributors

markoarsenovic avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.