Niya is a production-ready Next.js 15 template designed for developers and AI startups. Built with modern best practices, it includes authentication, state management, beautiful UI components, and everything you need to build scalable applications.
- Next.js 15 with App Router and TypeScript
- Supabase for authentication, database, and real-time features
- Tailwind CSS 4 for rapid UI development
- Zustand for lightweight state management
- React Query for server state management
- Zod for runtime type validation
- Complete authentication system with Supabase Auth
- Protected routes and middleware
- Role-based access control
- Email confirmation flow
- Password reset functionality
- Magic UI components for stunning animations
- Radix UI primitives for accessibility
- Framer Motion for smooth animations
- Dark mode support
- Responsive design
- Zero-config setup
- Hot reload with Turbopack
- ESLint and Prettier configuration
- TypeScript strict mode
- Comprehensive error handling
- Optimized for performance
- SEO-friendly with metadata
- Image optimization
- Error boundaries
- Loading states
- Node.js 18+
- npm, yarn, pnpm, or bun
- Clone the repository
git clone https://github.com/namanbarkiya/niya-saas-template.git
cd niya-saas-template- Install dependencies
npm install
# or
yarn install
# or
pnpm install
# or
bun install- Set up environment variables
cp env-example.env .env.local- Configure Supabase
- Create a new project at supabase.com
- Copy your project URL and anon key
- Update
.env.localwith your credentials
- Run the development server
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev- Open your browser Navigate to http://localhost:3000 to see your application.
niya-saas-template/
βββ app/ # Next.js 15 App Router
β βββ api/ # API routes
β βββ dashboard/ # Protected dashboard pages
β βββ login/ # Authentication pages
β βββ signup/ # Registration pages
βββ components/ # Reusable components
β βββ auth/ # Authentication components
β βββ dashboard/ # Dashboard components
β βββ forms/ # Form components
β βββ landing/ # Landing page components
β βββ providers/ # Context providers
β βββ ui/ # Base UI components
βββ lib/ # Utility libraries
β βββ hooks/ # Custom React hooks
β βββ query/ # React Query configuration
β βββ store/ # State management
β βββ supabase/ # Supabase client
β βββ utils/ # Utility functions
β βββ validations/ # Zod schemas
βββ public/ # Static assets
- Rapid Prototyping: Get started quickly with a production-ready foundation
- Learning: Study modern React and Next.js patterns
- Portfolio Projects: Showcase your skills with a professional template
- Side Projects: Build MVPs and side projects efficiently
- AI Application Frontend: Perfect foundation for AI-powered applications
- Dashboard Applications: Built-in dashboard with authentication
- Real-time Features: Supabase integration for real-time data
- Scalable Architecture: Designed to grow with your business
- Consistent Codebase: Standardized patterns and practices
- Type Safety: Full TypeScript support for better development experience
- Testing Ready: Structured for easy testing implementation
- Deployment Ready: Optimized for Vercel and other platforms
The template uses Tailwind CSS for styling. You can customize the design system in tailwind.config.js:
module.exports = {
theme: {
extend: {
colors: {
// Your custom colors
},
fontFamily: {
// Your custom fonts
},
},
},
};All components are modular and customizable. Check the components/ directory for examples.
The authentication system is built with Supabase Auth. You can customize the auth flow in lib/supabase/.
For detailed technical information, see Technical Description.
- State Management: Zustand for client state, React Query for server state
- Form Handling: React Hook Form with Zod validation
- Error Handling: Comprehensive error boundaries and toast notifications
- Performance: Optimized with Next.js 15 features
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js - The React framework
- Supabase - The open source Firebase alternative
- Tailwind CSS - A utility-first CSS framework
- Magic UI - Beautiful UI components
- Radix UI - Unstyled, accessible UI primitives
- GitHub Issues: Report bugs or request features
- Discussions: Join the community
- Author: Naman Barkiya
Built with β€οΈ by Naman Barkiya