├── .gitignore ├── README.md ├── app ├── (routes) │ ├── credits │ │ └── page.tsx │ ├── dashboard │ │ ├── _components │ │ │ └── ImageUpload.tsx │ │ └── page.tsx │ ├── designs │ │ ├── _components │ │ │ └── DesignCard.tsx │ │ └── page.tsx │ ├── layout.tsx │ └── provider.tsx ├── Contact.tsx ├── Footer.tsx ├── MagicButton.tsx ├── _components │ ├── AppHeader.tsx │ ├── AppSidebar.tsx │ ├── Authentication.tsx │ └── ProfileAvatar.tsx ├── api │ ├── ai-model │ │ └── route.tsx │ ├── user │ │ └── route.ts │ └── wireframe-to-code │ │ └── route.tsx ├── favicon.ico ├── globals.css ├── layout.tsx ├── page.tsx ├── provider.tsx └── view-code │ ├── [uid] │ └── page.tsx │ └── _components │ ├── CodeEditor.tsx │ └── SelectionDetail.tsx ├── components.json ├── components └── ui │ ├── button.tsx │ ├── input.tsx │ ├── popover.tsx │ ├── select.tsx │ ├── separator.tsx │ ├── sheet.tsx │ ├── sidebar.tsx │ ├── skeleton.tsx │ ├── sonner.tsx │ ├── textarea.tsx │ └── tooltip.tsx ├── configs ├── db.tsx ├── firebaseConfig.tsx └── schema.ts ├── context └── AuthContext.tsx ├── data └── Constants.tsx ├── drizzle.config.ts ├── hooks └── use-mobile.tsx ├── lib └── utils.ts ├── next.config.ts ├── package-lock.json ├── package.json ├── postcss.config.mjs ├── public ├── Mistral.png ├── Wireframetocode.png ├── deepseek.png ├── deepseek1.png ├── file.svg ├── gemma.webp ├── globe.svg ├── google.png ├── herobg.png ├── landingvid.mp4 ├── logo.svg ├── logo_h.png ├── logo_h1.png ├── logo_main.svg ├── meta.png ├── meta1.png ├── microsoft.png ├── next.svg ├── opengv.png ├── qwen.png ├── vercel.svg ├── w_t_c.png └── window.svg ├── tailwind.config.ts └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.* 7 | .yarn/* 8 | !.yarn/patches 9 | !.yarn/plugins 10 | !.yarn/releases 11 | !.yarn/versions 12 | 13 | # testing 14 | /coverage 15 | 16 | # next.js 17 | /.next/ 18 | /out/ 19 | 20 | # production 21 | /build 22 | 23 | # misc 24 | .DS_Store 25 | *.pem 26 | 27 | # debug 28 | npm-debug.log* 29 | yarn-debug.log* 30 | yarn-error.log* 31 | .pnpm-debug.log* 32 | 33 | # env files (can opt-in for committing if needed) 34 | .env 35 | 36 | # vercel 37 | .vercel 38 | 39 | # typescript 40 | *.tsbuildinfo 41 | next-env.d.ts 42 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 🚀 Vision to Web 2 | **Transform Wireframes into Fully Functional Code with AI-Powered Precision** 3 | 4 | ![vision-to-web-banner](https://media-hosting.imagekit.io/6828aa092aac47f5/Screenshot%202025-05-09%20215820.png?Expires=1841416238&Key-Pair-Id=K2ZIVPTIP2VGHC&Signature=2hsYr~ibE2-UycsotmHeHcu9HgtdmQQYq02MRX2r9MmCGBgiyE0-KHcYHu1AF62-3eFAleU-3l4DU5bN34D4YfHVn4ofg~Uh8J9uC9EItNNwHKG1p5sGQq5cb50qv7TX8-FMuT0idclRihJQUDkCFTaw34efZI46D7ReKA4p9SJ5qyZj7YiMCdDYmudSsgx8nKiyaigel4FlsqpJhvzxbtfsFXdEdCZ-JvE6HCXSnqkXZVnTnV5LZ38zZVu0AB1TLsGs6Ok3~~00xI6oSeCWXq5OzXc~fCMpAhWRAEyT~Gg~bz-DWwMt0Oz6ahryHNEQ0Dr2xgqfWagml5XlPhGXcw__) 5 | 6 | --- 7 | 8 | ## ✨ Overview 9 | 10 | **Vision to Web** is an intelligent platform that converts UI wireframes into clean, production-ready HTML, CSS, and TypeScript (TSX) code using advanced AI models. It streamlines the UI/UX-to-code process, helping developers and designers bring their ideas to life instantly — no more manual front-end coding from scratch. 11 | 12 | --- 13 | 14 | ## 🧠 Key Features 15 | 16 | - 🔁 **Multi-Model AI Support** – Choose from Gemini, Mistral, Qwen, DeepSeek, and Gemma. 17 | - 📤 **Image Upload & Description Input** – Upload your wireframe and guide the AI with context. 18 | - ⚡ **Real-Time Code Generation & Preview** – See code and live preview update instantly. 19 | - 💾 **Conversion History** – Access your previous conversions anytime. 20 | - 🧩 **Seamless UI/UX to Code Flow** – Converts design intent into structured code blocks. 21 | - 🛠️ **Built with TypeScript, Firebase, Drizzle ORM, and Modern Web Stacks.** 22 | 23 | --- 24 | 25 | ## 📸 Demo 26 | 27 | ![vision-to-web-demo](https://your-demo-gif-link.com/demo.gif) 28 | 29 | > Experience the future of UI development. 30 | 31 | --- 32 | 33 | ## 🏗️ Tech Stack 34 | 35 | | Category | Technology | 36 | |----------------|---------------------------------------------| 37 | | Frontend | React, TypeScript, Tailwind CSS | 38 | | Backend | Firebase (Storage, Auth, Firestore) | 39 | | Database | Drizzle ORM + SQL | 40 | | Code Preview | Real-time Editor + Live Preview Rendering | 41 | | AI Integration | OpenAI, Gemini, Mistral, DeepSeek, etc. | 42 | | Deployment | Vercel / Netlify | 43 | 44 | --- 45 | 46 | ## ⚙️ How It Works 47 | 48 | 1. **Upload Wireframe** – PNG, JPG, or Sketch wireframe. 49 | 2. **Choose AI Model** – Select from multiple supported models. 50 | 3. **Describe Intent** – Provide a short functional description. 51 | 4. **Generate Code** – Watch real-time code and preview rendering. 52 | 5. **Save or Export** – Copy or store the generated code securely. 53 | 54 | --- 55 | 56 | ## 📌 Use Cases 57 | 58 | - Rapid front-end prototyping 59 | - Design handoff automation 60 | - Code scaffolding for MVPs 61 | - Learning and teaching UI development 62 | 63 | --- 64 | 65 | ## 🛡️ Security & Scalability 66 | 67 | - 🔒 Firebase Auth for secure user access 68 | - ☁️ Cloud-based storage for wireframes 69 | - 🔄 Scalable backend infrastructure 70 | - 📈 Real-time database updates with Firestore 71 | 72 | --- 73 | 74 | ## 🚀 Deployment Links 75 | 76 | | Platform | Link | 77 | |--------------|------------------------------------------------------------------| 78 | | Live Demo | [https://vision2web.vercel.app](https://vision2web.vercel.app) | 79 | | Frontend Repo| [GitHub – vision-to-web](https://github.com/yourusername/vision-to-web) | 80 | | Docs | [Documentation](https://your-docs-link.com) | 81 | 82 | --- 83 | 84 | ## 👥 Contributors 85 | 86 | - **Atharva Kalbande** – Lead Developer & Architect 87 | - **Harshika Rathod** – AI Integration & UX Optimization 88 | - **Arnav Varhade** – Documentation 89 | - **Shruti Thakur** – Documentation 90 | 91 | --- 92 | 93 | ## 📚 Future Enhancements 94 | 95 | - Export generated code directly to GitHub repositories 96 | - Figma and design tool integration for seamless input 97 | - Enhanced responsive design generation capabilities 98 | - AI-powered debugging and optimization suggestions 99 | - Support for reusable component and template libraries 100 | 101 | --- 102 | 103 | ## 🤝 Contributing 104 | 105 | We welcome contributions! 106 | If you'd like to help improve **Vision to Web**, please fork the repo and submit a PR. 107 | 108 | ```bash 109 | git clone https://github.com/yourusername/vision-to-web.git 110 | cd vision-to-web 111 | npm install 112 | npm run dev 113 | -------------------------------------------------------------------------------- /app/(routes)/credits/page.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | import { useAuthContext } from '@/app/provider' 3 | import { Button } from '@/components/ui/button' 4 | import axios from 'axios' 5 | import React, { useEffect, useState } from 'react' 6 | 7 | function Credits() { 8 | 9 | const { user } = useAuthContext(); 10 | const [userData, setUserData] = useState(); 11 | useEffect(() => { 12 | user && GetUserCredits(); 13 | }, [user]) 14 | 15 | const GetUserCredits = async () => { 16 | const result = await axios.get('/api/user?email=' + user?.email); 17 | console.log(result.data) 18 | setUserData(result.data); 19 | } 20 | 21 | return ( 22 |
23 |

Credits

24 | 25 |
27 |
28 |

My Credits:

29 | {userData?.credits &&

{userData?.credits} Credits left

} 30 |
31 | {/* */} 32 |
33 |
34 | ) 35 | } 36 | 37 | export default Credits -------------------------------------------------------------------------------- /app/(routes)/dashboard/_components/ImageUpload.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | import { Button } from '@/components/ui/button' 3 | import { Textarea } from '@/components/ui/textarea' 4 | import { CloudUpload, Loader2Icon, WandSparkles, X } from 'lucide-react' 5 | import Image from 'next/image' 6 | //@ts-ignore 7 | import uuid4 from "uuid4"; 8 | import React, { ChangeEvent, useState } from 'react' 9 | import { 10 | Select, 11 | SelectContent, 12 | SelectItem, 13 | SelectTrigger, 14 | SelectValue, 15 | } from "@/components/ui/select" 16 | import { getDownloadURL, ref, uploadBytes } from 'firebase/storage' 17 | import { storage } from '@/configs/firebaseConfig' 18 | import axios from 'axios' 19 | import { useAuthContext } from '@/app/provider' 20 | import { useRouter } from 'next/navigation' 21 | import Constants from '@/data/Constants' 22 | import { toast } from 'sonner' 23 | 24 | function ImageUpload() { 25 | 26 | const [previewUrl, setPreviewUrl] = useState(null) 27 | const [file, setFile] = useState(); 28 | const [model, setModel] = useState(); 29 | const [description, setDescription] = useState(); 30 | const { user } = useAuthContext(); 31 | const router = useRouter(); 32 | const [loading, setLoading] = useState(false); 33 | 34 | const OnImageSelect = (event: ChangeEvent) => { 35 | const files = event.target.files; 36 | if (files) { 37 | console.log(files[0]) 38 | const imageUrl = URL.createObjectURL(files[0]); 39 | setFile(files[0]); 40 | setPreviewUrl(imageUrl); 41 | } 42 | } 43 | 44 | const OnConverToCodeButtonClick = async () => { 45 | if (!file || !model || !description) { 46 | console.log("Select All Fields"); 47 | return; 48 | } 49 | setLoading(true); 50 | // Save Image to Firebase 51 | const fileName = Date.now() + '.png'; 52 | const imageRef = ref(storage, "Wireframe_To_Code/" + fileName); 53 | await uploadBytes(imageRef, file).then(resp => { 54 | console.log("Image Uploaded...") 55 | }); 56 | 57 | const imageUrl = await getDownloadURL(imageRef); 58 | console.log(imageUrl); 59 | 60 | const uid = uuid4(); 61 | console.log(uid); 62 | // Save Info To Database 63 | const result = await axios.post('/api/wireframe-to-code', { 64 | uid: uid, 65 | description: description, 66 | imageUrl: imageUrl, 67 | model: model, 68 | email: user?.email 69 | }); 70 | if (result.data?.error) { 71 | console.log("Not Enough credits"); 72 | toast('Not Enough Credits!'); 73 | setLoading(false); 74 | return; 75 | } 76 | setLoading(false); 77 | router.push('/view-code/' + uid); 78 | } 79 | 80 | return ( 81 |
82 |
83 | {!previewUrl ? ( 84 |
89 | {/* Dark Overlay for Better Visibility */} 90 |
91 | 92 |
93 | 94 |

95 | Upload Image 96 |

97 |

98 | Click Button Select Wireframe Image 99 |

100 |
101 | 106 |
107 | 114 |
115 |
116 | ) : ( 117 |
118 | preview 125 | setPreviewUrl(null)} 128 | /> 129 |
130 | )} 131 | 132 |
137 | {/* Dark Overlay for Better Visibility */} 138 |
139 |
140 |

141 | Select AI Model 142 |

143 | 171 | 172 |

173 | Enter Description about your webpage 174 |

175 |