create-next-supabase-starter
Version:
A simple CLI to create a Next.js 15 + Supabase project
153 lines (104 loc) β’ 7.56 kB
Markdown
# π create-next-supabase-starter
A powerful CLI tool to **instantly scaffold a modern, production-ready Next.js 15 + Supabase project** with a single command! π
## π€ Why Use This Starter Instead of Starting from Scratch?
Setting up a **Next.js 15 + Supabase project** from scratch can be **time-consuming and repetitive**. Developers often spend **hours configuring** authentication, database setup, styling, and component libraries before even writing business logic.
This starter **eliminates the setup hassle** and provides a **pre-configured, production-ready environment with stable versions**, allowing you to focus **on building features** instead of boilerplate code.
π **Why waste hours configuring when you can start coding in minutes?**
## π Features
β
**Next.js 15 with App Router** β Leverage the power of modern, server-driven architecture.
β
**React 19 Ready** β Optimized with the latest React features.
β
**TypeScript by Default** β Write safer, more maintainable code.
β
**Supabase Integration** β Pre-configured authentication, database, and storage.
β
**Tailwind CSS** β Fully styled with a scalable utility-based design system.
β
**shadcn/ui** β Beautiful pre-built UI components.
β
**React Hook Form** β Efficient and flexible form handling.
β
**Git Initialization (Optional)** β Quickly set up version control.
β
**Automated Dependency Installation** β No need to manually install packages.
β
**Environment Variables Included** β `.env.example` setup for easy configuration.
β
**Scalable & Production-Ready** β Best practices implemented out of the box.
## π₯ Installation & Usage
### **1οΈβ£ Quick Start (Recommended)**
You **donβt need to install anything!** Simply run:
```sh
npx create-next-supabase-starter@latest my-project
```
### **2οΈβ£ Running Without a Project Name**
If you donβt provide a name, the CLI will prompt you:
```sh
npx create-next-supabase-starter@latest my-project
```
π If you press **Enter** without a name, it will use **"next-supabase-starter"** by default.
## π¦ Whatβs Inside This Starter?
This starter is not just a simple Next.js setupβit comes **fully loaded** with essential features to kickstart any serious project.
### **π Technology Stack**
| Technology | Purpose |
| --------------------------- | ------------------------------------------------------------------------------------------------------------ |
| **Next.js 15 (App Router)** | Optimized for **performance** and **scalability** with modern **server components** and **dynamic routing**. |
| **React 19** | Utilizes the **latest features** for efficient rendering and state management. |
| **React Query** | Utilizes the **best practices** for efficient fetching, mutating and client side state management. |
| **TypeScript** | Provides **strong typing** for better maintainability and developer experience. |
| **Supabase** | Includes **authentication, database, and storage** setup using `supabase`. |
| **Tailwind CSS** | A **utility-first** CSS framework for quick and **scalable styling**. |
| **shadcn/ui** | Pre-built, **accessible UI components** styled with Tailwind. |
| **React Hook Form** | Lightweight and **powerful form handling** with built-in validation. |
| **pnpm** | **Efficient package manager** with workspaces support. |
| **ESLint & Prettier** | Code formatting and linting pre-configured. |
| **Environment Variables** | Pre-configured `.env.example` for easy API setup. |
## π οΈ How It Works
1οΈβ£ **Clones the Next.js + Supabase starter template.**
2οΈβ£ **Installs all dependencies automatically** (`pnpm install`).
3οΈβ£ **Asks if you want to initialize Git** (`git init`).
4οΈβ£ **Sets up a pre-configured project** with:
- Supabase authentication
- Tailwind CSS & shadcn/ui
- React Hook Form for forms
- Next.js 15 (App Router)
- TypeScript for type safety
5οΈβ£ **Displays a success message with your next steps.**
## π οΈ Options & Features
| Feature | Description |
| --------------------------- | ---------------------------------------------------------------------------------------------------- |
| **Project Name** | If not provided, CLI will prompt for one. Default: `"next-supabase-starter"`. |
| **Git Setup** | Asks if you want to initialize a Git repository. |
| **Automatic Installs** | Installs all dependencies using `pnpm install`. |
| **Pre-configured Supabase** | Ready to use with `supabase-js` for auth, database, and storage. |
| **React Query** | Pre-configured React Query providers with custom hooks (fetch, mutate). |
| **Auth Query Wrapper** | Auth Context mixed between supabase functions with react query providers ensures fresh user session. |
| **Tailwind & shadcn/ui** | Built-in styling and UI components, ready to use. |
| **React Hook Form** | Form handling setup with built-in validation. |
## π₯ Why Use This Starter?
β
**No More Boilerplate Setup** β Everything is pre-configured for you.
β
**Focus on Building, Not Configuring** β Get started instantly with Next.js 15, Supabase, and Tailwind.
β
**Best Practices Included** β The latest web development trends and best practices are built-in.
β
**Save Time & Effort** β Stop wasting hours setting up the same things repeatedly.
β
**Built-Ins** β Built-in auth system and thats always was a little hard for beginners with react query and supabase.
π‘ **With this starter, you can start writing actual business logic from Day 1!**
## π οΈ Example Output
```
π Create Next.js + Supabase Project
Enter your project name (or press enter to use default): my-app
π¦ Setting up my-app...
β
Starter project cloned successfully!
π¦ Installing dependencies...
π Do you want to initialize Git? (Y/n)
π Setup complete! Run the following to start your project:
cd my-app
pnpm dev
----------------------------------------
π Created by Mohamed 4rarh π
π» GitHub: https://github.com/Mohamed-4rarh
----------------------------------------
```
## π Support & Feedback
π’ Have feedback or found an issue? Open an issue on GitHub!
π» **GitHub:** [@Mohamed-4rarh](https://github.com/Mohamed-4rarh)