beeper-inbox-react 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,170 @@
1
+ # @beeper/inbox-react
2
+
3
+ React embeddable inbox widget for Beeper.
4
+
5
+ The widget resolves the realtime Convex backend from Beeper's `/widget/config` endpoint.
6
+ Host apps do not pass a `convexUrl`.
7
+
8
+ ## How `baseUrl` works (two different servers)
9
+
10
+ The provider talks to **two** origins:
11
+
12
+ | What | URL | Purpose |
13
+ |------|-----|--------|
14
+ | **`baseUrl`** | Convex **HTTP** deployment, e.g. `https://<deployment>.convex.site` | `GET/POST …/api/v1/projects/:id/widget/...` (inbox, config, read, etc.) |
15
+ | **Session mint (default)** | Your **app** origin, e.g. `http://localhost:3001` | `POST /api/beeper/widget-session` — proxies to Convex with the **server** API key |
16
+
17
+ - Use the **`.convex.site`** URL from the Convex dashboard (HTTP actions), **not** the `…convex.cloud` client URL.
18
+ - The browser calls `baseUrl` **cross-origin**; the Convex deployment must return CORS headers on `/api/v1` (this repo’s backend does).
19
+ - **Deploy requirement:** Convex `http.ts` must register **`OPTIONS`** for `/api/v1/` (preflight). If OPTIONS is missing, the edge router returns **404** and the browser reports a **CORS** error even though the real bug is “no route for preflight”.
20
+
21
+ If `baseUrl` is wrong, you’ll see non-JSON errors, 404 HTML, or CORS failures and the inbox stays empty.
22
+
23
+ ### Why `POST /api/beeper/widget-session` runs often
24
+
25
+ That call **mints** the short-lived `x-beeper-session-token`. It runs when there is no token yet, before inbox/read actions, and when refreshing an expiring session. If it runs in a tight loop, the mint endpoint is probably failing (check **503** / JSON `error` and server env `BEEPER_SERVER_KEY`, `CONVEX_SITE_URL`).
26
+
27
+ ## Install
28
+
29
+ ```bash
30
+ pnpm add @beeper/inbox-react @beeper/sdk
31
+ ```
32
+
33
+ ## Host backend session mint
34
+
35
+ Use `@beeper/sdk` on your backend (never browser):
36
+
37
+ ```ts
38
+ import { BeeperClient } from "@beeper/sdk";
39
+
40
+ const beeper = new BeeperClient({
41
+ baseUrl: process.env.BEEPER_BASE_URL!,
42
+ projectId: process.env.BEEPER_PROJECT_ID!,
43
+ apiKey: process.env.BEEPER_SERVER_KEY!,
44
+ });
45
+
46
+ export async function createWidgetSession(subscriberId: string) {
47
+ return beeper.createWidgetSession({
48
+ subscriberId,
49
+ profile: {
50
+ displayName: "John Doe",
51
+ email: "john@example.com",
52
+ },
53
+ });
54
+ }
55
+
56
+ // Optional: revoke active widget sessions (all or by subscriberId)
57
+ export async function revokeWidgetSessions(subscriberId?: string) {
58
+ return beeper.revokeWidgetSessions({ subscriberId });
59
+ }
60
+ ```
61
+
62
+ ## Frontend usage
63
+
64
+ ```tsx
65
+ import {
66
+ BeeperInboxProvider,
67
+ BeeperInboxBell,
68
+ BeeperInboxPanel,
69
+ } from "@beeper/inbox-react";
70
+
71
+ function App() {
72
+ return (
73
+ <BeeperInboxProvider
74
+ baseUrl={import.meta.env.VITE_BEEPER_BASE_URL}
75
+ projectId={import.meta.env.VITE_BEEPER_PROJECT_ID}
76
+ publishableKey={import.meta.env.VITE_BEEPER_PUBLISHABLE_KEY}
77
+ subscriber={{ subscriberId: "user_123" }}
78
+ theme="system"
79
+ customization={{
80
+ accentColor: "#f97316",
81
+ headerTitle: "Notifications",
82
+ }}
83
+ onEvent={(event) => {
84
+ // Hook into your telemetry pipeline.
85
+ // Example events: session.refresh.error, realtime.error, api.error
86
+ console.debug("[beeper-widget-event]", event);
87
+ }}
88
+ >
89
+ <BeeperInboxBell />
90
+ <BeeperInboxPanel />
91
+ </BeeperInboxProvider>
92
+ );
93
+ }
94
+ ```
95
+
96
+ By default, the provider calls `POST /api/beeper/widget-session` on the **same origin**
97
+ as the page (resolved with `new URL(sessionEndpoint, window.location.origin)`), with a JSON body:
98
+
99
+ `{ projectId, subscriberId, profile }`
100
+
101
+ Your backend should mint a token with the **server** API key and return either
102
+ `{ widgetSessionToken }` or `{ data: { widgetSessionToken } }` (matching the Beeper REST shape).
103
+
104
+ ### Beeper web app (`apps/web`)
105
+
106
+ This repo includes a dev proxy at `POST /api/beeper/widget-session`. Configure server env:
107
+
108
+ - `BEEPER_SERVER_KEY` — project API key with `widget:session:create` or `ingest:write`
109
+ - `BEEPER_PROJECT_ID` — optional default if you omit `projectId` in the body (the provider sends `projectId` automatically)
110
+ - `CONVEX_SITE_URL` or `VITE_CONVEX_SITE_URL` — Convex site URL for REST
111
+
112
+ ### `BeeperInboxBell`
113
+
114
+ - Default: **bell** icon + unread badge.
115
+ - `variant="minimal"` restores the text + count pill.
116
+ - `renderTrigger={({ toggle, unreadCount, open, triggerRef }) => <button ref={triggerRef}>…</button>}` — attach `triggerRef` so the panel can anchor correctly.
117
+
118
+ If your host app needs custom session behavior, use `getSessionToken` or `sessionEndpoint`.
119
+
120
+ ## Web push token registration (FCM)
121
+
122
+ After you obtain an FCM token in your app, pass it to the provider so the widget
123
+ registers it automatically:
124
+
125
+ ```tsx
126
+ <BeeperInboxProvider
127
+ {...props}
128
+ push={{
129
+ token: fcmToken,
130
+ platform: "web",
131
+ deviceLabel: "chrome-main",
132
+ autoRegister: true,
133
+ autoUnregister: false,
134
+ }}
135
+ >
136
+ <BeeperInboxBell />
137
+ <BeeperInboxPanel />
138
+ </BeeperInboxProvider>
139
+ ```
140
+
141
+ Manual registration is also available:
142
+
143
+ ```tsx
144
+ const { registerPushToken, unregisterPushToken } = useBeeperInbox();
145
+ await registerPushToken(fcmToken, { platform: "web" });
146
+ await unregisterPushToken(fcmToken);
147
+ ```
148
+
149
+ The widget calls:
150
+ - `POST /api/v1/projects/:projectId/widget/push/register`
151
+ - `POST /api/v1/projects/:projectId/widget/push/unregister`
152
+
153
+ ## Security checklist
154
+
155
+ - Keep `BEEPER_SERVER_KEY` on your backend only. Never expose it in browser code.
156
+ - Use `publishableKey` only for widget initialization and widget-safe routes.
157
+ - Mint short-lived session tokens (`ttlSeconds` around 5-15 minutes).
158
+ - Refresh/re-mint session tokens from your backend when expired.
159
+ - Use `onEvent` to monitor `session.refresh.error`, `api.error`, and `realtime.error`.
160
+ - Rotate API keys periodically and revoke compromised keys immediately.
161
+
162
+ ## Package release checklist
163
+
164
+ ```bash
165
+ pnpm -F @beeper/inbox-react run clean
166
+ pnpm -F @beeper/inbox-react run build
167
+ pnpm -F @beeper/inbox-react run check-types
168
+ ```
169
+
170
+ Then publish from `packages/inbox-react` using your normal npm release workflow.
@@ -0,0 +1,186 @@
1
+ import { type CSSProperties, type ReactNode, type RefObject } from "react";
2
+ export type BeeperInboxTheme = "light" | "dark" | "system";
3
+ export interface BeeperInboxCustomization {
4
+ accentColor?: string;
5
+ radius?: number;
6
+ fontScale?: number;
7
+ compact?: boolean;
8
+ showTopicTabs?: boolean;
9
+ showMarkAll?: boolean;
10
+ headerTitle?: string;
11
+ }
12
+ export interface BeeperInboxSubscriber {
13
+ subscriberId: string;
14
+ displayName?: string;
15
+ email?: string;
16
+ avatarUrl?: string;
17
+ metadata?: Record<string, unknown>;
18
+ }
19
+ export interface BeeperInboxPushRegistration {
20
+ token?: string;
21
+ platform?: "web" | "ios" | "android";
22
+ deviceLabel?: string;
23
+ metadata?: Record<string, unknown>;
24
+ autoRegister?: boolean;
25
+ autoUnregister?: boolean;
26
+ }
27
+ export interface BeeperInboxProviderProps {
28
+ /**
29
+ * Base URL for **Beeper HTTP API** on Convex (no trailing slash).
30
+ * Use your deployment’s **site** URL, e.g. `https://your-slug.convex.site` — the same host
31
+ * where `/api/v1/...` is routed. Not your Vite app URL, and not the `…convex.cloud` websocket URL.
32
+ */
33
+ baseUrl: string;
34
+ projectId: string;
35
+ publishableKey: string;
36
+ sessionToken?: string;
37
+ getSessionToken?: (subscriber: BeeperInboxSubscriber) => Promise<string>;
38
+ sessionEndpoint?: string;
39
+ sessionRequestHeaders?: Record<string, string>;
40
+ subscriber: BeeperInboxSubscriber;
41
+ theme?: BeeperInboxTheme;
42
+ customization?: Partial<BeeperInboxCustomization>;
43
+ push?: BeeperInboxPushRegistration;
44
+ actionLinkTarget?: "_blank" | "_self" | "auto";
45
+ onActionClick?: (action: {
46
+ item: InboxItem;
47
+ actionLabel?: string;
48
+ actionUrl: string;
49
+ }) => boolean | void | Promise<boolean | void>;
50
+ pollIntervalMs?: number;
51
+ onEvent?: (event: BeeperInboxEvent) => void;
52
+ children: ReactNode;
53
+ }
54
+ export type BeeperInboxEvent = {
55
+ type: "session.refresh.start";
56
+ projectId: string;
57
+ subscriberId: string;
58
+ } | {
59
+ type: "session.refresh.success";
60
+ projectId: string;
61
+ subscriberId: string;
62
+ } | {
63
+ type: "session.refresh.error";
64
+ projectId: string;
65
+ subscriberId: string;
66
+ message: string;
67
+ } | {
68
+ type: "api.error";
69
+ projectId: string;
70
+ subscriberId: string;
71
+ path: string;
72
+ status?: number;
73
+ message: string;
74
+ } | {
75
+ type: "realtime.connecting";
76
+ projectId: string;
77
+ subscriberId: string;
78
+ } | {
79
+ type: "realtime.live";
80
+ projectId: string;
81
+ subscriberId: string;
82
+ } | {
83
+ type: "realtime.retry.scheduled";
84
+ projectId: string;
85
+ subscriberId: string;
86
+ attempt: number;
87
+ retryInMs: number;
88
+ } | {
89
+ type: "realtime.error";
90
+ projectId: string;
91
+ subscriberId: string;
92
+ message: string;
93
+ } | {
94
+ type: "realtime.reconnect.manual";
95
+ projectId: string;
96
+ subscriberId: string;
97
+ } | {
98
+ type: "transport.polling";
99
+ projectId: string;
100
+ subscriberId: string;
101
+ };
102
+ interface InboxItem {
103
+ _id: string;
104
+ body: string;
105
+ title?: string;
106
+ createdAt: number;
107
+ readAt?: number;
108
+ metadata?: Record<string, unknown>;
109
+ actionLabel?: string;
110
+ actionUrl?: string;
111
+ }
112
+ interface WidgetConfig {
113
+ convexUrl?: string;
114
+ modeDefault: BeeperInboxTheme;
115
+ accentColor: string;
116
+ radius: number;
117
+ fontScale: number;
118
+ compact: boolean;
119
+ showTopicTabs: boolean;
120
+ showMarkAll: boolean;
121
+ headerTitle: string;
122
+ }
123
+ interface BeeperInboxContextValue {
124
+ open: boolean;
125
+ setOpen: (value: boolean) => void;
126
+ unreadCount: number;
127
+ items: InboxItem[];
128
+ loading: boolean;
129
+ refreshing: boolean;
130
+ connectionState: "connecting" | "live" | "polling" | "error";
131
+ errorMessage: string | null;
132
+ refresh: (options?: {
133
+ silent?: boolean;
134
+ }) => Promise<void>;
135
+ reconnect: () => Promise<void>;
136
+ markRead: (inboxItemId: string) => Promise<void>;
137
+ markAllRead: () => Promise<void>;
138
+ registerPushToken: (token: string, options?: Omit<BeeperInboxPushRegistration, "token" | "autoRegister" | "autoUnregister">) => Promise<void>;
139
+ unregisterPushToken: (token: string) => Promise<void>;
140
+ handleActionClick: (item: InboxItem) => Promise<void>;
141
+ effectiveConfig: WidgetConfig;
142
+ /** Attach to the open button so the panel can anchor under it. */
143
+ triggerRef: RefObject<HTMLElement | null>;
144
+ }
145
+ declare function parseTokenExpiryMs(token: string): number | null;
146
+ declare function isSessionExpiringSoon(expiresAt: number | null, now?: number): boolean;
147
+ export declare function BeeperInboxProvider({ baseUrl, projectId, publishableKey, sessionToken, getSessionToken, sessionEndpoint, sessionRequestHeaders, subscriber, theme, customization, push, actionLinkTarget, onActionClick, pollIntervalMs, onEvent, children, }: BeeperInboxProviderProps): import("react/jsx-runtime").JSX.Element;
148
+ export declare function useBeeperInbox(): BeeperInboxContextValue;
149
+ export type BeeperInboxBellRenderProps = {
150
+ unreadCount: number;
151
+ open: boolean;
152
+ toggle: () => void;
153
+ accentColor: string;
154
+ fontScale: number;
155
+ triggerRef: RefObject<HTMLElement | null>;
156
+ };
157
+ export interface BeeperInboxBellProps {
158
+ /**
159
+ * `bell` — icon + optional count badge (default).
160
+ * `minimal` — text label + count pill (previous default look).
161
+ */
162
+ variant?: "bell" | "minimal";
163
+ /** Used when variant is `minimal`. @default "Inbox" */
164
+ label?: string;
165
+ className?: string;
166
+ style?: CSSProperties;
167
+ /** @default "Open notifications" */
168
+ "aria-label"?: string;
169
+ /** Full control over the trigger; not wrapped in an extra button. */
170
+ renderTrigger?: (props: BeeperInboxBellRenderProps) => ReactNode;
171
+ }
172
+ export declare function BeeperInboxBell({ variant, label, className, style, "aria-label": ariaLabel, renderTrigger, }: BeeperInboxBellProps): import("react/jsx-runtime").JSX.Element;
173
+ export interface BeeperInboxPanelProps {
174
+ /**
175
+ * `anchor` — fixed under the bell / `triggerRef` (default).
176
+ * `fixed-bottom-end` — previous viewport corner placement (e.g. floating widget).
177
+ */
178
+ placement?: "anchor" | "fixed-bottom-end";
179
+ }
180
+ export declare function BeeperInboxPanel({ placement, }?: BeeperInboxPanelProps): import("react/jsx-runtime").JSX.Element | null;
181
+ export declare const __internal: {
182
+ parseTokenExpiryMs: typeof parseTokenExpiryMs;
183
+ isSessionExpiringSoon: typeof isSessionExpiringSoon;
184
+ };
185
+ export {};
186
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE3D,MAAM,WAAW,wBAAwB;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CA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