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-10-03 15:58:59 +03:00
title : "MAGE - GPT Web App Generator ✨" ,
2023-06-30 15:14:34 +03:00
head : [
2023-10-03 15:58:59 +03:00
"<meta property=\"og:title\" content=\"MAGE - 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-10-02 15:12:59 +03:00
"<meta property=\"og:image\" content=\"https://usemage.ai/twitter.png\">" ,
"<meta name=\"twitter:image\" content=\"https://usemage.ai/twitter.png\" />" ,
2023-08-30 17:30:14 +03:00
"<meta name=\"twitter:image:width\" content=\"800\" />" ,
"<meta name=\"twitter:image:height\" content=\"400\" />" ,
"<meta name=\"twitter:card\" content=\"summary_large_image\" />" ,
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-10-03 15:58:59 +03:00
( "js-confetti" , "0.11.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 : {
2023-10-03 15:58:59 +03:00
gitHub : {
configFn : import { getGitHubAuthConfig } from "@server/auth.js" ,
getUserFieldsFn : import { getGitHubUserFields } from "@server/auth.js" ,
} ,
2023-07-03 18:26:17 +03:00
google : {
configFn : import { getGoogleAuthConfig } from "@server/auth.js" ,
2023-10-03 15:58:59 +03:00
getUserFieldsFn : import { getGoogleUserFields } from "@server/auth.js" ,
} ,
2023-07-03 18:26:17 +03:00
} ,
2023-07-04 18:13:32 +03:00
onAuthFailedRedirectTo : "/login" ,
2023-10-03 15:58:59 +03:00
onAuthSucceededRedirectTo : "/"
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
}
2023-07-15 13:42:20 +03:00
route FeedbackRoute { path : "/feedback" , to : FeedbackPage }
page FeedbackPage {
component : import { Feedback } from "@client/pages/FeedbackPage.jsx" ,
authRequired : true
}
2023-07-03 18:26:17 +03:00
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
}
2023-07-14 13:10:55 +03:00
action registerZipDownload {
fn : import { registerZipDownload } from "@server/operations.js" ,
entities : [ Project ]
}
2023-07-15 13:42:20 +03:00
action createFeedback {
fn : import { createFeedback } from "@server/operations.js" ,
entities : [ Feedback ]
}
query getFeedback {
fn : import { getFeedback } from "@server/operations.js" ,
entities : [ Feedback ]
}
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-10-03 15:58:59 +03:00
query getNumProjects {
fn : import { getNumProjects } 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 ] )
2023-10-03 15:58:59 +03:00
createdAt DateTime @ default ( now ( ) )
2023-07-03 18:26:17 +03:00
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-07-12 17:16:21 +03:00
creativityLevel String @ default ( "balanced" )
2023-06-28 12:38:48 +03:00
createdAt DateTime @ default ( now ( ) )
2023-07-04 14:05:04 +03:00
status String @ default ( "pending" )
2023-07-14 13:10:55 +03:00
referrer String @ default ( "unknown" )
zipDownloadedAt DateTime ?
2023-07-04 14:05:04 +03:00
userId Int ?
user User ? @ relation ( fields : [ userId ] , references : [ id ] )
2023-06-28 12:38:48 +03:00
files File [ ]
logs Log [ ]
2023-07-15 13:42:20 +03:00
feedbacks Feedback [ ]
psl = }
entity Feedback { = psl
id String @ id @ default ( uuid ( ) )
score Int
message String
createdAt DateTime @ default ( now ( ) )
projectId String
project Project @ relation ( fields : [ projectId ] , references : [ id ] )
2023-06-28 12:38:48 +03:00
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
]
}