A modern, production-ready SaaS boilerplate with authentication, database integration, and a beautiful UI. Built with React, TypeScript, and Supabase.
- React 18 with TypeScript
- Vite for fast development and building
- TanStack Query for data fetching and caching
- Shadcn UI components with Tailwind CSS
- Wouter for lightweight routing
- Node.js with Express
- Prisma ORM for database operations
- Passport.js for authentication
- Supabase integration ready for production
- TypeScript for type safety
- ESLint & Prettier for code quality
- React Hook Form for form handling
- Zod for schema validation
- Clone this template
- Install dependencies:
npm install
- Start the development server:
npm run dev
By default, the application uses in-memory storage (MemStorage) for development, which means:
- No database setup required
- Data persists only during runtime
- Perfect for rapid development and testing
- Authentication works out of the box
The project comes with Supabase integration ready. To switch from MemStorage to Supabase:
-
Create a Supabase project at supabase.com
-
Set the following environment variables:
SUPABASE_URL=your_supabase_url SUPABASE_ANON_KEY=your_supabase_anon_key USE_SUPABASE=true
-
In
server/storage.ts
, update the storage export:// Comment out MemStorage // export const storage = new MemStorage(); // Use Supabase Storage export const storage = new SupabaseStorage();
- User authentication (login/register)
- Session management
- Real-time PostgreSQL database
- Type-safe database operations
- Production-ready UI components
The boilerplate includes a complete authentication system:
- User registration and login
- Protected routes
- Session management
- Password hashing
- Remember me functionality
├── client/ # Frontend React application
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── hooks/ # Custom React hooks
│ │ ├── lib/ # Utility functions
│ │ └── pages/ # Page components
├── server/ # Backend Express application
│ ├── auth.ts # Authentication setup
│ ├── storage.ts # Storage implementations
│ └── routes.ts # API routes
└── shared/ # Shared types and schemas
└── schema.ts # Database schema
- Define types in
shared/schema.ts
- Implement backend routes in
server/routes.ts
- Add frontend components in
client/src/components
- Create new pages in
client/src/pages
- Development: Uses MemStorage (in-memory)
- Production: Uses Supabase (PostgreSQL)
- Easy switching between storage implementations
npm run dev
- Start development servernpm run build
- Build for productionnpm run check
- TypeScript type checking
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
MIT