A production-ready SaaS starter template built for the Modern Stack Hackathon, featuring SvelteKit, Convex, Better Auth, Autumn Stripe billing, and more.
✅ Authentication System
✅ User Management
✅ UI Components
✅ Developer Experience
git clone https://github.com/joachimchauvet/modernstack-saas
cd modernstack-saas
pnpm install
Create a .env.local
file in the root directory:
PUBLIC_CONVEX_URL=your_convex_url
PUBLIC_CONVEX_SITE_URL=your_convex_site_url
SITE_URL=http://localhost:5173
RESEND_API_KEY=your_resend_api_key
RESET_EMAIL_FROM="Your App <[email protected]>" # Optional
[email protected] # Optional
pnpm convex dev
pnpm dev
The app will be running at http://localhost:5173
Run both the SvelteKit dev server and Convex in parallel:
# Terminal 1 - Convex backend
pnpm convex dev
# Terminal 2 - SvelteKit frontend
pnpm dev
├── src/
│ ├── lib/
│ │ ├── components/ # UI components
│ │ ├── auth-client.ts # Better Auth client
│ │ └── ...
│ ├── routes/
│ │ ├── (app)/ # Protected routes
│ │ │ ├── dashboard/
│ │ │ └── settings/
│ │ └── auth/ # Authentication routes
│ └── convex/ # Convex backend
│ ├── auth.ts # Auth configuration
│ ├── storage.ts # File storage
│ └── ...
Create a production build:
pnpm build
Preview the production build:
pnpm preview
This starter uses adapter-cloudflare by default, but you can swap it for any SvelteKit adapter:
pnpm convex deploy
Set all environment variables in your hosting platform:
PUBLIC_CONVEX_URL
PUBLIC_CONVEX_SITE_URL
SITE_URL
(update to your production domain)RESEND_API_KEY
RESET_EMAIL_FROM
(optional)RESET_EMAIL_REPLY_TO
(optional)Deploy your frontend to your chosen platform
This starter template was created for the Convex Modern Stack Hackathon, showcasing the power of combining modern web technologies to build production-ready SaaS applications.