-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Description
The idea is to offer a way for users to quickly add pieces of functionality to their apps via the Wasp CLI.
For example, if they wanted to enable auth they would run one command which would add auth to the Wasp file + create auth routes and pages the user might need.
Some examples in other projects:
One possible way to implement it
The idea can be summed up in these made up examples:
wasp add
Lists out the available recipes and the user chooses.
$ wasp add
What are we adding today? 🪄
- Tailwind
- Auth
- Email sending
- Async Jobs
...wasp add tailwind
User knows upfront which action they want.
$ wasp add tailwind
Okay, adding Tailwind ✨
- creating tailwind.config.cjs
- creating postcss.config.cjs
To complete adding Tailwind to your project,
add this to your main CSS file:
@tailwind base;
@tailwind components;
@tailwind utilities;wasp add auth
Some of the recipes will require extra questions.
$ wasp add auth
Which auth do we you want to add?
- Email ✅
- Username & password
- Google
- Github
Are you using Typescript?
- Yes ✅
- Hell no
Okay, adding Email auth ✨
- creating client/pages/LoginPage.tsx
- creating client/pages/SignupPage.tsx
- creating client/pages/EmailVerifyPage.tsx
- creating client/pages/ForgotPasswordPage.tsx
- creating client/pages/ResetPasswordPage.tsx
- appending to .env.server
- updating the Wasp file
Your email auth is enabled. If you want to protect a page,
add `authRequired: true` to it.cprecioso