Skip to content

Commit 4050db7

Browse files
authored
Merge pull request #25 from hackfest-dev/feat/frontend-ui
Feat/frontend UI
2 parents 75a7a95 + 47fda5a commit 4050db7

42 files changed

Lines changed: 5812 additions & 2184 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 288 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,288 @@
1+
# ui-ux-pro-max
2+
3+
Comprehensive design guide for web and mobile applications. Contains 67 styles, 96 color palettes, 57 font pairings, 99 UX guidelines, and 25 chart types across 13 technology stacks. Searchable database with priority-based recommendations.
4+
5+
## Prerequisites
6+
7+
Check if Python is installed:
8+
9+
```bash
10+
python3 --version || python --version
11+
```
12+
13+
If Python is not installed, install it based on user's OS:
14+
15+
**macOS:**
16+
```bash
17+
brew install python3
18+
```
19+
20+
**Ubuntu/Debian:**
21+
```bash
22+
sudo apt update && sudo apt install python3
23+
```
24+
25+
**Windows:**
26+
```powershell
27+
winget install Python.Python.3.12
28+
```
29+
30+
---
31+
32+
## How to Use This Skill
33+
34+
When user requests UI/UX work (design, build, create, implement, review, fix, improve), follow this workflow:
35+
36+
### Step 1: Analyze User Requirements
37+
38+
Extract key information from user request:
39+
- **Product type**: SaaS, e-commerce, portfolio, dashboard, landing page, etc.
40+
- **Style keywords**: minimal, playful, professional, elegant, dark mode, etc.
41+
- **Industry**: healthcare, fintech, gaming, education, etc.
42+
- **Stack**: React, Vue, Next.js, or default to `html-tailwind`
43+
44+
### Step 2: Generate Design System (REQUIRED)
45+
46+
**Always start with `--design-system`** to get comprehensive recommendations with reasoning:
47+
48+
```bash
49+
python3 skills/ui-ux-pro-max/scripts/search.py "<product_type> <industry> <keywords>" --design-system [-p "Project Name"]
50+
```
51+
52+
This command:
53+
1. Searches 5 domains in parallel (product, style, color, landing, typography)
54+
2. Applies reasoning rules from `ui-reasoning.csv` to select best matches
55+
3. Returns complete design system: pattern, style, colors, typography, effects
56+
4. Includes anti-patterns to avoid
57+
58+
**Example:**
59+
```bash
60+
python3 skills/ui-ux-pro-max/scripts/search.py "beauty spa wellness service" --design-system -p "Serenity Spa"
61+
```
62+
63+
### Step 2b: Persist Design System (Master + Overrides Pattern)
64+
65+
To save the design system for hierarchical retrieval across sessions, add `--persist`:
66+
67+
```bash
68+
python3 skills/ui-ux-pro-max/scripts/search.py "<query>" --design-system --persist -p "Project Name"
69+
```
70+
71+
This creates:
72+
- `design-system/MASTER.md` — Global Source of Truth with all design rules
73+
- `design-system/pages/` — Folder for page-specific overrides
74+
75+
**With page-specific override:**
76+
```bash
77+
python3 skills/ui-ux-pro-max/scripts/search.py "<query>" --design-system --persist -p "Project Name" --page "dashboard"
78+
```
79+
80+
This also creates:
81+
- `design-system/pages/dashboard.md` — Page-specific deviations from Master
82+
83+
**How hierarchical retrieval works:**
84+
1. When building a specific page (e.g., "Checkout"), first check `design-system/pages/checkout.md`
85+
2. If the page file exists, its rules **override** the Master file
86+
3. If not, use `design-system/MASTER.md` exclusively
87+
88+
### Step 3: Supplement with Detailed Searches (as needed)
89+
90+
After getting the design system, use domain searches to get additional details:
91+
92+
```bash
93+
python3 skills/ui-ux-pro-max/scripts/search.py "<keyword>" --domain <domain> [-n <max_results>]
94+
```
95+
96+
**When to use detailed searches:**
97+
98+
| Need | Domain | Example |
99+
|------|--------|---------|
100+
| More style options | `style` | `--domain style "glassmorphism dark"` |
101+
| Chart recommendations | `chart` | `--domain chart "real-time dashboard"` |
102+
| UX best practices | `ux` | `--domain ux "animation accessibility"` |
103+
| Alternative fonts | `typography` | `--domain typography "elegant luxury"` |
104+
| Landing structure | `landing` | `--domain landing "hero social-proof"` |
105+
106+
### Step 4: Stack Guidelines (Default: html-tailwind)
107+
108+
Get implementation-specific best practices. If user doesn't specify a stack, **default to `html-tailwind`**.
109+
110+
```bash
111+
python3 skills/ui-ux-pro-max/scripts/search.py "<keyword>" --stack html-tailwind
112+
```
113+
114+
Available stacks: `html-tailwind`, `react`, `nextjs`, `vue`, `svelte`, `swiftui`, `react-native`, `flutter`, `shadcn`, `jetpack-compose`
115+
116+
---
117+
118+
## Search Reference
119+
120+
### Available Domains
121+
122+
| Domain | Use For | Example Keywords |
123+
|--------|---------|------------------|
124+
| `product` | Product type recommendations | SaaS, e-commerce, portfolio, healthcare, beauty, service |
125+
| `style` | UI styles, colors, effects | glassmorphism, minimalism, dark mode, brutalism |
126+
| `typography` | Font pairings, Google Fonts | elegant, playful, professional, modern |
127+
| `color` | Color palettes by product type | saas, ecommerce, healthcare, beauty, fintech, service |
128+
| `landing` | Page structure, CTA strategies | hero, hero-centric, testimonial, pricing, social-proof |
129+
| `chart` | Chart types, library recommendations | trend, comparison, timeline, funnel, pie |
130+
| `ux` | Best practices, anti-patterns | animation, accessibility, z-index, loading |
131+
| `react` | React/Next.js performance | waterfall, bundle, suspense, memo, rerender, cache |
132+
| `web` | Web interface guidelines | aria, focus, keyboard, semantic, virtualize |
133+
| `prompt` | AI prompts, CSS keywords | (style name) |
134+
135+
### Available Stacks
136+
137+
| Stack | Focus |
138+
|-------|-------|
139+
| `html-tailwind` | Tailwind utilities, responsive, a11y (DEFAULT) |
140+
| `react` | State, hooks, performance, patterns |
141+
| `nextjs` | SSR, routing, images, API routes |
142+
| `vue` | Composition API, Pinia, Vue Router |
143+
| `svelte` | Runes, stores, SvelteKit |
144+
| `swiftui` | Views, State, Navigation, Animation |
145+
| `react-native` | Components, Navigation, Lists |
146+
| `flutter` | Widgets, State, Layout, Theming |
147+
| `shadcn` | shadcn/ui components, theming, forms, patterns |
148+
| `jetpack-compose` | Composables, Modifiers, State Hoisting, Recomposition |
149+
150+
---
151+
152+
## Example Workflow
153+
154+
**User request:** "Làm landing page cho dịch vụ chăm sóc da chuyên nghiệp"
155+
156+
### Step 1: Analyze Requirements
157+
- Product type: Beauty/Spa service
158+
- Style keywords: elegant, professional, soft
159+
- Industry: Beauty/Wellness
160+
- Stack: html-tailwind (default)
161+
162+
### Step 2: Generate Design System (REQUIRED)
163+
164+
```bash
165+
python3 skills/ui-ux-pro-max/scripts/search.py "beauty spa wellness service elegant" --design-system -p "Serenity Spa"
166+
```
167+
168+
**Output:** Complete design system with pattern, style, colors, typography, effects, and anti-patterns.
169+
170+
### Step 3: Supplement with Detailed Searches (as needed)
171+
172+
```bash
173+
# Get UX guidelines for animation and accessibility
174+
python3 skills/ui-ux-pro-max/scripts/search.py "animation accessibility" --domain ux
175+
176+
# Get alternative typography options if needed
177+
python3 skills/ui-ux-pro-max/scripts/search.py "elegant luxury serif" --domain typography
178+
```
179+
180+
### Step 4: Stack Guidelines
181+
182+
```bash
183+
python3 skills/ui-ux-pro-max/scripts/search.py "layout responsive form" --stack html-tailwind
184+
```
185+
186+
**Then:** Synthesize design system + detailed searches and implement the design.
187+
188+
---
189+
190+
## Output Formats
191+
192+
The `--design-system` flag supports two output formats:
193+
194+
```bash
195+
# ASCII box (default) - best for terminal display
196+
python3 skills/ui-ux-pro-max/scripts/search.py "fintech crypto" --design-system
197+
198+
# Markdown - best for documentation
199+
python3 skills/ui-ux-pro-max/scripts/search.py "fintech crypto" --design-system -f markdown
200+
```
201+
202+
---
203+
204+
## Tips for Better Results
205+
206+
1. **Be specific with keywords** - "healthcare SaaS dashboard" > "app"
207+
2. **Search multiple times** - Different keywords reveal different insights
208+
3. **Combine domains** - Style + Typography + Color = Complete design system
209+
4. **Always check UX** - Search "animation", "z-index", "accessibility" for common issues
210+
5. **Use stack flag** - Get implementation-specific best practices
211+
6. **Iterate** - If first search doesn't match, try different keywords
212+
213+
---
214+
215+
## Common Rules for Professional UI
216+
217+
These are frequently overlooked issues that make UI look unprofessional:
218+
219+
### Icons & Visual Elements
220+
221+
| Rule | Do | Don't |
222+
|------|----|----- |
223+
| **No emoji icons** | Use SVG icons (Heroicons, Lucide, Simple Icons) | Use emojis like 🎨 🚀 ⚙️ as UI icons |
224+
| **Stable hover states** | Use color/opacity transitions on hover | Use scale transforms that shift layout |
225+
| **Correct brand logos** | Research official SVG from Simple Icons | Guess or use incorrect logo paths |
226+
| **Consistent icon sizing** | Use fixed viewBox (24x24) with w-6 h-6 | Mix different icon sizes randomly |
227+
228+
### Interaction & Cursor
229+
230+
| Rule | Do | Don't |
231+
|------|----|----- |
232+
| **Cursor pointer** | Add `cursor-pointer` to all clickable/hoverable cards | Leave default cursor on interactive elements |
233+
| **Hover feedback** | Provide visual feedback (color, shadow, border) | No indication element is interactive |
234+
| **Smooth transitions** | Use `transition-colors duration-200` | Instant state changes or too slow (>500ms) |
235+
236+
### Light/Dark Mode Contrast
237+
238+
| Rule | Do | Don't |
239+
|------|----|----- |
240+
| **Glass card light mode** | Use `bg-white/80` or higher opacity | Use `bg-white/10` (too transparent) |
241+
| **Text contrast light** | Use `#0F172A` (slate-900) for text | Use `#94A3B8` (slate-400) for body text |
242+
| **Muted text light** | Use `#475569` (slate-600) minimum | Use gray-400 or lighter |
243+
| **Border visibility** | Use `border-gray-200` in light mode | Use `border-white/10` (invisible) |
244+
245+
### Layout & Spacing
246+
247+
| Rule | Do | Don't |
248+
|------|----|----- |
249+
| **Floating navbar** | Add `top-4 left-4 right-4` spacing | Stick navbar to `top-0 left-0 right-0` |
250+
| **Content padding** | Account for fixed navbar height | Let content hide behind fixed elements |
251+
| **Consistent max-width** | Use same `max-w-6xl` or `max-w-7xl` | Mix different container widths |
252+
253+
---
254+
255+
## Pre-Delivery Checklist
256+
257+
Before delivering UI code, verify these items:
258+
259+
### Visual Quality
260+
- [ ] No emojis used as icons (use SVG instead)
261+
- [ ] All icons from consistent icon set (Heroicons/Lucide)
262+
- [ ] Brand logos are correct (verified from Simple Icons)
263+
- [ ] Hover states don't cause layout shift
264+
- [ ] Use theme colors directly (bg-primary) not var() wrapper
265+
266+
### Interaction
267+
- [ ] All clickable elements have `cursor-pointer`
268+
- [ ] Hover states provide clear visual feedback
269+
- [ ] Transitions are smooth (150-300ms)
270+
- [ ] Focus states visible for keyboard navigation
271+
272+
### Light/Dark Mode
273+
- [ ] Light mode text has sufficient contrast (4.5:1 minimum)
274+
- [ ] Glass/transparent elements visible in light mode
275+
- [ ] Borders visible in both modes
276+
- [ ] Test both modes before delivery
277+
278+
### Layout
279+
- [ ] Floating elements have proper spacing from edges
280+
- [ ] No content hidden behind fixed navbars
281+
- [ ] Responsive at 375px, 768px, 1024px, 1440px
282+
- [ ] No horizontal scroll on mobile
283+
284+
### Accessibility
285+
- [ ] All images have alt text
286+
- [ ] Form inputs have labels
287+
- [ ] Color is not the only indicator
288+
- [ ] `prefers-reduced-motion` respected
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
No,Data Type,Keywords,Best Chart Type,Secondary Options,Color Guidance,Performance Impact,Accessibility Notes,Library Recommendation,Interactive Level
2+
1,Trend Over Time,"trend, time-series, line, growth, timeline, progress",Line Chart,"Area Chart, Smooth Area",Primary: #0080FF. Multiple series: use distinct colors. Fill: 20% opacity,⚡ Excellent (optimized),✓ Clear line patterns for colorblind users. Add pattern overlays.,"Chart.js, Recharts, ApexCharts",Hover + Zoom
3+
2,Compare Categories,"compare, categories, bar, comparison, ranking",Bar Chart (Horizontal or Vertical),"Column Chart, Grouped Bar",Each bar: distinct color. Category: grouped same color. Sorted: descending order,⚡ Excellent,✓ Easy to compare. Add value labels on bars for clarity.,"Chart.js, Recharts, D3.js",Hover + Sort
4+
3,Part-to-Whole,"part-to-whole, pie, donut, percentage, proportion, share",Pie Chart or Donut,"Stacked Bar, Treemap",Colors: 5-6 max. Contrasting palette. Large slices first. Use labels.,⚡ Good (limit 6 slices),⚠ Hard for accessibility. Better: Stacked bar with legend. Avoid pie if >5 items.,"Chart.js, Recharts, D3.js",Hover + Drill
5+
4,Correlation/Distribution,"correlation, distribution, scatter, relationship, pattern",Scatter Plot or Bubble Chart,"Heat Map, Matrix",Color axis: gradient (blue-red). Size: relative. Opacity: 0.6-0.8 to show density,⚠ Moderate (many points),⚠ Provide data table alternative. Use pattern + color distinction.,"D3.js, Plotly, Recharts",Hover + Brush
6+
5,Heatmap/Intensity,"heatmap, heat-map, intensity, density, matrix",Heat Map or Choropleth,"Grid Heat Map, Bubble Heat",Gradient: Cool (blue) to Hot (red). Scale: clear legend. Divergent for ±data,⚡ Excellent (color CSS),⚠ Colorblind: Use pattern overlay. Provide numerical legend.,"D3.js, Plotly, ApexCharts",Hover + Zoom
7+
6,Geographic Data,"geographic, map, location, region, geo, spatial","Choropleth Map, Bubble Map",Geographic Heat Map,Regional: single color gradient or categorized colors. Legend: clear scale,⚠ Moderate (rendering),⚠ Include text labels for regions. Provide data table alternative.,"D3.js, Mapbox, Leaflet",Pan + Zoom + Drill
8+
7,Funnel/Flow,funnel/flow,"Funnel Chart, Sankey",Waterfall (for flows),Stages: gradient (starting color → ending color). Show conversion %,⚡ Good,✓ Clear stage labels + percentages. Good for accessibility if labeled.,"D3.js, Recharts, Custom SVG",Hover + Drill
9+
8,Performance vs Target,performance-vs-target,Gauge Chart or Bullet Chart,"Dial, Thermometer",Performance: Red→Yellow→Green gradient. Target: marker line. Threshold colors,⚡ Good,✓ Add numerical value + percentage label beside gauge.,"D3.js, ApexCharts, Custom SVG",Hover
10+
9,Time-Series Forecast,time-series-forecast,Line with Confidence Band,Ribbon Chart,Actual: solid line #0080FF. Forecast: dashed #FF9500. Band: light shading,⚡ Good,✓ Clearly distinguish actual vs forecast. Add legend.,"Chart.js, ApexCharts, Plotly",Hover + Toggle
11+
10,Anomaly Detection,anomaly-detection,Line Chart with Highlights,Scatter with Alert,Normal: blue #0080FF. Anomaly: red #FF0000 circle/square marker + alert,⚡ Good,✓ Circle/marker for anomalies. Add text alert annotation.,"D3.js, Plotly, ApexCharts",Hover + Alert
12+
11,Hierarchical/Nested Data,hierarchical/nested-data,Treemap,"Sunburst, Nested Donut, Icicle",Parent: distinct hues. Children: lighter shades. White borders 2-3px.,⚠ Moderate,⚠ Poor - provide table alternative. Label large areas.,"D3.js, Recharts, ApexCharts",Hover + Drilldown
13+
12,Flow/Process Data,flow/process-data,Sankey Diagram,"Alluvial, Chord Diagram",Gradient from source to target. Opacity 0.4-0.6 for flows.,⚠ Moderate,⚠ Poor - provide flow table alternative.,"D3.js (d3-sankey), Plotly",Hover + Drilldown
14+
13,Cumulative Changes,cumulative-changes,Waterfall Chart,"Stacked Bar, Cascade",Increases: #4CAF50. Decreases: #F44336. Start: #2196F3. End: #0D47A1.,⚡ Good,✓ Good - clear directional colors with labels.,"ApexCharts, Highcharts, Plotly",Hover
15+
14,Multi-Variable Comparison,multi-variable-comparison,Radar/Spider Chart,"Parallel Coordinates, Grouped Bar",Single: #0080FF 20% fill. Multiple: distinct colors per dataset.,⚡ Good,⚠ Moderate - limit 5-8 axes. Add data table.,"Chart.js, Recharts, ApexCharts",Hover + Toggle
16+
15,Stock/Trading OHLC,stock/trading-ohlc,Candlestick Chart,"OHLC Bar, Heikin-Ashi",Bullish: #26A69A. Bearish: #EF5350. Volume: 40% opacity below.,⚡ Good,⚠ Moderate - provide OHLC data table.,"Lightweight Charts (TradingView), ApexCharts",Real-time + Hover + Zoom
17+
16,Relationship/Connection Data,relationship/connection-data,Network Graph,"Hierarchical Tree, Adjacency Matrix",Node types: categorical colors. Edges: #90A4AE 60% opacity.,❌ Poor (500+ nodes struggles),❌ Very Poor - provide adjacency list alternative.,"D3.js (d3-force), Vis.js, Cytoscape.js",Drilldown + Hover + Drag
18+
17,Distribution/Statistical,distribution/statistical,Box Plot,"Violin Plot, Beeswarm",Box: #BBDEFB. Border: #1976D2. Median: #D32F2F. Outliers: #F44336.,⚡ Excellent,"✓ Good - include stats table (min, Q1, median, Q3, max).","Plotly, D3.js, Chart.js (plugin)",Hover
19+
18,Performance vs Target (Compact),performance-vs-target-(compact),Bullet Chart,"Gauge, Progress Bar","Ranges: #FFCDD2, #FFF9C4, #C8E6C9. Performance: #1976D2. Target: black 3px.",⚡ Excellent,✓ Excellent - compact with clear values.,"D3.js, Plotly, Custom SVG",Hover
20+
19,Proportional/Percentage,proportional/percentage,Waffle Chart,"Pictogram, Stacked Bar 100%",10x10 grid. 3-5 categories max. 2-3px spacing between squares.,⚡ Good,✓ Good - better than pie for accessibility.,"D3.js, React-Waffle, Custom CSS Grid",Hover
21+
20,Hierarchical Proportional,hierarchical-proportional,Sunburst Chart,"Treemap, Icicle, Circle Packing",Center to outer: darker to lighter. 15-20% lighter per level.,⚠ Moderate,⚠ Poor - provide hierarchy table alternative.,"D3.js (d3-hierarchy), Recharts, ApexCharts",Drilldown + Hover
22+
21,Root Cause Analysis,"root cause, decomposition, tree, hierarchy, drill-down, ai-split",Decomposition Tree,"Decision Tree, Flow Chart",Nodes: #2563EB (Primary) vs #EF4444 (Negative impact). Connectors: Neutral grey.,⚠ Moderate (calculation heavy),✓ clear hierarchy. Allow keyboard navigation for nodes.,"Power BI (native), React-Flow, Custom D3.js",Drill + Expand
23+
22,3D Spatial Data,"3d, spatial, immersive, terrain, molecular, volumetric",3D Scatter/Surface Plot,"Volumetric Rendering, Point Cloud",Depth cues: lighting/shading. Z-axis: color gradient (cool to warm).,❌ Heavy (WebGL required),❌ Poor - requires alternative 2D view or data table.,"Three.js, Deck.gl, Plotly 3D",Rotate + Zoom + VR
24+
23,Real-Time Streaming,"streaming, real-time, ticker, live, velocity, pulse",Streaming Area Chart,"Ticker Tape, Moving Gauge",Current: Bright Pulse (#00FF00). History: Fading opacity. Grid: Dark.,⚡ Optimized (canvas/webgl),⚠ Flashing elements - provide pause button. High contrast.,Smoothed D3.js, CanvasJS
25+
24,Sentiment/Emotion,"sentiment, emotion, nlp, opinion, feeling",Word Cloud with Sentiment,"Sentiment Arc, Radar Chart",Positive: #22C55E. Negative: #EF4444. Neutral: #94A3B8. Size = Frequency.,⚡ Good,⚠ Word clouds poor for screen readers. Use list view.,"D3-cloud, Highcharts, Nivo",Hover + Filter
26+
25,Process Mining,"process, mining, variants, path, bottleneck, log",Process Map / Graph,"Directed Acyclic Graph (DAG), Petri Net",Happy path: #10B981 (Thick). Deviations: #F59E0B (Thin). Bottlenecks: #EF4444.,⚠ Moderate to Heavy,⚠ Complex graphs hard to navigate. Provide path summary.,"React-Flow, Cytoscape.js, Recharts",Drag + Node-Click

0 commit comments

Comments
 (0)