A modern SaaS template built with Next.js 15, Tailwind CSS v4, Shadcn UI v2, and Supabase.
git clone https://github.com/yourusername/frontend-template.git
cd frontend-template
npm install --legacy-peer-deps
Note: The
--legacy-peer-deps
flag is required due to compatibility issues between react-day-picker and other dependencies. Shadcn UI uses react-day-picker v8.x for its calendar component, and upgrading to v9 would break the custom implementation (specifically theIconLeft
andIconRight
components). This flag allows npm to ignore peer dependency conflicts until Shadcn UI updates their components for the newer version.
.env.example
file to .env.local
:cp .env.example .env.local
.env.local
with your Supabase credentials:NEXT_PUBLIC_SUPABASE_URL=your-supabase-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
NEXT_PUBLIC_SITE_URL=http://localhost:3000
npm run dev
# or
yarn dev
# or
pnpm dev
Your application should now be running at http://localhost:3000.
The template includes a secure authentication system with several security enhancements:
To protect against brute force attacks and abuse, the system implements rate limiting:
The application implements various security headers through middleware:
/
āāā app/ # Next.js App Router
ā āāā (auth)/ # Authentication routes
ā āāā (public)/ # Public routes
ā āāā (authenticated)/ # Protected routes
āāā components/ # React components
āāā hooks/ # Custom React hooks
āāā lib/ # Utility functions and libraries
āāā public/ # Static assets
āāā utils/ # Helper functions
āāā supabase/ # Supabase client configuration
The application can be deployed to any platform that supports Next.js, such as Vercel, Netlify, or a custom server.
# Build the application
npm run build
# or
yarn build
# or
pnpm build
# Start the production server
npm start
# or
yarn start
# or
pnpm start
npm run dev
- Run the development servernpm run build
- Build the application for productionnpm start
- Start the production servernpm run lint
- Run ESLintnpm run format
- Format code with Prettiernpm run clean:dotfiles
- Clean up dotfilesnpm run clean:node_modules
- Remove node_modulesnpm run clean:cache
- Clear Next.js cacheContributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.