This is a full-stack generative AI app that allows users to:
- 🎨 Generate UI code from text prompts using Ollama + CodeLLaMA
- 🖼️ Upload images to extract layout and generate responsive HTML using LLaVA
- 🎛️ Preview the output directly in the browser
- ⚡ Powered entirely by local AI models — no cloud APIs needed!
Layer | Tech |
---|---|
Frontend | Static HTML, JS, Tailwind CSS (/frontend/public ) |
Backend | Node.js + Express |
AI Engine | Ollama (CodeLLaMA, LLaVA) |
generative-ai-preview-app/
├── backend/ # Express server for prompt → code/image caption → code
├── frontend/
│ └── public/ # Contains index.html, app.js, and preview pages
├── .gitignore
├── README.md
Make sure you have Ollama installed, then run:
ollama run codellama
ollama run llava
cd backend
npm install
node index.js
- Runs on:
http://localhost:5000
- Endpoints:
POST /generate-ui
→ Text prompt → UI codePOST /generate-ui-from-image
→ Image → Caption → Code
Open directly in browser:
frontend/public/index.html
Or use Live Server (VS Code extension).
- 🧠 Text-to-UI with Tailwind CSS using CodeLLaMA
- 🖼️ Vision-based UI generation from images (LLaVA)
- 💡 100% local execution with Ollama (no cloud APIs)
- 🔧 Built with Express and plain HTML/JS