Better-Notify for tRPC

Better-Notify follows the same philosophy as tRPC — define a typed contract, consume it everywhere. Use the notification client in any tRPC procedure with full end-to-end type safety.

Why it fits

Example

server/routers/auth.ts
import { mail } from '../notifications';

export const authRouter = router({
  signup: publicProcedure
    .input(z.object({ email: z.string().email(), name: z.string() }))
    .mutation(async ({ input }) => {
      const user = await createUser(input);

      await mail.welcome.send({
        to: user.email,
        input: { name: user.name },
      });

      return { userId: user.id };
    }),
});
Get startedBrowse integrations

Also works with