Hacker News new | ask | show | jobs
KitForStartups – The Open Source SvelteKit SaaS Boilerplate (github.com)
110 points by segbedji 1002 days ago
This is a project I’ve been working on for a couple of weeks now, and I feel it’s now in a state I can share it with the community here on Discord.

It all started when I saw Marc Lou launched ShipFast (a paid Next.js startup boilerplate). I wanted to build something similar for SvelteKit. I was planning to make it a paid product, but ended up open sourcing it.

You can see KitForStartups as a toolkit you can use to prototype and ship faster your MVPs, web applications, etc.

It comes with support for many databases (SQLite w/Turso, MySQL and Postgres), authentication (email + password, OAuth with Google and GitHub), email sending with Resend (local emails are configured to be sent with MailHog for faster debugging), toast notifications with Melt UI, etc…

I’m still actively working on the project and on things like support for Supabase, magic link authentication, MailGun, a CLI, etc…

Give a look at the repo here https://github.com/okupter/kitforstartups, and please feel free to open an issue or PR is there’s something you’d like to see included.

11 comments

Good to see another start kit.

I was recently looking for one. I was ready to trade the need of training myself in some technologies (Svelte in your case) for a good set of "batteries included".

I would suggest that you either put an online demo and include a link in a prominent place in your README, or describe the features in a clearer way. You currently list Stripe, Lemon Squeezy etc. in your Tech Stack section. ShipFast has a better way of doing that on their website. They list features like email, payment, login, etc. When you click on the feature they display the options they support including the technical details.

I have kitforstartups.com, and yeah, the final goal is to add some example, and more documentation there.
Link is broken.

Thanks for open sourcing this!

That returns a 404.
That's the intended response when the page can't be found. They never said there was a site hosted there. Just that the domain was owned.
Yeah, I know how a 404 works. Their comment was misleading and I wasn't the only person who felt that way.
Just tossing a question out there to more experienced folks. Doesn't it make more sense to use a more robust structure such as Django or Rails for the backend with React or Svelte for the front end, especially for starter kits like these? I think that would be more scalable when looking in the long term, as compared to relying on a single framework. There's the obvious disadvantage of having to learn more frameworks and possibly a language too, but won't it pay off later when you want to scale your SaaS?
+1 to what @kevinak said. SvelteKit already provides some good ways to handle basic backend features. API routes, form actions etc... work great.

If needed, once can also plug in a customer Express or other Node.js servers, https://kit.svelte.dev/docs/adapter-node#custom-server.

Nah, it’s unnecessary- you can do everything in Kit, adding a pure backend would just add extra work for no reason.

Kit is built for serverless so you won’t have any issues with scaling.

> adding a pure backend would just add extra work for no reason

I see Django/React everywhere with clients though. It's far more popular than you might think, though the reasoning why can be wildly different.

Wouldn't it be great to just:

   import authentication
   import authorisation
   import admin-dashboard
   import payments
   import backups
   import marketplace-ecommerce-frontend
   import email-provider
   import job-queue
   import database
   import ./mysaasmodel
   import analytics
   import omnichannel-notifications # email, web chat, post, notifications
   import code-hosting
   import business-rule-engine
   import subscriptions
   import landing-page
   import blog
   import government-tax-reporting
   import accounting
   import business-registration
   import business-banking
   import pricing-page
   import newsletter
   import server-vendor
   import product-database
   import enterprise-resource-planning
   import website
   import mobile-application
And everything just ties itself together. You could wrap each service on a market exchange and they could all talk, negotiate on an event bus.

EDIT: Integration and costs are painful, if I could do things based on "rates", rates could scale? Sorry to hijack your announcement, just a thought about SaaS kits, I always worry about their sustainability and maintenance into the future. It would be good if computing had some stable foundations. (The nobody got fired for picking X)

I guess i am only 20% there with authentication/authorization/rest/db :(
Wouldn't that be much overhead? I was thinking just having a CLI where you'd choose the things you want, and the boilerplate gets scaffolded automatically with those.
The frontend js ecosystem has dead code elimination, so when it’s built, only what you actually called comes along.
> import authorisation

+153, I love being able to use regular English spelling instead of being pushed into using US spelling.

Little known fact but almost all “US spelling” came from Britain or was derived more directly from Greek (s/z). Also some incursions from French were dropped. Further, it was the British that changed during the 18/19th century in accent and spelling, around the decline of the British Empire.

So avoiding the differences on purity grounds is not particularly logical.

Indeed, from that paragraph:

"He was very influential in popularizing certain spellings in America, but he did not originate them."

You know I'm a bit surprised Stripe has not put out more boilerplates that include integration with their platform. It's often a feature not added / coming soon in the OSS SaaS boilerplates I've seen.
Agreed. What do you think the reason for not doing it would be? Liability? Are they responsible if someone takes it and modifies code? I've gotta assume they could cover their butts with a terms of use.

This could be a very solid best practices utilizing product if they did put it out.

Thanks, will do that.
I recently looked at Django Pegasus and ended up just compiling my own 'kit'. There is some value on curation but ultimately the hard part is understanding your chosen libraries and customization for your use case.
I think the name is pretty generic/bad. Maybe you could incorporate some nordic myth etc since they are adding the new runes api to svelte. One thing that could be nice is using something like Zod for input validation, I see alot of "// TODO: validation" ;) Otherwise it looks really cool and might be something I would use for my next sveltekit project, right now I just run with pocketbase + sveltekit for my app.
I've been thinking about the right balance for validation. Should I just do a simple checks (check if fields are not undefined, empty strings, etc…), or just plug in Zod.

I will probably go with the latter.

Looks great!

I'm working on a similar starter kit for rails here https://github.com/tarunvelli/rails-tabler-starter

I don't know much about Rails. But how easy is it to add a CLI, where users can select the options they want and get a scaffold generated with those specifically.
Rails comes with a CLI scaffold generator, which can be customized too.
I think that’s called Rails
this looks really cool but what I'd like to see is something like this packaged as an addon to just a sveltekit install, as in you can choose which pieces you need, more modular, could even break it out into separate packages in a mono repo, @kfs/db, @kfs/auth, @kfs/stripe, @kfs/lemonsqueezy,

the main reason being if I want updates I'd need to merge in upstream and manage merge conflicts etc with own changes, the other way I'd just update packages and fix breaking changes.

That's actually a very good idea. I was thinking about using a CLI, but this will make that not necessary, and easily scalable.

Thanks for the idea.

Congratulations on releasing such a big project! This is exciting.
having a running demo would be great