Giter Site home page Giter Site logo

angular-spring-k8s-concept's Introduction

angular-spring-k8s-concept

A concept repository which has a complete full stack application using microservices

Structure

This Repository consist of Spring-Boot Microservices and an Angular Frontend

Every Micro service (Car-Micro-Api, Authentication-Service and User-Micro-Api) will register into the Eureka server and Eureka server knows all the client applications running on each port and IP address. Eureka Server is also known as Discovery Server.

Spring Cloud Gateway is intended to sit between a requester (Angular Frontend) and a resource (APIs) that’s being requested, where it intercepts, analyzes, and modifies every request. That means you can route requests based on their context.

That's why, Angular Frontend is communicating only with Gateway, which has the all the routes and JWT Filtering.

Authentication-Service is small microservice which is communicating with User-micro-Api to register and login users

Car-Micro-Api and User-Micro-Api are nested APIs which is running on a random port and is used to redirect requests to micro-servers

Car-Micro-Api and Car-Micro-Server communicating over Kafka which is used as Messaging Queue in order to show that these microservices can also work asynchronously (It can be also replaced by RabbitMQ or any other technology)

Car-Micro-Server and User-Micro-Server is running the on specific port is which is only connection point of our MongoDB databases which makes this structure very secure.

All the information is stored in MongoDB as two different collections.

All Microservices are dockerized and ready to be deployed as docker-compose file.

Alt text

Frontend

Alt text

When you run the frontend, you are going to see this screen. You can use these credentials to check that project is running.

email:[email protected] password:test

Alt text

In registration page, you can create your own user as well.

Alt text

After the successful registration you can see the users list which are populated as test data also you can get users by persons name as well

Alt text

You can see the vehicle list and also create new vehicle within the form

Run the project

Project is intended to work as dockerized, but it is developed flexible architecture, so if you have local MongoDB and Kafka instances you can run the project also locally.

You can change this configuration at env data which is in all projects.

Dockerized

All you need is install Docker and Docker Compose and

docker-compose up

Locally

If you have installed MongoDB and Kafka locally, you can use localhost as well.

You can run angular frontend as first installing dependencies npm install and then ng serve

To run Java Spring Boot microservices, you need to install Gradle and Maven.

To Build Maven Microservices : Link To Build Gradle Microservices : Gradle

In Order to Register All Microservices in Eureka and Access them through Gateway, you need to run microservices in following order.

Order of running microservices:

Eureka-Registry Micro Service

... Other Micro Services (it does not matter which one you run)

Gateway Micro Service

angular-spring-k8s-concept's People

Contributors

cbaser avatar

Watchers

 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.