-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.wasp
152 lines (132 loc) · 4.61 KB
/
main.wasp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
app roke {
wasp: {
version: "^0.15.1"
},
title: "Roke: A Full-Stack Wasp Starter with Modern UI Components",
head: [
"<meta name='description' content='A comprehensive Wasp starter template featuring shadcn/ui components, Motion animations, and TypeScript support for building modern full-stack web applications.'>",
"<meta property='og:url' content='https://example.com'>",
"<meta property='og:type' content='website'>",
"<meta property='og:title' content='Roke: A Full-Stack Wasp Starter with Modern UI Components'>",
"<meta property='og:description' content='A comprehensive Wasp starter template featuring shadcn/ui components, Motion animations, and TypeScript support for building modern full-stack web applications.'>",
"<meta property='og:image' content='https://example.com/example.png'>",
"<meta name='twitter:card' content='summary_large_image'>",
"<meta property='twitter:domain' content='example.com'>",
"<meta property='twitter:url' content='https://example.com'>",
"<meta name='twitter:title' content='Roke: A Full-Stack Wasp Starter with Modern UI Components'>",
"<meta name='twitter:description' content='A comprehensive Wasp starter template featuring shadcn/ui components, Motion animations, and TypeScript support for building modern full-stack web applications.'>",
"<meta name='twitter:image' content='https://example.com/example.png'>"
],
auth: {
userEntity: User,
methods: {
email: {
fromField: {
name: "example.com",
email: "wizard@example.com"
},
emailVerification: {
clientRoute: EmailVerificationRoute,
getEmailContentFn: import { getVerificationEmailContent } from "@src/auth/email",
},
passwordReset: {
clientRoute: PasswordResetRoute,
getEmailContentFn: import { getPasswordResetEmailContent } from "@src/auth/email",
},
userSignupFields: import { getEmailUserFields } from "@src/auth/user-signup-fields",
}
},
onAuthSucceededRedirectTo: "/note-example",
onAuthFailedRedirectTo: "/login"
},
client: {
rootComponent: import Root from "@src/root/RootPage",
setupFn: import setupClient from "@src/lib/setup"
},
emailSender: {
provider: Dummy,
}
}
//#region Routes
route Landing { path: "/", to: Landing }
route Guide { path: "/guide", to: Guide }
route NoteExample { path: "/note-example", to: NoteExample }
route Motion { path: "/motion", to: Motion }
route Utils { path: "/utils", to: Utils }
route Profile { path: "/profile/:id", to: ProfilePage }
route LoginRoute { path: "/login", to: LoginPage }
route SignupRoute { path: "/signup", to: SignupPage }
route RequestPasswordResetRoute { path: "/request-password-reset", to: RequestPasswordResetPage }
route PasswordResetRoute { path: "/password-reset", to: PasswordResetPage }
route EmailVerificationRoute { path: "/email-verification", to: EmailVerificationPage }
route NotFoundRoute { path: "*", to: NotFoundPage }
//#endregion
//#region Pages
page Landing {
component: import Landing from "@src/landing/LandingPage",
}
page Guide {
component: import Guide from "@src/GuidePage",
}
page NoteExample {
component: import NoteExample from "@src/notes/NotesPage",
}
page Motion {
component: import Motion from "@src/motion/MotionPage",
}
page Utils {
component: import Utils from "@src/UtilsPage",
}
page ProfilePage {
component: import Profile from "@src/ProfilePage",
authRequired: true,
}
page LoginPage {
component: import { Login } from "@src/auth/auth",
}
page SignupPage {
component: import { Signup } from "@src/auth/auth",
}
page RequestPasswordResetPage {
component: import { RequestPasswordReset } from "@src/auth/auth",
}
page PasswordResetPage {
component: import { PasswordReset } from "@src/auth/auth",
}
page EmailVerificationPage {
component: import { EmailVerification } from "@src/auth/auth",
}
page NotFoundPage {
component: import NotFound from "@src/404Page"
}
//#endregion
//#region Notes
action createNote {
fn: import { createNote } from "@src/notes/operations",
entities: [User, Note],
}
query getNotes {
fn: import { getNotes } from "@src/notes/operations",
entities: [User, Note],
}
action updateNote {
fn: import { updateNote } from "@src/notes/operations",
entities: [User, Note],
}
action deleteNote {
fn: import { deleteNote } from "@src/notes/operations",
entities: [User, Note],
}
//#endregion
//#region Jobs
job exampleJob {
executor: PgBoss,
perform: {
fn: import { exampleJob } from "@src/jobs/example-job",
},
entities: [User, Note],
schedule: {
cron: "0 0 * * 0"
}
}
//#endregion