Skip to content

An average saas boilerplate builth w/ Next.js 14 & Lucia auth

Notifications You must be signed in to change notification settings

overdocxs/overdocs

Repository files navigation

SaaS Starter

Introduction · Installation · Tech Stack + Features · Credits


Introduction

OverDocs harnesses a powerful stack including Next.js 14, Drizzle, Neon, Lucia Auth, Resend, React Email, Shadcn/ui, and Stripe. These seamlessly integrated technologies accelerate your development and Saas journey.

Motivation

Implementing authentication in Next.js, especially Email+Password authentication, can be challenging. NextAuth intentionally limits email password functionality to discourage the use of passwords due to security risks and added complexity. However, in certain projects, clients may require user password authentication. Lucia offers a flexible alternative to NextAuth.js, providing more customization options without compromising on security. This template serves as a starting point for building a Next.js app with Lucia authentication.

Installation

Clone this repo locally with the following command:

pnpx create-next-app my-saas-project --example "https://github.com/cahyawibawa/overdocs.git"
  1. Install dependencies using pnpm:
pnpm install
  1. Copy .env.example to .env.local and update the variables.
cp .env.example .env.local
  1. Start the development server:
pnpm run dev

Note

I use npm-check-updates package for update this project.

Use this command for update your project: ncu -i --format group

Roadmap

  • Setup the Database with Drizzle and Neon Serverless
  • Add Email & Password Credentials Authentication with Lucia, React Hook Form & Zod
  • Email Verification with Nodemailer
  • Add Pricing Section
  • Update documentation for installation & configuration (work on it)
  • Update Password
  • Fix Oauth Google and Github credentials
  • Add Resend Integrations
  • Add Stripe or Lemonsqueezy for subscription

Tech Stack

  • Next.js – React framework for building performant apps with the best developer experience
  • Lucia – Handle user authentication with ease with providers like Google, GitHub, etc.
  • Drizzle ORM – Typescript-first ORM for Node.js
  • Neon – Serverless Postgres with autoscaling, branching, bottomless storage and generous free tier.
  • React Email – Versatile email framework for efficient and flexible email development
  • Resend – A powerful email framework for streamlined email development
  • Tailwind CSS – Utility-first CSS framework for rapid UI development
  • Shadcn/ui – Re-usable components built using Radix UI and Tailwind CSS
  • MinifyJS – Modern standard for public facing documentation
  • Vercel – Easily preview & deploy changes with git
  • Stripe – For subscriptions

Code Quality

  • TypeScript – Static type checker for end-to-end typesafety
  • Prettier – Opinionated code formatter for consistent code style
  • ESLint – Pluggable linter for Next.js and TypeScript

Miscellaneous

  • Vercel Analytics – Track unique visitors, pageviews, and more in a privacy-friendly way

Credits

This project was inspired by Miickasmt Next SaaS Stripe Starter and SaaSy Kits Next.js Lucia Auth Starter Template.