DEV Community

Cover image for Nextless.js - Next JS SaaS Boilerplate Template with Serverless backend
Remi W.
Remi W.

Posted on

Nextless.js - Next JS SaaS Boilerplate Template with Serverless backend

Recently, I was building my own SaaS product and it took me 5 months to build it from scratch, which was way more time than I expected at the beginning. It wasn't an easy journey, but I finally did it! πŸŽ‰

Here is some of my learning to build a SaaS product in 2021.

Static Site Generator

You heard it correctly, you can build a SaaS with Static Site Generator (SSG). I made this first SaaS in Next JS in static mode (next export). So, I can host the frontend on any static hosting: cheap, fast, highly scalable, easy to maintain, secure, etc. No need to have a dynamic server to serve your UI.

UI components

The frontend is fully built in React and TypeScript styled with Tailwind CSS. I made everything:

πŸ”₯ Landing Page
πŸ”₯ Authentication
πŸ”₯ Dashboard
πŸ”₯ Forms
πŸ”₯ User Settings
πŸ”₯ Table

The components paradigm definitively makes your UI more modular and more reusable.

You don't need to hire a UI/UX designer anymore for a micro-SaaS!

Developer Experience, build for developers

As a passionate developer, I love using tools helping me to be a better engineer:

❀️ Type checking with TypeScript
❀️ Linter with ESLint
❀️ Code formatter with Prettier
❀️ Editor configuration for VSCode
❀️ Local development and Debugging session

Maybe one day, with GitHub Copilot, you don't need to code anymore ;) But, for now, Developer Experience is extremely important to write high-quality code.

Fully Serverless

For this project, I was a solo developer, I need to get help from the right tools. And, Serverless is one of them. It really makes your code ready for production:

πŸš€ One command deployment for backend
πŸš€ Infrastructure as code, also deploy in one command
πŸš€ Highly scalable with Serverless
πŸš€ Low maintenance: no server maintenance, no Docker, no Kubernetes

Because it's Serverless, I only pay based on my traffic.

You don't need to hire a DevOps engineer anymore for a small SaaS!

Stripe integration

Like any SaaS product, you need to accept subscriptions. Accepting payment is difficult, it's even more difficult to build a subscription with recurring payment.

Stripe is one of the best solutions you can find on the market. Even that, it wasn't an easy integration: webhooks, reading documentation, code example, asking questions, testing, etc.

Here is the result, now my users can easily subscribe to any plan. They can also have access to a self-serve customer portal where they can update, upgrade, cancel, pause, resume, manage their plan.

Nextless.js, Next JS SaaS starter

It's only a showcase of what I've done recently. But, in a couple of weeks, I'll share more details on what I have learned by building my first SaaS product.

Here is the link to my first SaaS: PostMage for generating social image

You can find more information on the tech stack at Nextless.js SaaS Boilerplate

Next JS SaaS Boilerplate Starter

I have learned so much about Next JS, web development, frontend development, React, Tailwind CSS, TypeSript Serverless, Stripe, AWS, Infrastructure by building my first SaaS product. I'll definitely share my experience with tutorials, blog posts, etc. Stay tuned.

Top comments (5)

Collapse
 
ilearnbydoing profile image
Durgesh Gupta

great product

Collapse
 
ixartz profile image
Remi W.

Thank you for your support!

Collapse
 
ivan_jrmc profile image
Ivan Jeremic

Amazing good job!

Collapse
 
ixartz profile image
Remi W.

Thank you!

Collapse
 
olefyrenko profile image
Info Comment hidden by post author - thread only accessible via permalink
Dmytro Olefyrenko

Looks great! I like that you have selected the AWS stack for your project. I have used Supabase for the similar starter kit nestajs.com. The Postgres DB in the Supabase is very powerful!

Some comments have been hidden by the post's author - find out more