Hey all 👋🏼,
last week I asked you about the perfect boilerplate to bootstrap a SaaS application without getting much traction.
I guess most of the stuff out there is locked behind a paywall or doesn't fit my specific needs 🥲.
That's why I've decided to start a series on Medium on how I am coming up with my own boilerplate using Next.js, Firebase Auth, Express.js and PostgreSQL and the TypeORM ORM.
You can find the final code for part 1 of the journey (client side) on this branch of the repo. If you look more closely, I actually took the liberty of going ahead and almost finished the project, but it needs further polishing and documentation.
I will write up the second (and possibly third) episodes in the coming weeks - stay tuned!
Care to say thanks? Follow me on twitter 😁.
P.S.: inputs and recommendations on how to improve the project are more than welcome.
From my experience of building https://usegravity.app - there is a market for open-source boilerplates, with a few buts:
it's mostly hobbyists that use them; businesses pay for these boilerplates because they want peace of mind when their entire business is hinged on a third-party foundation, this is related to point #2 below:
maintaining a product like this is a huge amount of work, and requires customer service/support, which is unsustainable with a free or cheap business model
Hey @kylegawley 👋🏼. Thank you for sharing your perspective. From the looks of it—your (awesome) product is much more solid and feature rich than what I am building at the moment.
My target audience are fellow indie makers 🚂.
I see my boilerplate as something to get started real quick on MVP development. Sure enough, I plan to do maintenance and bug fixing (mostly because I myself rely on it for my projects), but I din't see myself getting into the business of addressing client-specific needs (especially for businesses).
This comment was deleted 5 years ago.
Hi Francesco (wow! another Italian Indie Hacker 🤙)
Honestly, I don't find the concept of "boilerplate" attractive and useful. They need constant updates and, in most cases, they are too (and unnecessarily) opinionated.
In my opinion, there are too many dependencies and moving parts in your boilerplate that could create maintenance problems in the future and perhaps the stack you have chosen is not an ideal starting point to quickly build an MVP for a SaaS product.
I don't even like parts of your stack. I prefer Prisma over TypeORM (which IMHO forces you to write non-idiomatic JS code) and Fastify over Express (which lacks modularity and TypeScript support).
To me can be more useful to have a collection of libraries/modules (aka toolkit) with your code to include in my own projects instead of an entire boilerplate.
You should build a "Pro" version of this for money. It will probably be the only sustainable way to work on it In the long term. This also means, it will be better in the long run for those who want to only use the OSS (free) version.
Hey @rob_race! Thank you for the recommendation. My goal (to which I believe I am 90% of the way to) is to ship something usable with < 30 mins of required set up time (provided you have some knowledge of the technologies you are working with).
A couple of questions, if you care to elaborate:
30 minutes is... kind of a while?
I confess, I'm biased, I prioritized project start-up time with Nodewood, a paid JavaScript boilerplate (so not exactly your target audience, but still, close enough to comment), and it's like 4 minutes, including download and installation.
Now, I have built a CLI tool to make a lot of this stuff easier, but you could definitely get it down lower with like, setting up your repo as a Template repo and including a docker-compose file. Template, clone, run docker command, and a user could theoretically be set up and working in 10m, easy.
(Yeah, I know I'm working against myself here, but honestly, I feel this space is big enough to support a fair amount of boilerplates, and as @kylegawley mentioned up-thread, I think trying to do this for free, long-term is pretty unsustainable. If you do go pro, I definitely wish you the best of luck! And heck, I'm happy to wish you luck in the meantime, as well.)
Ahaha @DanHulton no worries - I am not looking to compete with you on this one 😅. Thank you very much for the insights and the openness. I do appreciate the work you’re doing with Nodewood and I look forward to having some spare cash to try it out for myself.
I do have some CLI magic on my local env - I just don’t want to over complicate the boilerplate (from a technical standpoint, not from a UX perspective).
Anyway, I think 30 mins are fair enough if you consider the creation of the Firebase project and the familiarisation with the initial code base. Definitely 1/10 of the time it would take to write it up from scratch 😖
Great! Thank you for the insights.
As a matter of facts you are tempting me to give it a go 😅. I'll add it to the list of things to try in 2021.
For now I'll be happy to share the OSS version with the community and maybe have a couple of good souls who are willing to offer me a coffee.
Why not just use NextJS's own backend system instead of Express?
Great work! I think it is the perfect moment to monetize bootstrap with the help of some marketing: https://bedrock.mxstbr.com/
That is a great idea Francesco! (great to see another Italian IndieHacker btw 💪)
We kind of did the same thing, but not open source it.
During the years working at the company I co-founded with @SeaOfDreams we've built different products for internal use.
At some point we decided that we wanted to try to build our first Saas (that we actually never shipped due to a series of things) so i collected different "modules" i've built for other projects and glued them together to build a Saas boilerplate for future projects (it is like a blank canvas with basic Saas functionalities e.g. auth, invoicing, multi-language support, admin functionalities etc.)
This allowed us to build our latest product Splitstack in about a month of work (Planning to Ship it next week 😄)
Thanks for sharing! Good luck on your launch ⭐️
Being on a similar path at the moment, I'm a bit curious about the rationale behind your technical choices. Why Express with Next? Did you hit a wall that forced you to switch the engine or is it just a matter of taste?
Did you take a look at NextAuth? It seems like a great option to handle authentication, and it supports various providers.
Ciao @dSebastien.
First, let me say that I love to work JavaScript (TypeScript) full-stack. Indeed, it has some drawbacks on the BE, but I am happy with the overall experience and so
I have not looked into NextAuth—it looks promising though!
I feel like we could share some notes as we go ;-)
Personally, I've kept the default back-end engine of Next, in the hope to be able to deploy everything through Vercel or Serverless and gain time. Express doesn't necessarily prevents that, but I don't see the point of switching (so far).
Instead of TypeORM, I've chosen Prisma, which I'm really glad about so far. The tooling is top-notch and it's quite straightforward to get started, generate TS code based on the schema, seed the database, handle DB migrations, etc.
Thanks Francesco for both the repo and the articles! I'll follow all of them as well as your Twitter :)
Glad to hear you're coming along for the ride 🔥
Good god I wish I knew about TypeOrm before committing to Sequelize in my new project. This looks so much better ;_;
@Glench I have been there. On one of the projects I worked on last year (I will not plug it in here since it's mostly decommissioned) I hit my head against the wall while trying to use TypeScript in Sequelize. It's just not there yet (it's not as clean as I'd like it to be).
If you can take some time to swap TypeORM in for Sequelize out, do so. You'll not regret it.
Hey Francesco,
I think this is a great idea and I would definitely use this if I was learning how to build an app, but not in prod.
Some gripes I have with this concept:
Here is my 2 cents experience I had with building a SaaS app:
I built everything in Next JS static mode: cheap, fast, highly scalable and secure. So I can host anywhere, no need to have a dynamic server for the frontend.
Here is my learning after building Nextless NextJS SaaS Boilerplate.
Hey @ryanmargono. Thank you for the constructive criticism. Both are valid points
Great stuff - good luck and keep up the good work!
Thank you Mike 🙏🏼