This project is a Next.js application that includes a theme toggle feature, multiple pages for different functionalities, and various integrations for a complete SaaS template.
app/
: Contains the main application pages and layoutlayout.tsx
: Main layout component for the applicationpage.tsx
: Home page componentotp/page.tsx
: One-Time Password (OTP) pageapi-usage/page.tsx
: API usage pagenew-project/page.tsx
: New project creation pagechat-interface/page.tsx
: Chat interface pagebilling/page.tsx
: Billing and subscription pagesettings/page.tsx
: User settings pageregister/page.tsx
: User registration pageforgot-password/page.tsx
: Password recovery pagereset-password/page.tsx
: Password reset page
components/
: Reusable React componentsSidebar.tsx
: Sidebar component for navigationThemeProvider.tsx
: Provider component for theme contextThemeToggle.tsx
: Toggle component for switching between light and dark themesApiCostChart.tsx
: Chart component for API usage costs
lib/
: Utility functions and API integrationsstripe.ts
: Stripe integration for paymentssupabase.ts
: Supabase client setup and helper functionsopenai.ts
: OpenAI integration for AI features
- Theme Toggle: Users can switch between light and dark themes using the ThemeToggle component.
- Sidebar Navigation: Easy navigation between different pages of the application.
- Multiple Pages: Includes pages for home, OTP, API usage, creating new projects, chat interface, billing, and user settings.
- Authentication: User registration, login, and password recovery flows.
- API Integration: Stripe for payments, Supabase for backend, and OpenAI for AI features.
- Responsive Design: Tailwind CSS for a mobile-friendly layout.
- Next.js
- React
- TypeScript
- Tailwind CSS
- Stripe
- Supabase
- OpenAI
-
Clone the repository:
git clone https://github.com/dustinwloring1988/saas-template-supabase.git && cd saas-template-supabase
-
Install dependencies:
npm install
-
Set up environment variables: Create a
.env.local
file in the root directory and add the necessary environment variables for Stripe, Supabase, OpenAI, and other integrations. -
Run the development server:
npm run dev
-
Open http://localhost:3000 in your browser to see the application.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.