CareflowDocumentation

Frontend Overview

Build a new frontend application using your preferred framework, or adapt an existing application for deployment in Careflow. This guide describes base path configuration and session integration.

Configure the base path

Careflow provides the application's deployment path through the CAREFLOW_BASE_PATH environment variable at container startup:

sh
CAREFLOW_BASE_PATH=/a/example-deployment/example-app

Use this value in the application's runtime configuration to resolve routes, static assets, and redirects under the deployment path. Avoid hardcoding a path specific to one deployment.

Note: Setting the container environment variable does not modify URLs compiled into a frontend bundle.

Routes, assets, and redirects

With the example base path above, application URLs resolve as follows:

Application pathBrowser-visible path
Home/a/example-deployment/example-app/
Settings/a/example-deployment/example-app/settings
Logo/a/example-deployment/example-app/assets/logo.svg
Login redirect/a/example-deployment/example-app/login

Apply the base path once. When the router handles the prefix, no additional prefix is required in application links.

A root-relative URL such as /assets/logo.svg resolves from the hostname's root rather than the application's deployment path. Include the configured base path when constructing these URLs. URLs for external services remain independent of the application base path.

Session handling

Applications can retain their own authentication and session management or integrate the optional Embed SDK to use the Careflow session.