Surge is a SaaS website builder built using Next.js 14, Tailwind CSS, MySQL, Prisma, and Clerk for authentication. Surge offers its services at a fair price, integrated with Stripe to allow users to create and deploy their own SaaS websites with ease.
- User Authentication: Secure authentication using Clerk.
- Database Management: Efficient data handling with MySQL and Prisma.
- Responsive Design: Tailwind CSS for a sleek and responsive user interface.
- Payment Integration: Seamless payment processing with Stripe.
- Dynamic Routing: Next.js 14 for optimized and dynamic routing.
- SaaS Deployment: Easy deployment of SaaS websites.
- Framework: Next.js 14
- Styling: Tailwind CSS
- Database: MySQL
- ORM: Prisma
- Authentication: Clerk
- Payments: Stripe
- Hosting: Vercel (recommended)
- Node.js v14 or later
- MySQL database
- Stripe account
- Clerk account
-
Clone the repository:
git clone https://github.com/your-username/surge.git cd surge
-
Install dependencies:
npm install
-
Setup environment variables:
Create a
.env.local
file in the root directory and add the following:DATABASE_URL=mysql://user:password@localhost:3306/database NEXT_PUBLIC_CLERK_FRONTEND_API=your-clerk-frontend-api CLERK_API_KEY=your-clerk-api-key NEXT_PUBLIC_STRIPE_PUBLIC_KEY=your-stripe-public-key STRIPE_SECRET_KEY=your-stripe-secret-key NEXT_PUBLIC_DOMAIN=your-domain.com
-
Run database migrations:
npx prisma migrate dev
-
Start the development server:
npm run dev
-
Open your browser and navigate to
http://localhost:3000
.
- Sign up at Clerk.
- Create a new application and get your
CLERK_API_KEY
andNEXT_PUBLIC_CLERK_FRONTEND_API
. - Add these keys to your
.env.local
file.
- Sign up at Stripe.
- Create a new project and get your
STRIPE_SECRET_KEY
andNEXT_PUBLIC_STRIPE_PUBLIC_KEY
. - Add these keys to your
.env.local
file.
- Update your
DATABASE_URL
in the.env.local
file with your MySQL connection string.
- Sign Up/Login: Users can sign up or log in using the Clerk authentication system.
- Create SaaS: Users can create their own SaaS website using the intuitive builder interface.
- Manage Content: Users can manage their website content easily.
- Payment Processing: Users can set up Stripe for payment processing to monetize their SaaS offerings.
Deploy your project on Vercel:
- Connect your repository: Follow Vercel’s guide to connect your GitHub repository.
- Set Environment Variables: Add the environment variables from your
.env.local
to Vercel. - Deploy: Click on the deploy button in Vercel.
We welcome contributions to Surge! Here’s how you can help:
- Fork the repository.
- Create a new branch:
git checkout -b feature-branch
. - Commit your changes:
git commit -m 'Add new feature'
. - Push to the branch:
git push origin feature-branch
. - Open a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.
Thank you for using Surge! If you have any questions or feedback, please feel free to open an issue.