mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-11-30 18:23:19 +03:00
4375990a99
Signed-off-by: Mihovil Ilakovac <mihovil@ilakovac.com>
175 lines
4.1 KiB
JavaScript
175 lines
4.1 KiB
JavaScript
app waspAi {
|
|
wasp: {
|
|
version: "^0.11.0"
|
|
},
|
|
title: "GPT Web App Generator ✨",
|
|
head: [
|
|
"<meta property=\"og:title\" content=\"GPT Web App Generator ✨\">",
|
|
"<meta property=\"og:description\" content=\"Generate your full-stack React, Node.js and Prisma web app using the magic of GPT and the Wasp full-stack framework.\">",
|
|
"<meta property=\"og:type\" content=\"website\">",
|
|
"<meta property=\"og:image\" content=\"/cover.png\">"
|
|
],
|
|
dependencies: [
|
|
("prismjs", "^1.29.0"),
|
|
("react-accessible-treeview", "2.6.1"),
|
|
("react-icons", "4.10.1"),
|
|
("@zip.js/zip.js", "2.7.16"),
|
|
("async-mutex", "0.4.0"),
|
|
("@headlessui/react", "1.7.15"),
|
|
("@heroicons/react", "2.0.18"),
|
|
("react-parallax-tilt", "1.7.151"),
|
|
("timeago.js", "4.0.2"),
|
|
("@visx/mock-data", "3.0.0"),
|
|
("@visx/group", "3.0.0"),
|
|
("@visx/shape", "3.0.0"),
|
|
("@visx/scale", "3.2.0"),
|
|
("@visx/responsive", "3.0.0"),
|
|
("@visx/gradient", "3.0.0"),
|
|
("@visx/axis", "3.2.0"),
|
|
],
|
|
client: {
|
|
rootComponent: import { RootComponent } from "@client/RootComponent.jsx",
|
|
},
|
|
db: {
|
|
system: PostgreSQL
|
|
},
|
|
auth: {
|
|
userEntity: User,
|
|
externalAuthEntity: SocialLogin,
|
|
methods: {
|
|
google: {
|
|
configFn: import { getGoogleAuthConfig } from "@server/auth.js",
|
|
getUserFieldsFn: import { getUserFields } from "@server/auth.js",
|
|
}
|
|
},
|
|
onAuthFailedRedirectTo: "/login",
|
|
onAuthSucceededRedirectTo: "/stats"
|
|
}
|
|
}
|
|
|
|
route RootRoute { path: "/", to: MainPage }
|
|
page MainPage {
|
|
component: import Main from "@client/pages/MainPage.jsx"
|
|
}
|
|
|
|
route ResultRoute { path: "/result/:appId", to: ResultPage }
|
|
page ResultPage {
|
|
component: import { ResultPage } from "@client/pages/ResultPage.jsx"
|
|
}
|
|
|
|
route StatsRoute { path: "/stats", to: StatsPage }
|
|
page StatsPage {
|
|
component: import { Stats } from "@client/pages/StatsPage.jsx",
|
|
authRequired: true
|
|
}
|
|
|
|
route LoginRoute { path: "/login", to: LoginPage }
|
|
page LoginPage {
|
|
component: import { LoginPage } from "@client/pages/LoginPage.jsx",
|
|
}
|
|
|
|
action startGeneratingNewApp {
|
|
fn: import { startGeneratingNewApp } from "@server/operations.js",
|
|
entities: [
|
|
Project,
|
|
]
|
|
}
|
|
|
|
query getAppGenerationResult {
|
|
fn: import { getAppGenerationResult } from "@server/operations.js",
|
|
entities: [
|
|
Project
|
|
]
|
|
}
|
|
|
|
query getStats {
|
|
fn: import { getStats } from "@server/operations.js",
|
|
entities: [
|
|
Project
|
|
]
|
|
}
|
|
|
|
entity User {=psl
|
|
id Int @id @default(autoincrement())
|
|
|
|
email String @unique
|
|
externalAuthAssociations SocialLogin[]
|
|
projects Project[]
|
|
psl=}
|
|
|
|
entity SocialLogin {=psl
|
|
id String @id @default(uuid())
|
|
|
|
provider String
|
|
providerId String
|
|
|
|
userId Int
|
|
user User @relation(fields: [userId], references: [id])
|
|
psl=}
|
|
|
|
entity Project {=psl
|
|
id String @id @default(uuid())
|
|
name String
|
|
description String
|
|
primaryColor String @default("sky")
|
|
authMethod String @default("usernameAndPassword")
|
|
createdAt DateTime @default(now())
|
|
status String @default("pending")
|
|
userId Int?
|
|
user User? @relation(fields: [userId], references: [id])
|
|
files File[]
|
|
logs Log[]
|
|
psl=}
|
|
|
|
entity File {=psl
|
|
id String @id @default(uuid())
|
|
name String
|
|
content String
|
|
createdAt DateTime @default(now())
|
|
projectId String
|
|
project Project @relation(fields: [projectId], references: [id])
|
|
|
|
@@index([name, projectId])
|
|
psl=}
|
|
|
|
entity Log {=psl
|
|
id String @id @default(uuid())
|
|
content String
|
|
createdAt DateTime @default(now())
|
|
projectId String
|
|
project Project @relation(fields: [projectId], references: [id])
|
|
psl=}
|
|
|
|
job checkPendingAppsJob {
|
|
executor: PgBoss,
|
|
schedule: {
|
|
cron: "* * * * *",
|
|
},
|
|
perform: {
|
|
fn: import { checkForPendingApps } from "@server/jobs/checkForPendingApps.js"
|
|
},
|
|
entities: [Project]
|
|
}
|
|
|
|
job failStaleAppsJobs {
|
|
executor: PgBoss,
|
|
schedule: {
|
|
cron: "* * * * *",
|
|
},
|
|
perform: {
|
|
fn: import { failStaleGenerations } from "@server/jobs/failStaleGenerations.js",
|
|
},
|
|
entities: [Project, Log]
|
|
}
|
|
|
|
job generateAppJob {
|
|
executor: PgBoss,
|
|
perform: {
|
|
fn: import { generateApp } from "@server/jobs/generateApp.js",
|
|
},
|
|
entities: [
|
|
Project,
|
|
File,
|
|
Log
|
|
]
|
|
} |