How yuva-raj444/analytechs works
AnalyTechs captures anonymous page-view and click events, persists them through an API, and presents session timelines and document-aware click heatmaps. The map follows the tracker-to-API ingestion path and the dashboard’s API-backed views, while retaining the demo sites and shared event model as product components. API validation, MongoDB access, and the dashboard fetch helper are shown as internal layers. README-described capabilities are included, but unshown route details are evidenced only by the README; no unsampled source is assumed inspected.
Main entry points: server.ts Fastify API · index.ts Tracker SDK · page.tsx Dashboard · db.ts Event storage access
Components 15
Event capture
- Tracker SDK
packages/tracker/src/index.ts - Event model
packages/types/index.ts
Analytics service
- Fastify API
apps/api/src/server.ts - Event validation
apps/api/src/schemas.ts - API configuration
apps/api/src/config.ts - Event storage access
apps/api/src/db.ts - MongoDB events
Analytics dashboard
- Dashboard
apps/dashboard/app/page.tsx - Dashboard API client
apps/dashboard/lib/api.ts - Session timelines
apps/dashboard/app/page.tsx - Click heatmaps
apps/dashboard/app/page.tsx - Page discovery
apps/dashboard/app/page.tsx
Demo sites
- Multi-page demo
apps/demo2 - Demo app
apps/demo
Other components
- Site visitor
Connections 15
- Site visitor → Multi-page demo: visits
README.md - Multi-page demo → Tracker SDK: loads
README.md - Site visitor → Tracker SDK: interacts
packages/tracker/src/index.ts - Tracker SDK → Fastify API: posts batches
packages/tracker/src/index.ts - Fastify API → Event validation: validates events
apps/api/src/server.ts - Fastify API → Event storage access: stores and queries
apps/api/src/server.ts - Event storage access → MongoDB events: reads and writes
apps/api/src/db.ts - Dashboard → Dashboard API client: fetches data
apps/dashboard/app/page.tsx - Dashboard API client → Fastify API: requests endpoints
apps/dashboard/lib/api.ts - Dashboard → Session timelines: renders
apps/dashboard/app/page.tsx - Dashboard → Click heatmaps: renders
apps/dashboard/app/page.tsx - Dashboard → Page discovery: discovers pages
apps/dashboard/app/page.tsx - Event model → Tracker SDK: defines event shape
README.md - API configuration → Fastify API: configures
apps/api/src/server.ts - Demo app → Tracker SDK: embeds
README.md