Build Secure Ionic Apps with Angular and JHipster
Tags: angular, webdev, programming, tutorial
Published: 2022-05-26 19:18:55

### Build an Ionic + Angular frontend for your Spring Boot backend, all using the power of JHipster! Secured by OpenID Connect.

### <br>

Ionic is a framework for building mobile apps with web technologies that look and act like native apps. Because they’re built with web technologies (HTML, JavaScript, and CSS), you can also deploy your Ionic apps as single-page applications. Or, even better, as progressive web apps (PWAs) that work offline.

Ionic supports the big three web frameworks: Angular, React, and Vue. Once you’ve written your app, you can deploy it to a simulator or device with [Capacitor](https://capacitorjs.com/). Capacitor (pictured as the blue layer) provides the runtime for your app to communicate with the native operating system and vice versa.

<img src="https://images.ctfassets.net/23aumh6u8s0i/1aiIGPNua0xeFNK2ZcsgrA/6eb4f0c88f1a0324b2039fed68ce577e/capacitor.png" align="right" alt="SwiftUI logo" width="350" />Ionic’s main competitors are native apps built with Swift or Objective-C (for iOS) and Java or Kotlin (for Android). Ionic also competes with React Native, which uses web technologies and translates them to native components.

The Ionic blog has a recent post that [does a performance comparison between Ionic and React Native](https://ionicframework.com/blog/ionic-vs-react-native-performance-comparison/). TL;DR: Both options will give you a high-performance app with a truly native look and feel.

<br>

**Prerequisites:**

* [Node 16](https://nodejs.org/)
* [Java 11](https://sdkman.io/)
* [Docker Desktop](https://docs.docker.com/desktop/#download-and-install)


## What the Heck Is JHipster?

This tutorial will show you how to use Ionic, Angular, and Capacitor to build a mobile app that talks to a Spring Boot backend. It won’t take but a few minutes, thanks to JHipster!

[JHipster](https://www.jhipster.tech/) is an application generator that creates an Angular frontend and a Spring Boot backend based on the options you choose. It has the ability for you, as a developer, to customize what it generates with _blueprints_. The blueprints feature has resulted in many additional options for an app: Kotlin, Spring Native, Micronaut, Quarkus, .NET Core, NestJS, and Svelte.

Below is a diagram of the app you’ll create in this tutorial and its authentication flow.

![Authentication Flow](https://images.ctfassets.net/23aumh6u8s0i/1JxrZeVOA6jFF2P6SjuiVu/8bee5b25a712396063dce20bc373b0fb/ionic-jhipster-flow.png)

<br>
## ✨ Introducing the JHipster Ionic Blueprint!

The JHipster project has supported generating an Ionic app using a `generator-jhipster-ionic` module for the past several years. As the primary maintainer of this module, I’m proud to announce that it has been re-written as a blueprint, and it’s _much_ easier to understand now. The previous module relied on the Ionic CLI, the base Angular [starter](https://github.com/ionic-team/starters), the [Ionic JHipster starter](https://github.com/oktadev/ionic-jhipster-starter), and custom code to glue it all together. Now, the source code is all contained in one project.

[Marcelo Shima](https://github.com/mshima) volunteered to do the conversion, and after a couple of months, I’m proud to say the [JHipster Ionic blueprint](https://github.com/jhipster/generator-jhipster-ionic) is now available!


[Read more...](https://auth0.com/blog/ionic-angular-jhipster/?utm_source=content_synd&utm_medium=sc&utm_campaign=angular)