Launch high-converting websites instantlyβno coding, no stress, just results.
NextLaunch is a production-ready Next.js template marketplace. It bundles premium landing-page/ui kits, a purchase flow with Razorpay, authenticated dashboards powered by Clerk, template delivery backed by Firebase, and delightful UI micro-interactions via Framer Motion. Use it as the foundation for marketplaces, theme stores, or any digital product catalog.
- Overview
- Highlights
- Architecture
- Tech stack
- Project structure
- Getting started
- Environment variables
- Core workflows
- Quality checks
- Deployment
- Contributing
- Security
- License
- Maintainer
- Templates storefront with category filters, curated sections, testimonials, FAQs, pricing comparison, and conversion-focused CTAs.
- Authenticated dashboard for buyers to review purchases and re-download assets.
- Serverless API routes for template fetching, purchase verification, secure download URLs, emails, and payment notifications.
- Single-point customization via
config/siteConfig.tsso branding, navigation, hero copy, and theme settings stay centralized.
- π¨ Multi-theme UI system powered by
next-themes, Tailwind presets, and reusable section components. - β‘ Smooth motion + scroll experiences using Framer Motion, custom animation presets, and Lenis integration.
- π³ Razorpay checkout flow with HMAC verification, download access gating, and frontend Razorpay widget support.
- π Clerk authentication keeps dashboards and purchase APIs secure with JWT verification helpers.
- βοΈ Firebase (Firestore + Storage) hosts template metadata, purchase receipts, and downloadable assets.
- π¬ Transactional email automation through Nodemailer + Gmail SMTP for purchase confirmations and contact replies.
- π¦ Persistent template store using Zustand with caching, offline fallbacks, and filter helpers.
ββββββββββββββ βββββββββββββββββ ββββββββββββββββ
β Next.js β β API Routes β β Integrations β
β App Dir β -> β (app/api/*) β -> β Razorpay β
β (UI + UX) β β auth, CRUD β β Firebase β
ββββββββββββββ βββββββββββββββββ β Clerk β
β β β Nodemailer β
β Zustand Store ββββββββββββββββ
βββββββββββ Client <-> Server ββββββββββββββββββββββββββ
Key principles:
- App Router + RSC for streaming, metadata, and route groups (marketing pages live under
app/(pages)while transactional routes live underapp/api). - Composable sections in
sections/feed page-level layouts, making it easy to plug templates into other projects. - Data-first configuration via
db/templates.ts(seed data) andconfig/siteConfig.ts(content + theming) to keep UI code lean.
| Layer | Tools |
|---|---|
| Framework | Next.js 15 (App Router) + React 19 |
| Language | TypeScript |
| Styling | Tailwind CSS, tailwind-merge, custom animation presets |
| State | Zustand with persist middleware |
| Auth | Clerk (publishable + secret keys) |
| Payments | Razorpay Checkout, HMAC verification |
| Data | Firebase Firestore + Storage, server-side Admin SDK |
| Nodemailer + Gmail SMTP | |
| UI | Lucide icons, Radix primitives, Framer Motion, Lenis |
next-launch/
βββ app/
β βββ (pages)/... # Marketing pages, auth routes, dashboard routes
β βββ api/ # Purchase, template, payment, and email endpoints
β βββ globals.css
β βββ layout.tsx
βββ components/ # UI primitives, navbar/footer, Razorpay checkout, mockups
βββ sections/ # Reusable page sections (hero, pricing, testimonials, etc.)
βββ store/templateStore.ts # Zustand store for templates & purchases
βββ db/templates.ts # Seed/template metadata and helper exports
βββ config/siteConfig.ts # Centralized site copy, links, feature lists, etc.
βββ lib/ # Auth helpers, Firebase Admin SDK, utilities
βββ public/ # Logos, mock images, favicons, testimonial assets
βββ animations/ # Shared animation variants and easing curves
βββ types/ # Shared TypeScript interfaces
βββ tailwind.config.ts / postcss.config.mjs
βββ package.json / tsconfig.json / eslint.config.mjs- Node.js 20+
- npm 10+ (or pnpm/yarn, adjust commands accordingly)
- Firebase project, Clerk application, Razorpay account, Gmail SMTP app password
npm installCreate a .env.local file in the project root using the variables below. Never commit production secretsβ.gitignore already excludes .env*.
npm run devVisit http://localhost:3000 and sign in via Clerk to access authenticated flows.
npm run build
npm run start # serve the production build
npm run lint # ESLint (Next.js rules)| Variable | Description |
|---|---|
NEXT_PUBLIC_DB_API_KEY |
Firebase web API key for client-side SDK |
NEXT_PUBLIC_DB_AUTH_DOMAIN |
Firebase auth domain |
NEXT_PUBLIC_DB_PROJECT_ID |
Firebase project ID (client) |
NEXT_PUBLIC_DB_STORAGE_BUCKET |
Firebase storage bucket |
NEXT_PUBLIC_DB_MESSAGING_SENDER_ID |
Sender ID for Firebase |
NEXT_PUBLIC_DB_APP_ID |
Firebase app ID |
NEXT_PUBLIC_DB_MEASUREMENT_ID |
Analytics measurement ID |
NEXT_PUBLIC_FIREBASE_PROJECT_ID |
Used for helpful Firestore index hints |
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY |
Clerk frontend key for providers |
NEXT_PUBLIC_RAZORPAY_KEY_ID |
Public Razorpay key for checkout widget |
CLERK_SECRET_KEY |
Server-side Clerk key for token verification |
FIREBASE_PROJECT_ID |
Service account project ID |
FIREBASE_CLIENT_EMAIL |
Service account email |
FIREBASE_PRIVATE_KEY |
Service account private key (\n escaped) |
RAZORPAY_KEY_ID |
Server Razorpay key (order creation) |
RAZORPAY_KEY_SECRET |
Razorpay HMAC secret |
GMAIL_USER |
Gmail address used for SMTP notification emails |
GMAIL_PASS |
Gmail app password for SMTP |
Tip: Provide dev-safe defaults (e.g., test Razorpay keys, test Gmail inbox) and keep production secrets in Vercel project settings.
db/templates.tsexposes seed data and metadata for SEO.sections/templates-showcase-section.tsx+components/sections/*render cards, pricing, testimonials.- The Zustand store (
store/templateStore.ts) handles caching, filtering, and local persistence.
- Frontend calls
/api/payments/create-orderto create a Razorpay order with the secret key. components/pages/razorpay-checkout.tsxopens the Razorpay widget with the publishable key.- On success,
/api/payments/verifyvalidates the signature and records the purchase in Firestore. /api/purchases/get|check-updates|download-urlhydrate dashboards and gated downloads.
Payment gateway swap: Razorpay is the default implementation, but the flow is modular. Replace the
/app/api/payments/*routes pluscomponents/pages/razorpay-checkout.tsxwith calls to your preferred provider (Stripe, PayPal, Lemon Squeezy, etc.), keeping the purchase documents and download flow unchanged.
/api/purchase-notifysends transactional emails to the buyer with template/payment details./api/send-mailpowers the contact form, including validation and basic rate limiting.
- Update
db/templates.tsto add new templates or metadata. - Curate homepage/marketing content via
config/siteConfig.tswithout touching component code.
npm run lintβ ESLint/Next.js ruleset (recommended before commits).npm run buildβ ensures App Router routes, API handlers, and type checks are healthy.- Consider adding CI (GitHub Actions) to run these commands automatically on PRs.
- Push the repository to GitHub (public).
- Create a new Vercel project β Import this repo.
- Copy all environment variables from
.env.localinto Vercel β Settings β Environment Variables. - Add required third-party webhooks/redirects (Razorpay, Clerk) pointing to your Vercel domain.
- Trigger a production deploy; Vercel will handle Next.js build + serverless routing.
- Fork the repository & create a feature branch.
- Run
npm run lintlocally before opening a PR. - Describe the motivation, screenshots (if UI), and testing steps.
- For larger features, open an issue first so we can discuss requirements.
Please avoid opening public issues for vulnerabilities. Instead, email mrnaseem745@gmail.com with a detailed report. Youβll receive an acknowledgement within 48 hours and coordinated disclosure will be arranged if needed.
Distributed under the MIT License. You are free to use the code in commercial and personal projects, but purchased template assets themselves may include additional licensing termsβrespect your buyers.
Built and maintained by Naseem Ansari. Feel free to reach out on LinkedIn or Twitter for support, collaborations, or template ideas.