Git Product home page Git Product logo

weazbootgradle's Introduction

Gradle Angular OAuth2 Spring Boot

Weazbootgradle

Tool Status
Travis Build Status
Jenkins Build Status
Java Coverage Status

Introduction

Weazbootgradle is a starter Spring Boot / Angular project with many features designed to be used with Intellij IDE.
It uses Gradle as the main build tool with Angular CLI for the frontend. It is cross platform, travis-ci and Jenkins friendly, and loaded with multiple testing frameworks. It comes pre-configured with Intellij IDE configuration settings so that you can get started quickly.

The entire build lifecycle for this project can be run in a single: ./gradlew build command.

Goal

A frontend application secured by OAuth2 authorization code flow, with an example OAuth2 authentication server. The authentication server could be used in an organization, replaced by an existing service (Google, Facebook, Okta, etc), or extended to integrate with other OAuth2 providers.

It should have staples such as login, logout, backend requests, etc in addition to being fully tested and easy to scale.

Setup

In your workspace directory:

git clone https://github.com/themadweaz/weazbootgradle.git

Then open the project directly in IntelliJ IDE. Do not Import, Open. Import would work, but you would lose many of the IntelliJ IDE specific configuration features of this sample.

Once that is done, either run the ./gradlew build from the command line or the build Run Configuration in IntelliJ IDE. This will pull down all dependencies, install Node.js and npm, and run the test suite.

See each module's README.md for more information about commands available.

Optional

  • Load pre-configured settings for IntelliJ IDE by importing the settings jar in $PROJECT_ROOT/config/intellij/settings-*.jar using File->Import Settings.... Use at your own risk, as this will overwrite your own IntelliJ IDE settings.

Tooling

Java

Spring Boot

The project comes with a pretty sane Spring Boot multi-app setup. It contains a main application that serves the Angular app, and an authorization server example app. It is designed to be extended, and has classes prefixed with the word Custom which are targets for enhancement.

Spring Security (OAuth2)

Instead of the basic authentication default Spring Security configuration, this project comes with an OAuth2 authentication server implementation which secures the frontend. It supports token revocation and session based logout. It follows the example by Dave Syer from this github with lots of modifications.

The default username/password is: username/password

Testing

Everything is tested using the most modern Spring Boot patterns. It has JaCoCo coverage tooling to monitor how well the application is tested. Also included is an example integration with Coveralls to record that coverage over time.

Devtools

Pre-configured with Spring Developer Tools for hot-swapping classes and resources.

Checkstyle

The build runs Checkstyle on the code base as part of the build lifecycle. It is pre-configured with a modified version of Google's checkstyle configuration. The IntelliJ IDE project is configured to be able to run this checkstyle variant from the Checkstyle IntelliJ IDE plugin. The project contains a Code Style XML configuration that matches the style rules in the checkstyle configurations. Can be easily modified as needed.

Javascript

Node / NPM Install

Using a few Gradle plugins, the first ./gradlew build run will install Node.js and pull down any npm dependencies defined in Package.json. If you already have Node.js installed, it will use your local version.

Grunt

We use Grunt to help stand up the jars and then run ng test from the Angular CLI.

Testing

Angular CLI includes tools for running both unit and end2end types of testing. More information can be found on in the Frontend README.

Contributing:

I will happily take pull requests. Please open an issue first!

TODO:

  • Users: roles, actuator for both applications
  • auth store / authorize page for clients requiring authorization
  • scope abstraction
  • possibly saml integration

IntelliJ / Devtools

To get devtools working correctly on class changes, you need to do a few things. First, you will need to go to Settings -> Compiler and enable the option Make Project Automatically. Next, you will need to enable the compiler.automake.allow.when.app.running registry setting in IntelliJ IDE.
You can access the registry in by using the shortcut Shift + Command + A, then searching for registry. Set this value to true.

weazbootgradle's People

Contributors

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