|
1 | 1 | # Findings |
2 | 2 |
|
3 | 3 | ## Requirements |
4 | | -- Run `bun fix` from the repo root and fix the issues it reports. |
5 | | -- Run `bun run check-types` from the repo root and fix failures. |
6 | | -- Make sure packages are building successfully. |
7 | | -- Do this safely in a large dirty worktree without reverting unrelated work. |
8 | | - |
9 | | -## Research Findings |
10 | | -- Root `package.json` defines: |
11 | | - - `fix`: `bunx ultracite fix` |
12 | | - - `check-types`: `bun run check:ai-pipeline-hard-cut && turbo run check-types` |
13 | | - - `build`: `turbo run build` |
14 | | -- The repo already has extensive unrelated modifications across `apps/*` and `packages/*`. |
15 | | -- Existing planning files were from a prior analytics task and were replaced for this run. |
16 | | -- Initial `bun fix` run auto-fixed 72 files, then stopped on 23 remaining diagnostics plus one warning. |
17 | | -- Remaining manual diagnostics were concentrated in React support demo/example files, a test helper, one composer UI test page, and a hooks-order issue in `packages/react/src/support/components/conversation-timeline.tsx`. |
18 | | -- A second `bun fix` pass narrowed the remainder to: |
19 | | - - a misplaced `biome-ignore-all` suppression in `packages/react/src/identify-visitor.tsx` |
20 | | - - a default-parameter-order issue in `packages/react/src/hooks/use-conversation-typing.test.tsx` |
21 | | -- A third `bun fix` pass completed cleanly with no additional fixes needed. |
22 | | -- The initial root `check-types` failure was isolated to `apps/web`. |
23 | | -- `apps/web` had two categories of issues: |
24 | | - - stale generated `.next/types` references to a deleted route |
25 | | - - real source mismatches in the timeline preview/test harness where cached timeline item types and widget/dashboard preview types had drifted apart |
26 | | -- Clearing `apps/web/.next/types` and `apps/web/.next/dev/types` removed the stale validator reference to the deleted `composer-ui-test` page. |
27 | | -- The remaining `apps/web` source fixes were limited to timeline preview typings, fake support controller callback annotations, and a safe fallback in `getTimelineUiPreset`. |
28 | | -- `bun run --filter @cossistant/web check-types` passed after those fixes, and the full root `bun run check-types` passed on the next run. |
29 | | -- The root `bun run build` passed successfully across the Turbo build graph. |
30 | | -- `apps/web` build emitted non-blocking warnings: |
31 | | - - missing `VAPID_PUBLIC_KEY`, `VAPID_PRIVATE_KEY`, and `VAPID_SUBJECT` during build |
32 | | - - a Turbopack NFT trace warning pointing at `apps/web/next.config.mjs` via docs component source loading |
33 | | -- `apps/facehash-landing` and `examples/nextjs-tailwind` also completed their production builds successfully. |
34 | | - |
35 | | -## Technical Decisions |
36 | | -| Decision | Rationale | |
37 | | -|----------|-----------| |
38 | | -| Start with root scripts instead of package-by-package guesses | Keeps the work aligned with how the repo is meant to be verified | |
39 | | -| Log only failures that block requested commands | Prevents side tracking in a noisy dirty worktree | |
40 | | - |
41 | | -## Issues Encountered |
42 | | -| Issue | Resolution | |
43 | | -|-------|------------| |
44 | | -| Pre-existing dirty worktree complicates verification | Restrict edits to files required for current failures | |
45 | | -| `bun fix` report truncated some diagnostics at the default limit | Rerun after the first patch set with a higher max diagnostics cap | |
46 | | -| `apps/web` stale generated Next types referenced a deleted route | Removed generated `.next/types` folders and confirmed regenerated types pass later checks | |
| 4 | +- Write a Tinybird guest post draft in repo root as `tinybird-guest-post-cossistant.md` |
| 5 | +- Match the feel of recent Tinybird customer stories without copying them |
| 6 | +- Keep the story human, readable, and low-jargon |
| 7 | +- Ground every Cossistant claim in repo truth or explicit user-approved facts |
| 8 | +- Include screenshot recommendations and approval notes |
47 | 9 |
|
48 | | -## Resources |
49 | | -- `/Users/anthonyriera/code/cossistant-monorepo/package.json` |
50 | | -- `/Users/anthonyriera/code/cossistant-monorepo/turbo.json` |
51 | | -- `/Users/anthonyriera/code/cossistant-monorepo/task_plan.md` |
| 10 | +## Tinybird Story Pattern Scan |
| 11 | +- `Maple` |
| 12 | + - Leans into developer experience, TypeScript resources, local-first workflow, and AI agents helping with iteration |
| 13 | + - Good reference for the "LLMs were genuinely useful" angle |
| 14 | +- `Order Editing` |
| 15 | + - Strong small-team framing: stop babysitting infrastructure and get back to building product |
| 16 | + - Good reference for keeping the problem concrete and relatable |
| 17 | +- `Fever` |
| 18 | + - Emphasizes reliability under load and safer iteration |
| 19 | + - Useful for talking about trust and stability without overdoing performance claims |
| 20 | +- `Marc Lou` |
| 21 | + - Strong "power without complexity" framing |
| 22 | + - Useful reference for plain-language positioning |
| 23 | +- `Plain` |
| 24 | + - Closest support-space comparison |
| 25 | + - Their angle is real-time support insights embedded throughout the product |
| 26 | + - We should not center that angle |
| 27 | + - Cossistant's stronger differentiator is live visitor presence on a globe plus API-first flexibility for custom support builds |
| 28 | + |
| 29 | +## Cossistant Product Facts Verified In Repo |
| 30 | +- Cossistant describes itself as an open-source chat support widget for the React ecosystem with a code-first, API-driven philosophy in `/Users/anthonyriera/code/cossistant-monorepo/README.md` |
| 31 | +- Cossistant offers headless primitives and reusable support components in: |
| 32 | + - `/Users/anthonyriera/code/cossistant-monorepo/README.md` |
| 33 | + - `/Users/anthonyriera/code/cossistant-monorepo/apps/web/content/docs/(root)/what.mdx` |
| 34 | + - `/Users/anthonyriera/code/cossistant-monorepo/apps/web/content/docs/support-component/index.mdx` |
| 35 | +- Tinybird is explicitly used for: |
| 36 | + - inbox analytics |
| 37 | + - live visitor presence |
| 38 | + - live "last seen in app" enrichment |
| 39 | + - Source: `/Users/anthonyriera/code/cossistant-monorepo/apps/web/content/docs/self-host/analytics.mdx` |
| 40 | +- Tinybird workspace contains dedicated endpoints for: |
| 41 | + - `inbox_analytics` |
| 42 | + - `unique_visitors` |
| 43 | + - `online_now` |
| 44 | + - `visitor_presence` |
| 45 | + - `presence_locations` |
| 46 | + - Source: `/Users/anthonyriera/code/cossistant-monorepo/tinybird/README.md` |
| 47 | +- Cossistant ingests Tinybird events for: |
| 48 | + - presence |
| 49 | + - visitor activity |
| 50 | + - page views |
| 51 | + - conversation lifecycle metrics |
| 52 | + - Source: `/Users/anthonyriera/code/cossistant-monorepo/apps/api/src/lib/tinybird-sdk.ts` |
| 53 | +- Tinybird ingestion has product-grade handling already in place: |
| 54 | + - batch buffering |
| 55 | + - retry logic |
| 56 | + - graceful flush on shutdown |
| 57 | + - Source: `/Users/anthonyriera/code/cossistant-monorepo/apps/api/src/lib/tinybird-sdk.ts` |
| 58 | +- Frontend access is locked down with short-lived JWTs scoped to specific Tinybird pipes and fixed `website_id` params |
| 59 | + - Source: `/Users/anthonyriera/code/cossistant-monorepo/apps/api/src/lib/tinybird-jwt.ts` |
| 60 | +- The inbox UI surfaces Tinybird-backed analytics directly in the conversation list header and opens a live visitors overlay from there |
| 61 | + - Source: `/Users/anthonyriera/code/cossistant-monorepo/apps/web/src/components/conversations-list/index.tsx` |
| 62 | +- The live visitors overlay combines: |
| 63 | + - inbox analytics display |
| 64 | + - live visitor count |
| 65 | + - active visitor list |
| 66 | + - page paths |
| 67 | + - globe visualization with geo points |
| 68 | + - Source: `/Users/anthonyriera/code/cossistant-monorepo/apps/web/src/app/(dashboard)/[websiteSlug]/overlays/live-visitors-overlay.tsx` |
| 69 | + |
| 70 | +## User-Provided Facts Approved For Use |
| 71 | +- Tinybird setup felt easy |
| 72 | +- Tinybird has been reliable |
| 73 | +- LLMs were useful during integration |
| 74 | +- Cossistant is dev-first, like Tinybird |
| 75 | +- Playus may be named publicly |
| 76 | +- Playus uses Cossistant's open API to power support inside its mobile app and a custom support dashboard |
| 77 | +- Playus serves `600K DAU` |
| 78 | + |
| 79 | +## Editorial Positioning |
| 80 | +- The story should feel like: |
| 81 | + - "we wanted support data to feel live inside the product" |
| 82 | +- The story should not feel like: |
| 83 | + - "we built a generic analytics dashboard" |
| 84 | +- Best emotional hook: |
| 85 | + - the live globe makes presence feel immediate and human |
| 86 | +- Best builder hook: |
| 87 | + - we wanted control over the support experience, not over a separate analytics stack |
| 88 | +- Best trust signal: |
| 89 | + - a customer can use the API-first backend to run a custom support surface at meaningful scale |
| 90 | + |
| 91 | +## Title And Packaging |
| 92 | +- Final title: |
| 93 | + - `How Cossistant built real-time customer support analytics and a live visitor globe with Tinybird` |
| 94 | +- Meta title: |
| 95 | + - `How Cossistant built live support analytics with Tinybird` |
| 96 | +- Meta description: |
| 97 | + - `How Cossistant used Tinybird to power real-time inbox analytics, live visitor presence, and a globe view for developer-first support.` |
52 | 98 |
|
53 | | -## Visual/Browser Findings |
54 | | -- None |
| 99 | +## Screenshot Shortlist |
| 100 | +- Inbox analytics strip in the inbox header with live visitors count and support metrics |
| 101 | +- Live visitors overlay showing: |
| 102 | + - globe |
| 103 | + - active visitors list |
| 104 | + - page paths |
| 105 | +- Optional visitor detail panel if it clearly reinforces presence and context |
| 106 | +- Playus custom support UI if the team wants to show the API-first angle visually |
| 107 | + |
| 108 | +## Fact Check Log |
| 109 | +| Claim | Source | Verification Status | |
| 110 | +|------|--------|---------------------| |
| 111 | +| Cossistant is open source and code-first | `/README.md` and `/apps/web/content/blog/introducing-cossistant.mdx` | verified | |
| 112 | +| Cossistant is API-driven and provides backend infrastructure | `/README.md` | verified | |
| 113 | +| Cossistant offers headless support primitives and custom builds | `/apps/web/content/docs/(root)/what.mdx` and `/apps/web/content/docs/support-component/index.mdx` | verified | |
| 114 | +| Tinybird powers inbox analytics and live visitor presence | `/apps/web/content/docs/self-host/analytics.mdx` | verified | |
| 115 | +| Tinybird endpoints include inbox analytics, online now, visitor presence, and geo presence locations | `/tinybird/README.md` | verified | |
| 116 | +| Frontend Tinybird access uses short-lived JWTs scoped by website and pipe | `/apps/api/src/lib/tinybird-jwt.ts` | verified | |
| 117 | +| Live visitors overlay includes a globe and visitor list | `/apps/web/src/app/(dashboard)/[websiteSlug]/overlays/live-visitors-overlay.tsx` | verified | |
| 118 | +| Playus uses the open API and serves `600K DAU` | user instruction in this thread | approved user-provided fact | |
| 119 | +| LLMs were useful during integration | user instruction in this thread | approved user-provided fact | |
| 120 | +| Cossistant is part of the Vercel OSS program | `/Users/anthonyriera/code/cossistant-monorepo/README.md` | verified | |
| 121 | + |
| 122 | +## Things To Avoid In The Draft |
| 123 | +- No fabricated cost savings |
| 124 | +- No fabricated latency numbers |
| 125 | +- No claim that Playus DAU was verified from public sources |
| 126 | +- No generic "data platform" filler |
| 127 | +- No overexplaining Tinybird internals when the user-facing product benefit is enough |
| 128 | + |
| 129 | +## Resources |
| 130 | +- Tinybird example URLs: |
| 131 | + - `https://www.tinybird.co/customer-stories/maple` |
| 132 | + - `https://www.tinybird.co/customer-stories/orderediting` |
| 133 | + - `https://www.tinybird.co/customer-stories/fever` |
| 134 | + - `https://www.tinybird.co/customer-stories/marc-lou` |
| 135 | + - `https://www.tinybird.co/customer-stories/plain` |
| 136 | +- Key local files: |
| 137 | + - `/Users/anthonyriera/code/cossistant-monorepo/README.md` |
| 138 | + - `/Users/anthonyriera/code/cossistant-monorepo/tinybird/README.md` |
| 139 | + - `/Users/anthonyriera/code/cossistant-monorepo/apps/web/content/docs/self-host/analytics.mdx` |
| 140 | + - `/Users/anthonyriera/code/cossistant-monorepo/apps/api/src/lib/tinybird-sdk.ts` |
| 141 | + - `/Users/anthonyriera/code/cossistant-monorepo/apps/api/src/lib/tinybird-jwt.ts` |
| 142 | + - `/Users/anthonyriera/code/cossistant-monorepo/apps/web/src/components/conversations-list/index.tsx` |
| 143 | + - `/Users/anthonyriera/code/cossistant-monorepo/apps/web/src/app/(dashboard)/[websiteSlug]/overlays/live-visitors-overlay.tsx` |
0 commit comments