Skip to content

sabihkahn/TwoMinSite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌐 2minsite β€” AI-Powered Website Builder SaaS

Build, launch, and manage stunning e-commerce websites in minutes β€” no coding required.

TypeScript React Node.js Express MongoDB TailwindCSS


πŸ“‹ Table of Contents


πŸš€ Overview

TWOMINSITE is a full-stack SaaS platform that lets users create beautiful, themed e-commerce websites without writing a single line of code. Users can manage products, track analytics, and launch their storefront β€” all from a polished dashboard.


πŸ“Έ Screenshots

Landing Page

Landing Page

Home (Logged In)

Home

Dashboard

Dashboard

Create Website

Create Website

Add Product

Add Product

Pricing

Pricing

Login & Register

Login Register
Login Register

β„Ή About & Contact

About Contact Us
About Contact

πŸ›  Tech Stack

Frontend

Technology Purpose
React UI Framework
TypeScript Type Safety
Vite Build Tool
TailwindCSS Styling
Framer Motion Animations
Zustand State Management
Axios HTTP Client
React Router Routing
Recharts Analytics Charts
Lucide Icons
Cloudinary Image Uploads

Backend

Technology Purpose
Node.js Runtime
Express Web Framework
TypeScript Type Safety
MongoDB Database
Mongoose ODM
JWT Authentication
Bcrypt Password Hashing
Zod Schema Validation
Nodemailer Email Service
Winston Logging
Rate Limiting API Protection

✨ Features

  • πŸ” Auth System β€” Secure JWT-based registration, login & logout with cookie management
  • 🎨 8 Website Themes β€” Choose from Dark, Forest, Gothic, Neon Future, Soft Glass & more
  • πŸ›’ Product Management β€” Add, update, and manage store products with image uploads via Cloudinary
  • πŸ“Š Analytics Dashboard β€” Visual charts powered by Recharts for store performance
  • πŸ“§ Email Notifications β€” Transactional emails via Nodemailer
  • πŸ›‘οΈ Input Validation β€” Full Zod schema validation on all API endpoints
  • 🚦 Rate Limiting β€” Protection against API abuse
  • πŸ“ Structured Logging β€” Winston-powered server logs
  • πŸ“± Responsive UI β€” Mobile-first design with Tailwind CSS
  • ⚑ Animated UX β€” Smooth transitions with Framer Motion

πŸ“ Project Structure

β”œβ”€β”€ backend/ β”‚ └── src/ β”‚ β”œβ”€β”€ controller/ # Business logic β”‚ β”œβ”€β”€ db/ # MongoDB connection β”‚ β”œβ”€β”€ middleware/ # Auth & upload guards β”‚ β”œβ”€β”€ models/ # Mongoose schemas β”‚ β”œβ”€β”€ routes/ # Express route definitions β”‚ β”œβ”€β”€ types/ # TypeScript interfaces β”‚ β”œβ”€β”€ utils/ # JWT, mailer, logger, website helpers β”‚ └── zodprotection/ # Zod validation schemas β”‚ β”œβ”€β”€ frontend/ β”‚ └── src/ β”‚ β”œβ”€β”€ api/ # Axios instance β”‚ β”œβ”€β”€ components/ # Reusable UI components β”‚ β”œβ”€β”€ pages/ # Route-level page components β”‚ β”œβ”€β”€ store/ # Zustand global state β”‚ └── cloudinary/ # Image upload helper β”‚ β”œβ”€β”€ images/ # Screenshot assets β”‚ β”œβ”€β”€ frontendimages/ β”‚ └── themeswebsiteimage/ β”‚ └── websites/ # Generated HTML website templates β”œβ”€β”€ darkfantasy/ └── premium/


πŸš€ Getting Started

Prerequisites

  • Node.js v18+
  • MongoDB (local or Atlas)
  • Cloudinary account

1. Clone the Repository

git clone https://github.com/yourusername/webcraft.git
cd webcraft

2. Install Backend Dependencies

cd backend
npm install

3. Install Frontend Dependencies

cd ../frontend
npm install

4. Configure Environment Variables

See Environment Variables below.

5. Run in Development

Backend:

cd backend
npm run dev

Frontend:

cd frontend
npm run dev

πŸ”‘ Environment Variables

Backend (backend/.env)

PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
JWT_EXPIRES_IN=7d
EMAIL_USER=your_email@gmail.com
EMAIL_PASS=your_email_app_password
CLIENT_URL=http://localhost:5173

Frontend (frontend/.env)

VITE_API_URL=http://localhost:5000/api
VITE_CLOUDINARY_CLOUD_NAME=your_cloud_name
VITE_CLOUDINARY_UPLOAD_PRESET=your_upload_preset

🎨 Website Themes

Theme Preview
Default Default
Dark Dark
Dark Blue Dark Blue
Forest Forest
Gothic Gothic
Green Woods Green Woods
Neon Future Neon Future
Soft Glass Soft Glass

πŸ”Œ API Routes

Auth

Method Endpoint Description
POST /api/user/register Register a new user
POST /api/user/login Login & receive JWT cookie
POST /api/user/logout Logout & clear cookie
PUT /api/user/update-profile Update user profile

Website Builder

Method Endpoint Description
POST /api/website/create Create a new website
PUT /api/website/update Update website settings
GET /api/website/preview Preview generated site

Dashboard

Method Endpoint Description
GET /api/dashboard Fetch dashboard stats
POST /api/dashboard/product Add a product

Misc

Method Endpoint Description
POST /api/email/send Send contact email

πŸ“œ License

This project is licensed under the ISC License.


sabih ur rehamn ---author Made with using React, Express & MongoDB

About

a web and app based softwaree which will genrate website in under 2 minutes for a brand or for gym or bakries

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages