[ CONVEX COMPONENT · STABLE · MIT ]
@vllnt/convex-notifications
Per-subject directed inbox — deliver notifications with read/unread state and fan-out
STABLE 0.1.0 · 2 GitHub stars
Package details
Install
The untagged install gets the latest stable version (0.1.0). The canary tag tracks main (0.2.0-canary.c9eceef).
pnpm add @vllnt/convex-notifications
pnpm add @vllnt/convex-notifications@canaryRegister the component
Add it to your app’s convex/convex.config.ts, then run npx convex dev to generate the references.
import { defineApp } from "convex/server";
import notifications from "@vllnt/convex-notifications/convex.config";
const app = defineApp();
app.use(notifications);
export default app;Use it
Usage, options and examples are in the package README.
Downloads
- Last 7 days
- 472
- Since first publish
- 3,459
Downloads per week since 14 June 2026, oldest on the left. Weeks count back from 23 November 2026, so the first one may be shorter than seven days.
472 downloads in the last 7 days. 3,459 downloads since 14 June 2026. Source: npm, counted through 23 November 2026.
Show downloads per week as a table
| Week | Downloads |
|---|---|
| 14 June 2026 to 15 June 2026 | 137 |
| 16 June 2026 to 22 June 2026 | 393 |
| 23 June 2026 to 29 June 2026 | 14 |
| 30 June 2026 to 6 July 2026 | 79 |
| 7 July 2026 to 13 July 2026 | 42 |
| 14 July 2026 to 20 July 2026 | 20 |
| 21 July 2026 to 27 July 2026 | 6 |
| 28 July 2026 to 3 August 2026 | 3 |
| 4 August 2026 to 10 August 2026 | 7 |
| 11 August 2026 to 17 August 2026 | 21 |
| 18 August 2026 to 24 August 2026 | 9 |
| 25 August 2026 to 31 August 2026 | 340 |
| 1 September 2026 to 7 September 2026 | 363 |
| 8 September 2026 to 14 September 2026 | 54 |
| 15 September 2026 to 21 September 2026 | 18 |
| 22 September 2026 to 28 September 2026 | 148 |
| 29 September 2026 to 5 October 2026 | 126 |
| 6 October 2026 to 12 October 2026 | 108 |
| 13 October 2026 to 19 October 2026 | 70 |
| 20 October 2026 to 26 October 2026 | 299 |
| 27 October 2026 to 2 November 2026 | 366 |
| 3 November 2026 to 9 November 2026 | 251 |
| 10 November 2026 to 16 November 2026 | 113 |
| 17 November 2026 to 23 November 2026 | 472 |
Release history
Every release on a timeline, oldest on the left. A tall mark with its version is a stable release; a short mark is a canary build. The time axis is the one of the downloads chart, so a release stands above the week it shipped in.
1 stable release and 9 canary builds since 14 June 2026. Latest stable: 0.1.0 on 1 September 2026.
Show every release as a table
| Version | Kind | Published |
|---|---|---|
| 0.2.0-canary.c9eceef | canary | 31 October 2026 |
| 0.1.0 | stable | 1 September 2026 |
| 0.1.0-canary.574a29f | canary | 1 September 2026 |
| 0.1.0-canary.27935a0 | canary | 31 August 2026 |
| 0.1.0-canary.be06c2b | canary | 31 August 2026 |
| 0.1.0-canary.98c82f2 | canary | 31 August 2026 |
| 0.1.0-canary.eba758b | canary | 16 June 2026 |
| 0.1.0-canary.bf63d2c | canary | 16 June 2026 |
| 0.1.0-canary.b24e1eb | canary | 16 June 2026 |
| 0.1.0-canary.3721294 | canary | 14 June 2026 |
Changelog
The newest stable releases of @vllnt/convex-notifications, with the notes from its changelog.
0.1.0
Fixed
- Apply the documented 30-day default retention window instead of deleting newly read notifications on the next daily sweep.
- Reject invalid maintenance batches and fan-out limits, with absolute 500-row transaction caps, to prevent scheduler loops and unbounded write amplification.
- Maintain unread counts transactionally with the official aggregate component instead of an unbounded inbox scan.
- Require a payload parser for typed clients so stored opaque values cannot violate
TPayload.
Changed
- Treat Convex
_generatedoutput as CLI-owned, exclude it from formatting, and expose a dedicated codegen script. - Require
convex@^1.45.0and updateconvex-testto^0.0.56.
Added
- First release of
@vllnt/convex-notifications— a per-subject directed inbox with read/unread state and fan-out. deliver(subjectRef | subjectRefs[], type, payload?)fans one notification out to each recipient, minting anotificationIdper row and inserting it unread; rejects an empty fan-out (EMPTY_FANOUT) and one overmaxFanOut(FANOUT_TOO_LARGE).markRead(notificationId)marks one notification read (idempotent), stampingreadAt;markAllRead(subjectRef)marks a subject's whole unread inbox in bounded, self-rescheduling batches.get(notificationId)returns the current notification (ornull);list(subjectRef, paginationOpts, { unreadOnly? })pages a subject's inbox newest-first via the standard Convex pagination envelope;unreadCount(subjectRef)returns the unread total.- Subject-bounded reads: a
list/unreadCountfor one subject never spans another subject's rows (the indexes are subject-keyed). - Server-sourced time: every handler stamps
createdAt/readAtfromDate.now()inside the mutation — no caller-supplied clock. - Typed generics:
Notifications<TPayload>with an optionalpayloadValidatorhost parser narrowing the opaque storedpayloadat the client boundary on write and read — nov.any()dump, no unchecked cast. - Bounded, self-rescheduling
purge(take(batch)+ scheduler) that removes only read notifications past theircreatedAtcutoff, plus a built-in daily purge cron (crons.ts); unread notifications are never purged. Default retention 30 days. - Mount-safe: correct under multiple
app.use(component, { name })mounts — each instance is sandboxed, the cron is registered per instance.
Licence
Released under the MIT licence. The full text is in the source repository.
[ PACKAGE ]
- Stable
- 0.1.0
- Canary
- 0.2.0-canary.c9eceef
- GitHub stars
- 2 GitHub stars
- Licence
- MIT
- Issues
- Open an issue