notifkit 0.1.11 → 0.1.13

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 CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  **You shouldn't have to build a notification system.**
6
6
 
7
- Self-hosted notification infrastructure for product notifications. One API call handles email, SMS, push, and webhooks, with preferences, quiet hours, retries, fallback, scheduling, workflows, an admin dashboard, and delivery logs built in.
7
+ Self-hosted notification infrastructure for product notifications. One API call handles push, email, SMS, chat, and webhooks, with preferences, quiet hours, retries, fallback, scheduling, workflows, an admin dashboard, and delivery logs built in.
8
8
 
9
9
  [![npm version](https://img.shields.io/npm/v/notifkit.svg?style=flat-square&color=6366f1)](https://www.npmjs.com/package/notifkit) [![npm downloads](https://img.shields.io/npm/dm/notifkit.svg?style=flat-square&color=6366f1)](https://www.npmjs.com/package/notifkit) [![Coverage](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/devkitshq/notifkit/badges/coverage.json&style=flat-square)](https://github.com/devkitshq/notifkit/actions/workflows/ci.yml) [![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-3178c6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Node.js](https://img.shields.io/badge/node-%3E%3D22.0.0-339933.svg?style=flat-square)](https://nodejs.org) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](./LICENSE)
10
10
 
@@ -12,23 +12,9 @@ Self-hosted notification infrastructure for product notifications. One API call
12
12
 
13
13
  </div>
14
14
 
15
- ### Sending one notification is easy
15
+ Like Knock or Courier, except it runs on the PostgreSQL and Redis you already have, your workflows live in your code, and there is no per-message bill.
16
16
 
17
17
  ```ts
18
- await sendEmail({
19
- to: user.email,
20
- subject: "Order Shipped",
21
- ...
22
- });
23
- ```
24
-
25
- Sending them reliably is the hard part. Users opt out. People are asleep. Push tokens die. Providers throw 503s. Channels fail and need fallback. Somewhere along the way you need timezone-aware quiet hours, future scheduling, deduplication, multi-channel templates, delivery logs, unsubscribe handling, multi-step workflows, and a dead-letter queue nobody wants to maintain.
26
-
27
- notifkit is that machinery. Your app makes one typed call, and notifkit decides who gets the notification, which channel to use, when to send it, whether the user is allowed to receive it, and what to do when delivery fails.
28
-
29
- ```ts
30
- import { notifkit } from "notifkit";
31
-
32
18
  await notifkit.notify({
33
19
  user: "usr_123",
34
20
  template: "order-shipped",
@@ -39,269 +25,67 @@ await notifkit.notify({
39
25
 
40
26
  That call tries push, then email if push fails. Preferences, consent, quiet hours, retries, deduplication, throttling, template rendering, and delivery tracking all happen behind it.
41
27
 
42
- ## How it runs
43
-
44
- notifkit is an orchestration engine and a typed SDK.
45
-
46
- ```mermaid
47
- flowchart TD
48
- App["Your Application / AI Agent / Browser<br/>Typed SDK · REST API · MCP Server · Admin Dashboard"]
49
-
50
- App -->|"HTTP POST /v1/notify"| API
51
- App -->|"HTTP GET /admin"| API
52
-
53
- API["Notifkit API Server<br/>Schema Validation · Auth · Multi-Tenancy<br/>Admin SPA · Priority Queue Ingestion"]
54
-
55
- API --> PG
56
- API --> REDIS
57
-
58
- PG[("PostgreSQL — Storage<br/>Users · Preferences<br/>Templates · Workflows<br/>Delivery Logs · DLQ")]
59
- REDIS[("Redis — Streams / ZSET<br/>Priority Queues<br/>Scheduled Sends<br/>Sliding Rate Limits")]
60
-
61
- subgraph WORKERS["Background Workers Pipeline"]
62
- direction LR
63
- ENRICH["Enricher<br/>(Resolve)"] --> ENGINE["Engine<br/>(Quiet Hours)"] --> DELIVER["Delivery<br/>(Rate Limits / CB)"]
64
- ENGINE --> SCHED["Scheduler<br/>(sendAt / QH)"]
65
- SCHED --> DELIVER
66
- end
67
- REDIS -->|"consume"| ENRICH
68
- ENRICH -.->|"read / write state"| PG
69
- DELIVER -.->|"delivery logs"| PG
70
- DELIVER -->|"Dispatch"| PROVIDERS
71
-
72
- PROVIDERS["Provider Transports<br/>Email: Resend · Push: Firebase (FCM) · SMS: Twilio<br/>Chat: Slack, Telegram, Discord, WhatsApp<br/>Webhooks: Custom HTTP · Local: Console"]
73
-
74
- classDef entry stroke:#6366f1,stroke-width:2px
75
- classDef store stroke:#0ea5e9,stroke-width:2px
76
- classDef work stroke:#22c55e,stroke-width:2px
77
- class App,API,PROVIDERS entry
78
- class PG,REDIS store
79
- class ENRICH,ENGINE,DELIVER,SCHED work
80
- ```
81
-
82
- `NotifkitServer` runs the HTTP REST API router (`/v1/notify`, `/health`, `/metrics`), the built-in admin dashboard (`/admin`), and the background worker pipelines: enricher, decision engine, scheduler, and delivery. `NotifkitClient` is the lightweight client your application uses to trigger notifications, sync templates, and manage users over HTTP.
83
-
84
- ### Topologies
85
-
86
- In a single process, the API and all workers run in the same Node.js process (`services: ["all"]`), which works for small and medium apps, side projects, and staging. Distributed, you run stateless API servers (`services: ["api"]`) behind a load balancer and scale worker pools (`services: ["enricher", "engine", "delivery", "scheduler"]`) horizontally across Redis Streams consumer groups.
87
-
88
- ## Quickstart (needs 5 mins)
89
-
90
- ### 1. Install
91
-
92
- ```bash
93
- npm install notifkit @notifkit/provider-resend
94
- npm install -D tsx @testcontainers/postgresql @testcontainers/redis
95
- ```
96
-
97
- The `@testcontainers/*` packages start throwaway PostgreSQL and Redis containers for local development when `DATABASE_URL` and `REDIS_URL` are not set.
98
-
99
- > [!WARNING]
100
- > In production, point notifkit at real PostgreSQL and Redis instances via `DATABASE_URL` and `REDIS_URL`, and run with `NODE_ENV=production`.
101
-
102
- ### 2. Run the engine
103
-
104
- `server.ts` starts the API and the worker pipelines. In development it auto-starts those containers, so Docker is the only prerequisite.
105
-
106
- ```ts
107
- import { NotifkitServer } from "notifkit";
108
- import { ResendTransport } from "@notifkit/provider-resend";
109
-
110
- const server = new NotifkitServer({
111
- services: ["all"],
112
- port: 3000,
113
- databaseUrl: process.env.DATABASE_URL,
114
- redisUrl: process.env.REDIS_URL,
115
- adminUser: {
116
- email: "admin@example.com",
117
- password: "supersecretpassword123",
118
- },
119
- providers: [
120
- new ResendTransport({
121
- apiKey: process.env.RESEND_API_KEY!,
122
- from: "notifications@yourdomain.com",
123
- }),
124
- ],
125
- });
126
-
127
- await server.start();
128
- console.log("notifkit listening on http://localhost:3000");
129
- ```
130
-
131
- `from` is required on `ResendTransport` — it is the sender for any template that does not name its own, and it has to be an address on a domain you have verified in Resend. A template can override it with its own `from`, so one transport can serve both `no-reply@` receipts and `marketing@` campaigns.
132
-
133
- `adminUser` (or `ADMIN_EMAIL` and `ADMIN_PASSWORD` in the environment) seeds your initial dashboard login credentials in PostgreSQL on startup.
134
-
135
- `ADMIN_API_KEY` is the root credential that mints project API keys. In production, use a long random string (`openssl rand -hex 32`). Locally, any string works:
136
-
137
- ```bash
138
- ADMIN_API_KEY=supersecretkey RESEND_API_KEY=re_xxx npx tsx server.ts
139
- ```
140
-
141
- ### 3. Create a project and its API key
142
-
143
- Every `/v1/*` route requires a project API key, and only the admin credential can mint one. You can create projects via the CLI helper or in the admin dashboard under **Projects & API Keys** (`/admin/projects`):
144
-
145
- ```bash
146
- ADMIN_API_KEY=supersecretkey npx notifkit-create-project "my-app"
147
- ```
148
-
149
- ```
150
- Project "my-app" created. Save the API key now — it is not recoverable.
151
-
152
- NOTIFKIT_PROJECT_ID=1ce67fa1-b4a9-4985-8046-ef6018912b2a
153
- NOTIFKIT_API_KEY=nk_live_f57c57b76d795cef89e2dbf6b6f352a36…
154
- ```
155
-
156
- The server stores only a SHA-256 hash of the key, so the `nk_live_…` value is printed once and never again — put it in your app's `.env` now. Point the script at another host with `NOTIFKIT_URL`, and mint further keys later with `POST /v1/projects/:id/keys` (`role: "read_only"` there gets you a key that can read but not send) or directly in the web dashboard.
157
-
158
- ### 4. Dispatch your first notification
28
+ ## Why notifkit
159
29
 
160
- `client.ts` is your application code. It talks to the server over HTTP: register a template, register a user, and send.
161
-
162
- ```ts
163
- // client.ts
164
- import { NotifkitClient } from "notifkit";
30
+ - **Doesn't lose messages.** Redis Streams consumer groups, 24-hour idempotency, retries, circuit breakers and a replayable dead-letter queue. [Chaos-tested](./tests/chaos): workers killed with `SIGKILL` mid-stream, Redis and PostgreSQL restarted under load, Redis wiped, and 100k messages with flat memory.
31
+ - **Runs on a small box.** 200 notifications/sec sustained on 2 vCPUs, over a 15-minute soak with provider failures, retries and webhooks. [Method and numbers →](https://notifkit.dev/articles/notifications-on-a-25-dollar-server.html)
32
+ - **Runs in production.** About 260K notifications a day (8M a month) of email, push and OTPs at our own company.
33
+ - **Your stack, your data.** PostgreSQL and Redis you already run, provider accounts you already have, and nothing that bills per send. Trust me it will save you $$$
34
+ - **Workflows in code.** Multi-step sequences that wait days, block on events and survive restarts, written in TypeScript and kept in git.
165
35
 
166
- const notifkit = new NotifkitClient({
167
- baseUrl: "http://localhost:3000",
168
- apiKey: process.env.NOTIFKIT_API_KEY!,
169
- });
170
-
171
- // 1. Register a template
172
- await notifkit.syncTemplates({
173
- templates: [
174
- {
175
- id: "order-shipped",
176
- channel: "email",
177
- content: { subject: "Order #{{orderId}} Shipped", text: "Your order is on the way!" },
178
- },
179
- ],
180
- });
36
+ ## Quickstart
181
37
 
182
- // 2. Register a user (supports id + contacts array or object)
183
- await notifkit.addUser("usr_123", [{ channel: "email", target: "alex@acme.com" }]);
184
-
185
- // 3. Dispatch
186
- await notifkit.notify({
187
- user: "usr_123",
188
- template: "order-shipped",
189
- channels: ["email"],
190
- data: { orderId: "9481" },
191
- });
192
- ```
193
-
194
- With the server still running in the first terminal, run the client in a second one:
38
+ You need Node 22+ and Docker running. In development notifkit starts throwaway PostgreSQL and Redis containers for you.
195
39
 
196
40
  ```bash
197
- NOTIFKIT_API_KEY=nk_live_xxx npx tsx client.ts
41
+ npm create notifkit@latest my-app # or: npx notifkit create my-app
42
+ cd my-app
43
+ npm run dev # leave it running
198
44
  ```
199
45
 
200
- ### 5. Or call the REST API directly
201
-
202
- The Node.js SDK is optional. notifkit exposes a standard HTTP REST API, so you can dispatch notifications and manage resources from any language (cURL, Python, Go, and so on). The same project API key goes in the `Authorization` header (an `x-api-key` header works too):
46
+ In a second terminal:
203
47
 
204
48
  ```bash
205
- curl -X POST http://localhost:3000/v1/notify \
206
- -H "Content-Type: application/json" \
207
- -H "Authorization: Bearer $NOTIFKIT_API_KEY" \
208
- -d '{
209
- "user": "usr_123",
210
- "template": "order-shipped",
211
- "channels": ["email"],
212
- "data": { "orderId": "9481" }
213
- }'
49
+ npm run setup # create a project, save its API key to .env
50
+ npm run send # send a test notification
214
51
  ```
215
52
 
216
- ### Development vs. production
217
-
218
- Locally, Docker is the only prerequisite: in development notifkit starts throwaway PostgreSQL and Redis containers for you. In production you need Node 22+, PostgreSQL, and Redis, and you run migrations by pointing `drizzle-kit` at `node_modules/notifkit/drizzle`.
219
-
220
- ## Running in production
221
-
222
- notifkit runs in production at my own company, delivering 100K+ notifications a day across email, push, and OTPs. I built it because I needed it and didn't want to spend months rebuilding distributed notification plumbing or pay a SaaS per alert. It runs on your servers, with your provider accounts and your data.
223
-
224
- ### Reliability and resilience
53
+ The default provider prints notifications to the server terminal, so you need no provider account to try it. Pass `--provider resend`, `twilio` or `fcm` to start with a real one. See [create-notifkit](./packages/create-notifkit) for the options.
225
54
 
226
- Every component is tested against failure using real testcontainers:
55
+ To add notifkit to an app you already have, or to see what each generated file does, follow the [full quickstart](https://notifkit.dev/docs/quickstart.html). For production, see [Deployment](https://notifkit.dev/docs/deployment.html).
227
56
 
228
- - **Crash recovery**: Worker processes killed with `SIGKILL` mid-stream lose zero messages. Redis Streams consumer groups (PEL) auto-reclaim and replay in-flight work.
229
- - **Connection resilience**: Disconnections from PostgreSQL or Redis trigger automatic backpressure and reconnects without dropping state.
230
- - **High throughput & concurrency**: 10,000+ notification bursts with sliding-window rate limiters, flat memory profiles, and 24-hour idempotency deduplication.
57
+ ## How it compares
231
58
 
232
- ## Scope
59
+ | | notifkit | Novu |
60
+ | :--------------- | :-------------------------- | :--------------------------------------------- |
61
+ | Self-hosted | Yes | Yes |
62
+ | Storage | PostgreSQL + Redis | MongoDB + Redis |
63
+ | Workflows | TypeScript in your codebase | Code via a bridge endpoint, or a visual editor |
64
+ | Channel fallback | Built in: `fallback: true` | Built from workflow step conditions |
65
+ | In-app inbox UI | No | Yes |
66
+ | Admin dashboard | Yes | Yes |
67
+ | MCP server | Yes | Yes |
68
+ | License | MIT, no paid edition | MIT core, commercial enterprise modules |
233
69
 
234
- notifkit is the durable notification layer that runs inside your own stack. It is not a marketing automation suite, and it does not replace Customer.io, OneSignal, or SendGrid. You bring your own provider accounts and pay them directly.
70
+ **Knock and Courier** are hosted SaaS. Both have a free tier of about 10k notifications a month; past that, Knock's Starter plan is $250/month for 50k plus $5 per extra 1,000, and Courier bills per send. notifkit costs whatever your Postgres and Redis cost. _(Pricing checked October 2026. See their pricing pages for current numbers.)_
235
71
 
236
- First-party providers cover Resend, Firebase Cloud Messaging, Slack, Twilio, Telegram, Discord, and WhatsApp. Anything else is a `Transport` class with a `send()` method.
72
+ If you need an in-app inbox or 75 provider adapters today, Novu is the more complete choice. Choose notifkit if you want reliability features like provider fallback without a commercial license, a small codebase you can read, and published failure testing.
237
73
 
238
- ## Agent-operable
74
+ Longer comparisons: [Novu](https://notifkit.dev/docs/vs/novu.html) · [Knock](https://notifkit.dev/docs/vs/knock.html) · [Courier](https://notifkit.dev/docs/vs/courier.html)
239
75
 
240
- https://github.com/user-attachments/assets/4dff98bb-37d3-44b4-bf46-9607c1cd89b5
76
+ ## What it handles
241
77
 
242
- An AI agent can operate notifkit directly. Connect the notifkit MCP server ([`@notifkit/mcp`](./packages/mcp)) to Claude Code, Cursor, Claude Desktop, Gemini, or any MCP-compatible agent:
243
-
244
- ```bash
245
- npx -y @notifkit/mcp
246
- ```
247
-
248
- ### Ask your agent
249
-
250
- ```text
251
- You: Why didn't usr_9182 receive their password reset?
252
-
253
- Agent: The notification was suppressed because usr_9182's email
254
- address has a hard-bounce suppression from yesterday.
255
- ```
256
-
257
- Your application and your AI agents use the same notification infrastructure. Through MCP an agent can:
258
-
259
- - Send one-off notifications or campaigns to users, lists, and segments (`send_notification`, `send_campaign`)
260
- - Diagnose delivery issues by inspecting message histories, provider responses, and quiet hours (`get_delivery_logs`, `get_notification`)
261
- - Schedule future sends and cancel pending notifications (`list_scheduled`, `cancel_notification`)
262
- - Check delivery, open, click, bounce, and complaint metrics (`list_campaigns`, `get_campaign_stats`)
263
- - List, preview, and update templates with sample data (`list_templates`, `preview_template`, `upsert_template`)
264
- - Look up users, contacts, preferences, and segment membership (`list_users`, `get_user_preferences`, `update_user_preferences`)
265
- - Trigger workflows and inspect workflow runs (`create_workflow`, `trigger_workflow`, `get_workflow_run`)
266
- - Manage bounce suppressions, check system queues, and replay dead-letter messages (`list_suppressions`, `get_dead_letters`, `replay_dead_letter`)
267
-
268
- ### The same task, with and without an agent
269
-
270
- | Without an agent | With the notifkit MCP server |
271
- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
272
- | Query the database for contact info, open Twilio or Resend or write a throwaway script, format the payload, check the user's timezone by hand, send it, and hope it delivered. | **You:** _"Send an urgent update to alex@acme.com that his package was lost in transit and support is rushing a replacement. Text him if push doesn't deliver."_<br><br>**Agent:** Looks up `alex@acme.com`, renders the template, dispatches push with SMS fallback, bypasses quiet hours because the send is urgent, tracks delivery status, and confirms it reached his phone. |
273
-
274
- [MCP documentation](https://notifkit.dev/docs/mcp.html)
275
-
276
- ## AI-assisted migration
277
-
278
- Already have notification code scattered across your application? Point your coding agent at:
279
-
280
- ```text
281
- https://notifkit.dev/llms-full.txt
282
- ```
283
-
284
- It can read notifkit's API from there, find ad-hoc notification code in your repository, and refactor it into notifkit calls.
285
-
286
- ## Feature matrix
287
-
288
- | Feature | Capabilities |
289
- | :------------------ | :--------------------------------------------------------------------------------------- |
290
- | **Channels** | `email`, `sms`, `push`, `webhook`, `telegram`, `discord`, `whatsapp`, `slack`, `console` |
291
- | **Admin Dashboard** | Built-in SPA at `/admin` for live feeds, DLQ triage, queue metrics, workflows, templates |
292
- | **Targeting** | A user, a list of users, a segment, or a topic |
293
- | **Priorities** | `low`, `normal`, `high`, `critical`, on separate stream lanes |
294
- | **Scheduling** | Future sends with `sendAt`, quiet-hours deferral, cancellation |
295
- | **Preferences** | Per-user channel and topic opt-outs, quiet hours, contact-level overrides |
296
- | **Workflows** | Multi-step sequences with `wait`, `waitForEvent`, and `notify` steps |
297
- | **Reliability** | Redis Streams, 24h idempotency, retries, DLQ, provider circuit breakers |
298
- | **Templates** | `{{var}}` interpolation with destination-aware escaping |
299
- | **AI** | Optional LLM augmentation before render via the Vercel AI SDK |
300
- | **Multi-tenancy** | Projects with isolated keys, data, and rate limits |
301
- | **Consent** | RFC 8058 one-click unsubscribe; complaints and hard bounces suppress automatically |
302
- | **Reporting** | Campaign labels with delivery and engagement totals |
303
- | **Agent operation** | MCP server for sending, triage, campaigns, templates, workflows, and system operations |
304
- | **Observability** | Prometheus `/metrics`, `/health`, `/live`, `/ready`, and queryable delivery logs |
78
+ | The question | What notifkit does |
79
+ | :------------------------------------------ | :------------------------------------------------------------------ |
80
+ | "What happens when a provider goes down?" | Circuit breakers, exponential backoff, DLQ replay |
81
+ | "What if a worker dies mid-send?" | Consumer groups reclaim and replay in-flight messages |
82
+ | "Will a retried request send twice?" | Same `X-Idempotency-Key` within 24 hours is delivered once |
83
+ | "What if push fails?" | Falls back to the next channel you listed: SMS, then email |
84
+ | "What if the user is asleep?" | Quiet hours in the user's timezone; the send waits for the window |
85
+ | "What about OTPs during a marketing blast?" | `critical` runs on its own lane and skips quiet hours |
86
+ | "What if they unsubscribed?" | RFC 8058 one-click unsubscribe; bounces and complaints suppress too |
87
+ | "Can several apps share one deployment?" | Projects, each with its own API keys, data and rate limit |
88
+ | "Can my Python or Go service use it?" | Yes. It is a REST API; the TypeScript SDK is optional |
305
89
 
306
90
  ## Providers
307
91
 
@@ -309,12 +93,12 @@ Bring your own provider accounts. First-party packages:
309
93
 
310
94
  - [`@notifkit/provider-resend`](./packages/provider-resend): transactional email via Resend
311
95
  - [`@notifkit/provider-fcm`](./packages/provider-fcm): push notifications via Firebase Cloud Messaging
312
- - [`@notifkit/provider-slack`](./packages/provider-slack): Slack messages via Incoming Webhooks or the Web API
313
96
  - [`@notifkit/provider-twilio`](./packages/provider-twilio): SMS via Twilio, with signature-verified delivery status callbacks
97
+ - [`@notifkit/provider-slack`](./packages/provider-slack): Slack messages via Incoming Webhooks or the Web API
314
98
  - [`@notifkit/provider-telegram`](./packages/provider-telegram): messages via a Telegram bot
315
99
  - [`@notifkit/provider-discord`](./packages/provider-discord): messages via a Discord webhook
316
100
  - [`@notifkit/provider-whatsapp`](./packages/provider-whatsapp): messages via Meta's WhatsApp Cloud API
317
- - [`@notifkit/provider-console`](./packages/provider-console): console transport for local development and testing
101
+ - [`@notifkit/provider-console`](./packages/provider-console): prints instead of sending, for development and tests
318
102
 
319
103
  For anything else, implement a `Transport`:
320
104
 
@@ -327,56 +111,34 @@ class MyTransport implements Transport {
327
111
  }
328
112
  ```
329
113
 
330
- The keys, the billing, and the deliverability stay yours.
331
-
332
- ## Admin dashboard
333
-
334
- notifkit includes a web console served directly at `/admin` for operational management:
335
-
336
- - **Live activity feed & logs**: Real-time SSE stream for worker transitions, delivery histories, and error diagnostics.
337
- - **Queue analytics & DLQ triage**: Redis Streams lane gauges (`low`, `normal`, `high`, `critical`), message replay, and dead-letter queue management.
338
- - **Workflows & template studio**: Visual multi-step sequence viewer (`wait`, `waitForEvent`, `notify`) with execution step tracing and live template previews.
339
- - **Users, projects & API keys**: Manage recipient preferences, quiet hours, projects, and scoped API keys (`admin` or `read_only`).
340
-
341
- ### Accessing and running the dashboard
114
+ ## Run it from your AI agent
342
115
 
343
- Once the server is running, visit `http://localhost:3000/admin` and sign in with the admin credentials you configured.
344
-
345
- You can also create or update admin users at any time via the CLI:
116
+ Connect the notifkit MCP server to Claude Code, Cursor, or any MCP client:
346
117
 
347
118
  ```bash
348
- npx notifkit-create-admin admin@example.com supersecretpassword123
119
+ claude mcp add notifkit \
120
+ --env NOTIFKIT_URL=http://localhost:3000 \
121
+ --env NOTIFKIT_API_KEY=nk_live_... \
122
+ -- npx -y @notifkit/mcp
349
123
  ```
350
124
 
351
- In production, the pre-built dashboard bundle in `dashboard/dist` is served automatically. In development, run `npm --prefix dashboard run dev` to start the Vite development server with hot module replacement (the API server automatically proxies `/admin` requests to port 5173).
125
+ Then ask things like "why didn't usr_9182 get their password reset?" or "how did yesterday's spring-sale campaign do?". [MCP docs →](https://notifkit.dev/docs/mcp.html)
352
126
 
353
- ## Documentation
127
+ Already have notification code scattered across your app? Point your coding agent at `https://notifkit.dev/llms-full.txt` and ask it to refactor that code into notifkit calls.
128
+
129
+ ## Admin dashboard
354
130
 
355
- Everything lives at [**notifkit.dev/docs**](https://notifkit.dev/docs/).
131
+ Templates, workflows, and routing live in your code. The dashboard at `/admin` is an optional ops console: a live activity feed, delivery logs, queue depth per priority lane, workflow runs step by step, dead-letter replay, scheduled-send cancellation, and project and API key management.
356
132
 
357
- | Guide | Description |
358
- | :----------------------------------------------------------------------------- | :------------------------------------------------------- |
359
- | [Quickstart](https://notifkit.dev/docs/quickstart.html) | Install to first delivered notification |
360
- | [How it works](https://notifkit.dev/docs/concepts.html) | Core concepts and the notification pipeline |
361
- | [Channels & fallback](https://notifkit.dev/docs/guides/routing.html) | Multicast, ordered fallback, and custom transports |
362
- | [Preferences & quiet hours](https://notifkit.dev/docs/guides/preferences.html) | Preference, consent, and timing rules |
363
- | [Templates & AI](https://notifkit.dev/docs/guides/templates.html) | Interpolation, escaping, and per-channel content |
364
- | [Segments & scheduling](https://notifkit.dev/docs/guides/segments.html) | Fan-out, priority lanes, `sendAt`, and idempotency |
365
- | [Workflows](https://notifkit.dev/docs/guides/workflows.html) | Multi-step sequences, recurring sends, and digests |
366
- | [Examples](https://notifkit.dev/docs/examples.html) | Runnable projects |
367
- | [Architecture](https://notifkit.dev/docs/architecture.html) | Streams, delivery guarantees, topologies, and data model |
368
- | [Deployment](https://notifkit.dev/docs/deployment.html) | Docker, Compose, and production topologies |
369
- | [Operations](https://notifkit.dev/docs/operations.html) | Health, metrics, DLQ, key rotation, and shutdown |
370
- | [Reference](https://notifkit.dev/docs/reference.html) | API, payloads, and SDK methods |
371
- | [MCP server](https://notifkit.dev/docs/mcp.html) | Operate notifkit from an AI agent |
133
+ To sign in, set `ADMIN_EMAIL` and `ADMIN_PASSWORD` before starting the server, then open `http://localhost:3000/admin`.
372
134
 
373
- ## Why build this?
135
+ ## Documentation
374
136
 
375
- Notification infrastructure looks simple until you're responsible for it. Queues, retries, provider adapters, preference systems, quiet-hour logic, workflows, suppression handling, and operational tooling take months to build well. notifkit is what I built instead, and it's what I run.
137
+ Everything lives at **[notifkit.dev/docs](https://notifkit.dev/docs/)**: [concepts](https://notifkit.dev/docs/concepts.html), [routing and fallback](https://notifkit.dev/docs/guides/routing.html), [preferences](https://notifkit.dev/docs/guides/preferences.html), [workflows](https://notifkit.dev/docs/guides/workflows.html), [architecture](https://notifkit.dev/docs/architecture.html), [operations](https://notifkit.dev/docs/operations.html) and the [API reference](https://notifkit.dev/docs/reference.html).
376
138
 
377
139
  ## Contributing
378
140
 
379
- Issues and pull requests are welcome. Stars help other people find the project.
141
+ Issues and pull requests are welcome.
380
142
 
381
143
  ```bash
382
144
  npm install
@@ -387,10 +149,8 @@ npm test
387
149
 
388
150
  The test suite starts its own PostgreSQL and Redis containers, so Docker is the only thing you need running.
389
151
 
390
- ## Contact
391
-
392
- Questions, bugs, or ideas: [contact.devkitshq@gmail.com](mailto:contact.devkitshq@gmail.com), or open an issue.
152
+ Questions, bugs, or ideas: [contact.devkitshq@gmail.com](mailto:contact.devkitshq@gmail.com), or open an issue. If notifkit saved you from building notification plumbing, a [star](https://github.com/devkitshq/notifkit) helps other developers find it.
393
153
 
394
154
  ## License
395
155
 
396
- MIT. Do what you like with it, including commercially. See [LICENSE](./LICENSE).
156
+ MIT. Use it for anything, including commercially. Every feature is in this repository: there is no paid edition and no hosted tier.