File size: 3,512 Bytes
fe186e3
 
 
 
 
 
 
 
 
dcbd9eb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37bc74b
 
 
 
 
 
f5831ec
37bc74b
 
 
f5831ec
37bc74b
 
 
f5831ec
37bc74b
 
4b65fa0
37bc74b
4b65fa0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37bc74b
50cdda4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
---
title: ImagineUI
colorFrom: blue
colorTo: purple
sdk: docker
pinned: false
license: apache-2.0
---

# ImagineUI

An AI-powered CSS style generator that creates and iterates on designs using natural language instructions.

## Problem & Solution

### Problem
Designers and developers need a tool that can:
- Translate verbal descriptions into CSS styling
- Rapidly prototype and iterate on web layouts
- Learn from real-world design patterns

### Target Audience
- Frontend developers needing quick style prototypes
- UI/UX designers exploring creative variations
- Writers and content creators
- Small business owners creating marketing materials
- Cross-disciplinary teams discussing design concepts

### Solution
An agentic RAG application that:
- Consumes HTML templates
- Creates style variations based on natural language input
- Iterates designs through user feedback
- Learns from CSS Zen Garden designs

## Setup

This project uses Poetry for dependency management.

### Prerequisites

1. Python 3.11 (via brew or your system's package manager)
2. Poetry: `curl -sSL https://install.python-poetry.org | python3 -`

### Installation

1. Clone and enter the repository:
```
git clone https://github.com/yourusername/ImagineUI.git
cd ImagineUI
```

2. Install dependencies:
```
poetry install
poetry run playwright install chromium
```

## Tools

### CSS Zen Garden Scraper

Collects designs from CSS Zen Garden into a structured dataset. Each design in `designs/<design_id>/` contains:
- `style.css`: The design's CSS file
- `metadata.json`: Design information (author, URLs)
- `screenshot_desktop.png`: Screenshot at 1920px width
- `screenshot_mobile.png`: Screenshot at 480px width

Usage:
```
poetry run python scraper.py          # Run scraper
poetry run python analyze_designs.py   # Analyze designs
poetry run jupyter notebook           # Test in notebook
```

## Development

- `poetry add <package>`: Add dependencies
- `poetry update`: Update dependencies
- `poetry shell`: Activate virtual environment

## Project Structure

```
ImagineUI/
β”œβ”€β”€ designs/            # Scraped CSS Zen Garden designs
β”‚   └── <design_id>/   # Each design's files
β”œβ”€β”€ scraper.py         # CSS Zen Garden scraper
β”œβ”€β”€ test_scraper.ipynb # Scraper testing notebook
β”œβ”€β”€ pyproject.toml     # Project dependencies
└── README.md
```

## Technical Stack

- LLM: For understanding design instructions
- Embedding Model: For design similarity search
- Vector Database: For storing design patterns
- Orchestration: For managing the design workflow
- Monitoring & Evaluation: For quality assurance
- User Interface: For interaction and feedback

# AI Designer

## Problem and Audience

### Problem:

  I want a tool that can show me examples of a design I'm imagining.

### Audience:

  This app is for designers and non-designers who want to be inspired and see examples of good style design.

## Solution

  An agentic RAG application that scrapes designs from CSS Zen Garden and serves the best matches to the user.


# **Data Collection & Dataset Creation**

To populate the data, run the notebook in the data_collection folder with a range of design ids. Not all are included in the repository. New data will need to be moved to the src data folder to be accessible to the application.

# **Build**

uv sync

chainlit run src/app.py

And you're off!

## Public addresses

https://huggingface.co/spaces/Technologic101/imagineui

https://github.com/Technologic101/ImagineUI/tree/main