demo

package
v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package demo seeds a realistic dataset so `smolanalytics demo` shows a populated, beautiful dashboard with zero setup — the 60-second "oh" moment. Seed data uses rand (it's fake data); the analytics engine that computes over it stays deterministic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Live added in v0.9.0

func Live() (store.Store, error)

Live returns a demo Store that stays fresh forever: it re-seeds a whole new 30-day dataset every few hours (anchored to the current day) and injects a live visitor every ~90s. The re-seed is an atomic pointer swap, so a dashboard request never sees a half-built store. Use this for the long-running hosted demo; Seed alone is fine for the one-shot CLI `smolanalytics demo`.

func Seed

func Seed(s store.Store) error

func SeedGSC added in v0.7.2

func SeedGSC(gs *gsc.Store) error

SeedGSC populates the search store so the demo shows the Search card and the money_pages report working. The page rows are engineered to hit each bucket: two clean quick wins (position 4-15), one CTR problem (position 3 earning a fraction of a top-3 CTR), and one cannibalization pair (the same query earning clicks on two pages).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL