Application Overview

Architecture

Here is a simplified architecture diagram of the application:

application architecture.drawio

The different components are:

  • The frontend: the application itself, developed using the Patternfly framework (React, Typescript), running in the browser of the user.

  • The backend: a Python FastAPI application, running in a container on OpenShift. It handles the communication with the database, the LLM, and the Object storage. It handles the communication with the frontend by exposing a REST API.

  • The database: a PostgreSQL database, running in a container on OpenShift. It stores the claims.

  • The LLM: the language model used to summarize and extract information from the claims. It is consumed by the backend through its API.

  • The Object storage: an S3-compatible object storage. It stores the claim images.

Application Code

If you want to have a look at the code of the application, you can do it directly from OpenShift AI!

  • Close the different Jupyter tabs that may still be opened in your browser.

  • Go back to the OpenShift AI dashboard.

  • Stop your Workbench by using the toggle. — You should probably give it 5 or 10 seconds to fully stop.

  • Edit the Workbench configuration by clicking on the menu item at the left, then Edit workbench button.

    stop workbench
  • In the image section, change the image to CUSTOM - VSCode for Insurance Claim Processsing Lab:

    vscode image
  • Note that this is a Custom-built image added in this particular lab to illustrate the flexibility of the OpenShift AI platform. Not everyone wants to use Jupyter Notebooks for everything.

  • Then click on Update workbench at the bottom of the page:

    update workbench
  • You can now start your Workbench again by using the toggle.

  • Once the Workbench is started, click on the Open Link.

  • You will be redirected to the VSCode IDE.

  • After logging in and accepting the authorization, VSCode will open.

  • The first time you connect to it, you must indicate that you trust the workspace.

  • Click on the Yes, I trust the authors button.

    trust vscode
    • You can also close the Welcome tab, and you are in a familiar VSCode environment.

    • Your Persistent Volume has been automatically reconnected to this new environment.

      • Therefore, all the data you created in the Jupyter environment is still available

      • You can see more files because VSCode displays hidden files by default, which Jupyter does not do.

    • If you want, you can now explore the code of the application, in the app folder:

      app code

Of course, this is a complete VSCode environment, so you can configure it in the same way as you would do for a local VSCode installation. You can install extensions that will be persisted when you stop and restart the Workbench, you can configure your own keybindings, etc.

The application has already been built as a container image that we are now ready to deploy using GitOps. You can head to the next section.