How andymarrow/omnioptimize works
Omni Analytics combines a browser-tracking SDK and ingestion/analytics backend with a Next.js dashboard for viewing project analytics and managing projects. The principal flow is client event capture, batch validation and queueing, backend processing/storage, then analytics views. The repository also contains a Convex-backed dashboard with project, SEO, code-scan, and settings areas. Several dashboard and worker implementations were not sampled, so those components are shown without speculative call chains.
Main entry points: Tracker.ts Tracking SDK · ingest.handler.ts Ingest handler · ProjectContext.js Project context · analytics.ts Convex functions
Components 26
Tracking client
- Tracking SDK
omni-sdk/packages/sdk/src/tracker/Tracker.ts - React adapter
omni-sdk/packages/react/src/context/TrackerContext.tsx - Event capture
omni-sdk/packages/sdk/src/plugins - Batch transport
omni-sdk/packages/sdk/src/transmitter
Event backend
- Ingest API
omni-sdk/backend/src/routes/ingest.ts - Batch validation
omni-sdk/backend/src/schemas/ingest.ts - Ingest handler
omni-sdk/backend/src/handlers/ingest.handler.ts - Ingestion queue
omni-sdk/backend/src/queue/IngestionQueue.ts - Event worker
omni-sdk/backend/src/worker.ts - Event processors
omni-sdk/backend/src/processors - Analytics repositories
omni-sdk/backend/src/repositories - Session repository
omni-sdk/backend/src/repositories/SessionRepository.ts - Event database
omni-sdk/backend/src/db/schema.ts
Analytics dashboard
- Analytics overview
app/(main)/dashboard/page.jsx - Deep insights
app/(main)/dashboard/deep-insight/page.jsx - Analytics reports
app/(main)/dashboard/analytics/page.jsx - Session replay
app/(main)/dashboard/_components/insights/SessionReplayTab.jsx - SEO analysis
app/(main)/dashboard/seo/page.jsx - Code security
app/(main)/dashboard/code/page.jsx - Account settings
app/(main)/dashboard/settings/page.jsx - Project context
app/_context/ProjectContext.js
Convex services
- Convex functions
convex/analytics.ts - Project functions
convex/projects.ts - SEO functions
convex/seo.ts - Convex data model
convex/schema.ts
Other components
- Tracked site
Connections 21
- Tracked site → Tracking SDK: hosts
- React adapter → Tracking SDK: provides tracker
- Tracking SDK → Event capture: dispatches events
- Tracking SDK → Batch transport: sends batches
- Batch transport → Ingest API: posts batches
- Ingest API → Ingest handler: routes to
omni-sdk/backend/src/routes/ingest.ts - Ingest handler → Batch validation: validates with
omni-sdk/backend/src/handlers/ingest.handler.ts - Ingest handler → Ingestion queue: enqueues batch
omni-sdk/backend/src/handlers/ingest.handler.ts - Event worker → Event processors: dispatches to
- Event processors → Analytics repositories: persists via
- Session repository → Event database: reads and writes
omni-sdk/backend/src/repositories/SessionRepository.ts - Session repository → Analytics repositories: delegates rage counts
omni-sdk/backend/src/repositories/SessionRepository.ts - Project context → Project functions: queries projects
app/_context/ProjectContext.js - Analytics overview → Project context: reads active project
app/(main)/dashboard/page.jsx - Analytics overview → Convex functions: fetches overview
app/(main)/dashboard/page.jsx - Deep insights → Project context: reads project
app/(main)/dashboard/deep-insight/page.jsx - Deep insights → Convex functions: uses API reference
app/(main)/dashboard/deep-insight/page.jsx - SEO analysis → SEO functions: uses SEO data
- Convex functions → Convex data model: uses data model
- Project functions → Convex data model: uses data model
- SEO functions → Convex data model: uses data model