create-waitlist-email
v0.1.2
Published
One command to deploy your own waitlist-email backend and create your first waitlist project.
Maintainers
Readme
create-waitlist-email
One command to spin up your own self-hosted waitlist backend and create your first project — no manual env wrangling, no copy-pasting URLs.
# Interactive setup
npx create-waitlist-email
# Or create a new project instantly using your saved backend (0 prompts):
npx create-waitlist-email my-new-projectRequirements: Node 18+, a free MongoDB Atlas cluster (connection string ready), and a Vercel account.
What the CLI asks
Do you already have a backend deployed?
- No — deploy a new one now → it asks for a folder name and your MongoDB connection string, then handles everything else automatically.
- Yes — I already have one → it asks for your backend's base URL and Secret key, then skips straight to project creation.
Project name (e.g.
my-launch) → creates the project on your backend and prints yourprojectId.
On subsequent runs the CLI remembers your backend URL and Secret key (~/.waitlist-email/config.json) and asks whether to reuse them.
What it does under the hood (fresh deploy path)
- Clones the waitlist-email backend via degit — no git history, just the files.
- Generates a random 48-character hex
MY_SECRETso you never have to think about it. - Writes a local
.env.localsonpm run devworks immediately if you want to poke around. - Runs
vercel link --yesto create.vercel/project.jsonnon-interactively. - Pushes
MONGODB_URIandMY_SECRETto Vercel's production environment viavercel env add. - Deploys to production (
vercel --prod --yes), captures the live URL, then setsBASE_URLand redeploys so the running functions actually see it. - Calls your freshly deployed
/api/projectsendpoint (with automatic retry/backoff for cold-start propagation) to create your first project. - Saves
baseUrl+secretKeyto~/.waitlist-email/config.jsonfor future runs.
Add the form to your app
Once the CLI finishes, install the official React component:
npm i waitlist-email-reactimport { WaitlistForm } from "waitlist-email-react/react";
export default function App() {
return (
<WaitlistForm
baseUrl="https://your-backend.vercel.app"
projectId="your-project-id"
/>
);
}Handles submission, loading states, validation, and feedback messages out of the box — no extra CSS required.
Full props reference → npmjs.com/package/waitlist-email-react
Backend repo
Want to deploy manually, self-host on a different platform, or understand exactly what's being deployed? See the backend source: github.com/Durjoy96/waitlist-email
License
MIT
