Welcome to the SaaS Booking Starter, a simple and elegant application to help you kickstart your SaaS project with a booking system. Built with Supabase and React Context API, this app allows users to manage bookings, handle payments, and manage subscriptions in an intuitive way. Whether you're building a booking platform or offering subscription-based services, this starter template will get you up and running quickly.
- Booking System: Let your users book appointments or services through an easy-to-use interface.
- User Authentication: Secure sign-up, login, and logout functionalities integrated with Supabase.
- Subscription Management: Allows users to subscribe to different plans and manage their subscriptions.
- Payment Integration: Includes Stripe-based payment processing and subscription handling.
- Responsive Design: Built to work on any device, ensuring a smooth experience for all users.
- Context API: Efficient state management with the Context API to handle user sessions and bookings.
- Frontend: React, TypeScript, Next.js
- Backend: Supabase (for user authentication, database, and real-time features)
- Payments: Stripe
- State Management: React Context API
Here's a brief look at the project structure:
└── src/
├── app/
│ ├── (dashboard)/
│ │ └── dashboard/
│ │ ├── actions/
│ │ │ ├── booking-action.ts
│ │ │ └── logout-action.ts
│ │ ├── layout.tsx
│ │ ├── page.tsx
│ │ ├── subscription/
│ │ │ └── page.tsx
│ │ └── upcoming-bookings/
│ │ └── page.tsx
│ ├── api/
│ │ └── create-payment-intent/
│ │ └── route.ts
│ ├── favicon.ico
│ ├── fonts/
│ ├── globals.css
│ ├── layout.tsx
│ ├── login/
│ ├── page.tsx
│ ├── payment/
│ ├── server-actions/
│ ├── services/
│ └── signup/
├── components/
│ ├── auth/
│ ├── checkout/
│ ├── dashboard/
│ ├── landing/
│ ├── layout/
│ ├── payment/
│ └── ui/
├── context/
├── hooks/
├── lib/
├── middleware.ts
└── types/
To get started, clone this repository and install the necessary dependencies:
git clone https://github.com/your-username/saas-booking-starter.git
cd saas-booking-starter
npm installBefore you can run the application, you'll need to set up Supabase and Stripe.
- Create a Supabase account.
- Create a new project and note down your Supabase URL and API Key.
- Set up the database schema according to the
supabase/schema.sqlfile included in this project. - Configure the
.envfile with the following environment variables:
NEXT_PUBLIC_SUPABASE_URL=<your-supabase-url>
NEXT_PUBLIC_SUPABASE_ANON_KEY=<your-supabase-api-key>- Create a Stripe account.
- Set up your pricing plans in Stripe and get your API Key.
- Update the
.envfile with your Stripe keys:
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=<your-stripe-publishable-key>
STRIPE_SECRET_KEY=<your-stripe-secret-key>Once you've configured Supabase and Stripe, you can run the project locally:
npm run devNavigate to http://localhost:3000 to view the application in action.
Users can sign up or log in to the application using their email address. The authentication is powered by Supabase, providing a seamless and secure experience.
Users can view their upcoming bookings, create new bookings, and cancel/delete existing bookings. All bookings are stored in the Supabase database.
Users can choose from different subscription plans. Stripe handles the payment processing, and subscription data is stored in the database.
The dashboard displays an overview of the user's bookings and subscription status. It also provides a form to create new bookings.
- React: For building the user interface.
- Supabase: Used for authentication, real-time database, and storage.
- Context API: Efficient state management for the user session and bookings.
- Stripe: For handling payments and subscriptions.
- Next.js: Server-side rendering, routing, and building scalable applications.
We welcome contributions to this project! To get started, fork the repository, create a branch, and make your changes. When you're ready, submit a pull request.
- Fork this repository
- Clone your forked repository
- Create a new branch for your feature/bugfix
- Make changes and commit them
- Push your changes to your forked repository
- Open a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions or suggestions, feel free to open an issue or contact us. Happy coding! 🚀
Happy building!