Skip to content

Instantly share code, notes, and snippets.

View AlexandroMtzG's full-sized avatar

Alexandro Martínez AlexandroMtzG

View GitHub Profile
function onSelected(extractEntity: ExtractCustomEntitiesDto) {
const mapping: { [key: string]: string } = {
target_market: "targetMarket",
pain_points: "problemStatement",
capability: "capability",
alternative: "alternative",
feature: "feature",
benefit: "benefit",
use_case: "useCase",
strategic_narrative: "strategicNarrative",
import { ActionArgs, json } from "@remix-run/node";
import { useTypedActionData, useTypedLoaderData } from "remix-typedjson";
import { i18nHelper } from "~/locale/i18n.utils";
import EditPageLayout from "~/components/ui/layouts/EditPageLayout";
import { EntityWithDetails, getAllEntities } from "~/utils/db/entities/entities.db.server";
import { TenantWithDetails, adminGetAllTenants, getTenant } from "~/utils/db/tenants.db.server";
import TableSimple from "~/components/ui/tables/TableSimple";
import { useEffect } from "react";
import { useTranslation } from "react-i18next";
import NumberUtils from "~/utils/shared/NumberUtils";
import CryptoJS from "crypto-js";
function encrypt(text: string) {
const secret = process.env.CRYPTO_SECRET?.toString();
if (!secret) {
throw Error("CRYPTO_SECRET not set");
}
const ciphertext = CryptoJS.AES.encrypt(text, secret).toString();
return ciphertext;
}
export type PerformanceServerTimings = Record<string, Array<PerformanceServerTiming>>;
/**
* Run this on the server to get a `time` function that can be used to time
* server-side operations and add them to the `Server-Timing` header.
*/
export type TimeFunction = <T>(
serverTiming:
| string
| {
import { HeadersFunction } from "@remix-run/node"
export const serverTimingHeaders: HeadersFunction = ({
loaderHeaders,
parentHeaders,
}) => {
return setServerTimingHeaders(new Headers(), {
loaderHeaders,
parentHeaders,
})
import { json, LoaderFunction, V2_MetaFunction } from "@remix-run/node";
import { useLoaderData, useSearchParams } from "@remix-run/react";
import { useAppData } from "~/utils/data/useAppData";
import { DashboardLoaderData, loadDashboardData } from "~/utils/data/useDashboardData";
import { i18nHelper } from "~/locale/i18n.utils";
import { getAppDashboardStats } from "~/utils/services/appDashboardService";
import ProfileBanner from "~/components/app/ProfileBanner";
import { DashboardStats } from "~/components/ui/stats/DashboardStats";
import { getTenantIdFromUrl } from "~/utils/services/urlService";
import { Stat } from "~/application/dtos/stats/Stat";
prisma:client Prisma Client call: +3m
prisma:client prisma.user.findUnique({
where: {
id: 'clgvf8sqn003igogrsxorlde7'
},
include: {
admin: true
}
}) +0ms
prisma:client Generated request: +0ms
generator client {
provider = "prisma-client-js"
previewFeatures = ["jsonProtocol"]
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}

Based on the following interfaces, give me an array of blocks for a Landing Page for the topic "BUILD → MARKET → MANAGE YOUR SAAS. The One-Man SaaS Framework. Quick start your MVP with out-of-the-box SaaS features like Authentication, Pricing & Subscriptions, Admin & App portals, Entity Builder (CRUD, API, Webhooks, Permissions, Logs...), Blogging, CRM, Email Marketing, Page Block Builder, Notifications, Onboarding, and more. Don't reinvent the wheel, again.".

This is an example:

[ { "banner": { "style": "top", "text": "Welcome to Remix Page Blocks 👋! Built by SaasRock.", "cta": [