Skip to content

Commit 9509cdf

Browse files
authored
Merge pull request #15 from sidequery/readme-positioning
Improve README positioning
2 parents b462c2c + ac00997 commit 9509cdf

1 file changed

Lines changed: 35 additions & 12 deletions

File tree

README.md

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,34 @@
22

33
<img src="hog.png" alt="Hogflare" width="220">
44

5-
Hogflare is a Cloudflare Workers ingestion layer for PostHog SDKs. It supports PostHog-style ingestion, stateful persons and groups, SDK feature flags, and a read-only session replay explorer, then streams events and person snapshots into Cloudflare Pipelines so data lands in R2 as Iceberg/Parquet.
5+
Hogflare is a warehouse-native PostHog alternative that runs on Cloudflare. Point existing PostHog SDKs at a Worker to capture events, resolve persons and groups, evaluate feature flags, ingest session replay, and write queryable product analytics data to R2 Data Catalog Iceberg tables.
6+
7+
It is built for teams that want PostHog-compatible analytics primitives in their own Cloudflare lakehouse, without operating the full PostHog stack.
68

79
![Hogflare replay explorer](docs/assets/replay-explorer.jpg)
810

9-
## What Works Today
11+
## Product Surface
12+
13+
- PostHog-compatible SDK endpoints: `/capture`, `/identify`, `/alias`, `/batch`, `/e`, `/engage`, `/groups`, `/s`
14+
- Stateful persons and groups: `$set`, `$set_once`, `$unset`, aliasing, group properties, group slots, and append-only person snapshots
15+
- Feature flags and remote config: `/array/:token/config`, `/flags`, and `/decide`
16+
- Session replay: PostHog replay ingestion plus an R2 SQL-backed explorer for sessions, event search, funnels, friction signals, and person journeys
17+
- Warehouse output: event rows and person snapshots in R2 Data Catalog-backed Iceberg/Parquet tables
18+
- Cloudflare-native enrichment: IP, geo, colo, ASN, and related request metadata
19+
- Backfill importer for existing PostHog persons, groups, and historical events
20+
21+
## Semantic Model
22+
23+
Hogflare includes semantic model definitions over the R2/Iceberg tables so teams can query product analytics directly from DuckDB, R2 SQL, or BI tooling:
24+
25+
- Core facts: `events`, `sessions`, `pageviews`, `activity_days`
26+
- Identity and profiles: `persons`, `person_profiles`, `identity_links`
27+
- Product analytics: `first_event_retention`, `attribution`, `groups`
28+
- Reusable metrics: identification rate, pageviews per session, events per user, grouped event rate, day 1/7/30 retention, bounce rate, engagement rate, attribution rate, and identity links per profile
29+
30+
## What It Is Not Yet
1031

11-
- PostHog-compatible ingestion endpoints: `/capture`, `/identify`, `/alias`, `/batch`, `/e`, `/engage`, `/groups`, `/s`
12-
- Persons and groups: `$set`, `$set_once`, `$unset`, aliasing, group properties, and group slots
13-
- SDK config and feature flags: `/array/:token/config`, `/flags`, and `/decide`
14-
- Session replay ingestion and read-only replay explorer backed by R2 SQL over Iceberg rows
15-
- Request enrichment with Cloudflare IP and geo fields
16-
- Queryable event and person snapshots in R2 Data Catalog-backed Iceberg tables
32+
Hogflare is not a full PostHog clone. It does not try to ship PostHog's complete app surface, plugin system, cohort engine, or ClickHouse-backed query layer. The focus is PostHog SDK compatibility, product analytics data ownership, replay review, and a practical semantic layer on Cloudflare-managed storage.
1733

1834
## Docs
1935

@@ -22,15 +38,19 @@ Hogflare is a Cloudflare Workers ingestion layer for PostHog SDKs. It supports P
2238
- [PostHog Compatibility](docs/posthog-compatibility.md): SDK setup, endpoint behavior, persons, groups, feature flags, signing, and enrichment.
2339
- [Import Existing PostHog Data](docs/import-posthog.md): host-side backfill importer for existing PostHog projects.
2440
- [Data Model](docs/data-model.md): event and person row shapes plus DuckDB/R2 SQL query examples.
41+
- [`models/`](models): semantic model definitions for events, sessions, pageviews, persons, identity, groups, attribution, retention, and shared metrics.
2542

2643
## Architecture
2744

2845
```mermaid
2946
flowchart TB
3047
SDKs["PostHog SDKs"]
48+
Importer["PostHog Importer"]
3149
3250
SDKs -->|"ingest"| Worker
3351
SDKs -->|"flags/decide"| Worker
52+
Importer -->|"backfill"| EventsPipeline
53+
Importer -->|"person snapshots"| PersonsPipeline
3454
3555
subgraph CF["Cloudflare Workers"]
3656
Worker["Hogflare Worker"]
@@ -52,19 +72,22 @@ flowchart TB
5272
PersonsPipeline --> PersonsR2["R2 Data Catalog<br/>persons table"]
5373
5474
ReplayUI["Replay Explorer"] -->|"R2 SQL"| EventsR2
75+
Models["Semantic Models<br/>models/*.yml"] --> EventsR2
76+
Models --> PersonsR2
77+
Consumers["DuckDB / R2 SQL / BI"] --> Models
5578
```
5679

5780
## Why
5881

59-
PostHog is a nice-to-use web and product analytics platform. Self-hosting PostHog is prohibitively complex, so most users rely on the cloud offering. Hogflare is an alternative for cost-conscious data teams and businesses that want a low-maintenance way to ingest web and product analytics directly into a managed data lake.
82+
PostHog is a nice-to-use web and product analytics platform. Self-hosting PostHog is prohibitively complex, so most users rely on the cloud offering. Hogflare is for cost-conscious data teams and businesses that want product analytics, session replay, feature flags, identity resolution, and modeled warehouse data in infrastructure they control.
6083

6184
A [hobby deployment of PostHog](https://github.com/PostHog/posthog/blob/master/docker-compose.hobby.yml) includes postgres, redis, redis7, clickhouse, zookeeper, kafka, worker, web, plugins, proxy, objectstorage, seaweedfs, asyncmigrationscheck, temporal, elasticsearch, temporal-admin-tools, temporal-ui, temporal-django-worker, cyclotron-janitor, capture, replay-capture, property-defs-rs, livestream, feature-flags, and cymbal.
6285

63-
PostHog does much more than this package, but some teams only need the warehouse-first basics.
86+
PostHog does much more than Hogflare, but many teams do not need to run PostHog's entire application stack to get useful web and product analytics. Hogflare keeps the SDK integration familiar while making Cloudflare Pipelines, R2 Data Catalog, and Iceberg the system of record.
6487

65-
## Replay Demo
88+
## Local Replay Demo
6689

67-
The branch includes a local replay fixture that makes the explorer usable without Cloudflare credentials:
90+
The repo includes a local replay fixture that makes the explorer usable without Cloudflare credentials:
6891

6992
```bash
7093
REPLAY_DEMO_PORT=4666 bun scripts/replay_demo_stub.mjs

0 commit comments

Comments
 (0)