feat: initial commit

This commit is contained in:
Mauricio Siu
2024-04-28 23:57:52 -06:00
parent 8857a20344
commit be56ba046c
412 changed files with 60777 additions and 1 deletions

15
server/db/schema/utils.ts Normal file
View File

@@ -0,0 +1,15 @@
import { faker } from "@faker-js/faker";
import { customAlphabet } from "nanoid";
const alphabet = "abcdefghijklmnopqrstuvwxyz123456789";
const customNanoid = customAlphabet(alphabet, 6);
export const generateAppName = (type: string) => {
const verb = faker.hacker.verb().replace(/ /g, "-");
const adjective = faker.hacker.adjective().replace(/ /g, "-");
const noun = faker.hacker.noun().replace(/ /g, "-");
const randomFakerElement = `${verb}-${adjective}-${noun}`;
const nanoidPart = customNanoid();
return `${type}-${randomFakerElement}-${nanoidPart}`;
};