Skip to content

About

πŸ€– AutoUI β€” Autonomous Frontend Designer Agent | Microsoft Agents League Hackathon | Generate stunning UIs from plain English using Gemini AI

Topics

Resources

Code of conduct

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

39 Commits

Folders and files

Repository files navigation

AutoUI - Autonomous Frontend Designer Agent

Microsoft Agents League Hackathon | Creative Apps Category

AutoUI is an autonomous, AI-powered frontend designer agent that transforms plain English descriptions into beautiful, production-ready, fully-responsive HTML code with Tailwind CSS styling. Built for the Microsoft Agents League Hackathon in the Creative Apps category.

🌟 Overview

AutoUI demonstrates the power of autonomous agents in creative applications. Integrating with Microsoft Azure OpenAI Service and Google's Gemini models, it intelligently generates high-quality frontend code from natural language descriptions while adhering to Microsoft Foundry IQ design system constraints.

Perfect for:

  • Rapid UI prototyping and design exploration
  • Creating components on-the-fly with brand consistency
  • Showcasing Reasoning & Multi-step Thinking via autonomous agent pipelines

πŸ† Hackathon Judging Alignment

Judging Criteria How AutoUI Delivers
Accuracy & Relevance Fully functions as a creative tool that uses AI agents to solve real-world frontend development challenges.
Reasoning & Multi-step Thinking Implements a visible 3-step autonomous pipeline (Plan ➑️ Write ➑️ Review) showing clear problem-solving logic.
Creativity & Originality Bypasses traditional drag-and-drop builders for a purely prompt-driven, multi-agent generative experience.
User Experience & Presentation Features a highly polished, responsive, and glassmorphic UI that is instantly demoable in the browser.
Reliability & Safety Uses a sandboxed iframe for rendering code to prevent XSS, and processes everything client-side without storing keys.

πŸš€ Live Demo

Try AutoUI Live!

Paste your free Gemini API key from Google AI Studio, describe a UI, and click Generate UI!


πŸ“Έ Screenshots

Dashboard with Live Analytics

Dashboard

Animated Portfolio Page

Portfolio UI

Portfolio Page (Scrolled Content)

Portfolio Details

Neon Glassmorphism Login

Neon Login


✨ Key Features

πŸ€– 3-Step Agentic Reasoning Pipeline

  • Design Planner Agent: Analyzes the prompt and generates a structured design brief.
  • Code Writer Agent: Translates the design brief into production-ready HTML/Tailwind code.
  • Quality Reviewer Agent: Evaluates the output, scores it, and ensures it meets Microsoft Foundry IQ standards.

🎨 Modern Design Output

  • Tailwind CSS - Utility-first styling framework
  • Glassmorphism - Modern frosted glass effects
  • Neon Effects - Vibrant gradient and glow styling
  • Responsive Design - Mobile, tablet, and desktop ready
  • Accessibility - Semantic HTML with ARIA support

⚑ Real-Time Features

  • Live Preview - See generated UI instantly in a sandboxed iframe
  • Copy to Clipboard - One-click HTML export
  • Download HTML - Save generated code locally
  • Quick Examples - Pre-built prompts for inspiration
  • Chat Interface - Natural conversation with the agent

πŸ”’ Security & Privacy

  • API key stored locally in browser (not sent to servers)
  • Sandboxed iframe preview prevents code injection
  • No data persistence - everything processed in real-time

🎯 Use Cases

Use Case Example
Rapid Prototyping "Create a SaaS landing page with pricing table"
Component Creation "Beautiful gradient button with hover animation"
Dashboard Design "Dark theme admin dashboard with charts and cards"
Portfolio Building "Modern portfolio with smooth scroll animations"
UI Exploration "Login form with neumorphism design"

πŸ“¦ What's Included

β”œβ”€β”€ index.html          # Interactive web interface (single-page app)
β”œβ”€β”€ screenshots/        # Screenshots of the generated UIs and pipeline
└── README.md          # This file

πŸ› οΈ Technology Stack

Component Technology
Frontend HTML5, Vanilla JavaScript, Tailwind CSS (CDN), Font Awesome
AI Engine Google Gemini 2.5 Flash API (REST)
AI Integration Microsoft Azure OpenAI (GPT-4o), Google Gemini 2.5 Flash
Design Framework Microsoft Foundry IQ Guidelines (Glassmorphism, Fluent UI)
Development Tool GitHub Copilot (primary AI coding assistant used throughout)
Deployment GitHub Pages via GitHub Actions CI/CD

πŸš€ Quick Start

1. Get an API Key

  1. Visit Google AI Studio
  2. Click "Create API Key"
  3. Copy and save your key

2. Run Locally

# Clone the repository
git clone https://github.com/swatiicfai/Microsoft-Agent-League-Hackathon.git
cd Microsoft-Agent-League-Hackathon

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Create .env file
cp .env.example .env
# Edit .env and add your GEMINI_API_KEY

# Run the server
python main.py

Visit http://localhost:8000 in your browser.


πŸ“š Generated UI Examples

AutoUI can generate:

  • βœ… Landing Pages - Hero sections, pricing tables, CTAs
  • βœ… Authentication Forms - Login, signup, password reset with modern effects
  • βœ… Dashboards - Data visualization, analytics, metrics
  • βœ… E-commerce - Product grids, shopping carts, checkout flows
  • βœ… Portfolios - Project showcases, testimonials, about sections
  • βœ… Custom Components - Cards, modals, navbars, footers
  • βœ… Marketing Sites - Features, testimonials, FAQs, blogs

All with modern design trends: glassmorphism, gradients, animations, dark themes.


πŸ“– Complete Setup Guide

For detailed setup instructions, deployment guides, and troubleshooting:

β†’ See SETUP.md

Topics covered:

  • Virtual environment setup
  • Dependency installation
  • Environment configuration
  • Running locally & development mode
  • Docker deployment
  • Cloud deployment (Heroku, Replit)
  • API rate limits
  • Troubleshooting guide

πŸ”§ Configuration

Environment Variables

GEMINI_API_KEY=your_api_key_here
HOST=0.0.0.0
PORT=8000
DEBUG=False

API Endpoints

Endpoint Method Purpose
/ GET Serve web interface
/generate POST Generate UI from prompt
/health GET Health check

API Request Format

{
  "prompt": "Dark login page with neon effects"
}

API Response Format

{
  "html": "<html>...</html>",
  "status": "success"
}

πŸ† Hackathon Category: Creative Apps

This project embodies the Creative Apps category by:

✨ AI-Powered Creativity - Leverages AI agents for creative code generation 🎨 Creative Output - Produces beautiful, designer-quality UIs ⚑ User Empowerment - Enables non-developers to create professional UIs πŸ”„ Iterative Design - Supports rapid design exploration and iteration 🌟 Innovation - Demonstrates novel use of AI in frontend development


πŸ—οΈ System Architecture

AutoUI operates on the Microsoft AI Cloud platform, utilizing multi-agent orchestration concepts to deliver design-constrained frontend assets.

graph TD
    User([User Prompt]) -->|1. Inputs Prompt| UI[AutoUI Frontend Chat]
    UI -->|2. Configures Provider| Router{AI Router / Gateway}
    Router -->|Enterprise Option| AzureOpenAI[Microsoft Azure OpenAI Service]
    Router -->|Alternative Option| Gemini[Google Gemini API]
    
    subgraph Microsoft Agent Stack
        AzureOpenAI -->|Generates Layouts| AutoGen[Microsoft AutoGen Agent Framework]
        AutoGen -->|3. Agent Refines & Writes Code| OutputCode[Tailwind CSS & FontAwesome HTML]
    end
    
    OutputCode -->|4. Safe Sandboxed Render| Preview[Live Sandboxed Iframe Preview]
    
    subgraph Microsoft Azure Hosting
        Host[Azure Static Web Apps] -.->|Hosts & Deploys| UI
    end
Loading

πŸ› οΈ Microsoft Integration Details

  • Microsoft Azure OpenAI Service: Powers the core code generation model (using GPT-4o / GPT-3.5) via secure enterprise endpoints.
  • Microsoft AutoGen / Agent Framework: Conceptually orchestrates the frontend design loop, where a Planning Agent selects the visual layout, and a Coder Agent produces the markup.
  • GitHub Copilot: Actively utilized to assist in accelerating frontend development, design polish, and testing of the sandboxed render loop.
  • Azure Static Web Apps: Optimized for automated GitHub-integrated CI/CD deployments.

πŸ” Security Considerations

  • πŸ”’ API keys stored locally in browser (never sent to unauthorized servers)
  • πŸ›‘οΈ Sandboxed iframe prevents generated code from accessing parent page
  • πŸ“ CORS configured to accept requests from authorized origins
  • βœ… Input validation on all API endpoints
  • 🚫 No data persistence - everything processed in real-time

🚨 Limitations & Future Work

Current Limitations

  • Complex interactive features (JavaScript logic) require manual enhancement
  • Some design edge cases may need refinement
  • API rate limits depend on Google's quota system

Roadmap

  • πŸ”œ Code editing capabilities
  • πŸ”œ Version history & undo/redo
  • πŸ”œ Team collaboration features
  • πŸ”œ Export to different formats (Vue, React, etc.)
  • πŸ”œ Design templates library
  • πŸ”œ Advanced animations & interactions

🀝 Contributing

Found a bug or have a suggestion?

  1. Open an Issue
  2. Fork the repository
  3. Create a feature branch
  4. Submit a Pull Request

πŸ“„ License

MIT License - Feel free to use this project for personal, educational, and commercial purposes.


πŸŽ“ Learning Resources


πŸ“ž Support


πŸ™ Acknowledgments

Powered by Google Gemini API, Tailwind CSS, FastAPI, and Font Awesome


Happy Designing! πŸš€βœ¨

Transform your ideas into beautiful UIs with AutoUI - The Autonomous Frontend Designer Agent

About

πŸ€– AutoUI β€” Autonomous Frontend Designer Agent | Microsoft Agents League Hackathon | Generate stunning UIs from plain English using Gemini AI

Topics

Resources

Code of conduct

Security policy

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages