create-next-supaauth v0.1.18
create-next-supaauth
A modern, type-safe authentication boilerplate built with Next.js 14 and Supabase.
Ready to try it? Deploy now in seconds!
⨠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
Create a new project with one command:
npx create-next-supaauth my-app
Navigate to your project:
cd my-app
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
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:
Create a Supabase project at https://supabase.com if you haven't already.
Get your Supabase URL and anon key from your Supabase project dashboard.
Click the "Deploy to Vercel" button at the top of this README or use the button below.
In the Vercel deployment form, enter your Supabase credentials:
NEXT_PUBLIC_SUPABASE_URL
: Your Supabase project URLNEXT_PUBLIC_SUPABASE_ANON_KEY
: Your Supabase project anon/public key
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:
Create a Supabase project at https://supabase.com if you haven't already.
Get your Supabase URL and anon key from your Supabase project dashboard.
Click the "Deploy to Netlify" button at the top of this README or use the button below.
In the Netlify deployment form, enter your Supabase credentials:
NEXT_PUBLIC_SUPABASE_URL
: Your Supabase project URLNEXT_PUBLIC_SUPABASE_ANON_KEY
: Your Supabase project anon/public key
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:
Variable | Description | Where to Find |
---|---|---|
NEXT_PUBLIC_SUPABASE_URL | The URL of your Supabase project | Supabase Dashboard ā Project Settings ā API ā Project URL |
NEXT_PUBLIC_SUPABASE_ANON_KEY | The anonymous key for your Supabase project | Supabase 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
UI Customization
- Modify Tailwind styles in
src/styles/globals.css
- Update components in
src/components/layout/
- Modify Tailwind styles in
Route Protection
- Extend protected routes in
src/middleware.ts
- Extend protected routes in
Feature Extension
- Build upon the dashboard in
src/app/dashboard/page.tsx
- Build upon the dashboard in
š¤ Contributing
We welcome contributions! Here's how you can help:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
š¬ Support
- š Supabase Documentation
- š Issue Tracker
- š” Discussions
š License
This project is licensed under the MIT License - see the LICENSE file for details.
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago