DIY Dynamic Frontend
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.
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.
Frontend Application
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.
What is the Construction Permit Use Case?
This comprehensive digital service addresses challenges associated with conventional "over the counter" and paper-based permit management. Its primary objectives are to enhance transparency, accountability, and efficiency in overseeing construction practices to ensure they are safe and compliant with regulations.
Property owners, lead architects, engineers, or principal contractors can initiate the construction permit application process by providing the required information and documents online. Once the application is submitted, the applicant can monitor the approval progress and take additional actions that may arise during the process. These actions include:
Uploading any additional documents required
Scheduling inspections
Applicants receive notifications about changes in their application status, such as when a specific action is needed, when an inspection date is approaching, or when their application has been either approved or rejected. This real-time communication system enhances the overall experience and engagement of citizens throughout the construction permit approval journey.
Providers
The Construction Permit Frontend can switch between three providers:
Storage Provider
Browser's local storage / Data from Mock Provider if no data is available in the local storage
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.
Deployment Guidelines
Environment variables needed are described in Configuration
Backend Storage Application
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.
API Call
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:
tenant
"building-permit"
any string
user
"user1"
One of 10 default users or any new registered user
Actual implementation can be found in the GovStack RPC Backend Repository.
Documentation can be found in GovStack RPC Backend Docs Repository.
Deployment Guidelines
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:
Local Run
Run application locally, useful for development purposes. Should be run as Spring Boot app.
Kubernetes
Run application in k8s cluster using Helm Chart
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.
Was this helpful?