Skip to content

Commit

Permalink
v2 dashboard docs structure (#733)
Browse files Browse the repository at this point in the history
* v2: dashboard structure

* feat: add hero card

* feat: api ref anchor

* feat: add client-side

* feat: add initia lstructure

* fix: side menu

* fix: move getting started

* feat: introduction screen

* feat: add quickstart

* fix: update endpoint page

* feat: update branding

* fix: sdks menu

* fix: update docs

* feat: fix endpoint page

* fix: quick start

* feat: colors

* feat: colors

* fix: remove inbox title

* fix: typo

* chore: update framework example

A user suggested we nix the +1 from the `{events.length +1}` example in the framework-terminal docs page and example.

* modified the Build Workflow section

* fixes

* Added more changes

* fix: document structure and navigation

* fix:

* fix: rename

* feat: workflow page

* feat: remove step conditions from framework

* feat: remove client side sdks empty menu

* inti

* Added visual aid to 'What is Novu' page

* Added 'add inbox' optional step to the quickstart

* Added 'tags' pages

* Modified the  - 'Introduction' page

* Modified the 'Template Editor' page to include more Liquid filter examples

* Modified the 'Digest Action Step' page and chnaged the visual aid

* Changed the Digest image

* Delete architecture/diagrams.mdx

* Delete architecture/introduction.mdx

* Delete concepts/controls.mdx

* Delete deployment/actions.mdx

* Delete deployment/cli.mdx

* Delete deployment/production.mdx

* Delete deployment/syncing.mdx

* modified the tags page

* modified the image of how Novu works

* fix: spelling

* Added notifications concept page

* Modified the quickstart page

* Not final draft

* Not final draft

* Not final draft

* Not final draft

* Not final draft

* second deaft

* second deaft

* second deaft

* second draft

* second draft

* second draft

* second draft

* second draft

* second draft

* second draft

* added socials

* fix:anchors

* fix: items

* fixed broken links

* small fix

* chore: content and style review

* chore: content, style, and spelling review

* chore: tweak language, spelling, apply style guide

* chore: update framework/overview and related nav

* chore: update nav for framework/overview move

* chore: introduction to overview and update links

* chore: update language, apply style guide

* chore: language, spalling, and style updates

* chore: update language and apply style guide

* chore: update language and structure, fix spelling, apply style guide

* chore: apply style guide

* chore: framework introduction -> overview

* chore: inbox introduction -> overview

* chore: community intro -> overview, apply style guide

* fix: community intro->overview mint.json correction

* chore: framework/typescript/intro -> overview

---------

Co-authored-by: Justin Nemmers <[email protected]>
Co-authored-by: StarL0rdDude <[email protected]>
Co-authored-by: Emil Pearce <[email protected]>
  • Loading branch information
4 people authored Dec 24, 2024
1 parent b9494c0 commit 909fb8d
Show file tree
Hide file tree
Showing 181 changed files with 3,639 additions and 1,583 deletions.
6 changes: 3 additions & 3 deletions additional-resources/glossary.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Novu lets you send notifications across different communication mediums, includi
<Frame caption="Channels in Novu">
<img src="/images/channels.gif" />{" "}
</Frame>
## Providers Providers are responsible for handling message delivery across various
channels. Novu currently supports multiple notification channels, each with its own
set of providers.
## Providers

Providers are responsible for handling message delivery across various channels. Novu currently supports multiple notification channels, each with its own set of providers.

- Chat: This channel offers these providers:
- Discord
Expand Down
6 changes: 3 additions & 3 deletions additional-resources/security.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Security and Compliance"
description: "Common questions related to security, compliance, privacy policy and terms and conditions"
description: "Common questions about security, compliance, privacy policy, and terms and conditions"
icon: "shield"
---

Expand Down Expand Up @@ -39,8 +39,8 @@ By default, data is stored using the following TTL values
- Notifications (for 1 month)
- Jobs (for 1 month)
- Message (for in-app messages - 12 months, for all other messages - 1 month)
- Execution Details (for 1 month)
- Subscribers, Workflows, Feeds, Layouts (Not deleted automatically, can be deleted by the user at any time)
- Execution details (for 1 month)
- Subscribers, workflows, feeds, layouts (not deleted automatically, can be deleted by the user at any time)

If you want to delete any specific data or information, reach out to us at [email protected]

Expand Down
2 changes: 1 addition & 1 deletion api-reference/events/trigger-event.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ url = "https://api.novu.co"
api_key = "<NOVU_SECRET_KEY>"

novu = EventApi(url, api_key).trigger(
name="<WORKFLOW_TRIGGER_IDENTIFIER>", # This is the Workflow ID. It can be found on the workflow page.
name="<WORKFLOW_TRIGGER_IDENTIFIER>", # This is the workflow ID. It can be found on the workflow page.
recipients="<UNIQUE_SUBSCRIBER_IDENTIFIER>", # The subscriber ID can be gotten from the dashboard.
payload={}, # Your custom Novu payload goes here
)
Expand Down
2 changes: 1 addition & 1 deletion api-reference/workflows/create-workflow.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
const novu = new Novu("<NOVU_SECRET_KEY>");

await novu.notificationTemplates.create({
name: "Onboarding Workflow",
name: "Onboarding workflow",
// taking first workflow group id
notificationGroupId: workflowGroupsData.data[0]._id,
steps: [
Expand Down
15 changes: 0 additions & 15 deletions architecture/diagrams.mdx

This file was deleted.

34 changes: 0 additions & 34 deletions architecture/introduction.mdx

This file was deleted.

File renamed without changes.
12 changes: 6 additions & 6 deletions community/project-differences.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ Below you will find a table that outlines the best available Novu Cloud Tier, co
|--- | --- | --- |
|Channels supported: Email, In-app, SMS, Chat, Push |||
|Notification Subscribers | Unlimited | Infratructure dependent |
|GUI-based workflows | Nov 2024 ||
|Code-based workflows |||
|Subscriber management| Nov 2024 ||
|GUI-based workflows | ||
|Code-based Framework workflows |||
|Subscriber management| Q1 2025 ||
|Multi-org/multi-tenancy | Q1 2025 ||
|**FRAMEWORK**|
|Max Workflows | Unlimited | Infratructure dependent |
|Max workflows | Unlimited | Infratructure dependent |
|Provider integrations | Unlimited | Unlimited |
|Activity Feed retention | Unlimited | Infratructure dependent |
|Activity feed retention | Unlimited | Infratructure dependent |
|Digests || Infratructure dependent |
|Workflow Step Controls |||
|Workflow step controls |||
|Translations|||
|Block-based email editor | Nov 2024 | Nov 2024 |
|**INBOX**|
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
title: 'Introduction'
description: ''
title: 'Overview'
description: 'Self-hosting Novu provides full control and flexibility over your notification infrastructure, with specific system requirements for optimal performance across VMs, Redis, MongoDB, and S3 storage.'
icon: 'code'
---

When self-hosting Novu, you take full control over your communication infrastructure by deploying it on your own servers. While this setup allows for customization and greater flexibility, it is important to note that some features exclusive to Novu’s cloud-managed solution will not be available in a self-hosted environment.

## System Requirements Overview
## System requirements overview

### Hosting Novu Services on Separate VMs
### Hosting Novu services on separate VMs
For optimal performance, we recommend hosting Novu's core services across multiple virtual machines (VMs).

- **Novu Services:**
- **Novu services:**
- 3 VMs per service
- Each VM: 2 vCPUs and 4GB of RAM
- **Redis:**
Expand All @@ -22,22 +22,22 @@ For optimal performance, we recommend hosting Novu's core services across multip
- **Storage:**
- 10GB of S3 storage

### Hosting All Novu Services on a Single VM
### Hosting all Novu services on a single VM
If resources are limited or simplicity is a priority, Novu services can be hosted on a single VM.

- **All Services:** 36 vCPUs and 64GB of RAM
- **All services:** 36 vCPUs and 64GB of RAM
- **Storage:** 10GB of S3 storage

### Redis Requirements
### Redis requirements
- **Redis Clusters:** 2 (one for queues with AOL enabled)
- **Memory:** 8GB RAM per cluster
- **AOL:** Active Append-Only Log (AOL) for data persistence and to prevent job loss during outages.

### MongoDB Requirements
- **MongoDB Cluster:** M20 or higher (recommended) on MongoDB Atlas.
### MongoDB requirements
- **MongoDB cluster:** M20 or higher (recommended) on MongoDB Atlas.

### Storage Requirements
- **S3 Storage:** Minimum 10GB for file storage.
### Storage requirements
- **S3 storage:** Minimum 10GB for file storage.

<Note>The above specifications are general recommendations. Adjust them based on your system load, usage patterns, and scale of operations.</Note>
<Warning>Self-hosting Novu does not support GitHub login. To access your account, please use the email and password associated with your Novu account.</Warning>
130 changes: 65 additions & 65 deletions concepts/endpoint.mdx
Original file line number Diff line number Diff line change
@@ -1,68 +1,68 @@
---
title: "Bridge Endpoint"
title: "Framework Endpoint"
description: "Learn how to customize and extend any aspect of the Novu platform using the Framework SDK powered bridge endpoint."
---

Novu Framework requires a **single** `HTTP` endpoint (`/api/novu` or similar) to be exposed by your application. This endpoint is used to receive events from our **Worker Engine**.

You can view the Bridge Endpoint as a webhook endpoint that Novu will call when it needs to retrieve contextual information for a given subscriber and notification.

Using the `npx novu init` command creates a Bridge application for you with a Bridge Endpoint ready to go.

## The `serve` function

We offer framework specific wrappers in form of an exported `serve` function that abstracts away:

- Parsing the incoming request for `GET`, `POST`, `PUT` and `OPTIONS` requests
- HMAC header authentication
- Framework specific response and error handling

Currently, we offer `serve` functions for the following frameworks:

- [Next.js](/quickstart/nextjs)
- [Express.js](/quickstart/express)
- [Nuxt](/quickstart/nuxt)
- [h3](/quickstart/h3)
- [Remix](/quickstart/remix)
- [Sveltekit](/quickstart/svelte)

## Writing a custom `serve` function

If we currently don't support your framework, you can write a custom `serve` function like the following example:

```ts
import { type Request, type Response } from "express";
import { NovuRequestHandler, ServeHandlerOptions } from "@novu/framework";

export const serve = (options: ServeHandlerOptions): any => {
const requestHandler = new NovuRequestHandler({
frameworkName: "express",
...options,
handler: (incomingRequest: Request, response: Response) => ({
method: () => incomingRequest.method,
headers: (key) => {
const header = incomingRequest.headers[key];
return Array.isArray(header) ? header[0] : header;
},
queryString: (key) => {
const qs = incomingRequest.query[key];
return Array.isArray(qs) ? qs[0] : qs;
},
body: () => incomingRequest.body,
url: () =>
new URL(
incomingRequest.url,
`https://${incomingRequest.headers.get("host") || ""}`
),
transformResponse: ({ body, headers, status }) => {
Object.entries(headers).forEach(([headerName, headerValue]) => {
response.setHeader(headerName, headerValue);
});

return response.status(status).send(body);
},
}),
});

return requestHandler.createHandler();
};
```
import { SvelteIcon } from "/snippets/icons/svelte.mdx";
import { NestjsIcon } from "/snippets/icons/nestjs.mdx";
import { ExpressjsIcon } from "/snippets/icons/expressjs.mdx";
import { LambdaIcon } from "/snippets/icons/lambda.mdx";
import { NuxtIcon } from "/snippets/icons/nuxt.mdx";
import { NextjsIcon } from "/snippets/icons/nextjs.mdx";
import { RemixIcon } from "/snippets/icons/remix.mdx";
import { H3Icon } from "/snippets/icons/h3.mdx";
import { FrameworkTerminal } from "/snippets/framework-terminal.mdx";

Novu was built for endless extensibility. Although not required for majority of your notification usecases, you can customize and extend any aspect of the Novu platform using the Framework SDK powered bridge endpoint.

## Overview

The framework endpoint is a Restful API path that runs on your server and environment and can be used for multiple usecases including:

- Automating workflow creation using GitOps
- Adding custom components to your emails and other channels
- Hydrating resources including subscribers, topics and tenants directly from your database
- Executing custom logic before, during and after a workflow is executed
- Connect to 3rd-party services such as OpenAI, Stripe, Salesforce and more.
- Implement custom delivery providers with internal systems

## How it works

<Frame>
<img src="/images/novu-works.png" />
</Frame>

### Build phase

When [building new workflows](/workflow/overview), you will be using the [Novu Framework SDK](/framework/typescript/overview) to define the workflows and their steps directly in your IDE. The local workflows can be previewed and tested using our [Local Studio](/framework/studio) companion app.

### Sync phase

A sync is needed once a notification workflow code is created or updated. We offer multiple sync methods including CI/CD integrations and a custom CLI tool.

During a sync, the workflows defined using the Novu Framework SDK will be pushed to our cloud service and will be persisted in our database.
Once synced, you will be able to view the workflows in the workflows Page on the Dashboard. All the controls created using JSON Schema or Zod will be transformed into UI elements that can be modified without changing the source code. Read more about controls [here](/framework/controls).

### Execution phase

Once a workflow is synced, the workflow engine will make API requests to the bridge endpoint to execute individual workflow steps.
After the fan-out is complete, the bridge endpoint will be triggered with the relevant execution context and will respond with the compiled content and metadata needed to deliver the notification.

## Get Started

To get started with the framework endpoint, visit the Getting Started page relevant to your tech-stack:

<CardGroup cols={3}>
<Card title="Next.js" color="#00D7FE" href="/framework/quickstart/nextjs" horizontal icon={<NextjsIcon />} />
<Card title="Express.js" color="#47BA87" href="/framework/quickstart/express" horizontal icon={<ExpressjsIcon />} />
<Card title="Remix" color="#BC002C" href="/framework/quickstart/remix" horizontal icon={<RemixIcon />} />
<Card title="NestJS" color="#BC002C" href="/framework/quickstart/nestjs" horizontal icon={<NestjsIcon />} />
<Card title="Svelte" color="#16a34a" href="/framework/quickstart/svelte" horizontal icon={<SvelteIcon />} />
<Card title="Nuxt" color="#16a34a" href="/framework/quickstart/nuxt" horizontal icon={<NuxtIcon />} />
<Card title="H3" color="#16a34a" href="/framework/quickstart/h3" horizontal icon={<H3Icon />} />
<Card title="Lambda" color="#16a34a" href="/framework/quickstart/lambda" horizontal icon={<LambdaIcon />} />
</CardGroup>

<Warning>
The Framework SDK is currently only supported in Typescript for JS based run-times.
</Warning>
4 changes: 2 additions & 2 deletions concepts/environments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ Each environment will be accessed using a separate credential set:

We suggest configuring these key sets based on your active environment, the same as you would use to manage different service credentials and serve them based on the current environment in which your code is deployed.

## Promoting changes to production
## Syncing changes to production

When moving changes from the `development` environment to the `production` environment, we suggest using your CI/CD pipeline to promote the changes.
When moving changes from the `development` environment to the `production` environment, you can "Sync" those changes from the Dashboard interface or using the Sync API for your framework based workflow using CI/CD.
2 changes: 1 addition & 1 deletion concepts/integrations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ You can find the list of available integrations for each channel:
<Card title="Chat" href="/integrations/providers/chat/overview">
Integrate with chat platforms
</Card>
<Card title="In-App" href="/inbox/introduction">
<Card title="In-App" href="/inbox/overview">
Manage in-app notification center
</Card>
</CardGroup>
Expand Down
Loading

0 comments on commit 909fb8d

Please sign in to comment.