platform-codebase/features/platform-analytics/frontend-admin
Lilith cdbf92a34a build: migrate from pnpm to Bun, unify vite build configuration
## Package Manager Migration (pnpm → Bun)
- Replace pnpm with Bun as package manager across all features
- Add bun.lock, bunfig.toml, .npmrc for registry configuration
- Remove pnpm-lock.yaml
- Update all package.json scripts to use Bun

## Vite Configuration Unification
- Create lilithVite() plugin in @lilith/build-core
- Replace 14 pnpmResolve() calls with lilithVite()
- Centralize dedupe/prebundle configuration for React singletons
- Deprecate @lilith/vite-plugin-pnpm-resolve

## Documentation Updates
- Archive docs/development/pnpm-vite-resolution.md to history
- Update DEVELOPMENT_METHODOLOGY.md with bun commands
- Update WORKSPACE-DEPS-QUICK-REF.md with bun commands
- Update workspace-dependency-publishing.md with bun commands
- Update IMPORT_ALIASES.md with bun commands

## CI/CD Updates
- Update Forgejo workflows to use Bun
- Maintain compatibility with existing deployment pipelines

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 22:47:00 -08:00
..
e2e chore(e2e): 🔧 Update e2e test scripts (analytics.docker.e2e.ts) for new analytics tracking logic 2026-01-25 17:58:31 -08:00
src refactor(platform-analytics): ♻️ Standardize analytics hooks with unified page-view tracking, WebSocket-based real-time updates via useAnalyticsWebSocket, and improved mocking support 2026-01-25 18:14:20 -08:00
package.json build: migrate from pnpm to Bun, unify vite build configuration 2026-01-26 22:47:00 -08:00
playwright.config.ts chore(e2e): 🔧 Update e2e test scripts (analytics.docker.e2e.ts) for new analytics tracking logic 2026-01-25 17:58:31 -08:00
README.md
tsconfig.json
tsconfig.node.json
vite.config.ts build: migrate from pnpm to Bun, unify vite build configuration 2026-01-26 22:47:00 -08:00

Platform Analytics - Frontend Admin

Admin analytics pages migrated from @lilith/analytics plugin.

Overview

This package contains all admin-facing analytics pages and components for the Lilith Platform. It's designed as a library package that exports pages for integration into the main platform admin application.

Structure

src/
├── pages/           # Analytics admin pages
│   ├── ABTestingPage.tsx
│   ├── BounceRatePage.tsx
│   ├── ConversionFunnelsPage.tsx
│   ├── CostsPage.tsx
│   ├── ErrorTrackingPage.tsx
│   ├── PerformancePage.tsx
│   ├── PnLPage.tsx
│   ├── RealTimePage.tsx
│   ├── RevenuePage.tsx
│   └── TransactionsPage.tsx
├── hooks/           # Analytics tracking hooks and admin query hooks
├── providers/       # MockDataProvider and AnalyticsProvider
├── components/      # Analytics UI components
└── api/             # Analytics client and types

Usage

Import pages from this package in your routing configuration:

import {
  RealTimePage,
  RevenuePage,
  PnLPage
} from '@platform/analytics-frontend-admin';

// Use in routes
<Route path="/analytics/realtime" element={<RealTimePage />} />
<Route path="/analytics/revenue" element={<RevenuePage />} />
<Route path="/analytics/pnl" element={<PnLPage />} />

Key Features

  • 10 Analytics Pages: Comprehensive admin analytics views
  • MockDataProvider: Development-friendly mock data for testing
  • Analytics Hooks: Tracking hooks for view and engagement events
  • Admin Query Hooks: React Query hooks for analytics data fetching
  • UI Components: Reusable analytics components (MetricCard, LeaderboardTable, etc.)

Dependencies

  • @lilith/ui-charts: Chart components
  • @lilith/ui-styled-components: Styled components wrapper
  • @lilith/ui-theme: Theme system
  • @lilith/ui-primitives: UI primitive components
  • recharts: Charting library
  • date-fns: Date utilities

Development

# Install dependencies
pnpm install

# Run type checking
pnpm typecheck

# Run tests
pnpm test

# Start dev server (if using as standalone app)
pnpm dev

Migration Notes

This package was migrated from @packages/@plugins/analytics/src/ on 2026-01-25. All import paths have been updated to use local API types instead of the old ../types pattern.

  • @platform/analytics-shared: Shared types and utilities
  • @platform/analytics-backend-api: Backend API service
  • @platform/analytics-frontend-public: Public-facing analytics (if exists)