guilhermeborgesbastos / feature-toggle

A Spring Boot RESTful API using Angular 9 for the UI that allows users to manage feature toggles for their applications.

Home Page:http://featuretoggle.guilhermeborgesbastos.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


Feature Toggle Application

Open Source Love svg2 Codacy Badge

A Web application that allows users to manage feature toggles for their applications.
Other applications can then query this service to get active features for customers.


Watch the video

What's the feature toggles concept?

If you are not familiar with the concept of feature toggles, you are welcome to read this excellent article: https://martinfowler.com/articles/feature-toggles.html

What's included?

  • An Spring Boot RESTful API with authorization and authentication system using OAuth2 and JWT;
  • An Angular application to manage Feature Toggles, Customers, and Users.
  • Multiple authorization levels with SUPER_ADMIN, PRODUCT_OWNER, and CLIENT;
  • A SQL Database schema to support data persistence;
  • Source code verified by static code analyzers;

RESTful API

The endpoins of the Spring Boot API can be easily imported into the Insomnia ( the leading Open Source API Client) by clicking on the button below:

Run in Insomnia}

Prerequisite

On the front-end side

Follow the steps below to properly install the required dependencies for the front-end on your local environment.

  1. It is required to have Node.js with version 12.18.0 or higher. To see what version of Node.js is installed on your machine type the following command in the terminal:
node -v
  1. If you haven't installed Node.js in your machine then go to this link in order to install node.

  2. It is required to have NPM with version 6.14.0 or higher. To see what version of NPM is installed on your machine type the following command in the terminal:

npm -v
  1. If you haven't installed NPM in your machine then go to this link in order to install NPM.

On the back-end side

Follow the steps below to properly install the required dependencies for the back-end on your local environment.

  1. It is required to have JAVA with version 1.8. To see what version of JAVA is installed on your machine type the following command in the terminal:
java -version
  1. If you haven't installed JAVA in your machine then go to this link in order to install it.

  2. Install and configure the MySQL following this link.

  3. Create a new database called feature_toggle as a local database.

  4. Import the database schema from /database/schema.sql into the feature_toggle database.

  5. Import the 'dump data' from the /database/schema-dumb-data.sql into the feature_toggle database.

Installing and Executing locally

  1. Fork this repository, by clicking the Fork button at the top-right on this page. Learn how to fork GitHub projects

  2. Clone the forked repository from your GitHub account.

git clone https://github.com/[replace-with-your-github-username]/feature-toggle.git
  1. Edit the /src/main/resources/application.properties file with your local MySQL credentials.

  2. Go to the cloned directory (e.g. cd feature-toggle).

  3. Run mvn clean install to build the application.

  4. Inner the /target folder of the built project, start the Spring Boot RESTful API:

cd /target
java -jar feature-toggle-0.0.1-SNAPSHOT.jar com.gbastos.featuretoggleapi.Application
  1. Inner the /src/main/resources/frontend folder of the cloned project, start the Angular application:
ng serve --host 0.0.0.0
  1. After that, the command will start a server instance and listen on port 4200. Open (http://localhost:4200/) in your browser. The Feature Toggle login will be displayed.

Use the default users below to access the application:

Username Password Role
guilhermeborgesbastos@gmail.com A4Dc$%/** SUPER_ADMIN
product.owner@gmail.com 4d8Y%$#@ PRODUCT_OWNER
client@gmail.com 145hJA87* CLIENT

Credits

This project uses several open source packages:


Site featuretoggle.guilhermeborgesbastos.com
LinkedIn profile
Facebook profile

License

The theme is available as open source under the terms of the MIT License.

About

A Spring Boot RESTful API using Angular 9 for the UI that allows users to manage feature toggles for their applications.

http://featuretoggle.guilhermeborgesbastos.com


Languages

Language:Java 44.6%Language:TypeScript 36.0%Language:HTML 11.7%Language:CSS 5.1%Language:TSQL 1.8%Language:JavaScript 0.7%