A modern SaaS template built with Next.js 15, Tailwind CSS v4, Shadcn UI v2, Upstash Redis, and Supabase.
- โก๏ธ Next.js 15 - The React framework for production
- ๐จ Tailwind CSS v4 - A utility-first CSS framework
- ๐ฅ Shadcn UI v2 - Beautifully designed components
- ๐ Supabase - For authentication and database
- ๐ TypeScript - Static type checking
- ๐ Dark Mode - Light and dark theme support
- ๐งฉ React Hook Form - Flexible form validation
- โ๏ธ Zod - Schema validation
- ๐ก๏ธ Enhanced Security - Robust authentication with rate limiting using Upstash
- ๐ Security Headers - CSP and other security headers (Coming Soon)
- ๐ซ Anti-Brute Force - Protection against authentication attacks (Coming Soon)
Make sure you have the following installed on your machine:
- Node.js 20+
- npm or yarn or pnpm (pnpm is redcommended)
- Docker Desktop
- Supabase CLI
Refer to the Installation Guides Section of this README to find short guides and links to recommended installation guides for the above.
git clone https://github.com/devsForFun/starterkit.git
cd starterkit- Visit github.com/devsforfun/starterkit
- Click on the Use this template button on the top right corner.
- Create your repository and clone it.
# recomended:
pnpm intstall
# or
npm install
# or
yarn installsupabase startAfter the contianer starts, you will be provided with some credentials like the following example:
API URL: http://127.0.0.1:54321 GraphQL URL: http://127.0.0.1:54321/graphql/v1 S3 Storage URL: http://127.0.0.1:54321/storage/v1/s3 DB URL: postgresql://postgres:postgres@127.0.0.1:54322/postgres Studio URL: http://127.0.0.1:54323 Inbucket URL: http://127.0.0.1:54324 JWT secret: super-secret-jwt-token-with-at-least-32-characters-long anon key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0 service_role key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU S3 Access Key: 625729a08b95bf1b7ff351a663f3a23c S3 Secret Key: 850181e4652dd023b7a98c58ae0d2d34bd487ee0cc3254aed6eda37307425907 S3 Region: localCopy those credentials from you terminal and save them in your notes or create a
supabase-local-credentials.txtfile in this repo (it is already added to.gitignoreso that it is not pushed into the repository.)
- Copy the
.env.examplefile to.env.local:
cp .env.example .env.local- Update the environment variables in
.env.localwith your Supabase credentials:
# Basic
NEXT_PUBLIC_SITE_URL=http://localhost:3000
# Supabase Credentials (From your local project generated using Supabase CLI)
NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54321
NEXT_PUBLIC_SUPABASE_ANON_KEY=xxxxxxxxx
# Upstash
UPSTASH_REDIS_REST_URL=xxxxxxxxx
UPSTASH_REDIS_REST_TOKEN=xxxxxxxxx
# recommended:
pnpm dev
# or
npm run dev
# or
yarn devYour application should now be running at http://localhost:3000.
- Email/password authentication
- Google OAuth integration
- Strong password requirements
- Secure password handling
- Session management with secure cookies
- Rate Limiting with Upstash Redis
/
โโโ app/ # Next.js App Router
โ โโโ (auth)/ # Authentication routes
โ โ โโโ forgot-password/
โ โ โโโ login/
โ โ โโโ register/
โ โ โโโ reset-password/
โ โโโ (public)/ # Public routes
โ โโโ (authenticated)/ # Protected routes
โ โโโ actions/ # Server actions
โ โโโ globals.css # Global styles
โโโ assets/ # Project assets
โ โโโ images/ # Image assets
โ โโโ logos/ # Logo files
โโโ components/ # React components
โ โโโ ui/ # Shadcn UI components
โ โโโ mode-toggle.tsx # Dark/light mode toggle
โ โโโ theme-provider.tsx # Theme context provider
โโโ hooks/ # Custom React hooks
โโโ lib/ # Utility functions and libraries
โโโ public/ # Static assets (favicons, etc.)
โโโ supabase/ # Supabase configuration
โโโ utils/ # Helper functions
โ โโโ supabase/ # Supabase client configuration
โโโ middleware.ts # Next.js middleware
โโโ next.config.ts # Next.js configuration
โโโ tailwind.config.ts # Tailwind CSS configuration
โโโ tsconfig.json # TypeScript configuration
โโโ components.json # Shadcn UI configuration
The application can be deployed to any platform that supports Next.js, such as Vercel, Netlify, or a custom server.
# Build the application
pnpm build
# or
npm run build
# or
yarn build
# Start the production server
pnpm start
# or
npm start
# or
yarn startpnpm dev- Run the development serverpnpm build- Build the application for productionpnpm start- Start the production serverpnpm lint- Run ESLintpnpm format- Format code with Prettierpnpm clean:dotfiles- Clean up dotfilespnpm clean:node_modules- Remove node_modulespnpm clean:cache- Clear Next.js cache
Refer to this: Node.js - Download Node.js ยฎ
Refer to Installation | pnpm
Refer to this: Docker Desktop
Refer to this article for more details: Supabase CLI | Supabase Docs
Or, Simply use the following:
# macos & linux:
brew install supabase/tap/supabase
# windows:
scoop bucket add supabase https://github.com/supabase/scoop-bucket.git
scoop install supabaseContributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.