App Management Interface#
The App Management page is the primary workspace-level UI for creating, browsing, and managing applications (prompts/workflows). It is distinct from the organization switcher and project selector β it operates within a selected project context.
Entry point: web/oss/src/components/pages/app-management/index.tsx
Page Structure#
The AppManagement component renders five main sections in sequence :
| Section | Component | Purpose |
|---|---|---|
| Get Started | GetStartedSection | Quick-start actions for new workspaces |
| Observability Dashboard | ObservabilityDashboardSection | Embedded tracing/monitoring summary |
| Application List | ApplicationManagementSection | App listing, search, create/edit/delete |
| Demo Applications | DemoApplicationsSection | Pre-built demos (hidden for demo projects) |
| Help & Support | HelpAndSupportSection | Documentation links and support resources |
ObservabilityDashboardSection and DemoApplicationsSection are lazy-loaded via next/dynamic to reduce initial bundle size .
App Data#
Apps are fetched via the useAppsData context hook, which calls /api/apps?project_id={projectId} using SWR . The fetch is gated on authentication, a valid project ID, and an active organization selection.
Each app is typed as ListAppsItem:
{ app_id: string; app_name: string; app_type?: string; updated_at: string }
Apps are sorted descending by updated_at before display and filtered client-side by the search term .
ApplicationManagementSection#
ApplicationManagementSection is the core listing component. Key features:
- Dual view modes: card grid and table list, toggled by a
Radio.Groupand persisted tolocalStorageunder the keyapp_management_display. - Search: client-side filter input that updates
searchTermin the parent . - Pagination: via the
usePaginationhook applied tofilteredApps. - Create app: the "Create New Prompt" button opens
AddAppFromTemplateModal. - Per-app actions: edit and delete, dispatched through
EditAppModalandDeleteAppModal. - Empty state:
EmptyAppViewcomponent is rendered when no apps exist .
Card layout is responsive: 2 columns β€1099 px, 3 up to 1700 px, 4 up to 2000 px, 5 above .
App Creation Flow#
App creation is handled in the parent AppManagement component. Two creation paths exist:
-
Template-based (
AddAppFromTemplateModalβhandleTemplateCardClick): callscreateAndStartTemplatefromservices/app-selector/api, passing the app name, template key, and LLM provider keys. Status updates flow through theonStatusChangecallback and are shown inCreateAppStatusModal. -
Custom workflow (
CustomWorkflowModalviauseCustomWorkflowConfig): for bring-your-own service deployments .
After successful creation, mutate() from useAppsData refreshes the app list and a PostHog app_deployment event is captured .
Error and timeout states in template creation each have retry handlers (onErrorRetry, onTimeoutRetry) that clean up any partially created app and restart the flow . A MaxAppModal guards against exceeding the workspace app limit .
Modals Reference#
| Modal | File | Trigger |
|---|---|---|
AddAppFromTemplateModal | modals/AddAppFromTemplateModal/index.tsx | "Create New Prompt" button |
CreateAppStatusModal | modals/CreateAppStatusModal.tsx | Shown during template creation |
CustomWorkflowModal | modals/CustomWorkflowModal/index.tsx | "Write your own app" action |
DeleteAppModal | modals/DeleteAppModal.tsx | Per-app delete action |
EditAppModal | modals/EditAppModal.tsx | Per-app edit action |
MaxAppModal | modals/MaxAppModal.tsx | App limit exceeded |
SetupTracingModal | modals/SetupTracingModal.tsx | Tracing setup CTA |
Key Files#
| Path | Role |
|---|---|
pages/app-management/index.tsx | Page root β state, creation logic, modal orchestration |
components/ApplicationManagementSection.tsx | App listing, search, view toggle, pagination |
components/AppCard.tsx | Card view for a single app |
components/AppTable.tsx | Table view for the app list |
contexts/app.context.tsx | useAppsData β SWR-backed app list with mutate |
services/app-selector/api.ts | createAndStartTemplate, deleteApp API calls |
assets/helpers.ts | getTemplateKey, timeout utilities |