Expand my Community achievements bar.

SOLVED

Using AEM as a Frontend with a REST API

Avatar

Level 1

We are a set of Fullstack developers who are using Java Springboot and MySQL to develop backends with JWT authentication and use VueJS / ReactJS to develop single page frontend. We have also used Laravel views to develop our frontend applications to work with external APIs. 

 

Recently we have been provided with a project that enforces to use AEM for the development of a customer portal that allows customers to register with mobile number and OTP, view and manage their profile, send service requests to administrators and there has to be a separate admin portal which allows the administrators to log in and see customer requests and other administration work.

 

The system utilizes a lot of third party API from different services and we want to manage everything using a single backend. Following is the architecture we are planning to develop

 

HighLevel Stack.jpg

 

My questions are,

1. Is this a correct approach when developing with AEM as we are not utilizing many CMS features of it? 

2. Since REST APIs are being used, what are the methods that we can use which also caters JWT based authentication? (eg: how to save the user token, manage state etc)

 

Based on the client policies, we have to use AEM for any frontends and Managed SQL (provided by them) for the database.

 

TIA

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

One solution can work in your scenario:

1. Use AEM only as CMS not for the frontend. From AEM side make API call to get the vary little data to be consumed by the server side and for the rest of the data, provide required information in the form of window object to frontend.

2. Use React to make the API call based on the data provided by AEM to generate the look and fill of the frontend.

Serverside call is expensive.

 

You can use some middle ware like APIGEE accomplish your API security needs.

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

One solution can work in your scenario:

1. Use AEM only as CMS not for the frontend. From AEM side make API call to get the vary little data to be consumed by the server side and for the rest of the data, provide required information in the form of window object to frontend.

2. Use React to make the API call based on the data provided by AEM to generate the look and fill of the frontend.

Serverside call is expensive.

 

You can use some middle ware like APIGEE accomplish your API security needs.

Avatar

Level 1
Many of the references I have seen of AEM are websites and ecommerce sites which allows the AEM authors a flexibility to create and manage new content in the websites. In this scenario, the application is purely a web app which does not utilize any content or asset management but just managing multiple services through a streamlined portal. I have not seen that many web apps developed with AEM. Thank you very much for the information. We will check this out and provide an update here