π Open-source codebase for creating your own Next.js template store
NextLaunch OS is the open-source platform codebase powering the NextLaunch marketplace. It enables developers to build, customize, and deploy their own template store with a clean, scalable architecture. Built with Next.js, TypeScript, Tailwind CSS, and Framer Motion.
- β¨ Store-Ready Architecture β Includes logic for product listings, checkout flow, and user management.
- π Dark Mode Support - Built-in theme switching with next-themes
- π± Fully Responsive - Mobile-first design approach
- β‘ Performance Optimized - Next.js 15 with App Router
- π Smooth Animations - Framer Motion for engaging user experiences
- π οΈ Developer Friendly - Clean, well-documented code
- π― SEO Ready - Meta tags, sitemaps, and structured data
- π§© Modular Components - Reusable UI components with Radix UI
- π¦ Zero Config - Ready to use out of the box
- π³ Payment Ready - Stripe, PayPal, Razorpay examples
- π§ Email Integration - Multiple email service providers
- π Authentication - Clerk, NextAuth.js examples
- ποΈ Database Ready - Supabase, Firebase, PlanetScale examples
Important for Developers: This open-source version of NextLaunch serves as a foundation for your projects. The current design, layout, and styling are intentionally basic and may not match your specific requirements or preferences.
- π― Implement Your Own Design System - Replace the existing styling with your brand colors, typography, and components
- π Customize Layouts - Modify page structures and component arrangements to fit your needs
- π Add Your Personal Touch - The templates are meant to be starting points, not final products
- πͺ Create Unique Experiences - Use your creativity to make something truly yours
- π± Optimize for Your Audience - Adapt the responsive design for your specific user base
This repository provides the functionality and structure, but the visual design is up to you. Think of it as a powerful scaffold rather than a finished house. The real magic happens when you apply your own design vision!
Don't be concerned if some pages or components don't look "polished" - that's intentional. Build something amazing with your own style! π
You can test all API endpoints immediately after setup:
# Get all templates
curl -X GET "http://localhost:3000/api/templates"
# Get featured templates
curl -X GET "http://localhost:3000/api/templates?featured=true"
# Add a new template
curl -X POST "http://localhost:3000/api/templates/add" \
-H "Content-Type: application/json" \
-d '{"title":"My Template","description":"A great template","category":"landing","price":49.99}'
# Create a purchase
curl -X POST "http://localhost:3000/api/purchases" \
-H "Content-Type: application/json" \
-d '{"userId":"user123","templateId":"template_1","orderId":"order_abc","amount":49,"currency":"USD"}'
# Get user purchases
curl -X GET "http://localhost:3000/api/purchases?userId=user123"
# Send contact email
curl -X POST "http://localhost:3000/api/send-mail" \
-H "Content-Type: application/json" \
-d '{"name":"John Doe","email":"[email protected]","message":"Hello from API!","services":["web-development"]}'
All APIs return proper JSON responses and include error handling with meaningful messages.
- Node.js 18.0 or later
- npm, yarn, or pnpm
-
Clone the repository
git clone https://github.com/gitnaseem745/nextlaunch-os.git cd nextlaunch-os
-
Install dependencies
npm install # or yarn install # or pnpm install
-
Set up environment variables
cp .env.example .env.local
Edit
.env.local
with your configuration values. -
Start the development server
npm run dev # or yarn dev # or pnpm dev
-
Open your browser Visit http://localhost:3000 to see your site.
- Starter Plan - Individual projects ($49)
- Professional Plan - Agencies and freelancers ($149)
- Enterprise Plan - Large teams ($299)
- Bundle Offers - Save with multiple template packages
- Payment Processing - Stripe, PayPal, Razorpay integration examples
- Template Management - CRUD operations for template data
- Purchase System - Order processing and notification system
- Email Services - Multiple email provider integrations
- User Authentication - Clerk integration examples
- Landing Page - Hero, features, testimonials, pricing
- Templates Gallery - Filterable template showcase
- Pricing Page - Multiple pricing plans with comparison
- FAQ Page - Comprehensive question sections
- Contact Page - Multi-service contact form
- Dashboard - User account management
- Authentication - Sign-in/Sign-up pages
- Pricing Cards - Multiple tier display with features
- Template Cards - Showcase with previews and tech stack
- FAQ Sections - Categorized question/answer system
- Contact Forms - Multi-service selection
- Testimonial Sliders - Customer feedback carousel
- Payment Integration - Checkout and processing flows
nextlaunch-os/
βββ animations/ # Framer Motion animation configurations
βββ app/ # Next.js App Router pages and layouts
βββ components/ # Reusable UI components
β βββ ui/ # Base UI components (buttons, cards, etc.)
β βββ sections/ # Page sections and layouts
β βββ pages/ # Page-specific components
βββ config/ # Site configuration
βββ db/ # Database utilities and configurations
βββ lib/ # Utility functions and helpers
βββ public/ # Static assets
βββ sections/ # Main page sections
βββ store/ # State management with Zustand
βββ types/ # TypeScript type definitions
Edit config/siteConfig.ts
to customize your site:
export const siteConfig = {
title: "Your Site Title",
description: "Your site description",
siteUrl: "https://your-domain.com",
author: "Your Name",
// ... more configuration options
};
The project includes example API routes for common functionality:
-
GET
/api/templates
- Get all templatescurl -X GET "http://localhost:3000/api/templates"
Optional query params:
?featured=true
for featured templates only -
POST
/api/templates/add
- Add new templatecurl -X POST "http://localhost:3000/api/templates/add" \ -H "Content-Type: application/json" \ -d '{"title":"My Template","description":"A great template","category":"landing","price":49.99}'
- GET
/api/purchases?userId=USER_ID
- Get user purchases - POST
/api/purchases
- Create new purchasecurl -X POST "http://localhost:3000/api/purchases" \ -H "Content-Type: application/json" \ -d '{"userId":"user123","templateId":"template_1","orderId":"order_abc","amount":49,"currency":"USD"}'
- GET
/api/payments?orderId=ORDER_ID
- Get payment status - POST
/api/payments
- Process payment (integration examples for Stripe, PayPal, Razorpay)
- POST
/api/send-mail
- Send contact form emailscurl -X POST "http://localhost:3000/api/send-mail" \ -H "Content-Type: application/json" \ -d '{"name":"John Doe","email":"[email protected]","message":"Hello!","services":["web-dev"]}'
- POST
/api/purchase-notify
- Webhook for payment provider notifications
All API routes include example implementations with detailed comments showing how to integrate with real services like Stripe, SendGrid, and database providers.
π Complete API Documentation - Detailed documentation with examples for all endpoints.
Copy .env.example
to .env.local
and configure:
# Required for basic functionality
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_APP_NAME="Your Site Name"
# Choose your preferred services
STRIPE_SECRET_KEY=sk_test_your_key
CLERK_SECRET_KEY=sk_test_your_key
RESEND_API_KEY=re_your_key
The project supports multiple themes out of the box. You can:
- Toggle between light and dark modes
- Customize colors in
tailwind.config.ts
- Add new theme variants
All components are modular and customizable:
- UI components in
components/ui/
- Page sections in
components/sections/
- Animations in
animations/
The project includes a comprehensive .env.example
with 140+ environment variables for all major services. Key configurations:
# App Configuration
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_APP_NAME="NextLaunch OS"
NEXT_PUBLIC_SITE_URL=https://your-domain.com
# Authentication (Choose one)
CLERK_PUBLISHABLE_KEY=pk_test_your_key
CLERK_SECRET_KEY=sk_test_your_key
# OR
NEXTAUTH_SECRET=your_secret
NEXTAUTH_URL=http://localhost:3000
# Stripe
STRIPE_PUBLISHABLE_KEY=pk_test_your_key
STRIPE_SECRET_KEY=sk_test_your_key
STRIPE_WEBHOOK_SECRET=whsec_your_secret
# PayPal
PAYPAL_CLIENT_ID=your_client_id
PAYPAL_CLIENT_SECRET=your_secret
# Razorpay
RAZORPAY_KEY_ID=rzp_test_your_key
RAZORPAY_KEY_SECRET=your_secret
# Resend (Recommended)
RESEND_API_KEY=re_your_key
# SendGrid
SENDGRID_API_KEY=SG.your_key
# Gmail/Nodemailer
SMTP_HOST=smtp.gmail.com
[email protected]
SMTP_PASS=your_app_password
# Supabase
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_key
# Firebase
FIREBASE_PROJECT_ID=your_project_id
FIREBASE_PRIVATE_KEY=your_private_key
FIREBASE_CLIENT_EMAIL=your_client_email
# PlanetScale/MySQL
DATABASE_URL=mysql://username:password@host:port/database
Each API route includes detailed examples for popular services:
- Stripe: Complete checkout flow with webhooks
- PayPal: REST API integration
- Razorpay: Indian payment gateway
- Clerk: Drop-in authentication with user management
- NextAuth.js: Flexible OAuth and credential auth
- Custom JWT: Roll your own solution
- Resend: Modern email API with React templates
- SendGrid: Enterprise email delivery
- Nodemailer: SMTP and Gmail integration
Choose your preferred database and follow the setup:
- Create account at supabase.com
- Create new project
- Copy connection details to
.env.local
- Use provided SQL schema in
/db/schema.sql
- Create project at firebase.google.com
- Enable Firestore
- Download service account key
- Configure environment variables
Before deploying, ensure:
- Environment variables configured
- Database schema applied
- Payment webhooks configured
- Email service verified
- Domain and SSL configured
- Analytics and monitoring setup
- Framework: Next.js 15 with App Router
- Language: TypeScript
- Styling: Tailwind CSS
- UI Components: Radix UI
- Animations: Framer Motion
- Icons: Lucide React
- State Management: Zustand
- Theme: next-themes
- Landing Page - Modern business landing pages with hero, features, testimonials
- E-commerce Store - Complete shop with product catalogs and checkout
- Creative Portfolio - Designer and developer portfolios with galleries
- Blog Platform - Content management with MDX and newsletter integration
- Dashboard - Analytics and admin interfaces
- SaaS Templates - Subscription-based service templates
- Stripe - Credit card processing and subscriptions
- PayPal - Alternative payment method
- Razorpay - Indian market payment solutions
- Clerk - Complete authentication solution
- NextAuth.js - Flexible authentication library
- Custom JWT - Roll your own authentication
- Resend - Modern email API
- SendGrid - Enterprise email delivery
- Nodemailer - SMTP email sending
- Gmail API - Google email integration
- Supabase - PostgreSQL with real-time features
- Firebase - NoSQL with real-time sync
- PlanetScale - MySQL at scale
- MongoDB - Document database
- Push your code to GitHub
- Import your repository on Vercel
- Configure environment variables
- Deploy!
- Netlify: Follow their Next.js deployment guide
- AWS Amplify: Use their Next.js hosting
- Self-hosted: Build with
npm run build
and serve theout
folder
# Clear Next.js cache
rm -rf .next
npm run dev
# Check TypeScript errors
npm run type-check
# Lint code
npm run lint
- Ensure
.env.local
exists in root directory - Restart development server after adding new variables
- Check variable names start with
NEXT_PUBLIC_
for client-side access
- Verify file structure in
/app/api/
- Check route exports (GET, POST, etc.)
- Ensure proper file naming (route.ts)
- Verify connection strings in environment variables
- Check firewall rules and IP allowlisting
- Test connection with provided utility scripts
If you encounter issues:
- Check the Issues for existing solutions
- Search Next.js documentation
- Create a new issue with detailed reproduction steps
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes
- Commit your changes:
git commit -m 'Add amazing feature'
- Push to the branch:
git push origin feature/amazing-feature
- Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- π§ Email: [email protected]
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
- Next.js team for the amazing framework
- Tailwind CSS for the utility-first CSS framework
- Radix UI for accessible UI components
- Framer Motion for smooth animations
- All contributors and the open-source community
- GitHub Repository
- Live Demo (Deploy to see live)
- Documentation
Made with β€οΈ by Naseem