Developer Packages & Documentation
High-performance, local-first open-source tooling built for zero cloud telemetry, military-grade data privacy, and sub-millisecond execution. Explore our official packages published across npm and PyPI.
@junglans/trail
Unified Local-First Analytics, On-Page Heatmaps & Diagnostic Telemetry for React and Node.js
A unified enterprise-grade bundle combining both the React client SDK (@junglans/trail-react) and Node.js backend middleware (@junglans/trail-server). Store all customer and user telemetry inside your own SQLite database under /api/jungtrail with zero monthly SaaS fees, zero cloud leakage, and complete privacy compliance.
@junglans/trail-server
Embedded Analytics & On-Page Heatmap Backend Middleware for Express and Next.js
An ultra-fast, zero-cloud-telemetry backend middleware that stores all incoming application events in your own local SQLite database under /api/jungtrail. Powered by better-sqlite3 with Write-Ahead Logging (WAL) for sub-millisecond event ingestion.
@junglans/trail-react
React Components, Automated Trackers, On-Page Visual Heatmaps & Analytics Widget
A lightweight, battle-tested React library providing automated DOM interaction trackers, rage-click and dead-click detection, Core Web Vitals monitoring, and a floating admin drawer with a live radial heatmap overlay.
jung
A Version Control Sidecar for AI-Assisted Development with Prompt, Plan, Cost & Diff Attribution
Git tracks WHAT changed. jung tracks WHY and WHO (human or AI agent). A local-first development sidecar that captures conversation logs, multi-step plans, tool executions, token expenditures, and human-vs-agent code attribution behind every code change — permanently linked to git diffs.
junglans-trail
Embedded Local-First Analytics & On-Page Heatmap Middleware for Python (FastAPI & Starlette)
Zero standalone servers. Store all telemetry, on-page heatmap coordinates, e-commerce transactions, and diagnostic events directly in your Python application's local SQLite database under /api/jungtrail with 104 capabilities built-in.
Quickstart in 30 Seconds
Mount analytics in Express, Next.js, FastAPI, or connect React components. Telemetry is saved in your local SQLite store instantly.
import express from 'express';
import { jungtrailMiddleware } from '@junglans/trail-server';
const app = express();
app.use(express.json());
// Mounts all 104 analytics, heatmap, e-commerce, and auth endpoints under /api/jungtrail
app.use('/api/jungtrail', jungtrailMiddleware({
dbName: 'analytics.db',
dbPath: './data/analytics.db',
adminKey: process.env.ADMIN_KEY || 'demo-admin-key'
}));
app.listen(8000, () => console.log('Trail active on port 8000'));Explore Open-Source CLI Tooling
Junglans Trail Capabilities Taxonomy
A comprehensive, modular suite of analytics, heatmap, telemetry, and diagnostic features running directly in your SQLite engine with zero third-party cloud dependence.
Core Tracking27 features
Fundamental user navigation, interaction behavior, and device environment analytics.
Real-time page views and route transitions with automatic SPA detection.
Automated event capture on buttons, links, and actionable DOM targets.
Flags rapid repetitive clicking (≥3 clicks within 500ms) on unresponsive elements.
Detects clicks on interactive-looking elements that trigger no DOM mutations or navigation.
Milestone beacons triggered at 25%, 50%, 75%, and 100% vertical viewport scroll.
Active visible engagement time excluding background tab states.
Mouse velocity vector tracking toward browser top bar or tab closure.
Automatic tracking of PDFs, ZIPs, APKs, and documents without manual code hooks.
Captures text copying actions on documentation code snippets and key quotes.
Core Web Vital timing metric for primary visual rendering speed.
Calculates visual layout stability score across user lifecycle.
Measures overall responsiveness to user clicks, taps, and key presses.
Extracts utm_source, utm_medium, utm_campaign, and referral parameters.
Classifies Desktop, Mobile, Tablet with exact screen width/height.
Privacy-preserving user agent parsing for Chrome, Safari, Firefox, Edge, etc.
Auth & Identity18 features
Auditing user authentication lifecycles, role permissions, and access patterns.
Tracks authentication attempts and highlights credential stuffing patterns.
Step-by-step completion rate from sign-up form visit to email confirmation.
Logs recovery token requests and password update completions.
Tracks TOTP and SMS token verification time and drop-off rates.
Breakdown of Google, GitHub, Microsoft, and SAML identity log-ins.
Attaches anonymous pre-login browsing history to authenticated user profiles.
Audits administrative role changes, team privilege updates, and invite states.
Session Lifecycle17 features
Multi-tab synchronization, idle detection, engagement segmentation, and GDPR compliance.
Maintains real-time heartbeat of online users across browser tabs.
Calculates total span from initial landing to final interaction.
Identifies single-interaction visits under 10 seconds duration.
Disaggregates periods of inactivity from true user focus.
Synchronizes session ID and cart changes across tabs in real-time.
Classifies visitors into Low, Medium, High, or Power user segments.
Endpoint allowing complete purge of a user's telemetry records upon request.
Heatmap & Spatial7 features
Visual on-page radial heatmaps, element click density maps, and spatial interaction overlays.
Renders smooth radial gradients directly over the active website DOM.
Ranked list of top-clicked CSS selectors and button components.
Filter click heatmaps by route, date range, or device viewport.
Visual color overlay illustrating the percentage of users reaching each fold.
Recalculates click coordinates accurately when elements reflow on resize.
Diagnostics & Performance8 features
Client-side error monitoring, network drops, and performance bottleneck diagnostics.
Captures window.onerror and unhandled promise rejections with stack traces.
Logs console.error events with sanitized context arguments.
Monitors online/offline transitions and queues telemetry for later dispatch.
Identifies backend calls exceeding configurable latency thresholds (e.g. >1000ms).
Tracks JS heap memory limits on supported browsers to spot memory leaks.
Database & Admin7 features
SQLite WAL persistence, backup automation, zero-config migrations, and data export.
High-concurrency database engine supporting thousands of events/second.
Download full historical event logs for offline analysis or spreadsheet import.
Creates timestamped snapshot copies without stopping the ingestion pipeline.
Ensures administrative endpoints are accessible only by authorized team leads.
Automatically trims aged events beyond the configured retention window.
E-Commerce & Revenue8 features
Cart funnels, conversion tracking, checkout stages, revenue metrics, and coupon analytics.
Records whenever product cards or catalog listings enter the viewport.
Tracks item quantities, variations, and catalog drop-offs.
Monitors shipping address, payment method, and confirmation steps.
Calculates total order value, average cart size, and product margin trends.
Identifies sessions where items were added to cart but checkout was incomplete.
Logs promotional voucher redemption rates and discount margin impact.
A/B Testing & Feature Flags4 features
Experiment exposure tracking, variant conversion, and statistical confidence scoring.
Records which experiment variant (Control vs Test A/B) each user viewed.
Compares conversion rates between variations across multiple milestones.
Tracks client-side feature toggle checks and roll-out percentages.
Feedback, NPS & CSAT4 features
In-app customer sentiment surveys, Net Promoter Scores, and qualitative notes.
Scores users from 0-10 and categorizes Promoters, Passives, and Detractors.
Captures 1-to-5 star ratings on key task completion moments.
Accepts free-form feedback commentary attached to session timelines.
Resilience & Latency4 features
IndexedDB buffer queues, backpressure handling, and latency benchmarking.
Stores pending events in browser IndexedDB if internet connectivity is lost.
Safeguards against memory exhaustion under burst traffic by dropping low-priority pings.
Measures round-trip time between client and ingestion endpoint.
Why Local-First Analytics Outperforms Cloud SaaS
Traditional analytics platforms charge per event and route sensitive user interactions across foreign cloud servers. Junglans keeps every byte securely in your local environment.
Traditional Cloud Analytics (Mixpanel, GA4, Hotjar)
- ✕Heavy recurring SaaS bills based on monthly tracked users (MTUs) and event volumes.
- ✕Third-party cloud data leakage: sensitive customer behavioral paths leave your infrastructure.
- ✕Client script bloat: heavy external trackers impact Core Web Vitals and Lighthouse scores.
- ✕Ad-blocker suppression: up to 40% of visitor telemetry is blocked before reaching servers.
Junglans Local-First Ecosystem (@junglans/trail & jung)
- ✓Zero tracking fees ($0/mo): stores all data in your own SQLite database using high-throughput WAL mode.
- ✓Absolute data sovereignty: complies with GDPR, HIPAA, and DPDP laws natively because data never leaves your server.
- ✓First-party same-origin traffic: routes to
/api/jungtrail, bypassing browser ad-blockers naturally. - ✓Sub-millisecond execution: SQLite WAL handles thousands of events per second with zero network latency overhead.
Ready to deploy local-first telemetry or AI attribution?
Install any of our 5 packages right now or read their dedicated documentation pages.