# Notifications
In-app notifications
- Package: @bijectionhq/notifications
- Category: Messaging
- Status: Reference
- License: Apache-2.0
- Bijection source (repository access required): https://github.com/bijectionhq/notifications/tree/8eeeb547fe47cd8b2728b4cf2adda6e9cf005fda
- Upstream: https://github.com/ben-katz/convex-notification/tree/7db3c9cf993fcefcf9b21828533e1a5ceb8d7598
- Documentation: https://docs.bijection.com/components/using
- Directory: https://bijection.com/components/notifications
## Get the source
Bijection repository access is required. Request access at https://bijection.com/contact.
```sh
git clone https://github.com/bijectionhq/notifications.git
cd notifications
git checkout 8eeeb547fe47cd8b2728b4cf2adda6e9cf005fda
```
## Before using this component
Read the package README at the recorded revision for setup, dependencies, and API examples. Upstream documentation describes the original package and may differ from the Bijection adaptation. This is a source candidate for evaluation. Catalog inclusion does not establish npm availability or runtime qualification. Check compatibility with your SDK and deployment before adoption. External providers run their own compute.
## Upstream package documentation
Recorded 2026-10-23. This describes convex-notification; check the Bijection adaptation separately.
A fully-configurable Convex component that provides a typed notification system for in-app messaging. It handles the storage, querying, and delivery of notifications within your Convex application.
### Use cases
- Build user notification feeds for social media apps, messaging platforms, or collaboration tools
- Send system notifications for order updates, payment confirmations, or account changes in e-commerce applications
- Implement real-time alerts for admin dashboards, monitoring systems, or workflow management tools
- Create notification queues for background job results, data processing updates, or scheduled reminders
### How it works
Add the component to your app:
```ts
// convex/convex.config.ts
import { defineApp } from "convex/server";
import notification from "convex-notification/convex.config.js";
const app = defineApp();
app.use(notification);
export default app;
```
Register the notification payloads your app supports:
```ts
// convex/notifications/client.ts
import { v } from "convex/values";
import { components } from "../_generated/api";
import { defineNotifications } from "convex-notification";
export const notifications = defineNotifications(components.notification, {
defaultListLimit: 50, // Used when querying without pagination.
batchChunkSize: 100, // Page size when querying with pagination.
kinds: {
// These can be configured to your needs
team_invite: v.object({
title: v.string(),
body: v.optional(v.string()),
href: v.string(),
inviteId: v.string(),
}),
admin_broadcast: v.object({
title: v.string(),
body: v.optional(v.string()),
href: v.optional(v.string()),
}),
},
});
```
Expose App-Facing Functions with your own auth resolution:
```ts
// convex/notifications/api.ts
import { makeNotificationAPI } from "convex-notification/server";
import { getCurrentUserOrThrow } from "../auth";
import { notifications } from "./client";
export const userNotifications = makeNotificationAPI(notifications, {
resolveTargetId: async (ctx) => {
const user = await getCurrentUserOrThrow(ctx);
return user._id;
},
});
```
Export the generated Convex functions:
```ts
// convex/notifications.ts
import { userNotifications } from "./notifications/api";
export const {
list,
listPage,
counts,
unseenCount,
markSeen,
markAllSeen,
dismiss,
dismissAll,
} = userNotifications;
```
Create notifications from the backend:
```ts
await notifications.create(ctx, {
targetId: userId,
kind: "team_invite",
data: {
title: "You were invited to a team",
body: "Open the invite to accept it.",
href: "/invite/abc123",
inviteId: "abc123",
},
source: { type: "invite", id: "abc123" },
dedupeKey: "invite:abc123",
});
```
The `data` object is type-checked from your registered `kind` configuration.