Skip to content

Commit cd9672e

Browse files
author
Sébastien Henau
committed
cleanup
1 parent 95754a1 commit cd9672e

File tree

1 file changed

+16
-62
lines changed

1 file changed

+16
-62
lines changed

CLAUDE.md

Lines changed: 16 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -79,61 +79,17 @@ Run tests: `npm run test` from root, or `npx vitest run` from `packages/js`.
7979
**Goal:** Make Flare's JavaScript error tracking good enough to stand on its own — not just an add-on for Laravel/PHP
8080
users, but a worthy error tracker for JavaScript-only projects.
8181

82-
The frontend error monitoring is currently barebones. We need to research competitors (Sentry, PostHog, etc.), identify
83-
gaps, and ship improvements as a series of projects. Each project gets a release and an announcement post.
84-
85-
## Research & discovery
86-
87-
- [x] Research Sentry — features, DX, SDK capabilities, what they do well
88-
- [x] Research PostHog — error tracking features, session replay, context collection
89-
- [x] Research other competitors (Bugsnag, Rollbar, LogRocket, Datadog RUM, New Relic, Raygun, Highlight.io)
90-
- [x] Audit current Flare JS client capabilities in detail
91-
- [x] Compile findings: what are we missing? What's table stakes vs. differentiators?
92-
- [x] Organize findings + idea list into concrete projects with priorities
93-
94-
## Competitive research findings
95-
96-
### What every competitor has (table stakes we're missing)
97-
98-
| Feature | Sentry | Bugsnag | Rollbar | Flare |
99-
|---|---|---|---|---|
100-
| **Automatic breadcrumbs** (console, clicks, navigation, network) | Yes | Yes (best-in-class) | Yes ("telemetry") | Manual "glows" only |
101-
| **User identification API** (`setUser()`) | Yes | Yes | Yes | None |
102-
| **Device/browser/OS context** (parsed from UA) | Yes | Yes | Yes | Raw UA string only |
103-
| **Sampling / rate limiting** | Yes | Yes | Yes (`itemsPerMinute`) | None |
104-
| **addEventListener** (robust error capture) | Yes | Yes | Yes | Fragile `window.onerror =` assignment |
105-
| **Error deduplication** | Yes | Yes | Yes | None |
106-
| **Release/version tracking** | Yes | Yes | Yes | Only `sourcemapVersion` for sourcemaps |
107-
| **ignoreErrors / URL filtering** | Yes | Yes | Yes | Must implement manually in hooks |
108-
| **Error cause chaining** (`error.cause`) | Yes | Yes | No | None |
109-
| **Retry logic** for report submission | Yes | Yes | Yes | None (single fetch, lost on failure) |
110-
| **React Error Boundary with fallback UI** | Yes | Yes | Yes | No fallback, no getDerivedStateFromError |
111-
| **Multiple sourcemap upload tools** | Vite/Webpack/Rollup/esbuild/CLI | CLI + Webpack | CLI + Webpack | Vite only |
112-
113-
### What differentiates the leaders
114-
115-
| Feature | Leader | Notes |
116-
|---|---|---|
117-
| Session replay linked to errors | LogRocket, Sentry, PostHog | Watch what user did before crash |
118-
| Backend trace correlation | Datadog, New Relic | Link frontend error to backend span |
119-
| Stability/crash-free scores | Bugsnag | Session-based release health tracking |
120-
| Feature flag context | Bugsnag, PostHog, Datadog | Which flag variant caused the regression? |
121-
| State management integration | LogRocket | Redux/Vuex snapshots at time of error |
122-
| Rage/dead click detection | LogRocket, Datadog | User frustration signals |
123-
| Performance monitoring / Web Vitals | Sentry, Datadog, New Relic | Tracing + Core Web Vitals |
124-
| `guess_uncaught_frames` | Rollbar | Reconstruct missing stack frames heuristically |
125-
| Plugin/integration architecture | Sentry, Bugsnag | Tree-shakeable, modular, extensible |
126-
| Tunnel / ad blocker bypass | Sentry | Proxy events through your own server |
127-
128-
### Flare's existing unique strengths
129-
130-
- **Solution providers** — no competitor has programmatic "here's how to fix this" suggestions
131-
- **Tiny bundle**~3-5KB gzipped vs Sentry's ~22KB+ core
82+
The frontend error monitoring is currently barebones. We need to identify gaps and ship improvements as a series of projects. Each project gets a release and an announcement post.
83+
84+
## Flare's existing strengths
85+
86+
- **Solution providers** — programmatic "here's how to fix this" suggestions
87+
- **Tiny bundle**~3-5KB gzipped
13288
- **Laravel/PHP ecosystem** — deep integration with the most popular PHP framework
133-
- **Vite-first** — modern build tool support (most competitors still lead with Webpack)
89+
- **Vite-first** — modern build tool support
13490
- **Clean two-hook system**`beforeEvaluate` (filter errors) + `beforeSubmit` (modify reports)
13591

136-
### Current gaps in Flare (detailed)
92+
## Current gaps in Flare (detailed)
13793

13894
**Context collection** — only captures URL, user agent (raw string), referrer, readyState, cookies, query params. Missing: browser name/version, OS, device type, screen size, viewport, locale, timezone, online/offline status, memory, connection info.
13995

@@ -143,7 +99,7 @@ gaps, and ship improvements as a series of projects. Each project gets a release
14399

144100
**Networking** — single `fetch()` POST per error. No retry, no offline queue, no rate limiting, no batching, no `sendBeacon()` for unload, no request timeout.
145101

146-
**React** (`@flareapp/react`) — captures component stack string only. Missing: fallback UI (`getDerivedStateFromError`), component props, component name, onError/onReset callbacks, React Router integration, Redux/Zustand state.
102+
**React** (`@flareapp/react`) — captures component stack string only. Missing: fallback UI (`getDerivedStateFromError`), component props, component name, onError/onReset callbacks, React Router integration, state management integration.
147103

148104
**Vue** (`@flareapp/vue`) — captures component name + info string. Missing: component props, Vue Router context, Pinia/Vuex state, component tree. Written in plain JS (no TypeScript).
149105

@@ -153,9 +109,9 @@ gaps, and ship improvements as a series of projects. Each project gets a release
153109

154110
## Roadmap: organized into projects
155111

156-
### Project 1: Core SDK hardening (table stakes)
112+
### Project 1: Core SDK hardening
157113

158-
Make `@flareapp/js` robust and feature-complete with what every competitor ships. This is the foundation everything else builds on.
114+
Make `@flareapp/js` robust and feature-complete. This is the foundation everything else builds on.
159115

160116
- [ ] Switch from `window.onerror =` to `addEventListener('error')` / `addEventListener('unhandledrejection')` for robustness
161117
- [ ] Automatic breadcrumbs: console output interception (`console.log/warn/error/info/debug`)
@@ -181,7 +137,7 @@ Make `@flareapp/js` robust and feature-complete with what every competitor ships
181137

182138
### Project 2: Enhanced React package
183139

184-
Make `@flareapp/react` competitive with Sentry's React integration.
140+
Make `@flareapp/react` a full-featured React error tracking integration.
185141

186142
- [ ] Fallback UI: implement `getDerivedStateFromError` so the boundary can render a fallback component
187143
- [ ] Configurable fallback: `<FlareErrorBoundary fallback={<ErrorPage />}>` or render prop `fallback={(error, reset) => ...}`
@@ -194,7 +150,7 @@ Make `@flareapp/react` competitive with Sentry's React integration.
194150

195151
### Project 3: Enhanced Vue package
196152

197-
Make `@flareapp/vue` competitive with Sentry's Vue integration.
153+
Make `@flareapp/vue` a full-featured Vue error tracking integration.
198154

199155
- [ ] Rewrite in TypeScript (currently plain JS)
200156
- [ ] Capture component props (configurable: `attachProps: true/false`)
@@ -253,13 +209,11 @@ Verify and ensure Flare works beyond the browser.
253209

254210
## Future considerations (not yet planned as projects)
255211

256-
These are features the leading competitors have but that may be out of scope for now:
257-
258-
- **Session replay** — would be a major undertaking (PostHog, Sentry, LogRocket all have this)
212+
- **Session replay** — would be a major undertaking
259213
- **Performance monitoring / Web Vitals** — could be a lightweight add-on
260-
- **Distributed tracing** — connecting frontend errors to backend spans (Datadog/New Relic territory)
214+
- **Distributed tracing** — connecting frontend errors to backend spans
261215
- **Feature flag integration** — linking errors to active feature flags
262216
- **Tunnel / ad blocker bypass** — proxy events through the user's own server
263-
- **Plugin/integration architecture** — modular system like Sentry's integrations (would require significant refactoring)
217+
- **Plugin/integration architecture** — modular, tree-shakeable, extensible system (would require significant refactoring)
264218
- **Offline event queuing** — persist unsent events in localStorage/IndexedDB
265219
- **Rage/dead click detection** — user frustration signals without explicit errors

0 commit comments

Comments
 (0)