Skip to content

Commit e505f17

Browse files
committed
feat:fastgpt api
1 parent a5cf0dc commit e505f17

34 files changed

Lines changed: 2828 additions & 14 deletions

.github/prompts/fastgpt.prompt.md

Lines changed: 517 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 233 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,233 @@
1+
---
2+
name: ui-ux-pro-max
3+
description: 'UI/UX design intelligence with 50 styles, 21 palettes, 50 font pairings, and stack-specific best practices'
4+
agent: 'agent'
5+
---
6+
7+
# ui-ux-pro-max
8+
9+
Searchable database of UI styles, color palettes, font pairings, chart types, product recommendations, UX guidelines, and stack-specific best practices.
10+
11+
## Prerequisites
12+
13+
Check if Python is installed:
14+
15+
```bash
16+
python3 --version || python --version
17+
```
18+
19+
If Python is not installed, install it based on user's OS:
20+
21+
**macOS:**
22+
```bash
23+
brew install python3
24+
```
25+
26+
**Ubuntu/Debian:**
27+
```bash
28+
sudo apt update && sudo apt install python3
29+
```
30+
31+
**Windows:**
32+
```powershell
33+
winget install Python.Python.3.12
34+
```
35+
36+
---
37+
38+
## How to Use This Workflow
39+
40+
When user requests UI/UX work (design, build, create, implement, review, fix, improve), follow this workflow:
41+
42+
### Step 1: Analyze User Requirements
43+
44+
Extract key information from user request:
45+
- **Product type**: SaaS, e-commerce, portfolio, dashboard, landing page, etc.
46+
- **Style keywords**: minimal, playful, professional, elegant, dark mode, etc.
47+
- **Industry**: healthcare, fintech, gaming, education, etc.
48+
- **Stack**: React, Vue, Next.js, or default to `html-tailwind`
49+
50+
### Step 2: Search Relevant Domains
51+
52+
Use `search.py` multiple times to gather comprehensive information. Search until you have enough context.
53+
54+
```bash
55+
python3 .shared/ui-ux-pro-max/scripts/search.py "<keyword>" --domain <domain> [-n <max_results>]
56+
```
57+
58+
**Recommended search order:**
59+
60+
1. **Product** - Get style recommendations for product type
61+
2. **Style** - Get detailed style guide (colors, effects, frameworks)
62+
3. **Typography** - Get font pairings with Google Fonts imports
63+
4. **Color** - Get color palette (Primary, Secondary, CTA, Background, Text, Border)
64+
5. **Landing** - Get page structure (if landing page)
65+
6. **Chart** - Get chart recommendations (if dashboard/analytics)
66+
7. **UX** - Get best practices and anti-patterns
67+
8. **Stack** - Get stack-specific guidelines (default: html-tailwind)
68+
69+
### Step 3: Stack Guidelines (Default: html-tailwind)
70+
71+
If user doesn't specify a stack, **default to `html-tailwind`**.
72+
73+
```bash
74+
python3 .shared/ui-ux-pro-max/scripts/search.py "<keyword>" --stack html-tailwind
75+
```
76+
77+
Available stacks: `html-tailwind`, `react`, `nextjs`, `vue`, `svelte`, `swiftui`, `react-native`, `flutter`
78+
79+
---
80+
81+
## Search Reference
82+
83+
### Available Domains
84+
85+
| Domain | Use For | Example Keywords |
86+
|--------|---------|------------------|
87+
| `product` | Product type recommendations | SaaS, e-commerce, portfolio, healthcare, beauty, service |
88+
| `style` | UI styles, colors, effects | glassmorphism, minimalism, dark mode, brutalism |
89+
| `typography` | Font pairings, Google Fonts | elegant, playful, professional, modern |
90+
| `color` | Color palettes by product type | saas, ecommerce, healthcare, beauty, fintech, service |
91+
| `landing` | Page structure, CTA strategies | hero, hero-centric, testimonial, pricing, social-proof |
92+
| `chart` | Chart types, library recommendations | trend, comparison, timeline, funnel, pie |
93+
| `ux` | Best practices, anti-patterns | animation, accessibility, z-index, loading |
94+
| `prompt` | AI prompts, CSS keywords | (style name) |
95+
96+
### Available Stacks
97+
98+
| Stack | Focus |
99+
|-------|-------|
100+
| `html-tailwind` | Tailwind utilities, responsive, a11y (DEFAULT) |
101+
| `react` | State, hooks, performance, patterns |
102+
| `nextjs` | SSR, routing, images, API routes |
103+
| `vue` | Composition API, Pinia, Vue Router |
104+
| `svelte` | Runes, stores, SvelteKit |
105+
| `swiftui` | Views, State, Navigation, Animation |
106+
| `react-native` | Components, Navigation, Lists |
107+
| `flutter` | Widgets, State, Layout, Theming |
108+
109+
---
110+
111+
## Example Workflow
112+
113+
**User request:** "Build a landing page for a skincare service"
114+
115+
**AI should:**
116+
117+
```bash
118+
# 1. Search product type
119+
python3 .shared/ui-ux-pro-max/scripts/search.py "beauty spa wellness service" --domain product
120+
121+
# 2. Search style (based on industry: beauty, elegant)
122+
python3 .shared/ui-ux-pro-max/scripts/search.py "elegant minimal soft" --domain style
123+
124+
# 3. Search typography
125+
python3 .shared/ui-ux-pro-max/scripts/search.py "elegant luxury" --domain typography
126+
127+
# 4. Search color palette
128+
python3 .shared/ui-ux-pro-max/scripts/search.py "beauty spa wellness" --domain color
129+
130+
# 5. Search landing page structure
131+
python3 .shared/ui-ux-pro-max/scripts/search.py "hero-centric social-proof" --domain landing
132+
133+
# 6. Search UX guidelines
134+
python3 .shared/ui-ux-pro-max/scripts/search.py "animation" --domain ux
135+
python3 .shared/ui-ux-pro-max/scripts/search.py "accessibility" --domain ux
136+
137+
# 7. Search stack guidelines (default: html-tailwind)
138+
python3 .shared/ui-ux-pro-max/scripts/search.py "layout responsive" --stack html-tailwind
139+
```
140+
141+
**Then:** Synthesize all search results and implement the design.
142+
143+
---
144+
145+
## Tips for Better Results
146+
147+
1. **Be specific with keywords** - "healthcare SaaS dashboard" > "app"
148+
2. **Search multiple times** - Different keywords reveal different insights
149+
3. **Combine domains** - Style + Typography + Color = Complete design system
150+
4. **Always check UX** - Search "animation", "z-index", "accessibility" for common issues
151+
5. **Use stack flag** - Get implementation-specific best practices
152+
6. **Iterate** - If first search doesn't match, try different keywords
153+
7. **Split Into Multiple Files** - For better maintainability:
154+
- Separate components into individual files (e.g., `Header.tsx`, `Footer.tsx`)
155+
- Extract reusable styles into dedicated files
156+
- Keep each file focused and under 200-300 lines
157+
158+
---
159+
160+
## Common Rules for Professional UI
161+
162+
These are frequently overlooked issues that make UI look unprofessional:
163+
164+
### Icons & Visual Elements
165+
166+
| Rule | Do | Don't |
167+
|------|----|----- |
168+
| **No emoji icons** | Use SVG icons (Heroicons, Lucide, Simple Icons) | Use emojis like 🎨 🚀 ⚙️ as UI icons |
169+
| **Stable hover states** | Use color/opacity transitions on hover | Use scale transforms that shift layout |
170+
| **Correct brand logos** | Research official SVG from Simple Icons | Guess or use incorrect logo paths |
171+
| **Consistent icon sizing** | Use fixed viewBox (24x24) with w-6 h-6 | Mix different icon sizes randomly |
172+
173+
### Interaction & Cursor
174+
175+
| Rule | Do | Don't |
176+
|------|----|----- |
177+
| **Cursor pointer** | Add `cursor-pointer` to all clickable/hoverable cards | Leave default cursor on interactive elements |
178+
| **Hover feedback** | Provide visual feedback (color, shadow, border) | No indication element is interactive |
179+
| **Smooth transitions** | Use `transition-colors duration-200` | Instant state changes or too slow (>500ms) |
180+
181+
### Light/Dark Mode Contrast
182+
183+
| Rule | Do | Don't |
184+
|------|----|----- |
185+
| **Glass card light mode** | Use `bg-white/80` or higher opacity | Use `bg-white/10` (too transparent) |
186+
| **Text contrast light** | Use `#0F172A` (slate-900) for text | Use `#94A3B8` (slate-400) for body text |
187+
| **Muted text light** | Use `#475569` (slate-600) minimum | Use gray-400 or lighter |
188+
| **Border visibility** | Use `border-gray-200` in light mode | Use `border-white/10` (invisible) |
189+
190+
### Layout & Spacing
191+
192+
| Rule | Do | Don't |
193+
|------|----|----- |
194+
| **Floating navbar** | Add `top-4 left-4 right-4` spacing | Stick navbar to `top-0 left-0 right-0` |
195+
| **Content padding** | Account for fixed navbar height | Let content hide behind fixed elements |
196+
| **Consistent max-width** | Use same `max-w-6xl` or `max-w-7xl` | Mix different container widths |
197+
198+
---
199+
200+
## Pre-Delivery Checklist
201+
202+
Before delivering UI code, verify these items:
203+
204+
### Visual Quality
205+
- [ ] No emojis used as icons (use SVG instead)
206+
- [ ] All icons from consistent icon set (Heroicons/Lucide)
207+
- [ ] Brand logos are correct (verified from Simple Icons)
208+
- [ ] Hover states don't cause layout shift
209+
- [ ] Use theme colors directly (bg-primary) not var() wrapper
210+
211+
### Interaction
212+
- [ ] All clickable elements have `cursor-pointer`
213+
- [ ] Hover states provide clear visual feedback
214+
- [ ] Transitions are smooth (150-300ms)
215+
- [ ] Focus states visible for keyboard navigation
216+
217+
### Light/Dark Mode
218+
- [ ] Light mode text has sufficient contrast (4.5:1 minimum)
219+
- [ ] Glass/transparent elements visible in light mode
220+
- [ ] Borders visible in both modes
221+
- [ ] Test both modes before delivery
222+
223+
### Layout
224+
- [ ] Floating elements have proper spacing from edges
225+
- [ ] No content hidden behind fixed navbars
226+
- [ ] Responsive at 320px, 768px, 1024px, 1440px
227+
- [ ] No horizontal scroll on mobile
228+
229+
### Accessibility
230+
- [ ] All images have alt text
231+
- [ ] Form inputs have labels
232+
- [ ] Color is not the only indicator
233+
- [ ] `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, SciChart,Real-time + Pause
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)