Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

2.1 KB
Raw Blame
import { urls } from 'scenes/urls'

import { ProductItemCategory, ProductKey } from '~/queries/schema/schema-general'

import { FEATURE_FLAGS } from '../../frontend/src/lib/constants'
import { ProductManifest } from '../../frontend/src/types'

export const manifest: ProductManifest = {
    name: 'Streamlit apps',
    urls: {
        streamlitApps: (): string => '/streamlit-apps',
        streamlitApp: (id: string): string => `/streamlit-apps/${id}`,
        streamlitAppEdit: (id: string): string => `/streamlit-apps/${id}/edit`,
        streamlitAppNew: (): string => '/streamlit-apps/new',
    },
    scenes: {
        StreamlitApps: {
            name: 'Streamlit apps',
            description: 'Build and share custom Python apps that run on your PostHog data.',
            import: () => import('./frontend/StreamlitApps'),
            projectBased: true,
        },
        StreamlitApp: {
            name: 'Streamlit app',
            import: () => import('./frontend/StreamlitApp'),
            projectBased: true,
        },
        StreamlitAppEdit: {
            name: 'Edit Streamlit app',
            import: () => import('./frontend/StreamlitAppEdit'),
            projectBased: true,
        },
    },
    routes: {
        '/streamlit-apps': ['StreamlitApps', 'streamlitApps'],
        '/streamlit-apps/new': ['StreamlitAppEdit', 'streamlitAppNew'],
        '/streamlit-apps/:id': ['StreamlitApp', 'streamlitApp'],
        '/streamlit-apps/:id/edit': ['StreamlitAppEdit', 'streamlitAppEdit'],
    },
    treeItemsProducts: [
        {
            path: 'Apps',
            intents: [ProductKey.STREAMLIT_APPS],
            href: urls.streamlitApps(),
            searchKeywords: ['python apps', 'data apps', 'internal tools'],
            type: 'streamlit_app',
            category: ProductItemCategory.UNRELEASED,
            flag: FEATURE_FLAGS.STREAMLIT_APPS,
            iconType: 'streamlit_app',
            iconColor: ['var(--color-product-data-pipeline-light)', 'var(--color-product-data-pipeline-dark)'],
            sceneKey: 'StreamlitApps',
            sceneKeys: ['StreamlitApps', 'StreamlitApp', 'StreamlitAppEdit'],
        },
    ],
}