npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

tracetics-sdk

v0.1.4

Published

Official JavaScript/TypeScript SDK for Tracetics – track user events and funnel analytics.

Readme

Onboardlytics — Core Architecture & Funnel Engine

Übersicht

Onboardlytics ist eine MultinTenant SaaS Plattform (Laravel 12 + Nwidart Modules), die externe Events empfängt, speichert und anhand definierter Funnels automatisch NutzernJourneynFortschritte berechnet. Diese README fasst die komplette aktuelle Architektur, Modelle, Services, Pipelines und die FunnelEnginenLogik zusammen.

Architekturüberblick

Module

  • Core — Events, Funnels, Aggregates
  • Auth — Registrierung, Login, Password Reset, Email Verification
  • Tenant — TenantnHandling, APInKeys, SanctumnAuthentifizierung

Event Intake Pipeline

  1. EventRequest — Validierung eingehender EventnDaten
  2. EventController — APInEndpoint, gibt strukturierte APInResponses zurück
  3. EventProcessor — erstellt EventnModel, dispatcht domain events
  4. EventCreated Listener — triggert:
  • FunnelEngine
  • AggregateService

Datenmodelle

TrackedApp

Identifiziert die Quelle der Events.

Felder

  • id (uuid)
  • tenant_id (uuid)
  • name
  • api_key

Beziehungen

  • trackedApp->events()

Event

Repräsentiert ein einzelnes TrackingnEvent.

Felder

  • id (uuid)
  • tracked_app_id
  • user_identifier
  • event_name
  • data (json)
  • created_at

Beziehungen

  • event->trackedApp()
  • event->funnelStepEvents()

Funnel

Ein Funnel besteht aus mehreren Schritten (FunnelSteps) mit definierter Reihenfolge.

Felder

  • id
  • tracked_app_id
  • name
  • description

Beziehungen

  • funnel->steps() (ordered)
  • funnel->progress()

FunnelStep

Ein einzelner Schritt im Funnel.

Felder

  • id
  • funnel_id
  • event_name
  • step_order (0nbasiert oder 1nbasiert)

Beziehungen

  • step->funnel()
  • step->events() (über FunnelStepEvent)

FunnelProgress

Speichert den Fortschritt eines Users in einem Funnel.

Felder

  • id
  • funnel_id
  • user_identifier
  • current_step (Index der Steps)
  • is_completed
  • completed_at

FunnelStepEvent

Verknüpft ein Event mit einem FunnelStep.

Aggregate

Aggregierte Zahlen pro Zeitraum:

Felder

  • period_start
  • period_end
  • event_name
  • count
  • tracked_app_id

FunnelEngine

Zweck: Jedes neue Event prüfen → Welche Funnels betreffen dieses Event? → richtigen Step finden → Fortschritt updaten → Completion erkennen.

process(Event $event)

  1. Lade alle Funnels der TrackedApp
  2. Finde passende FunnelSteps basierend auf event_name
  3. Prüfe FunnelProgress
  4. Aktualisiere Fortschritt
  5. Markiere Funnel als abgeschlossen
  6. Speichere FunnelStepEvent
  7. Dispatch optionaler FolgenEvents (später)

SchrittnfürnSchritt Logik

1. Relevante FunnelSteps finden

$steps = FunnelStep::where('event_name', $event->event_name)
->whereHas('funnel', fn ($q) =>
$q->where('tracked_app_id', $event->tracked_app_id)
)
->with('funnel')
->get();

2. For each step: FunnelProgress laden/erstellen

$progress = FunnelProgress::firstOrCreate(
[
'funnel_id' => $step->funnel_id,
'user_identifier' => $event->user_identifier,
],
[
'current_step' => 0,
'is_completed' => false,
]
);

3. Prüfen: Gehört dieses Event zum aktuellen Step?

if ($progress->current_step !== $step->step_order) {
continue;
}

4. Fortschritt erhöhen

$progress->current_step++;

5. Completion prüfen

if ($progress->current_step >= $step->funnel->steps->count()) {
$progress->is_completed = true;
$progress->completed_at = now();
}

6. Speichern & FunnelStepEvent anlegen

$progress->save();
FunnelStepEvent::create([
'event_id' => $event->id,
'funnel_step_id' => $step->id,
'funnel_id' => $step->funnel_id,
]);

Aggregates

Der AggregateService errechnet stündliche/ tägliche/ wöchentliche EventnAggregationen.

Logik:

  1. Zeitraum bestimmen (period_start / period_end)
  2. Aggregat für TrackApp + event_name finden
  3. count++
  4. speichern Alle AggregatenTests bestehen.

Tests (Pest + InnMemory SQLite)

  • Event intake vollständig getestet
  • FunnelEngine:
    • Step matching
    • Progress updates
    • Completion
    • StepEvents
  • Aggregates:
    • period handling
    • increment logic
  • Controllers:
    • Summary endpoint liefert korrekte Daten

Roadmap

  • Funnel Visualization (Charts)
  • User Journeys
  • Cohort Analytics
  • SDKs (JS, PHP, Python)
  • Dashboard Widgets

Fazit

Die Plattform hat jetzt:

  • Vollständige Event-Verarbeitung
  • Fertige Funnel-Datenstrukturen
  • Funktionierende FunnelEngine
  • Korrekte Aggregationslogik
  • Bestehende Testsuite mit 100% funktionierendem Kern Bereit für den nächsten großen Schritt: Frontend + Insights Dashboard.