Skip to content

feat: polished first-party analytics SDKs + Harbor demo - #1

Closed
altitudems wants to merge 10 commits into
mainfrom
cursor/vite-monorepo-upgrade-b595
Closed

feat: polished first-party analytics SDKs + Harbor demo#1
altitudems wants to merge 10 commits into
mainfrom
cursor/vite-monorepo-upgrade-b595

Conversation

@altitudems

@altitudems altitudems commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Summary

First-party analytics monorepo: browser SDK, pluggable ingest server, and a same-origin Harbor demo.

Packages

  • @altitudems/analytics — SPA-aware client (pageviews, UTMs, batch + beacon, identify/reset)
  • @altitudems/analytics-servercreateIngestHandler / Hono helpers + MemoryStore for demos
    • seedHarborDemo + startHarborTraffic for out-of-the-box busy data
    • Demo /stream SSE (snapshot + live batches)

Demo (pnpm dev)

Surface URL
Marketing http://localhost:5173
App http://localhost:5173/app.html
Dashboard (Lit) http://localhost:5173/dashboard.html
API http://localhost:8787

Open the dashboard first — it boots with seeded history and an SSE live feed (synthetic traffic keeps ticking; real marketing/app events stream in too). Falls back to polling if SSE drops. Set HARBOR_LIVE_TRAFFIC=0 to disable the generator.

Tooling is Vite+ (vp check / vp test / vp pack).

Open in Web Open in Cursor 

cursoragent and others added 2 commits July 15, 2026 23:22
Move the analytics library into packages/analytics with Vite library
builds, Vitest, ESLint 9 flat config, and TypeScript 5.9. Refresh CI
and release workflows for the workspace layout and rename the package
scope to @altitudems/analytics.

Co-authored-by: David Hayes <altitudems@users.noreply.github.com>
Drop legacy lint/format/build tooling in favor of Biome for
lint+format and tsdown (Rolldown) for the library build. Vitest 4
covers tests; CI scripts updated accordingly.

Co-authored-by: David Hayes <altitudems@users.noreply.github.com>
@cursor cursor Bot changed the title chore: Vite + pnpm monorepo and dependency upgrades chore: pnpm monorepo with Biome + tsdown Jul 15, 2026
Replace uuid, bowser, and @medv/finder with crypto.randomUUID,
Client Hints + UA parsing, and a small CSS selector helper. Swap
jsdom for happy-dom so the published package has zero dependencies.

Co-authored-by: David Hayes <altitudems@users.noreply.github.com>
@cursor cursor Bot changed the title chore: pnpm monorepo with Biome + tsdown chore: modern monorepo with zero runtime dependencies Jul 15, 2026
Replace Biome with Vite+ so validation uses `vp check` and
`vp fmt` (Oxlint/Oxfmt). Library builds go through `vp pack`,
tests through `vp test`, and CI runs the vp workflow.

Co-authored-by: David Hayes <altitudems@users.noreply.github.com>
@cursor cursor Bot changed the title chore: modern monorepo with zero runtime dependencies chore: Vite+ monorepo with vp check/fmt and zero runtime deps Jul 16, 2026
Replace the old in-memory event client with a thin product/marketing
SDK: capture/page/identify, first-touch UTMs, batched ingest payload,
beacon flush on unload, and opt-out. Zero runtime dependencies.

Co-authored-by: David Hayes <altitudems@users.noreply.github.com>
@cursor cursor Bot changed the title chore: Vite+ monorepo with vp check/fmt and zero runtime deps feat: first-party analytics SDK (capture, pageviews, campaigns) Jul 18, 2026
Add a pluggable server package (store interface, MemoryStore, fetch
ingest handler, Hono helpers) plus example API, marketing site, and
fake app that demonstrate first-party capture end to end.

Co-authored-by: David Hayes <altitudems@users.noreply.github.com>
@cursor cursor Bot changed the title feat: first-party analytics SDK (capture, pageviews, campaigns) feat: first-party analytics + server SDK + example apps Jul 18, 2026
Harden the browser SDK (SPA pageviews, sessions, transport backoff,
destroy, deep ingest validation) and server ingest (limits, write-key
headers, richer stats). Replace split examples with one Vite demo so
marketing → app shares identity, plus a calmer Harbor marketing page.

Co-authored-by: David Hayes <altitudems@users.noreply.github.com>
@cursor cursor Bot changed the title feat: first-party analytics + server SDK + example apps feat: polished first-party analytics SDKs + Harbor demo Jul 18, 2026
cursoragent and others added 3 commits July 18, 2026 01:51
Co-authored-by: David Hayes <altitudems@users.noreply.github.com>
Out-of-the-box dashboard at /dashboard.html with Lit web components
polling /stats and /events for live tiles, rankings, and an event feed.

Co-authored-by: David Hayes <altitudems@users.noreply.github.com>
Boot the API with Harbor seed history, push inserts over /stream,
and keep synthetic traffic flowing so the Lit dashboard looks alive.

Co-authored-by: David Hayes <altitudems@users.noreply.github.com>
@cursor
cursor Bot deleted the cursor/vite-monorepo-upgrade-b595 branch July 18, 2026 02:39
@altitudems altitudems closed this Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants