Enterprise-grade SaaS Platform for AI-Driven Web Application Generation, Real-Time Monaco Code Editing, Instant Cloud Deployment, and Automated Token Economics.
Features β’ Tech Stack β’ Quick Start β’ API Docs β’ Architecture β’ Deployment
GenWeb.ai is a modern, enterprise-ready MERN stack SaaS application that empowers users to create, preview, edit, and publish full-fledged web applications in seconds using natural language prompts.
Powered by DeepSeek LLM via OpenRouter, GenWeb.ai translates intuitive textual instructions into clean, modern, and production-grade HTML5, CSS3 (Tailwind CSS), and JavaScript code. Featuring an integrated Monaco Code Editor (the engine behind VS Code) and an instant sandbox preview, users can fine-tune generated layouts both programmatically and iteratively through conversational AI.
graph TD
User([π€ User Prompt]) -->|1. Submit Request| Frontend[β‘ React 19 Frontend]
Frontend -->|2. Authenticate & Deduct Credits| API[π Express 5 Gateway]
API -->|3. Prompt Parsing & Generation| AI[π€ OpenRouter AI - DeepSeek]
AI -->|4. Return JSON Structure & Code| API
API -->|5. Save Website Version| DB[(π MongoDB Atlas)]
API -->|6. Render Live Editor & Code| Frontend
Frontend -->|7. Programmatic/Prompt Editing| Monaco[π» Monaco Code Editor]
Frontend -->|8. Public Slug Publishing| Live[π Cloud Deployed Site]
| Category | Technology | Description |
|---|---|---|
| Framework | React 19 | Core UI rendering library utilizing latest React features |
| Build System | Vite 8 | Next-generation frontend tooling and instant HMR |
| State Management | Redux Toolkit | Centralized application state management |
| Styling | Tailwind CSS v4 | Utility-first CSS framework with Vite plugin integration |
| Code Editor | Monaco Editor | In-browser code editing suite with syntax highlighting |
| Routing | React Router v7 | Declarative client-side routing and navigation |
| Animations | Motion | High-performance React animation engine |
| Iconography | Lucide React | Clean, customizable SVG icons |
| HTTP Client | Axios | Promise-based HTTP client for API interactions |
| Category | Technology | Description |
|---|---|---|
| Runtime | Node.js | Server-side JavaScript runtime environment |
| Web Framework | Express 5 | Lightweight and high-performance server framework |
| Database | MongoDB / Mongoose 9 | NoSQL database ODM for persistent user & site storage |
| Authentication | Firebase Auth + JWT | Hybrid authentication (Google Sign-In & HTTP-only JWTs) |
| Rate Limiting | Express Rate Limit | Protection against DDoS and AI endpoint abuse |
| Billing | Stripe SDK | Complete payment engine with webhook event handling |
| AI Integration | OpenRouter SDK | High-speed LLM inference gateway (deepseek-chat) |
- π€ AI-Driven Web Generation: Generates responsive, multi-section web interfaces directly from natural language prompts using DeepSeek.
- π¬ Conversational Revisions: Continuously refine website design and functionality by chatting with AI (e.g., "Change primary color to Indigo and add a Pricing Section").
- π» Embedded Monaco Editor: Professional code editor with syntax highlighting, autocomplete, auto-formatting, and real-time code sync.
- π± Responsive Preview Sandbox: Switch between Desktop, Tablet, and Mobile views instantly to verify responsive UI design.
- π One-Click Cloud Deployment: Publish websites with unique, shareable public slugs (
/site/:slug). - π³ Credit Economy & Tiered SaaS Plans: Built-in subscription plans (
Free,Pro,Enterprise) and token-based usage enforcement. - π Enterprise-Grade Rate Limiting: Dual-layer rate limiting protecting both general endpoints and costly AI generation routes.
- β‘ Automated Stripe Webhooks: Real-time balance updates and tier migrations triggered upon payment completion.
Ensure you have the following software and accounts configured:
- Node.js:
v18.0.0or higher - npm:
v9.0.0or higher - MongoDB: Active MongoDB Atlas cluster or local MongoDB instance
- OpenRouter API Key: Obtain from OpenRouter.ai
- Stripe Account: API Keys & Webhook Secret from Stripe Dashboard
- Firebase Project: Web app configuration from Firebase Console
git clone https://github.com/PranavThorat1432/GenWeb.ai-an-AI-Website-Generator.git
cd GenWeb.ai-an-AI-Website-Generatorcd Server
npm installcd ../Client
npm installCreate .env files in both the Server and Client directories using the reference schemas below.
| Variable Name | Type | Description | Default / Example |
|---|---|---|---|
PORT |
Number | Server listener port | 5000 |
MONGODB_URL |
String | MongoDB connection URI string | mongodb+srv://<user>:<password>@cluster.mongodb.net/GenWeb |
JWT_SECRET |
String | Secret key for signing HTTP-only cookies | super_secret_jwt_key |
NODE_ENV |
String | Runtime environment (development / production) |
development |
FRONTEND_URL |
String | Authorized Client origin for CORS | http://localhost:5173 |
OPENROUTER_API_KEY |
String | API Key for OpenRouter AI API | sk-or-v1-... |
STRIPE_SECRET_KEY |
String | Stripe Secret key for server requests | sk_test_... |
STRIPE_PUBLISHABLE_KEY |
String | Stripe Publishable key | pk_test_... |
STRIPE_WEBHOOK_SECRET |
String | Webhook signing secret from Stripe CLI / Dashboard | whsec_... |
| Variable Name | Type | Description | Example |
|---|---|---|---|
VITE_SERVER_URL |
String | Base URL of the backend API | http://localhost:5000 |
VITE_FIREBASE_API_KEY |
String | Firebase Web API Key for authentication | AIzaSy... |
cd Server
npm run dev
# Server running at http://localhost:5000cd Client
npm run dev
# Application available at http://localhost:5173| Method | Endpoint | Access | Description |
|---|---|---|---|
POST |
/api/auth/google |
Public | Authenticates user via Google OAuth & issues HTTP-only JWT cookie |
GET |
/api/auth/logout |
User | Clears authentication session cookie |
| Method | Endpoint | Access | Description |
|---|---|---|---|
GET |
/api/user/get-user |
Protected | Fetches current user profile, plan tier, and remaining credit tokens |
| Method | Endpoint | Rate Limit | Description |
|---|---|---|---|
POST |
/api/website/generate |
10 req / 15m | Parses prompt, deducts credits, and returns generated site code |
GET |
/api/website/get/:id |
Standard | Retrieves website data and conversation history by ID |
POST |
/api/website/update/:id |
10 req / 15m | Performs prompt-based AI revisions on existing code |
GET |
/api/website/get-all |
Standard | Returns list of all websites created by authenticated user |
GET |
/api/website/deploy/:id |
Standard | Publishes website and generates public routing slug |
GET |
/api/website/get-slug/:slug |
Public | Fetches deployed site payload by unique public slug |
| Method | Endpoint | Access | Description |
|---|---|---|---|
POST |
/api/billing |
Protected | Initiates Stripe Checkout Session for plan upgrade / credits |
POST |
/api/stripe/webhook |
Stripe System | Raw body Stripe Webhook listener verifying signatures & fulfilling top-ups |
- Modern Glassmorphic Visual Theme: Sleek dark-mode visual hierarchy with polished translucent containers and gradient accents.
- Monaco Code Editing Suite: Full VS Code engine integration providing line numbers, code folding, bracket matching, and real-time syncing.
- Multi-Device Viewport Sandbox: Toggle live web view between Desktop (
100%), Tablet (768px), and Mobile (375px) dimensions. - Dynamic Micro-Interactions: Smooth state transitions powered by Motion engine for high-touch user engagements.
GenWeb.ai-an-AI-Website-Generator/
βββ Client/ # React 19 Frontend Application
β βββ public/ # Static Web Assets
β βββ src/
β β βββ assets/ # Graphics & Media Dependencies
β β βββ Components/ # Reusable UI Components
β β β βββ Cta.jsx # Call-To-Action Component
β β β βββ Faq.jsx # Frequently Asked Questions Component
β β β βββ Features.jsx # Platform Features Grid
β β β βββ Footer.jsx # Global Site Footer
β β β βββ HowItWorks.jsx # Workflow Step Component
β β β βββ LoginModal.jsx # Firebase Google Auth Modal
β β β βββ Testimonials.jsx # User Testimonials Carousel
β β βββ Hooks/ # Custom React Hooks
β β β βββ useGetCurrentUser.jsx # Auth User Hydration Hook
β β βββ Lib/ # Utility Libraries & Firebase SDK
β β β βββ firebase.js # Firebase App Initialization
β β βββ Pages/ # Application Page Routes
β β β βββ Dashboard.jsx # User Projects & Analytics Dashboard
β β β βββ EditorPage.jsx # Monaco Editor & Preview Workbench
β β β βββ Generate.jsx # AI Prompt Input Studio
β β β βββ Home.jsx # Landing Page
β β β βββ LiveSite.jsx # Deployed Website Renderer
β β β βββ Pricing.jsx # Plan Upgrade & Subscription Page
β β βββ Redux/ # State Management Store
β β β βββ Slices/ # Redux Toolkit Slices
β β β β βββ userSlice.js # User Profile State Slice
β β β βββ store.js # Redux Store Configuration
β β βββ App.jsx # Master Route Definitions
β β βββ index.css # Global Tailwind CSS Entry Point
β β βββ main.jsx # React Application DOM Mounting
β βββ .env # Frontend Environment Configuration
β βββ package.json # Client Node Dependencies & Scripts
β βββ vite.config.js # Vite Build Engine Configuration
β
βββ Server/ # Node.js / Express 5 API Server
β βββ src/
β β βββ Config/ # Third-Party API Configurations
β β β βββ mongoDB.js # Database Connection Driver
β β β βββ openRouter.js # AI DeepSeek Gateway & Retry Backoff
β β β βββ plan.js # Plan Tiers & Credit Allocation Matrix
β β β βββ stripe.js # Stripe SDK Instance
β β βββ Controllers/ # Business Logic Handlers
β β β βββ authController.js # Google Sign-In & Cookie Session Controller
β β β βββ billingController.js # Stripe Checkout Session Generator
β β β βββ stripeWebhookController.js # Payment Webhook Fulfillment
β β β βββ userController.js # User Profile Data Supplier
β β β βββ websiteController.js # AI Generation & Code Management Engine
β β βββ Middleware/ # Express Request Middlewares
β β β βββ isAuth.js # JWT Auth Cookie Validator
β β βββ Models/ # Mongoose Data Schemas
β β β βββ userModel.js # User Profile & Credit Schema
β β β βββ websiteModel.js # Project, Code, & Chat Schema
β β βββ Routes/ # Express REST Route Definitions
β β β βββ authRoutes.js # Auth Endpoints Router
β β β βββ billingRoutes.js # Billing Router
β β β βββ userRoutes.js # User Router
β β β βββ websiteRoutes.js # AI & Website Router
β β βββ Utils/ # Server Utility Helpers
β β βββ extractJSON.js # JSON Sanitization Helper for AI Responses
β βββ .env # Backend Environment Configuration
β βββ package.json # Server Dependencies & Scripts
β βββ server.js # Express Application Server Entrypoint
β
βββ LICENSE.md # Project License Information
βββ README.md # Enterprise Documentation
Validate JavaScript code quality and standard React hook rules:
cd Client
npm run lintTo test payment webhooks locally using the Stripe CLI:
stripe listen --forward-to localhost:5000/api/stripe/webhook- Set Environment Variables in your cloud hosting provider dashboard (matching
Server/.env). - Set Build Command:
npm install - Set Start Command:
node server.js
- Connect repository branch to Vercel/Netlify.
- Set Build Command:
npm run build(Outputs todist/). - Configure
VITE_SERVER_URLin environment variables to point to production backend.
Contributions are welcome! Please follow the steps below:
- Fork the Repository
- Create a Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the ISC License. See LICENSE.md for more information.
| Platform | Link |
|---|---|
| π§ Author | Pranav Thorat |
| π Live Demo | View Now |
| π§βπ» GitHub Repo | View Code |
| πΌ LinkedIn | Connect with Me |
| π© Email | pranavthorat95@gmail.com |
β If you find this project helpful, please give it a star!
π Happy Learning & Teaching!




