0.1.18 • Published 2 months ago

create-next-supaauth v0.1.18

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

create-next-supaauth

A modern, type-safe authentication boilerplate built with Next.js 14 and Supabase.

Next.js Supabase TypeScript Tailwind CSS npm version

Ready to try it? Deploy now in seconds!

Deploy with Vercel Deploy to Netlify

✨ Features

  • šŸ” Complete Server-Side authentication system with email/password
  • šŸš€ Server-side rendering with Next.js 14
  • šŸŽØ Modern UI with Tailwind CSS
  • šŸ“± Fully responsive design
  • šŸ”’ Protected dashboard routes
  • 🌐 Password reset with email verification
  • šŸ’Ŗ Type-safe code with TypeScript
  • ⚔ Powered by Supabase

šŸš€ Quick Start

Prerequisites

  • Node.js 16.14.0 or higher

Installation

  1. Create a new project with one command:

    npx create-next-supaauth my-app
  2. Navigate to your project:

    cd my-app
  3. Update your environment variables in .env.local with your Supabase credentials:

    NEXT_PUBLIC_SUPABASE_URL=your-supabase-url
    NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
  4. Start the development server:

    npm run dev

Visit http://localhost:3000 to see your app in action! šŸŽ‰

Deploy to Vercel

You can deploy this project directly to Vercel with the following steps:

  1. Create a Supabase project at https://supabase.com if you haven't already.

  2. Get your Supabase URL and anon key from your Supabase project dashboard.

  3. Click the "Deploy to Vercel" button at the top of this README or use the button below.

  4. In the Vercel deployment form, enter your Supabase credentials:

    • NEXT_PUBLIC_SUPABASE_URL: Your Supabase project URL
    • NEXT_PUBLIC_SUPABASE_ANON_KEY: Your Supabase project anon/public key
  5. Click "Deploy" and wait for the deployment to complete.

Deploy to Netlify

You can also deploy this project directly to Netlify with these simple steps:

  1. Create a Supabase project at https://supabase.com if you haven't already.

  2. Get your Supabase URL and anon key from your Supabase project dashboard.

  3. Click the "Deploy to Netlify" button at the top of this README or use the button below.

  4. In the Netlify deployment form, enter your Supabase credentials:

    • NEXT_PUBLIC_SUPABASE_URL: Your Supabase project URL
    • NEXT_PUBLIC_SUPABASE_ANON_KEY: Your Supabase project anon/public key
  5. Click "Save & Deploy" and wait for the deployment to complete.

Your application will be deployed and accessible through a Vercel or Netlify URL. You can then configure custom domains and other settings in your respective dashboard.

Environment Variables

This project requires the following environment variables to function properly:

VariableDescriptionWhere to Find
NEXT_PUBLIC_SUPABASE_URLThe URL of your Supabase projectSupabase Dashboard → Project Settings → API → Project URL
NEXT_PUBLIC_SUPABASE_ANON_KEYThe anonymous key for your Supabase projectSupabase Dashboard → Project Settings → API → Project API Keys → anon/public

These variables are necessary for the authentication system to communicate with your Supabase backend.

šŸ“– For Beginners

SupaAuth is designed to be beginner-friendly while maintaining professional standards. Here's what you'll learn:

Key Learning Points

  • šŸ“ Form handling and state management
  • šŸ”‘ Authentication flow implementation
  • šŸ›”ļø Route protection strategies
  • šŸŒ Server-side vs. client-side rendering
  • šŸŽØ Modern UI development with Tailwind CSS

Project Structure

src/
ā”œā”€ā”€ app/                    # Pages and layouts
│   ā”œā”€ā”€ auth/              # Authentication pages (signin, signup, reset-password)
│   ā”œā”€ā”€ dashboard/         # Protected dashboard
│   └── layout.tsx         # Root layout
ā”œā”€ā”€ components/            # Reusable UI components
ā”œā”€ā”€ contexts/              # React Context providers
ā”œā”€ā”€ lib/                   # Utility functions
ā”œā”€ā”€ styles/               # Global styles
└── types/                # TypeScript definitions

šŸ”§ For Advanced Developers

Performance Features

  • ⚔ Pre-configured Supabase authentication with SSR
  • šŸ”„ Optimized data fetching strategies
  • šŸŽÆ Type-safe API calls

Customization

  1. UI Customization

    • Modify Tailwind styles in src/styles/globals.css
    • Update components in src/components/layout/
  2. Route Protection

    • Extend protected routes in src/middleware.ts
  3. Feature Extension

    • Build upon the dashboard in src/app/dashboard/page.tsx

šŸ¤ Contributing

We welcome contributions! Here's how you can help:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

šŸ’¬ Support

šŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


0.1.18

2 months ago

0.1.17

2 months ago

0.1.16

2 months ago

0.1.15

2 months ago

0.1.14

2 months ago

0.1.13

2 months ago

0.1.12

2 months ago

0.1.11

2 months ago

0.1.10

2 months ago

0.1.9

2 months ago

0.1.8

2 months ago

0.1.7

2 months ago

0.1.6

2 months ago

0.1.5

2 months ago

0.1.4

2 months ago

0.1.3

2 months ago

0.1.2

2 months ago

0.1.1

2 months ago

0.1.0

2 months ago