Welcome to the Flywheel Next.js + Supabase Starter documentation! This guide will help you understand and use all features of this template.
Perfect for newcomers and those setting up the project for the first time.
- Prerequisites and requirements
- Installation steps
- Environment configuration
- First run and verification
- Troubleshooting common issues
Understand the project structure and design patterns.
- Project structure explained
- Layer architecture
- Design patterns used
- Data flow
- Component organization
- Performance optimizations
Learn how to work with Supabase database and authentication.
- Client architecture (browser, server, anonymous)
- RPC Pattern - Recommended approach
- Creating PostgreSQL functions
- Real-time subscriptions
- Storage utilities
- Authentication patterns
- Best practices
Master the custom React hooks provided in the starter.
useAuth- Authentication stateuseTheme- Dark/light modeuseIsMobile- Responsive design- Creating your own hooks
- Hook patterns and best practices
Explore ShadCN UI components and how to use them.
- What is ShadCN UI?
- Installed components
- Adding new components
- Component examples
- Customization guide
- Theming
Learn the professional Git workflow with automated validation.
- Conventional Commits - Commit message format
- Husky - Git hooks setup
- Commitlint - Commit validation
- Release-it - Automated releases
- Creating releases
- CHANGELOG generation
- Complete workflow examples
- Set up the project: Getting Started β Installation
- Configure Supabase: Getting Started β Set Up Supabase
- Run the dev server: Getting Started β Run Development Server
- Create database functions: Supabase β Database Functions
- Call RPC functions: Supabase β RPC Pattern
- Real-time updates: Supabase β Real-time Subscriptions
- Upload files: Supabase β Storage
- Add new components: UI Components β Adding New Components
- Customize theme: UI Components β Customization
- Component examples: UI Components β Component Examples
- Use authentication: Hooks β useAuth
- Theme switching: Hooks β useTheme
- Mobile detection: Hooks β useIsMobile
- Create custom hook: Hooks β Creating Custom Hooks
- Commit changes: Git Workflow β Conventional Commits
- Create a release: Git Workflow β Release-it
- Setup git hooks: Git Workflow β Husky
- Getting Started - Set up your development environment
- Architecture - Understand the project structure
- UI Components - Learn to build interfaces
- Hooks - Manage state and logic
- Supabase - Work with database
- Git Workflow - Professional development workflow
- Architecture - Review design patterns
- Supabase - RPC pattern and best practices
- Git Workflow - Commit conventions and releases
- Getting Started - Quick setup reference
// Check if user is logged in
import { useAuth } from '@/hooks/use-auth';
const { user } = useAuth();
// Get user in server component
import { createClient } from '@/lib/supabase/core/server';
const supabase = await createClient();
const {
data: { user },
} = await supabase.auth.getUser();Learn more: Hooks β useAuth | Supabase β Authentication
// RECOMMENDED: Call PostgreSQL functions via RPC
const { data } = await supabase.rpc('get_user_notes', {
p_user_id: userId,
});
// Avoid: Direct queries (less secure, harder to maintain)
// const { data } = await supabase.from('notes').select('*')Why RPC? Better security, performance, and maintainability.
Learn more: Supabase β RPC Pattern
# Add a new component
npx shadcn@latest add cardLearn more: UI Components β Adding Components
# Proper commit format
git commit -m "feat: add new feature"
git commit -m "fix: resolve bug"
git commit -m "docs: update documentation"Learn more: Git Workflow β Conventional Commits
- Check the Troubleshooting section
- Search for your issue in the documentation
- Check the Additional Resources section
- GitHub Issues: Report bugs or request features
- GitHub Discussions: Ask questions and share ideas
- Discord Community: Chat with other developers
Begin with the Getting Started Guide and follow the setup instructions!
Need to contribute? Check our Contributing Guide
Found an issue? Report it on GitHub
Have a question? Start a discussion