2023-06-15 23:19:01 +03:00
app waspAi {
wasp : {
2023-06-27 10:28:37 +03:00
version : "^0.11.0"
2023-06-15 23:19:01 +03:00
} ,
2023-06-30 14:44:59 +03:00
title : "GPT Web App Generator ✨" ,
2023-06-30 15:14:34 +03:00
head : [
"<meta property=\"og:title\" content=\"GPT Web App Generator ✨\">" ,
2023-06-30 15:47:09 +03:00
"<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.\">" ,
2023-06-30 15:14:34 +03:00
"<meta property=\"og:type\" content=\"website\">" ,
2023-06-30 15:47:09 +03:00
"<meta property=\"og:image\" content=\"/cover.png\">"
2023-06-30 15:14:34 +03:00
] ,
2023-06-20 13:03:01 +03:00
dependencies : [
( "prismjs" , "^1.29.0" ) ,
2023-06-20 14:54:12 +03:00
( "react-accessible-treeview" , "2.6.1" ) ,
2023-07-04 18:13:32 +03:00
( "react-icons" , "4.10.1" ) ,
2023-06-28 16:21:50 +03:00
( "@zip.js/zip.js" , "2.7.16" ) ,
2023-06-28 18:56:18 +03:00
( "async-mutex" , "0.4.0" ) ,
2023-06-29 23:00:05 +03:00
( "@headlessui/react" , "1.7.15" ) ,
2023-06-30 14:44:59 +03:00
( "@heroicons/react" , "2.0.18" ) ,
2023-07-03 15:45:50 +03:00
( "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" ) ,
2023-07-03 18:26:17 +03:00
( "@visx/axis" , "3.2.0" ) ,
2023-06-20 13:03:01 +03:00
] ,
2023-06-19 18:28:36 +03:00
client : {
rootComponent : import { RootComponent } from "@client/RootComponent.jsx" ,
2023-06-28 12:38:48 +03:00
} ,
db : {
system : PostgreSQL
2023-07-03 18:26:17 +03:00
} ,
auth : {
userEntity : User ,
externalAuthEntity : SocialLogin ,
methods : {
google : {
configFn : import { getGoogleAuthConfig } from "@server/auth.js" ,
getUserFieldsFn : import { getUserFields } from "@server/auth.js" ,
}
} ,
2023-07-04 18:13:32 +03:00
onAuthFailedRedirectTo : "/login" ,
onAuthSucceededRedirectTo : "/stats"
2023-06-19 18:28:36 +03:00
}
2023-06-15 23:19:01 +03:00
}
route RootRoute { path : "/" , to : MainPage }
page MainPage {
2023-06-19 18:28:36 +03:00
component : import Main from "@client/pages/MainPage.jsx"
2023-06-16 16:43:16 +03:00
}
2023-06-21 13:37:02 +03:00
route ResultRoute { path : "/result/:appId" , to : ResultPage }
page ResultPage {
component : import { ResultPage } from "@client/pages/ResultPage.jsx"
}
2023-07-03 15:45:50 +03:00
route StatsRoute { path : "/stats" , to : StatsPage }
page StatsPage {
2023-07-03 18:26:17 +03:00
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" ,
2023-07-03 15:45:50 +03:00
}
2023-06-16 16:43:16 +03:00
action startGeneratingNewApp {
2023-06-28 12:38:48 +03:00
fn : import { startGeneratingNewApp } from "@server/operations.js" ,
entities : [
Project ,
]
2023-06-16 16:43:16 +03:00
}
query getAppGenerationResult {
2023-06-28 12:38:48 +03:00
fn : import { getAppGenerationResult } from "@server/operations.js" ,
entities : [
Project
]
}
2023-07-03 15:45:50 +03:00
query getStats {
fn : import { getStats } from "@server/operations.js" ,
entities : [
Project
]
}
2023-07-03 18:26:17 +03:00
entity User { = psl
id Int @ id @ default ( autoincrement ( ) )
email String @ unique
externalAuthAssociations SocialLogin [ ]
2023-07-04 14:05:04 +03:00
projects Project [ ]
2023-07-03 18:26:17 +03:00
psl = }
entity SocialLogin { = psl
id String @ id @ default ( uuid ( ) )
provider String
providerId String
userId Int
user User @ relation ( fields : [ userId ] , references : [ id ] )
psl = }
2023-06-28 12:38:48 +03:00
entity Project { = psl
id String @ id @ default ( uuid ( ) )
name String
description String
2023-06-30 17:53:48 +03:00
primaryColor String @ default ( "sky" )
authMethod String @ default ( "usernameAndPassword" )
2023-06-28 12:38:48 +03:00
createdAt DateTime @ default ( now ( ) )
2023-07-04 14:05:04 +03:00
status String @ default ( "pending" )
userId Int ?
user User ? @ relation ( fields : [ userId ] , references : [ id ] )
2023-06-28 12:38:48 +03:00
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 = }
2023-07-04 14:05:04 +03:00
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
]
}