Git Product home page Git Product logo

regedit-backend's Introduction

Build Status Docker hub Docker hub Quality Gate Status

RegEdit Backend Service

A microservices architecture system with central authentication. Main components:

  1. RegEdit API gateway service: A Eureka server that will act as a central authentication unit, ZUUL proxy server for redirection.
  2. RegEdit service: This will act as a eureka client, which receive a request from gateway service.

1 RegEdit API Gateway Service (ZUUL+Eureka+JWT)

A EUREKA server that acts as a central authentication unit, ZUUL proxy server for redirection..

What you’ll need

In order to build the application, your environment should fulfill the following requirements:

  • A favorite text editor or IDE;
  • JDK 11+;
  • Maven 3.0+;
  • Mysql Server 8.0+ or PostgreSQL 9.6+ ;

How to build

Download and unzip the source code in your developing folder RegEditAPI_PATH.

Before building the application you must create and popolulate the RegEdit database.

You can create a MySQL database using the script regedit-api-gateway-create-mysql.sql stored in the RegEditAPI_PATH/db folder. Also you can create a PostgreSQL database using the script regedit-api-gateway-create-postgres.sql stored in the RegEditAPI_PATH/db folder.

Then yo can load the metadata and the test data, using the script regedit-api-gateway-init.sql stored in the RegEditAPI_PATH/db folder.

The script will populate the USER/ROLES tables with the user:

Username: [email protected]
Password: istat

As a first step, configure the database connection in the 'application.yml' file, located in the path [RegEditAPI_PATH]/src/main/resources:

Postgres connection

spring.datasource.url=jdbc:postgresql://localhost:5432/postgres?currentSchema=regedit_gateway&charset=UTF-8
spring.datasource.username=db_username
spring.datasource.password=db_password
spring.datasource.driverClassName=org.postgresql.Driver

MySQL connection

spring.datasource.url=jdbc:mysql://localhost:3306/regedit_gateway?useSSL=false&useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
spring.datasource.username=db_username
spring.datasource.password=db_password
spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver

Now you can perform your first build of the application using Maven comand:

[RegEditAPI_PATH]> mvn package

If the build process ends successfully, you are ready to run the application: The application is built using the open source framework Spring Boot, which generates an executable jar (that can be run from the command line). Spring Boot creates a stand-alone Spring based Applications, with an embedded Tomcat, that you can "just run".

[RegEditAPI_PATH]> java –jar target/regedit-api-gateway.jar

or using Maven comand:

[RegEditAPI_PATH]> mvn spring-boot:run 

Docker compose

You can run the RegEdit API Gateway as Docker containers using docker compose:

[RegEditAPI_PATH]> docker-compose up

Test the application

You can test the application and explore the available services, linking to API documentation by Swagger tools:

http://localhost:8080/swagger-ui/index.html/

and EUREKA services at:

http://localhost:8080/

Docker compose

You can run the RegEdit Backend Service as Docker containers using docker compose:

[RegEdit_PATH]> docker-compose up

Test the application

You can test the application and explore the available services, linking to API documentation by Swagger tools:

http://localhost:8080/swagger-ui.html

2. RegEdit Service

A JAVA REST API service to editing a register address table by user.

What you’ll need

In order to build the application, your environment should fulfill the following requirements:

  • A favorite text editor or IDE;
  • JDK 11+;
  • Maven 3.0+;
  • Mysql Server 8.0+ or PostgreSQL 9.6+ ;

How to build

Download and unzip the source code in your developing folder RegEdit_PATH.

Before building the application you must create and popolulate the RegEdit database.

You can create a MySQL database using the script regedit-create-mysql.sql stored in the RegEdit_PATH/db folder. Also you can create a PostgreSQL database using the script regedit-create-postgres.sql stored in the RegEdit_PATH/db folder.

Then yo can load the metadata and the test data, using the script regedit-data.sql stored in the RegEdit_PATH/db folder.

As a first step, configure the database connection in the 'application.yml' file, located in the path [RegEdit_PATH]/src/main/resources:

Postgres connection

spring.datasource.url=jdbc:postgresql://localhost:5432/postgres?currentSchema=regedit&charset=UTF-8
spring.datasource.username=db_username
spring.datasource.password=db_password
spring.datasource.driverClassName=org.postgresql.Driver

MySQL connection

spring.datasource.url=jdbc:mysql://localhost:3306/regedit?useSSL=false&useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
spring.datasource.username=db_username
spring.datasource.password=db_password
spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver

Now you can perform your first build of the application using Maven comand:

[RegEdit_PATH]> mvn package

If the build process ends successfully, you are ready to run the application: The application is built using the open source framework Spring Boot, which generates an executable jar (that can be run from the command line). Spring Boot creates a stand-alone Spring based Applications, with an embedded Tomcat, that you can "just run".

[RegEdit_PATH]> java –jar target/regedit.jar

or using Maven comand:

[RegEdit_PATH]> mvn spring-boot:run 

Docker compose

You can run the RegEdit Service as Docker containers using docker compose:

[RegEdit_PATH]> docker-compose up

Test the application

You can test the application and explore the available services, linking to API documentation by Swagger tools:

http://localhost:8080/swagger-ui.html

License

RegEdit Service is EUPL-licensed

regedit-backend's People

Stargazers

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