https://github.com/guilhermeborgesbastos/feature-toggle
A Spring Boot RESTful API using Angular 9 for the UI that allows users to manage feature toggles for their applications.
https://github.com/guilhermeborgesbastos/feature-toggle
angular feature-toggle feature-toggles spring-boot
Last synced: about 1 year ago
JSON representation
A Spring Boot RESTful API using Angular 9 for the UI that allows users to manage feature toggles for their applications.
- Host: GitHub
- URL: https://github.com/guilhermeborgesbastos/feature-toggle
- Owner: guilhermeborgesbastos
- Created: 2020-06-17T20:06:00.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-22T12:49:14.000Z (over 5 years ago)
- Last Synced: 2025-01-11T04:41:34.730Z (over 1 year ago)
- Topics: angular, feature-toggle, feature-toggles, spring-boot
- Language: Java
- Homepage: http://featuretoggle.guilhermeborgesbastos.com
- Size: 960 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Feature Toggle Application
[](https://GitHub.com/guilhermeborgesbastos/feature-toggle/stargazers/) [](https://www.codacy.com?utm_source=github.com&utm_medium=referral&utm_content=guilhermeborgesbastos/feature-toggle&utm_campaign=Badge_Grade)
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.
[](https://featuretoggle.guilhermeborgesbastos.com/?source=github)
## 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](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](https://insomnia.rest/) ( the leading Open Source API Client) by clicking on the button below:
[](https://insomnia.rest/run/?label=Feature%20Toggle%20API&uri=https%3A%2F%2Fraw.githubusercontent.com%2Fguilhermeborgesbastos%2Ffeature-toggle%2Fmaster%2Fmarkdown%2FInsomnia-Feature-Toggle-API-2020-07-27.json%3Ftoken%3DABJRES7ZSO5WRMA42733HCS7D3ISC)
## 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
```
2. If you haven't installed Node.js in your machine then go to [this link](https://nodejs.org/en/download/) in order to install node.
3. 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
```
4. If you haven't installed NPM in your machine then go to [this link](https://www.npmjs.com/get-npm) 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
```
2. If you haven't installed JAVA in your machine then go to [this link](https://www.java.com/) in order to install it.
3. Install and configure the MySQL following [this link](https://dev.mysql.com/doc/mysql-installation-excerpt/5.7/en/).
4. Create a new database called `feature_toggle` as a local database.
5. Import the database schema from `/database/schema.sql` into the `feature_toggle` database.
6. 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.
[](https://guides.github.com/activities/forking/)
2. Clone the forked repository from your GitHub account.
```
git clone https://github.com/[replace-with-your-github-username]/feature-toggle.git
```
3. Edit the `/src/main/resources/application.properties` file with your local MySQL credentials.
4. Go to the cloned directory (e.g. `cd feature-toggle`).
5. Run `mvn clean install` to build the application.
6. 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
```
7. Inner the `/src/main/resources/frontend` folder of the cloned project, start the Angular application:
```
ng serve --host 0.0.0.0
```
8. 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:
- [Angular](https://github.com/angular)
- [Angular CLI](https://cli.angular.io)
- [Angular Material](https://material.angular.io/)
- [Spring Boot](https://spring.io/projects/spring-boot)
- [Apache Maven](https://maven.apache.org/)
- [JWT](https://jwt.io/)
---
> Site [featuretoggle.guilhermeborgesbastos.com](https://featuretoggle.guilhermeborgesbastos.com)
> LinkedIn [profile](https://www.linkedin.com/in/guilhermeborgesbastos)
> Facebook [profile](https://www.facebook.com/guilherme.borgesbastos)
## License
The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).