Skip to content

Instantly share code, notes, and snippets.

View AlexandroMtzG's full-sized avatar

Alexandro Martínez AlexandroMtzG

View GitHub Profile

SaasRock Individual Contributor License Agreement (“Agreement”)

Version 1.0 - October 16th, 2022

Thank you for your interest in contributing to a SaasRock Core or SaasRock Enterprise (“SaasRock”) project. To clarify the intellectual property rights in the project and any Contributions, SaasRock requires that You accept this Contributor License Agreement. This license is for Your protection as a contributor as well as the protection of SaasRock, recipients of software distributed or made available by SaasRock, and other contributors; it does not change your rights to use your own Contributions for any other purpose.

You accept and agree to the following terms and conditions for Your past, present, and future Contributions submitted to SaasRock. Except for the licenses granted herein to SaasRock and the recipients of software distributed or made available by SaasRock, You reserve all right, title, and interest in and to Your Contributions.

  1. Definitions.

SaasRock Quick Start

Getting Started

1. Installation

💿 1.1. Install all the dependencies:

npm install
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