DIY Dynamic Frontend
Last updated
Last updated
This prototype can be used to only test and demo a functional frontend or to decouple frontend and backend development until it can be merged at a later point in time.
Component | Scope | Quick Links |
---|---|---|
Dynamic Frontend is implemented via RPC Layer concept that is based on the Facade Pattern.
In short, we are using it as a configurable API layer. It allows us granular control over our API call method endpoints from one location, which is good for demonstrating connectivity between different interchangeable Building Blocks. In addition, the RPC layer can also be configured for different providers, such as MockProvider, APIProvider, LocalStorageProvider, etc.
The example application for Construction Permit Use Case illustrates the deployment of an automated service designed to streamline the entire process of approving construction permits.
The Construction Permit Frontend can switch between three providers:
Provider | Datasource | Resource |
---|---|---|
These providers extend the Base Provider which acts as an interface for needed methods and api calls.
All three providers contain the business logic in the front end and use the provider as data storage.
Environment variables needed are described in Configuration
For efficient data storage supporting the seamless exchange of information with the RPC layer, the application 'rpc-backend' serves as an ideal backend solution. It facilitates the storage, retrieval, and utilization of data crucial for the RPC layer's operations used when creating Dynamic Frontend Application covering specific use-case.
The RPC Backend represents an advanced backend storage application tailored to securely manage user and tenant-specific key-value pairs. It offers a robust framework for storing and organizing data.
For example in Construction permit use case:
Actual implementation can be found in the GovStack RPC Backend Repository.
Documentation can be found in GovStack RPC Backend Docs Repository.
There are multiple ways to run and use the rpc-backend storage app. The different ways and respective resources can be found in the table below:
All environment variable definitions can be found in GovStack RPC Backend Docs Repository.
All available endpoints can be found in Main Documentation after accessing swagger UI. Usage of endpoints is described in API Usage.
Case | Description | Instructions |
---|---|---|
Item | Value | Default |
---|---|---|
Case | Description | Resource |
---|---|---|
Construction Permit Use Case Frontend
Frontend implementation with RPC providers
Generic RPC Backend
Storage application
Mock Provider
Local in-app preset values for required data
API Provider
RPC Backend - Storage Application
Storage Provider
Browser's local storage / Data from Mock Provider if no data is available in the local storage
Run locally
Run application locally. Run like a react app
Docker
Run application in Docker
Kubernetes
Run application in k8s cluster using HELM Chart
tenant
"building-permit"
any string
user
"user1"
One of 10 default users or any new registered user
Local Run
Run application locally, useful for development purposes. Should be run as Spring Boot app.
Docker
Run application as docker container
Kubernetes
Run application in k8s cluster using Helm Chart