--- template/app/main.wasp
+++ opensaas-sh/app/main.wasp
@@ -3,31 +3,31 @@
version: "^0.24.0"
},
- title: "My Open SaaS App",
+ title: "Open SaaS",
head: [
"",
- "",
- "",
- "",
+ "",
+ "",
+ "",
+ "",
"",
- "",
- "",
- "",
- "",
- "",
- "",
+ "",
+ "",
+ "",
+ "",
+
+ "",
+ "",
+ "",
+ "",
"",
"",
"",
- // TODO: You can put your Plausible analytics scripts below (https://docs.opensaas.sh/guides/analytics/):
- // NOTE: Plausible does not use Cookies, so you can simply add the scripts here.
- // Google, on the other hand, does, so you must instead add the script dynamically
- // via the Cookie Consent component after the user clicks the "Accept" cookies button.
- "", // for production
- "", // for development
+
+ "",
],
// 🔐 Auth out of the box! https://wasp.sh/docs/auth/overview
@@ -39,7 +39,7 @@
email: {
fromField: {
name: "Open SaaS App",
- email: "me@example.com"
+ email: "noreply@mg.wasp.sh"
},
emailVerification: {
clientRoute: EmailVerificationRoute,
@@ -51,21 +51,18 @@
},
userSignupFields: import { getEmailUserFields } from "@src/auth/userSignupFields",
},
- // Uncomment to enable Google Auth (check https://wasp.sh/docs/auth/social-auth/google for setup instructions):
- // google: { // Guide for setting up Auth via Google
- // userSignupFields: import { getGoogleUserFields } from "@src/auth/userSignupFields",
- // configFn: import { getGoogleAuthConfig } from "@src/auth/userSignupFields",
- // },
- // Uncomment to enable GitHub Auth (check https://wasp.sh/docs/auth/social-auth/github for setup instructions):
- // gitHub: {
- // userSignupFields: import { getGitHubUserFields } from "@src/auth/userSignupFields",
- // configFn: import { getGitHubAuthConfig } from "@src/auth/userSignupFields",
- // },
- // Uncomment to enable Discord Auth (check https://wasp.sh/docs/auth/social-auth/discord for setup instructions):
- // discord: {
- // userSignupFields: import { getDiscordUserFields } from "@src/auth/userSignupFields",
- // configFn: import { getDiscordAuthConfig } from "@src/auth/userSignupFields"
- // }
+ google: {
+ userSignupFields: import { getGoogleUserFields } from "@src/auth/userSignupFields",
+ configFn: import { getGoogleAuthConfig } from "@src/auth/userSignupFields",
+ },
+ gitHub: {
+ userSignupFields: import { getGitHubUserFields } from "@src/auth/userSignupFields",
+ configFn: import { getGitHubAuthConfig } from "@src/auth/userSignupFields",
+ },
+ discord: {
+ userSignupFields: import { getDiscordUserFields } from "@src/auth/userSignupFields",
+ configFn: import { getDiscordAuthConfig } from "@src/auth/userSignupFields"
+ }
},
onAuthFailedRedirectTo: "/login",
onAuthSucceededRedirectTo: "/demo-app",
@@ -91,22 +88,25 @@
// NOTE: "Dummy" provider is just for local development purposes.
// Make sure to check the server logs for the email confirmation url (it will not be sent to an address)!
// Once you are ready for production, switch to e.g. "SendGrid" or "Mailgun" providers. Check out https://docs.opensaas.sh/guides/email-sending/ .
- provider: Dummy,
+ provider: Mailgun,
defaultFrom: {
name: "Open SaaS App",
// When using a real provider, e.g. SendGrid, you must use the same email address that you configured your account to send out emails with!
- email: "me@example.com"
+ email: "noreply@mg.wasp.sh"
},
},
}
-// Prerendering routes with static content creates HTML files at build time that are served immediately,
-// improving SEO, search engine/AI crawling, and performance: https://wasp.sh/docs/advanced/prerendering
route LandingPageRoute { path: "/", to: LandingPage, prerender: true }
page LandingPage {
component: import { LandingPage } from "@src/landing-page/LandingPage"
}
+query getGithubRoadmap {
+ fn: import { getGithubRoadmap } from "@src/landing-page/operations",
+ entities: []
+}
+
//#region Auth Pages
route LoginRoute { path: "/login", to: LoginPage }
page LoginPage {
@@ -191,7 +191,7 @@
//#endregion
//#region Payment
-route PricingPageRoute { path: "/pricing", to: PricingPage, prerender: true }
+route PricingPageRoute { path: "/pricing", to: PricingPage }
page PricingPage {
component: import { PricingPage } from "@src/payment/PricingPage"
}
@@ -213,9 +213,9 @@
}
api paymentsWebhook {
- fn: import { paymentsWebhook } from "@src/payment/webhook",
+ fn: import { stripeWebhook } from "@src/payment/stripe/webhook",
entities: [User],
- middlewareConfigFn: import { paymentsMiddlewareConfigFn } from "@src/payment/webhook",
+ middlewareConfigFn: import { stripeMiddlewareConfigFn } from "@src/payment/stripe/webhook",
httpRoute: (POST, "/payments-webhook")
}
//#endregion
@@ -251,6 +251,17 @@
fn: import { deleteFile } from "@src/file-upload/operations",
entities: [User, File]
}
+
+job deleteFilesJob {
+ executor: PgBoss,
+ perform: {
+ fn: import { deleteFilesJob } from "@src/file-upload/workers"
+ },
+ schedule: {
+ cron: "0 5 * * *" // every day at 5am
+ },
+ entities: [File]
+}
//#endregion
//#region Analytics
@@ -297,7 +308,6 @@
component: import { CalendarPage } from "@src/admin/elements/calendar/CalendarPage"
}
-
route AdminUIButtonsRoute { path: "/admin/ui/buttons", to: AdminUIButtonsPage }
page AdminUIButtonsPage {
authRequired: true,