Utopian.io
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// auth function | |
import { CodeAdapter } from "sst/auth/adapter"; | |
import { auth } from "sst/aws/auth"; | |
import { createSessionBuilder } from "sst/auth"; | |
// This can be whatever you want | |
export const session = createSessionBuilder<{ | |
account: { | |
accountId: string; | |
email: string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { openPreview, render } from "mailing-core"; | |
import { Resend } from "resend"; | |
import type { CreateEmailOptions, CreateEmailRequestOptions } from "resend/build/src/emails/interfaces"; | |
const BRAND_NAME = "Template"; | |
const BASE_URL = "https://example.com"; | |
const resend = new Resend(process.env["RESEND_API_KEY"]); | |
function extractHostname(url: string): string { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import crypto from "crypto"; | |
import { listAllSubscriptions } from "lemonsqueezy.ts"; | |
import { NextRequest } from "next/server"; | |
// Put this in your billing lib and just import the type instead | |
type LemonsqueezySubscription = Awaited<ReturnType<typeof listAllSubscriptions>>["data"][number]; | |
const isError = (error: unknown): error is Error => { | |
return error instanceof Error; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"about-us.amos-description": "Amos description", | |
"about-us.amos-title": "Code slave", | |
"about-us.heading": "About us", | |
"about-us.kristina-description": "Kristina description", | |
"about-us.kristina-title": "Napoleon", | |
"about-us.natalia-description": "Natalia description", | |
"about-us.natalia-title": "The brains", | |
"about-us.subtitle": "Description of the about us section", | |
"account-settings-form.country-label": "Country", |