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

@jlaviole90/dashboard-angular

v0.1.6

Published

Standalone Angular 17+ components for displaying Webalytics data. Mirrors @jlaviole90/dashboard-react.

Downloads

371

Readme

@jlaviole90/dashboard-angular

Standalone Angular 17+ components for displaying your Webalytics data. Mirrors @jlaviole90/dashboard-react one-to-one — same types, same theming hooks, same visual language.

npm install @jlaviole90/dashboard-angular

Two modes

1. Browser-safe (plain SPA — recommended)

Use a public embed token (wb_pub_live_*). These are narrow, read-only, site-scoped credentials, optionally bound to a set of browser Origins. Safe to ship to the browser.

Mint one with the provisioning script on your backend:

make public-token ORG_SLUG=jlav \
  ALLOWED_ORIGINS='https://jlav.io,https://www.jlav.io'

Then in your Angular app:

// src/main.ts
import { bootstrapApplication } from "@angular/platform-browser";
import { provideWebalyticsDashboard } from "@jlaviole90/dashboard-angular";
import { AppComponent } from "./app/app.component";

bootstrapApplication(AppComponent, {
  providers: [
    provideWebalyticsDashboard({
      kind:        "public",
      host:        "https://analytics.example.com",
      publicToken: "wb_pub_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      siteId:      "11111111-2222-3333-4444-555555555555",
    }),
  ],
});

No SSR required. Token is restricted to your site's origins by the server, and only exposes aggregate, PII-free stats.

2. Server-side (Angular Universal / BFF)

If you already run Angular Universal, you can use the full admin bearer token instead — same components, full access to every query the admin API exposes:

// src/main.server.ts
import { bootstrapApplication } from "@angular/platform-browser";
import { provideWebalyticsDashboard } from "@jlaviole90/dashboard-angular";
import { AppComponent } from "./app/app.component";

bootstrapApplication(AppComponent, {
  providers: [
    provideWebalyticsDashboard({
      host:   process.env["WEBALYTICS_API_HOST"]!,
      token:  process.env["WEBALYTICS_API_TOKEN"]!,     // wb_pat_live_*, server-side only
      siteId: process.env["WEBALYTICS_SITE_UUID"]!,
    }),
  ],
});

Never pass token (admin bearer) into a browser-rendered app. It grants full org access. If you're not running Universal, use the browser-safe publicToken mode above.

One-component demo

import { Component } from "@angular/core";
import { DashboardComponent } from "@jlaviole90/dashboard-angular";

@Component({
  selector: "app-analytics",
  standalone: true,
  imports: [DashboardComponent],
  template: `<wb-dashboard window="7d" />`,
})
export class AnalyticsPage {}

Compose the primitives

For custom layouts, import the individual components and pass data via [data] inputs. You control fetching:

import { Component, inject } from "@angular/core";
import {
  WebalyticsDashboardService,
  SummaryCardsComponent,
  TopListComponent,
  TimeseriesChartComponent,
  RealtimeComponent,
  WebVitalsCardsComponent,
} from "@jlaviole90/dashboard-angular";

@Component({
  standalone: true,
  imports: [SummaryCardsComponent, TopListComponent, TimeseriesChartComponent,
            RealtimeComponent, WebVitalsCardsComponent],
  template: `
    <wb-summary-cards *ngIf="summary | async as s" [data]="s" />
    <wb-timeseries-chart *ngIf="ts | async as t" [data]="t" />
    <wb-top-list *ngIf="pages | async as p" [data]="p" />
  `,
})
export class CustomDashboardPage {
  private svc = inject(WebalyticsDashboardService);
  summary = this.svc.client.summary("30d");
  ts      = this.svc.client.timeseries("30d", "visitors", "day");
  pages   = this.svc.client.breakdown("30d", "path");
}

Theming

Override CSS variables on [data-wbx]:

[data-wbx] {
  --wbx-accent: #8b5cf6;
  --wbx-accent-soft: rgba(139, 92, 246, 0.12);
  --wbx-bg: #0b0b0b;
  --wbx-surface: #171717;
  --wbx-fg: #fafafa;
  --wbx-fg-muted: #a1a1aa;
  --wbx-border: #27272a;
}

Exports

| Symbol | Description | | --- | --- | | provideWebalyticsDashboard(config) | Providers for bootstrapApplication. | | WebalyticsDashboardService | Injectable with .client (typed fetch). | | DashboardComponent | <wb-dashboard> — opinionated full layout. | | SummaryCardsComponent | <wb-summary-cards [data]> — 4 metric tiles. | | RealtimeComponent | <wb-realtime [data]> — live counter. | | TimeseriesChartComponent | <wb-timeseries-chart [data]> — area chart. | | TopListComponent | <wb-top-list [data]> — breakdown list. | | WebVitalsCardsComponent | <wb-web-vitals-cards [data]> — CWV tiles. | | createClient(config) | Standalone client (no DI). |

See @jlaviole90/dashboard-react for conceptual docs — both packages surface identical semantics.