A production-ready SaaS starter template built for the Modern Stack Hackathon, featuring SvelteKit, Convex, Better Auth, Autumn Stripe billing, and more.
- SvelteKit with Svelte 5 - Modern, reactive frontend framework
- Convex - Real-time backend database with serverless functions
- Better Auth - Comprehensive authentication solution with email/password and OAuth
- Autumn - Stripe billing wrapper for seamless payment integration
- Resend - Transactional email service for password resets and email verification
- shadcn-svelte - Beautiful, accessible UI components
- Tailwind CSS v4 - Utility-first CSS framework
- Lucide - Beautiful icon library
-
✅ Authentication System
- Email/password authentication
- Google OAuth support
- Password reset flow
- Email change with verification
- Session management
-
✅ User Management
- User profile settings
- Avatar upload with Convex storage
- Account information management
-
✅ UI Components
- Dashboard with charts and data tables
- Sidebar navigation
- Settings pages (Account, Password, Email)
- Responsive design
- Dark/light mode ready
-
✅ Developer Experience
- TypeScript throughout
- Type-safe database queries
- Hot module replacement
- ESLint & Prettier configured
- LLM-focused documentation in
/docs+CLAUDE.mdfor AI-assisted development - GitHub Actions CI/CD for code quality checks and Cloudflare deployments
Planned features and improvements:
- OAuth Support - Complete Google OAuth integration and add additional providers
- Multi-tenancy / Team Support - Organizations, team invites, and role-based permissions
- Rate Limiting - API rate limiting and request throttling
- Stripe Stats in Admin Dashboard - Revenue analytics and subscription metrics
- Welcome Email Template - Branded welcome emails for new users
- E2E Tests with Playwright - Comprehensive end-to-end testing suite
- Node.js 18+
- pnpm (recommended) or npm
- Clone the repository:
git clone https://github.com/joachimchauvet/modernstack-saas
cd modernstack-saas- Install dependencies:
pnpm install- Set up environment variables:
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 <no-reply@yourdomain.com>" # Optional
RESET_EMAIL_REPLY_TO=support@yourdomain.com # Optional- Initialize Convex:
pnpm convex dev- Start the development server:
pnpm devThe 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 buildPreview the production build:
pnpm previewThis starter uses adapter-cloudflare by default, but you can swap it for any SvelteKit adapter:
- Deploy your Convex backend:
pnpm convex deploy-
Set all environment variables in your hosting platform:
PUBLIC_CONVEX_URLPUBLIC_CONVEX_SITE_URLSITE_URL(update to your production domain)RESEND_API_KEYRESET_EMAIL_FROM(optional)RESET_EMAIL_REPLY_TO(optional)
-
Deploy your frontend to your chosen platform
This project includes comprehensive documentation optimized for LLM consumption:
/docs- Framework-specific guides and best practicessvelte/- Svelte 5 runes, reactivity, templating, and state managementbetter_auth.md- Authentication setup and patternsconvex.md- Backend queries, mutations, and real-time datatailwind_v4.md- Styling with Tailwind CSS v4autumn.md- Billing and subscription management
GitHub Actions workflows are included for:
- Code Quality (
.github/workflows/code-quality.yml) - Linting, formatting, type checking, and spell checking on every push/PR - Cloudflare Pages (
.github/workflows/cloudflare-pages.yml) - Automatic deployments with preview URLs for pull requests - Cloudflare Workers (
.github/workflows/deploy-workers.yml) - Alternative deployment target with more features
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.
Stop plumbing, start vibing. Modern stack, zero setup headaches.
✓ Auth • ✓ Payments • ✓ Real-time DB • ✓ Your brilliant idea? Add here →
Fork & Ship on GitHub • MIT Licensed • Built for developers