Hi, I'm Alessandro.
I wanted a SaaS foundation where every piece is chosen for running cost and ease of use, so I made one and open-sourced it under MIT: https://github.com/lowsbarrel/sveltekit-cf-template
How it was built: with AI coding agents in a close loop. I directed each change, reviewed it by hand, and made the architecture calls. The repo was recreated recently, so the commit history is short, but it's not a weekend project.
Stack: SvelteKit with Svelte 5 runes on Workers, Postgres via Hyperdrive with Drizzle, Better Auth with orgs, Creem for billing, superforms and zod v4, Paraglide 2, Tailwind v4, Vitest (in workerd and Chromium) and Playwright.
I chose Cloudflare as the infra provider mainly for cost, ease of use and time to deploy. You can start at $0 on the free plan, and the $5/mo Workers plan goes a long way before usage costs kick in, so you get something that scales without paying for idle servers. Public pages (landing, pricing, legal, blog) are prerendered and served as static assets, so they don't even run the Worker. And since the database is plain Postgres (Neon, Supabase, RDS or self-hosted), you're not locked into Cloudflare if you want to leave.
For agents: AGENTS.md lists the invariants, there's a docs page per subsystem, and there are skills (setup, add-feature, add-plan, upgrade-template) that ask you product decisions instead of guessing. The pre-commit hook runs the same checks as CI.
I'm mainly posting to get feedback, so please be honest. In particular:
Alessandro seeks feedback on his open-source SaaS template built with SvelteKit on Cloudflare Workers and Postgres. He highlights the stack choices and cost-effectiveness, asking for opinions on the billing system and any potential barriers to using the template for real projects. A user provides feedback on architecture choices, suggesting decoupling services from Cloudflare bindings and discussing monorepo setups.
Honest feedback from someone that built 3 apps on SvelteKit/Astro Stack
I no longer build on Framework First setups, always monorepo and core logic like Repository and Services get their module. And Cloudflare is an adapter to ports. So you can swap KV for redis. Or Cf email sending for Resend.
I know many people are MVP and want to “fail fast” but this pay dividends.
Thanks, this is useful. Services are already decoupled from SvelteKit (routes, cron, queues, and workflows just build a Ctx and call them) and the database is standard Postgres via Drizzle. However, you're right that services still touch Cloudflare bindings directly (like env.EMAIL and env.RATE_LIMITER), so I'll likely wrap those in small Ctx interfaces to simplify testing and adapter swaps. I'm less sold on a full monorepo with ports-and-adapters for this template. it's meant to stay Cloudflare-opinionated and easy to ship without extra layers of indirection. That said, how do you typically split it: what stays in your core package versus the app, and do you keep Drizzle schemas in core or abstract them behind repositories?
So basically I have a unique app that is 3 apps. Dashboard, StoreFront and Scanner App.
apps/
|--dash/(sveltekit)
|--scanner/(sveltekit)
|--store/(Astro)
pkgs/
|--core/
|----src/
|-----schemas/ (Astro action/remote funcs input)
|-----repositories/
|-------Postgres/
|-------DoSqlite/
|-------LocalScanner/
|-----services/ (Business logic to call in handlers)
|-----layers/ (this is like “infra” or ports)
|-----adapters/
|-------Cloudflare/
|---------kv.ts
|---------email.ts
|---------…
|-------Neon/
|-------Resend/ (before changing into CF email)
|-------PGlite/ (crucial for local testing)
My “Layers” are something like ports. And I have one for every external provider.
Email, KV, DB, Analytics, Images, even Durable Objects etc…
In this setup AI can’t f up. My logic is infra agnostic, and easy to test, but still very Cloudflare shaped.