How digma-ai/digma-ui works
Project type and purpose
• This is a React-based monorepo containing multiple frontend applications for the Digma continuous-feedback platform.
• It produces three primary distributions: Web, JetBrains IDE plugin, and VS/VS Code extensions.
• Key capabilities include connecting to Digma APIs, proxying Jaeger UI, PostHog analytics, JSON-RPC integration with a local Digma engine, and feature flags for “Agentic” services.
File structure
• Top-level build and config files: Dockerfile, babelrc, webpack.common/dev/prod, tsconfig.*, package.json.
• /src/app.ts & /src/dispatcher.ts: application launch points and event dispatching.
• /src/api: REST and JSON-RPC client layers (ActionDispatcher, convert-To-DigmaJsonRpcRequest, web services).
• /src/containers: platform-specific entry points (Admin, Agentic, Dashboard, InstallationWizard, IdeLauncher, Login, Main, Notifications, RecentActivity, Troubleshooting, etc.).
• /src/redux & /src/store: cross-app state management (slices, services, selectors).
• /src/hooks, /src/utils, /src/logging: shared utilities, custom React hooks, and logging.
• /src/components + /src/common: UI components organized by feature areas and shared modules.
• /public & /assets: static assets and HTML templates.
• /website: supporting static pages (e.g., Digmathon leaderboard).
Extract key README information
• Three build targets via npm run build:prod:{platform} → dist outputs for web, jetbrains, vs/vscode.
• Web dev server runs at localhost:3000 with environment variables to configure API_BASE_URL, AUTH_API_BASE_URL, JAEGER_UI_PATH, feature flags (IS_AGENTIC_ENABLED, etc.).
• Storybook available on port 6006.
• Includes a fork of Jaeger UI for trace visualization.
• Build & CI Pipeline: GitHub Actions workflows → lint/test/build → Dockerfile.
• Monorepo Codebase:
• Entry Points
– Web app (webpack dev server → browser)
– IDE plugins (JetBrains, VS, VS Code) loaded in host UI view
• API Layer
– REST clients (src/api/web/services → API_BASE_URL, AUTH_API_BASE_URL)
– JSON-RPC client (src/api/json-rpc → local Digma engine)
• State Management
– Redux services & slices (/src/redux & /src/store)
– React hooks (/src/hooks)
• UI Components
– Feature modules: Admin, Agentic, Dashboard, Errors, Insights, etc.
– Shared /common component library
• Digma Back-end API
• Auth API
• Jaeger UI (custom or proxied)
• PostHog Analytics
• IDE Host (JetBrains/VS/VS Code) for plugin distributions
• Browser for web distribution
• Browser ←→ Web Dev Server (static assets + environment config)
• Browser → REST API (API_BASE_URL) for data fetch/auth
• Browser → Jaeger UI (iframe or proxy)
• IDE Host ↔ JSON-RPC client → local Digma engine (ActionDispatcher)
• Monorepo Code → Redux store updates → UI component re-render
• User actions → dispatcher.ts → analytics (PostHog), pluginEvents
c. Architectural patterns & design principles:
• Monorepo with shared code and multiple entrypoints
• Modular feature structure: “containers” for routing/logic and “components” for UI
• Layered API abstraction: unified JSON-RPC + REST wrappers
• Centralized state via Redux slices/services and custom hooks
• Plugin architecture for IDE integration
• Environment-driven feature flags
d. Relevant technologies & frameworks:
• React + TypeScript
• Redux Toolkit
• Webpack (common/dev/prod)
• Storybook
• JSON-RPC (custom converters)
• GitHub Actions CI
• PostHog, Jaeger UI integration