feat(community-skills): add opencode-cli + feynman-cli + migrate 12 skills
Two new tool-operation skills with deep references/ docs: - opencode-cli: SKILL.md + 6 references covering rules, agents, models, commands, formatters, permissions, skills, MCP, plugins, custom tools, LSP, themes, keybinds, server API, SDK, GitHub Actions, IDE, network, troubleshooting (full opencode.ai/docs surface) - feynman-cli: SKILL.md + 6 references covering install, setup, config, CLI, REPL slash commands, agents/tools/packages, and full pi-subagents custom-agent spec (verified against the working install) Migrate 12 skills from ~/.claude/skills into _shared/community-skills/: - clean copy: intel-briefing, vercel-react-best-practices, ui-ux-pro-max - core-only: notebooklm (data/images stripped — 184M to 224K) - light sanitize: anythingllm-manager (gitea URL), foia-tool (DB password), jira (atlassian instance + email), librarian (paths), obsidian-tasks (vault path + email-in-cred-path) - branding sanitize: marketing-strategist + pentest-reporter (Proudsec variants normalized to <COMPANY>) - secrets sanitize: waha-whatsapp (IP, API key, vault path placeholders) Skipped per user: proudguard-api (kept locally only). build.py: - DEFAULT_SKILL_PERSONA_MAP: 14 new entries - NAME_PATTERNS: opencode + jira to coding-tools; notebooklm + feynman- to ai-llm-dev; waha- to osint-intel Community-skills index: 703 -> 716 (+13). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
25
build.py
25
build.py
@@ -349,6 +349,25 @@ DEFAULT_SKILL_PERSONA_MAP = {
|
||||
# Infrastructure skills → personas
|
||||
"docker-essentials": ["architect"],
|
||||
"session-logs": ["architect"],
|
||||
# Agent tooling / dev-environment skills → personas
|
||||
"opencode-cli": ["forge", "architect"],
|
||||
"feynman-cli": ["scholar", "forge", "oracle"],
|
||||
"anythingllm-manager": ["architect", "forge"],
|
||||
"jira": ["architect", "forge"],
|
||||
"obsidian-tasks": ["architect", "scribe"],
|
||||
"vercel-react-best-practices": ["forge"],
|
||||
"ui-ux-pro-max": ["forge"],
|
||||
# Document / archival → personas
|
||||
"foia-tool": ["scribe", "scholar"],
|
||||
"librarian": ["scribe", "scholar"],
|
||||
"notebooklm": ["scholar", "oracle", "scribe"],
|
||||
# Intelligence / strategic analysis → personas
|
||||
"intel-briefing": ["frodo", "oracle", "sentinel"],
|
||||
"waha-whatsapp": ["oracle", "frodo"],
|
||||
# Reporting / pentest workflow → personas
|
||||
"pentest-reporter": ["neo", "phantom", "bastion"],
|
||||
# Marketing / business → personas
|
||||
"marketing-strategist": ["herald", "ledger"],
|
||||
# Document processing → personas
|
||||
"image-ocr": ["oracle", "scribe"],
|
||||
"mistral-ocr": ["oracle", "scribe"],
|
||||
@@ -1472,12 +1491,12 @@ def _classify_skill_topic(name: str, fm: dict) -> str:
|
||||
("ops-sysadmin", r"^(session-log|session-search|preview|watch|jobs|contributing)$"),
|
||||
("coding-frontend", r"^(react|nextjs|next-|angular|vue-|svelte|tailwind|shadcn|vercel|expo|remotion|frontend|ui-ux|accessibility|canvas-|stitch|framer)"),
|
||||
("coding-backend", r"^(python|java-|csharp|dotnet|aspnet|kotlin|swift|rust-|golang|go-|ruby-|php-|nodejs|node-|bash-|cli-|bazel|async-|architecting-|aspire-)"),
|
||||
("coding-tools", r"^(commit|changelog|debug-|refactor|test-driven|tdd|bdd|git-|github-|gitlab-|bats|copilot|codeql|code-review|linting|formatting|add-|adr-|agent-browser|mcp-)"),
|
||||
("ai-llm-dev", r"^(ai-|agentic|claude-|mcp|openai|anthropic|llm|rag-|embedding|fine-tun|prompt|anythingllm|olla|huggingface|elevenlabs|crawl-for-ai|agent-tools|agent-ui|agent-governance|para-memory|knowledge-hub)"),
|
||||
("coding-tools", r"^(commit|changelog|debug-|refactor|test-driven|tdd|bdd|git-|github-|gitlab-|bats|copilot|codeql|code-review|linting|formatting|add-|adr-|agent-browser|mcp-|opencode|jira)"),
|
||||
("ai-llm-dev", r"^(ai-|agentic|claude-|mcp|openai|anthropic|llm|rag-|embedding|fine-tun|prompt|anythingllm|olla|notebooklm|feynman-|huggingface|elevenlabs|crawl-for-ai|agent-tools|agent-ui|agent-governance|para-memory|knowledge-hub)"),
|
||||
("cloud-infra", r"^(aws|azure|gcp|kubernetes|docker|terraform|cloudflare|vercel|netlify|supabase|firebase|k8s|iac|devops|cicd|ansible|helm|bigquery|airflow|az-)"),
|
||||
("database", r"^(sql-|postgres|mysql|mongodb|redis)"),
|
||||
("browser-scrape", r"^(browser|playwright|puppeteer|firecrawl|stealth|scrape|crawl|use-my-browser)"),
|
||||
("osint-intel", r"^(osint|recon|intel-|foia|seithar|deep-scraper|stealth-browser|social-trust|news-crawler|proudguard|gov-cyber|tavily|session-logs|youtube-transcript)"),
|
||||
("osint-intel", r"^(osint|recon|intel-|foia|seithar|deep-scraper|stealth-browser|social-trust|news-crawler|proudguard|gov-cyber|tavily|session-logs|youtube-transcript|waha-)"),
|
||||
("marketing-content", r"^(copywriting|content-|seo-|blog-|article-|marketing-|ad-(creative|campaign)|brand-|banner|churn|billing|gtm-|competitive|backlink|boost|twitter|ai-social|ai-marketing|ai-content|ai-podcast|ai-music|ai-avatar|ai-automation|ai-image|ai-video|impeccable)"),
|
||||
("ops-sysadmin", r"^(healthcheck|sysadmin|dns-networking|network-|nmap-|pcap-|tmux|freshrss|obsidian-|librarian|pdf-|image-ocr|mistral-ocr|analyze|weather|node-connect|clawflow|skill-creator|devops-engineer)"),
|
||||
("business-pm", r"^(ceo-|cfo-|product-manager|marketing-strategist|marketing-psychology|qa-testing|design-md|persona-customer|product-|gtm-|arize|dataverse|power-|microsoft-)"),
|
||||
|
||||
115
personas/_shared/community-skills/anythingllm-manager/SKILL.md
Normal file
115
personas/_shared/community-skills/anythingllm-manager/SKILL.md
Normal file
@@ -0,0 +1,115 @@
|
||||
---
|
||||
name: anythingllm-manager
|
||||
description: Manage AnythingLLM persona workspaces, document uploads, vector re-embedding, and recovery. Use when the user mentions AnythingLLM, persona workspaces, vector DB recovery, document embedding, RAG workspace management, or needs to re-assign documents to persona workspaces.
|
||||
---
|
||||
|
||||
# AnythingLLM Persona Manager
|
||||
|
||||
## Overview
|
||||
|
||||
Manages a 29-persona RAG system in AnythingLLM Desktop with workspace creation, document upload/OCR, and vector embedding assignment via the AnythingLLM REST API. Library: 39,754 files (67 GB) across 88 mapped paths.
|
||||
|
||||
## Architecture
|
||||
|
||||
- **AnythingLLM API:** `http://localhost:3001/api/v1`
|
||||
- **API Key:** `SXQGXH3-AQ64B8E-KQNMDWC-WZBQAFW`
|
||||
- **Integration scripts:** `~/.config/anythingllm-desktop/integration/`
|
||||
- **Config:** `~/.config/anythingllm-desktop/integration/config.yaml`
|
||||
- **Progress tracker:** `~/.config/anythingllm-desktop/integration/upload_progress.json`
|
||||
- **Book library:** `/mnt/storage/Common/Books/` (39,754 files, 67 GB)
|
||||
- **Vector DB:** LanceDB at `~/.config/anythingllm-desktop/storage/lancedb/`
|
||||
- **Git repo:** `https://<your-gitea-host>/<user>/anything-llm-rag.git`
|
||||
|
||||
## 5 Persona Clusters (29 total)
|
||||
|
||||
| Cluster | Personas |
|
||||
|---------|----------|
|
||||
| intel | frodo, echo, ghost, oracle, wraith, scribe, polyglot |
|
||||
| cyber | neo, bastion, sentinel, specter, phantom, cipher, vortex |
|
||||
| military | marshal, centurion, corsair, warden, medic |
|
||||
| humanities | chronos, tribune, arbiter, ledger, sage, herald, scholar, gambit |
|
||||
| engineering | forge, architect |
|
||||
|
||||
## Common Operations
|
||||
|
||||
### Check Status
|
||||
```bash
|
||||
cd ~/.config/anythingllm-desktop/integration
|
||||
python3 setup.py --status
|
||||
```
|
||||
|
||||
### Create/Update Workspaces with Persona Prompts
|
||||
```bash
|
||||
python3 setup.py --create-workspaces
|
||||
python3 setup.py --create-workspaces --persona frodo
|
||||
```
|
||||
|
||||
### Full Upload Pipeline (upload + OCR + embed)
|
||||
```bash
|
||||
python3 setup.py --upload-documents --resume
|
||||
python3 setup.py --upload-documents --cluster cyber --resume
|
||||
python3 setup.py --upload-documents --persona neo --priority 1 --resume
|
||||
```
|
||||
|
||||
### Re-assign (fast vector recovery — no disk scan)
|
||||
```bash
|
||||
# Preview
|
||||
python3 setup.py --reassign --reset --dry-run
|
||||
|
||||
# Reset + re-embed all workspaces
|
||||
python3 setup.py --reassign --reset
|
||||
|
||||
# Single persona or cluster
|
||||
python3 setup.py --reassign --reset --persona frodo
|
||||
python3 setup.py --reassign --reset --cluster intel
|
||||
|
||||
# Only fill missing assignments (no reset)
|
||||
python3 setup.py --reassign
|
||||
```
|
||||
|
||||
### Dry Run (preview without changes)
|
||||
```bash
|
||||
python3 setup.py --upload-documents --dry-run
|
||||
```
|
||||
|
||||
## Recovery Procedures
|
||||
|
||||
### Vector DB Deleted (documents still imported)
|
||||
```bash
|
||||
python3 setup.py --reassign --reset
|
||||
```
|
||||
|
||||
### Single Persona Vector Recovery
|
||||
```bash
|
||||
python3 setup.py --reassign --reset --persona frodo
|
||||
```
|
||||
|
||||
### Full Reset (everything from scratch)
|
||||
```bash
|
||||
rm upload_progress.json
|
||||
python3 setup.py --all
|
||||
```
|
||||
|
||||
## API Quick Reference
|
||||
|
||||
Check API health:
|
||||
```bash
|
||||
curl -s http://localhost:3001/api/v1/auth -H "Authorization: Bearer SXQGXH3-AQ64B8E-KQNMDWC-WZBQAFW"
|
||||
```
|
||||
|
||||
List workspaces:
|
||||
```bash
|
||||
curl -s http://localhost:3001/api/v1/workspaces -H "Authorization: Bearer SXQGXH3-AQ64B8E-KQNMDWC-WZBQAFW"
|
||||
```
|
||||
|
||||
## Important Notes
|
||||
|
||||
- Library: 39,754 files, 67 GB, 88 mapped paths, 0 unmapped content folders
|
||||
- Batch processing: 50 files/batch, 5s delay to avoid rate limits
|
||||
- OCR: ocrmypdf with Turkish+English support
|
||||
- `direct-uploads/` symlinked to `/mnt/storage/anythingllm/direct-uploads/` (SSD savings)
|
||||
- Embedding: Google Gemini (`gemini-embedding-001`)
|
||||
- LLM: Ollama local (`qwen3:14b`)
|
||||
- `--reassign` skips disk scan — uses upload_progress.json directly for fast recovery
|
||||
- `--resume` continues interrupted upload operations
|
||||
- Skipped extensions: .bin .gz .zip .html .php .jpg .pptx .ppt .doc .json .log .py .djvu .mobi .azw3
|
||||
504
personas/_shared/community-skills/feynman-cli/SKILL.md
Normal file
504
personas/_shared/community-skills/feynman-cli/SKILL.md
Normal file
@@ -0,0 +1,504 @@
|
||||
---
|
||||
name: feynman-cli
|
||||
description: Install, configure, and operate the Feynman research-assistant CLI by Companion, Inc. Covers one-line installer, npm install, Windows PowerShell, feynman setup wizard, provider auth (Anthropic/OpenAI/Bedrock/Gemini/local Ollama+LM Studio+LiteLLM), ~/.feynman/settings.json, model selection + per-subagent overrides, thinking levels, env vars (FEYNMAN_MODEL/FEYNMAN_HOME/FEYNMAN_THINKING/TAVILY_API_KEY/SERPER_API_KEY), feynman doctor, every CLI subcommand and flag, REPL slash commands (/deepresearch /lit /review /audit /replicate /compare /draft /autoresearch /watch /log /jobs /init /outputs /search /preview /feynman-model /help), the four built-in agents (researcher/reviewer/writer/verifier), the four tools (alphaxiv/web-search/session-search/preview), 11 core packages + generative-ui, and version pinning + update + uninstall. Use when the user asks to install Feynman, run feynman setup, change the default model, authenticate alphaXiv, configure web search routing, troubleshoot Pi runtime, run a one-shot prompt, schedule a /watch, or any feynman.is question.
|
||||
license: MIT
|
||||
compatibility: claude-code, opencode
|
||||
metadata:
|
||||
audience: researchers, scientists, engineers
|
||||
source: https://www.feynman.is/docs
|
||||
vendor: Companion, Inc.
|
||||
---
|
||||
|
||||
# Feynman CLI — Install, Configure, Operate
|
||||
|
||||
Reference for **using** the Feynman research CLI. This skill covers the tool
|
||||
itself; the nine research **workflows** (`/deepresearch`, `/lit`, `/review`,
|
||||
`/audit`, `/replicate`, `/compare`, `/draft`, `/autoresearch`, `/watch`) each
|
||||
have their own dedicated skill in this repo's `feynman-skills/` set — see the
|
||||
"Workflows index" below.
|
||||
|
||||
> Skill spec: `name` matches `^[a-z0-9]+(-[a-z0-9]+)*$` (≤64). `description`
|
||||
> ≤1024.
|
||||
|
||||
## References (load on demand)
|
||||
|
||||
- `references/installation-setup.md` — every install path, prerequisites, post-install, doctor, update/uninstall, version pinning
|
||||
- `references/configuration.md` — real `~/.feynman/` layout (verified from working install), `agent/settings.json`, env vars, thinking levels, session dirs, web-search routing
|
||||
- `references/cli-reference.md` — every `feynman <subcommand>` with flags + examples
|
||||
- `references/repl-and-slash.md` — REPL behavior, slash commands, file-ref + shell expansion
|
||||
- `references/agents-tools-packages.md` — 4 built-in agents, 4 tools (alphaxiv/web-search/session-search/preview), 11 core + 1 optional package
|
||||
- `references/custom-agents.md` — full pi-subagents agent frontmatter spec, scope priority (builtin < user < project), `agentOverrides` in `settings.json`, prompt-assembly modes, MCP tool selection
|
||||
|
||||
## What is it
|
||||
|
||||
Feynman is an AI research-assistant CLI by **Companion, Inc.** It dispatches
|
||||
specialized subagents (researcher, reviewer, writer, verifier) to run
|
||||
deep-research, literature review, peer review, code audit, replication,
|
||||
source comparison, draft writing, and autonomous research workflows. The
|
||||
runtime is built on the Pi package stack (`pi-subagents`, `pi-docparser`,
|
||||
`pi-web-access`, `pi-markdown-preview`, `pi-charts`, `pi-zotero`,
|
||||
`pi-schedule-prompt`, etc.).
|
||||
|
||||
GitHub: not directly linked; vendor site: <https://feynman.is>.
|
||||
|
||||
## Install (cheatsheet)
|
||||
|
||||
```bash
|
||||
# macOS / Linux — recommended
|
||||
curl -fsSL https://feynman.is/install | bash
|
||||
|
||||
# Pin a specific version
|
||||
curl -fsSL https://feynman.is/install | bash -s -- 0.2.39
|
||||
|
||||
# Skills only (no runtime)
|
||||
curl -fsSL https://feynman.is/install-skills | bash
|
||||
|
||||
# Windows PowerShell (as Administrator)
|
||||
irm https://feynman.is/install.ps1 | iex
|
||||
|
||||
# npm (cross-platform; needs Node ≥20.19.0 <25)
|
||||
npm install -g @companion-ai/feynman
|
||||
```
|
||||
|
||||
Install locations:
|
||||
|
||||
| Layer | macOS / Linux | Windows |
|
||||
| ---------------- | -------------------------------- | ------------------------------------ |
|
||||
| Launcher binary | `~/.local/bin/feynman` | `%LOCALAPPDATA%\Programs\feynman\` |
|
||||
| Runtime | `~/.local/share/feynman` | `%LOCALAPPDATA%\Programs\feynman\` |
|
||||
| Config / sessions| `~/.feynman/` | `~/.feynman/` |
|
||||
| Auth state | `~/.ahub/` | `~/.ahub/` |
|
||||
|
||||
Post-install:
|
||||
|
||||
```bash
|
||||
feynman setup # guided wizard: model, auth, optional packages
|
||||
feynman --version
|
||||
feynman doctor # validates config, auth, Pi runtime, preview deps
|
||||
feynman status # one-line summary (model + auth + packages)
|
||||
```
|
||||
|
||||
Update:
|
||||
|
||||
```bash
|
||||
# Standalone — rerun installer
|
||||
curl -fsSL https://feynman.is/install | bash
|
||||
# npm
|
||||
npm install -g @companion-ai/feynman@latest
|
||||
# Single package
|
||||
feynman update <package-name>
|
||||
```
|
||||
|
||||
Uninstall (npm): `npm uninstall -g @companion-ai/feynman`. Standalone: remove
|
||||
`~/.local/bin/feynman` + `~/.local/share/feynman` + `~/.feynman` + `~/.ahub`.
|
||||
|
||||
## Provider auth
|
||||
|
||||
`feynman setup` walks you through provider auth. After install you can
|
||||
manage providers individually:
|
||||
|
||||
```bash
|
||||
feynman model login anthropic # OAuth ("Pi") flow → ~/.feynman/auth/
|
||||
feynman model login openai # OAuth or API key
|
||||
feynman model login google # Gemini
|
||||
feynman model login amazon-bedrock # uses AWS credential chain
|
||||
feynman model logout <id>
|
||||
feynman model list # all configured models
|
||||
feynman model set anthropic/claude-opus-4-20250514
|
||||
```
|
||||
|
||||
Local providers (Ollama, LM Studio, LiteLLM, vLLM): pick "Custom provider
|
||||
(baseUrl + API key)" in `feynman setup` and supply a base URL like
|
||||
`http://localhost:11434/v1`. LM Studio default `http://localhost:1234/v1`,
|
||||
LiteLLM `http://localhost:4000/v1`.
|
||||
|
||||
API keys also accepted via env (provider-config-files override env):
|
||||
|
||||
```
|
||||
ANTHROPIC_API_KEY OPENAI_API_KEY GEMINI_API_KEY AWS_PROFILE
|
||||
TAVILY_API_KEY SERPER_API_KEY
|
||||
```
|
||||
|
||||
## REPL launch + one-shot
|
||||
|
||||
```bash
|
||||
feynman # interactive REPL (in cwd)
|
||||
feynman --cwd ~/papers # REPL scoped to a directory
|
||||
feynman --new-session # fresh session
|
||||
feynman --session-dir ~/proj/.fey # custom session storage
|
||||
|
||||
feynman --prompt "Summarize Attention Is All You Need" # one-shot
|
||||
feynman deepresearch "transformer architectures for protein folding"
|
||||
feynman lit "agentic LLM benchmarks"
|
||||
feynman review draft.md
|
||||
feynman audit 2401.12345
|
||||
feynman replicate "scaling-law claim"
|
||||
feynman compare "post-training vs RLHF"
|
||||
feynman draft "literature notes on mechanistic interpretability"
|
||||
```
|
||||
|
||||
Override per call: `--model anthropic/claude-sonnet-4-20250514`,
|
||||
`--thinking high` (`off|minimal|low|medium|high|xhigh`).
|
||||
|
||||
## Slash commands (REPL)
|
||||
|
||||
Research workflows:
|
||||
|
||||
| Command | Purpose |
|
||||
| ----------------- | ----------------------------------------------------------- |
|
||||
| `/deepresearch` | Source-heavy multi-agent investigation → research brief |
|
||||
| `/lit` | Structured literature review (consensus / disagreement) |
|
||||
| `/review` | Peer-review of an artifact with severity-graded feedback |
|
||||
| `/audit` | Compare a paper's claims against its public code |
|
||||
| `/replicate` | Plan or execute a replication for a paper / claim / benchmark |
|
||||
| `/compare` | Agreement / disagreement matrix across multiple sources |
|
||||
| `/draft` | Paper-style draft from research findings |
|
||||
| `/autoresearch` | Autonomous experiment loop optimizing toward a goal |
|
||||
| `/watch` | Recurring monitoring on a topic |
|
||||
|
||||
Project / session:
|
||||
|
||||
| Command | Purpose |
|
||||
| ----------------- | -------------------------------------------------------- |
|
||||
| `/help` | Grouped command list |
|
||||
| `/init` | Bootstrap `AGENTS.md` + session-log folders for a project|
|
||||
| `/log` | Durable session log: work done / findings / next steps |
|
||||
| `/jobs` | Active background work (running / scheduled / watches) |
|
||||
| `/outputs` | Browse research artifacts |
|
||||
| `/search` | Search prior session transcripts (semantic + keyword) |
|
||||
| `/preview` | Render artifact as HTML or PDF |
|
||||
| `/feynman-model` | Open the model picker (default + per-subagent overrides) |
|
||||
|
||||
Body templating in REPL: `@<path>` to inject file content, `!<shell>` to run
|
||||
a shell snippet inline.
|
||||
|
||||
## Built-in agents
|
||||
|
||||
| Agent | Role | Invoked by |
|
||||
| ----------- | --------------------------------------------- | --------------------------------------------------------- |
|
||||
| `researcher`| Search / read / extract / organize sources | `/deepresearch`, `/lit`, `/review`, `/audit`, `/replicate`, `/compare`, `/draft` |
|
||||
| `reviewer` | Peer-review with Critical/Major/Minor/Nits | `/review`, `/audit`, `/compare` |
|
||||
| `writer` | Synthesize notes → brief, lit-review, paper, report | `/deepresearch`, `/lit`, `/draft`, `/compare` |
|
||||
| `verifier` | Citation/URL/code verification | `/deepresearch`, `/audit`, `/replicate` |
|
||||
|
||||
Override a model per agent: `/feynman-model` in REPL. Persists to
|
||||
`~/.feynman/agent/agents/<name>.md` as a `model:` frontmatter field.
|
||||
|
||||
## Built-in tools
|
||||
|
||||
| Tool | Purpose |
|
||||
| ---------------- | ---------------------------------------------------------- |
|
||||
| `alphaxiv` | Academic search; arXiv ID lookup; PDF fetch + section extract; Q&A |
|
||||
| `web-search` | Routes between auto/Perplexity/Gemini per `~/.feynman/web-search.json` |
|
||||
| `session-search` | Indexed semantic + keyword recall over `~/.feynman/sessions/` |
|
||||
| `preview` | Render artifact via pandoc → HTML/PDF (KaTeX, code highlighting) |
|
||||
|
||||
AlphaXiv auth: `feynman alpha login` / `feynman alpha status` /
|
||||
`feynman alpha logout`. Without it Feynman falls back to general web search
|
||||
and loses citation metadata.
|
||||
|
||||
Web search backends:
|
||||
- **auto** (default) — Gemini-grounded via Chromium profile (zero-config on
|
||||
macOS/Linux), falls back to Perplexity when configured
|
||||
- **perplexity** — forces Perplexity Sonar (needs `perplexityApiKey`)
|
||||
- **gemini** — forces Gemini grounding
|
||||
|
||||
Configure via `~/.feynman/web-search.json`:
|
||||
```json
|
||||
{ "route": "auto", "perplexityApiKey": "{env:PERPLEXITY_KEY}", "geminiApiKey": "{env:GEMINI_API_KEY}" }
|
||||
```
|
||||
|
||||
Preview deps: `feynman setup preview` installs pandoc (Homebrew on macOS,
|
||||
package manager on Linux). Verify with `feynman doctor`.
|
||||
|
||||
## Packages (11 core + 1 optional)
|
||||
|
||||
Core (auto-installed):
|
||||
`pi-subagents`, `pi-docparser`, `pi-web-access`, `pi-markdown-preview`,
|
||||
`pi-mermaid`, `@walterra/pi-charts`, `pi-zotero`,
|
||||
`@kaiserlich-dev/pi-session-search`, `pi-schedule-prompt`, plus background-task
|
||||
+ memory-persistence + long-running-loop helpers.
|
||||
|
||||
Optional:
|
||||
- `generative-ui` — interactive HTML widgets (macOS only)
|
||||
|
||||
Manage:
|
||||
```bash
|
||||
feynman packages list
|
||||
feynman packages install generative-ui
|
||||
feynman update # all
|
||||
feynman update pi-docparser # one
|
||||
```
|
||||
|
||||
`generative-ui` is hidden from `feynman packages list` on Linux/Windows.
|
||||
|
||||
## Configuration locations (verified from working install)
|
||||
|
||||
| Path | Purpose |
|
||||
| ------------------------------------- | -------------------------------------------------- |
|
||||
| `~/.feynman/agent/settings.json` | core config (model, provider, packages, theme) |
|
||||
| `~/.feynman/agent/auth.json` | OAuth tokens + API keys |
|
||||
| `~/.feynman/agent/agents/<name>.md` | builtin + custom agent prompts (markdown + frontmatter) |
|
||||
| `~/.feynman/agent/skills/<name>/` | installed skills (deep-research, lit-review, …) |
|
||||
| `~/.feynman/agent/themes/<theme>.json`| color themes (bundled `feynman.json`) |
|
||||
| `~/.feynman/agent/bin/` | bundled binaries (`fd`, `rg`) |
|
||||
| `~/.feynman/agent/run-history.jsonl` | append-only run log |
|
||||
| `~/.feynman/sessions/` | persisted REPL sessions |
|
||||
| `~/.feynman/memory/` | long-term memory store (`pi-memory` package) |
|
||||
| `~/.feynman/web-search.json` | search-backend routing |
|
||||
| `~/.feynman/.state/` | runtime state |
|
||||
| `~/.feynman/npm-global/` | sandboxed npm prefix for Pi packages |
|
||||
| `~/.ahub/` | Pi auth-hub state (separate from feynman/agent) |
|
||||
|
||||
> **Heads-up:** the public docs site shows simpler paths like
|
||||
> `~/.feynman/settings.json`. The real layout (above) prefixes most things
|
||||
> with `agent/` because Feynman wraps the Pi runtime. When in doubt, trust
|
||||
> what `feynman doctor` reports.
|
||||
|
||||
`agent/settings.json` real shape (taken from a working install):
|
||||
```json
|
||||
{
|
||||
"packages": [
|
||||
"npm:@companion-ai/alpha-hub",
|
||||
"npm:pi-subagents",
|
||||
"npm:pi-btw",
|
||||
"npm:pi-docparser",
|
||||
"npm:pi-web-access",
|
||||
"npm:pi-markdown-preview",
|
||||
"npm:@walterra/pi-charts",
|
||||
"npm:pi-mermaid",
|
||||
"npm:@aliou/pi-processes",
|
||||
"npm:pi-zotero",
|
||||
"npm:@kaiserlich-dev/pi-session-search",
|
||||
"npm:pi-schedule-prompt",
|
||||
"npm:@samfp/pi-memory",
|
||||
"npm:@tmustier/pi-ralph-wiggum"
|
||||
],
|
||||
"quietStartup": true,
|
||||
"collapseChangelog": true,
|
||||
"defaultThinkingLevel": "medium",
|
||||
"editorPaddingX": 1,
|
||||
"theme": "feynman",
|
||||
"defaultProvider": "github-copilot",
|
||||
"defaultModel": "gpt-5.3-codex",
|
||||
"lastChangelogVersion": "0.67.6"
|
||||
}
|
||||
```
|
||||
|
||||
> Documented `defaultProvider`/`defaultModel`/`defaultThinkingLevel` are real;
|
||||
> the rest (`packages`, `theme`, `quietStartup`, etc.) are what an actual
|
||||
> install writes. Edit by hand or rerun `feynman setup`.
|
||||
|
||||
## Custom agents (the right way)
|
||||
|
||||
Feynman runs on the **pi-subagents** runtime — same agent format as Pi. There
|
||||
are three scopes; later layers override earlier ones:
|
||||
|
||||
| Scope | Path | Priority |
|
||||
| -------- | ----------------------------------------------- | -------- |
|
||||
| Builtin | bundled inside the npm package's `agents/` | lowest |
|
||||
| User | `~/.feynman/agent/agents/<name>.md` | medium |
|
||||
| Project | `.feynman/agents/<name>.md` (walks up tree) | highest |
|
||||
|
||||
The four bundled-by-Feynman agents (`researcher`, `reviewer`, `writer`,
|
||||
`verifier`) ship as full files in `~/.feynman/agent/agents/` — edit them
|
||||
in-place to customize, or copy to `.feynman/agents/<name>.md` to scope the
|
||||
change to one project.
|
||||
|
||||
Minimal custom agent (`~/.feynman/agent/agents/security-auditor.md`):
|
||||
|
||||
```yaml
|
||||
---
|
||||
name: security-auditor
|
||||
description: Audit code for OWASP Top 10 + secret leaks; FATAL/MAJOR/MINOR rubric.
|
||||
thinking: high
|
||||
tools: read, grep, find, ls, bash, web_search, fetch_content
|
||||
output: audit.md
|
||||
defaultProgress: true
|
||||
inheritProjectContext: false # specialist — don't bias with repo conventions
|
||||
inheritSkills: false
|
||||
systemPromptMode: replace
|
||||
---
|
||||
|
||||
You are an adversarial security auditor. Find vulnerabilities; do not
|
||||
fix them. Output sections: ## Critical, ## High, ## Medium, ## Low,
|
||||
## Out-of-scope. Quote exact line ranges. Refuse to speculate when a
|
||||
file isn't in scope.
|
||||
```
|
||||
|
||||
Then dispatch from REPL: `/run security-auditor "audit src/auth/"`. Or chain:
|
||||
`/chain researcher "find recent CVEs in node-jsonwebtoken" -> security-auditor "check our usage"`.
|
||||
|
||||
**Override a builtin without copying it** — write into
|
||||
`agent/settings.json`:
|
||||
```json
|
||||
{
|
||||
"subagents": {
|
||||
"agentOverrides": {
|
||||
"reviewer": {
|
||||
"model": "anthropic/claude-opus-4-5",
|
||||
"thinking": "high",
|
||||
"inheritProjectContext": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
Override fields: `model`, `fallbackModels`, `thinking`, `systemPromptMode`,
|
||||
`inheritProjectContext`, `inheritSkills`, `disabled`, `skills`, `tools`,
|
||||
`systemPrompt`. Project scope (`.feynman/settings.json`) beats user scope.
|
||||
|
||||
Disable a builtin: `disabled: true` inside the override (still listed in
|
||||
`/agents` so you can re-enable). Disable all builtins:
|
||||
`subagents.disableBuiltins: true`.
|
||||
|
||||
Frontmatter cheat-sheet (full spec → `references/custom-agents.md`):
|
||||
|
||||
| Field | Purpose |
|
||||
| ---------------------- | ---------------------------------------------------- |
|
||||
| `name` | required, kebab-case |
|
||||
| `description` | required, agent-picker tooltip |
|
||||
| `tools` | comma list of builtin tools + `mcp:server[/tool]` |
|
||||
| `extensions` | absent=all, empty=none, csv=allowlist |
|
||||
| `model` | `provider/model-id` |
|
||||
| `fallbackModels` | csv ordered list of backups |
|
||||
| `thinking` | `off|minimal|low|medium|high|xhigh` |
|
||||
| `systemPromptMode` | `replace` (default) / `append` |
|
||||
| `inheritProjectContext`| custom default `false`; builtins default `true` |
|
||||
| `inheritSkills` | default `false` |
|
||||
| `skills` | csv of skill names to inject |
|
||||
| `output` | default artifact filename |
|
||||
| `defaultReads` | csv of files to auto-read |
|
||||
| `defaultProgress` | maintain `progress.md` |
|
||||
| `maxSubagentDepth` | nested-delegation limit for this agent's children |
|
||||
|
||||
Env vars override:
|
||||
|
||||
| Var | Effect |
|
||||
| ---------------------- | ------------------------------------- |
|
||||
| `FEYNMAN_MODEL` | Override default model for the run |
|
||||
| `FEYNMAN_HOME` | Override `~/.feynman` location |
|
||||
| `FEYNMAN_THINKING` | Override default thinking level |
|
||||
| `ANTHROPIC_API_KEY` | Anthropic auth |
|
||||
| `OPENAI_API_KEY` | OpenAI auth |
|
||||
| `GEMINI_API_KEY` | Google auth |
|
||||
| `AWS_PROFILE` | Bedrock profile selection |
|
||||
| `TAVILY_API_KEY` | Tavily web-search backend |
|
||||
| `SERPER_API_KEY` | Serper web-search backend |
|
||||
|
||||
## Workflows index (this repo)
|
||||
|
||||
The detailed how-to for each workflow lives in
|
||||
`personas/_shared/feynman-skills/`. This skill explains **the CLI**;
|
||||
those skills explain **the methodology**. Existing dedicated skills:
|
||||
|
||||
- `deep-research/SKILL.md`
|
||||
- `literature-review/SKILL.md`
|
||||
- `peer-review/SKILL.md`
|
||||
- `paper-code-audit/SKILL.md`
|
||||
- `replication/SKILL.md`
|
||||
- `source-comparison/SKILL.md`
|
||||
- `paper-writing/SKILL.md` — `/draft`
|
||||
- `autoresearch/SKILL.md`
|
||||
- `watch/SKILL.md`
|
||||
- `summarize/SKILL.md`, `eli5/SKILL.md`, `alpha-research/SKILL.md`,
|
||||
`paper-code-audit/SKILL.md`, `source-comparison/SKILL.md`,
|
||||
`session-log/SKILL.md`, `session-search/SKILL.md`, `preview/SKILL.md`,
|
||||
`jobs/SKILL.md`, `contributing/SKILL.md`, `docker/SKILL.md`,
|
||||
`modal-compute/SKILL.md`, `runpod-compute/SKILL.md`
|
||||
|
||||
Cross-platform note: `_platform-mapping.md` in `feynman-skills/` maps the
|
||||
four roles (researcher/reviewer/writer/verifier) to host-platform equivalents
|
||||
(Claude Code `Task` + persona subagent_types, OpenCode `task` + agent names)
|
||||
when these skills run **outside** Feynman itself.
|
||||
|
||||
## Quick recipes
|
||||
|
||||
**First-time setup on a fresh machine:**
|
||||
```bash
|
||||
curl -fsSL https://feynman.is/install | bash
|
||||
exec $SHELL # pick up ~/.local/bin
|
||||
feynman setup # interactive
|
||||
feynman alpha login # academic search
|
||||
feynman setup preview # pandoc for /preview
|
||||
feynman doctor # confirm everything green
|
||||
```
|
||||
|
||||
**Run a one-shot deep-research and save the brief:**
|
||||
```bash
|
||||
feynman --cwd ~/research --prompt "/deepresearch agentic memory persistence patterns 2024-2026"
|
||||
ls ~/research/outputs/
|
||||
```
|
||||
|
||||
**Schedule a recurring watch from REPL:**
|
||||
```
|
||||
feynman
|
||||
> /watch agentic-memory weekly
|
||||
> /jobs
|
||||
```
|
||||
|
||||
**Lock everyone on the team to one provider:**
|
||||
```json
|
||||
// ~/.feynman/settings.json (committed in your team's dotfiles repo)
|
||||
{
|
||||
"defaultProvider": "anthropic",
|
||||
"defaultModel": "claude-sonnet-4-20250514",
|
||||
"defaultThinkingLevel": "high"
|
||||
}
|
||||
```
|
||||
Plus deny other providers via `feynman model logout <id>` per machine.
|
||||
|
||||
**Use a self-hosted local model (vLLM):**
|
||||
```bash
|
||||
feynman setup
|
||||
# Choose: Custom provider (baseUrl + API key)
|
||||
# baseURL: http://gpu-host:8000/v1
|
||||
# api key: any non-empty string
|
||||
# model id: <whatever vLLM serves>
|
||||
```
|
||||
|
||||
**CI / scripted invocation (one-shot, no auth prompts):**
|
||||
```bash
|
||||
ANTHROPIC_API_KEY=$KEY \
|
||||
FEYNMAN_THINKING=low \
|
||||
feynman --prompt "Summarize $(cat README.md | head -200)" > brief.md
|
||||
```
|
||||
|
||||
## Pitfalls
|
||||
|
||||
- `~/.local/bin` may not be on `$PATH` after install — restart the shell or
|
||||
`export PATH="$HOME/.local/bin:$PATH"`.
|
||||
- `feynman setup` overwrites `settings.json`. Keep a backup if you've
|
||||
hand-edited it.
|
||||
- AlphaXiv-less mode silently degrades research quality. Always run
|
||||
`feynman alpha login` for serious work.
|
||||
- Web-search "auto" mode requires a logged-in Chromium profile on
|
||||
macOS/Linux for Gemini grounding — without one it errors instead of
|
||||
falling through to Perplexity unless `perplexityApiKey` is set.
|
||||
- `--thinking high` on cheap models (e.g. Haiku) can hit token limits before
|
||||
the run completes. Pair high thinking with high-context models.
|
||||
- `generative-ui` package is macOS-only; running `feynman packages install
|
||||
generative-ui` on Linux is a no-op (hidden from list).
|
||||
- `feynman doctor` reports OK even when the model is logged-out as long as
|
||||
the env var is set — env auth bypasses the auth-store check.
|
||||
- Per-subagent model overrides in `~/.feynman/agent/agents/*.md` shadow the
|
||||
global default for **just that role**; check with `/feynman-model` if a
|
||||
subagent suddenly costs more.
|
||||
- `--session-dir` doesn't migrate existing sessions; previous transcripts
|
||||
stay in the original location.
|
||||
- Pinning to a specific version with the bash installer is sticky — running
|
||||
the bare installer later will upgrade to latest. Re-pin to stay locked.
|
||||
- npm install needs Node `>=20.19.0 <25`; on Node 25+ you must use the
|
||||
standalone installer.
|
||||
|
||||
## Operational checklist
|
||||
|
||||
- [ ] Installer ran and `feynman --version` prints something
|
||||
- [ ] `feynman setup` completed (model picked, auth done)
|
||||
- [ ] `feynman alpha login` for academic workflows
|
||||
- [ ] `feynman setup preview` if you'll use `/preview`
|
||||
- [ ] `feynman doctor` reports all green
|
||||
- [ ] `~/.feynman/settings.json` reviewed (model, thinking level)
|
||||
- [ ] `~/.feynman/web-search.json` configured if not on macOS/Linux Chromium
|
||||
- [ ] Optional packages installed (`feynman packages list` to audit)
|
||||
- [ ] Sessions dir backed up if research is durable
|
||||
@@ -0,0 +1,143 @@
|
||||
# Built-in Agents, Tools, and Packages
|
||||
|
||||
## Built-in agents (Feynman bundle)
|
||||
|
||||
Feynman ships four primary research roles. Each lives as a full markdown
|
||||
file in `~/.feynman/agent/agents/<name>.md` — edit in place to customize, or
|
||||
override fields surgically via `agent/settings.json` →
|
||||
`subagents.agentOverrides.<name>`.
|
||||
|
||||
### researcher
|
||||
|
||||
Gathers primary evidence across papers, web sources, repos, and local files.
|
||||
The most-invoked agent.
|
||||
|
||||
- **Frontmatter (real):** `thinking: high`, default tools `read, write, edit, bash, grep, find, ls, web_search, fetch_content, get_search_content`, output `research.md`.
|
||||
- **Invoked by:** `/deepresearch`, `/lit`, `/review`, `/audit`, `/replicate`, `/compare`, `/draft`.
|
||||
- **Search strategy:** start wide (2–4 varied queries simultaneously via `web_search.queries`), evaluate, narrow. Cross-source `web_search` + `alpha`. Use `recencyFilter` for fast-moving topics, `includeContent: true` for top results.
|
||||
- **Output:** evidence table (numbered IDs, source / URL / claim / type / confidence), findings with inline `[1]`-style references, numbered Sources section, Coverage Status.
|
||||
|
||||
### reviewer
|
||||
|
||||
Acts as a skeptical-but-fair peer reviewer.
|
||||
|
||||
- **Frontmatter:** `thinking: high`, output `review.md`.
|
||||
- **Severity rubric:** FATAL (publication blocker), MAJOR (substantive flaw), MINOR (improvement), Nits (style).
|
||||
- **Examines:** claims-vs-evidence, methodology, baselines, ablations, reproducibility, related-work coverage, statistical strength, benchmark leakage.
|
||||
- **Output:** Structured Review (Summary / Strengths / Weaknesses / Questions / Verdict / Revision Plan) + Inline Annotations (quoted passages with `[W#]` references).
|
||||
- **Invoked by:** `/review`, `/audit`, `/compare`.
|
||||
|
||||
### writer
|
||||
|
||||
Synthesizes research findings into a structured artifact.
|
||||
|
||||
- **Frontmatter:** `thinking: medium`, default tools `read, bash, grep, find, ls, write, edit`, output `draft.md`.
|
||||
- **Output styles:** research brief, literature review, paper draft, comparison report, summary.
|
||||
- **Discipline:** writes only from supplied evidence, preserves caveats and disagreements, no inline citations (verifier handles that), no Sources section (verifier builds), no aesthetic laundering.
|
||||
- **Visuals:** `pi-charts` for data, Mermaid for diagrams (only when supported by evidence). Captions reference source data.
|
||||
- **Invoked by:** `/deepresearch`, `/lit`, `/draft`, `/compare`.
|
||||
|
||||
### verifier
|
||||
|
||||
Adds inline citations + verifies every URL.
|
||||
|
||||
- **Frontmatter:** `thinking: medium`, default tools `read, bash, grep, find, ls, write, edit, web_search, fetch_content, get_search_content`, output `cited.md`.
|
||||
- **Process:** anchor every factual claim → `[N]` citation, fetch every URL to confirm content, build merged Sources section, remove unsourced claims, audit numeric/figure provenance.
|
||||
- **Refuses:** "verified", "confirmed", "reproduced" without underlying evidence in research files.
|
||||
- **Invoked by:** `/deepresearch`, `/audit`, `/replicate`.
|
||||
|
||||
## Other pi-subagents agents (available via `/run`)
|
||||
|
||||
These ship in `pi-subagents` and are usable for non-research workflows. They
|
||||
load at lowest priority — overridable from `~/.feynman/agent/agents/`.
|
||||
|
||||
| Agent | Purpose |
|
||||
| ----------------- | ------------------------------------------------ |
|
||||
| `scout` | Fast codebase recon (read-grep-find heavy) |
|
||||
| `planner` | Make a step-by-step implementation plan |
|
||||
| `worker` | Execute against a plan |
|
||||
| `delegate` | Orchestrate child agents (`systemPromptMode: append`) |
|
||||
| `context-builder` | Build a focused context bundle for a task |
|
||||
|
||||
Use via pi-subagents commands: `/run planner "design X"`,
|
||||
`/chain scout "scan auth" -> planner -> worker`.
|
||||
|
||||
## Built-in tools
|
||||
|
||||
### alphaxiv
|
||||
|
||||
Primary academic search and retrieval.
|
||||
|
||||
- **Setup:** `feynman alpha login`, status `feynman alpha status`.
|
||||
- **Auth store:** `~/.feynman/agent/auth.json`.
|
||||
- **Capabilities:** topic / author / keyword search, arXiv ID lookup, PDF download + parsing, section extraction (abstract / methodology / results), paper Q&A, GitHub repo file inspection, persistent local annotations.
|
||||
- **Without auth:** falls back to web search; loses citation metadata, threads, full-text. Strongly recommend logging in for serious research.
|
||||
|
||||
### web-search
|
||||
|
||||
Routes between backends per `~/.feynman/web-search.json`.
|
||||
|
||||
- **Modes:** `auto` (Perplexity if configured else Gemini), `perplexity` (force Perplexity Sonar), `gemini` (force Gemini grounding).
|
||||
- **Default zero-config path:** Gemini grounding via signed-in Chromium profile (macOS / Linux Chrome).
|
||||
- **Features:** multi-query (`queries: [...]`), `domainFilter`, `recencyFilter`, `includeContent: true` for full-page fetch.
|
||||
- **Failure mode:** without Chromium profile and no `perplexityApiKey`, errors instead of degrading.
|
||||
|
||||
### session-search
|
||||
|
||||
Indexes prior session transcripts for recall.
|
||||
|
||||
- **Package:** `@kaiserlich-dev/pi-session-search` (core).
|
||||
- **Storage:** `~/.feynman/sessions/` (or `--session-dir <path>`).
|
||||
- **Invocation:** explicit `/search transformer scaling laws` or natural reference to past work — Feynman auto-triggers.
|
||||
- **Algorithm:** keyword + semantic similarity. Returns session IDs, timestamps, excerpts.
|
||||
- **Index:** incremental, fast even at hundreds of sessions.
|
||||
|
||||
### preview
|
||||
|
||||
Renders artifacts to HTML / PDF via pandoc + KaTeX.
|
||||
|
||||
- **Package:** `pi-markdown-preview` (core).
|
||||
- **Setup:** `feynman setup preview` (installs pandoc via Homebrew on macOS, package manager on Linux).
|
||||
- **REPL:** `/preview` (last artifact), `/preview outputs/foo.md` (specific).
|
||||
- **Formats:** Markdown → HTML/PDF (KaTeX `$…$` and `$$…$$`, syntax-highlighted code, tables, citations); HTML opens directly; PDF via pandoc + LaTeX.
|
||||
- **Verify:** `feynman doctor` reports preview-deps status.
|
||||
|
||||
## Packages (real install lists 14)
|
||||
|
||||
Loaded at startup per `agent/settings.json` → `packages` array. Default
|
||||
install includes:
|
||||
|
||||
| Package | Purpose |
|
||||
| ------------------------------------------------- | ---------------------------------------------- |
|
||||
| `npm:@companion-ai/alpha-hub` | AlphaXiv adapter |
|
||||
| `npm:pi-subagents` | Subagent orchestration (researcher/reviewer/…)|
|
||||
| `npm:pi-btw` | Inline aside / footnotes for outputs |
|
||||
| `npm:pi-docparser` | PDF / Office / image parsing |
|
||||
| `npm:pi-web-access` | Web fetch, browse, GitHub integration |
|
||||
| `npm:pi-markdown-preview` | HTML / PDF render |
|
||||
| `npm:@walterra/pi-charts` | Quantitative charts |
|
||||
| `npm:pi-mermaid` | Mermaid diagrams |
|
||||
| `npm:@aliou/pi-processes` | Background process management |
|
||||
| `npm:pi-zotero` | Zotero integration |
|
||||
| `npm:@kaiserlich-dev/pi-session-search` | Session search |
|
||||
| `npm:pi-schedule-prompt` | `/watch` cron-style scheduler |
|
||||
| `npm:@samfp/pi-memory` | Long-term memory |
|
||||
| `npm:@tmustier/pi-ralph-wiggum` | Long-running agent loop helper |
|
||||
|
||||
Optional preset:
|
||||
- `generative-ui` — interactive HTML widgets (macOS only). Hidden from
|
||||
`feynman packages list` on Linux/Windows.
|
||||
|
||||
Manage:
|
||||
```bash
|
||||
feynman packages list
|
||||
feynman packages install generative-ui
|
||||
feynman update # all packages
|
||||
feynman update pi-docparser # one package
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
- The four "official" agents (`researcher`, `reviewer`, `writer`, `verifier`) are bundled with Feynman, not with `pi-subagents`. The pi-subagents npm package contains `scout`, `planner`, `worker`, `delegate`, `context-builder`, plus its own `researcher` / `reviewer` (lower priority — overridden by Feynman's versions).
|
||||
- Custom agents take precedence over both layers — see `references/custom-agents.md`.
|
||||
- "Tools" in agent frontmatter are builtin tool names (`read`, `bash`, `web_search`, `fetch_content`, `get_search_content`). MCP server tools use `mcp:server-name` or `mcp:server/tool-name` and require `pi-mcp-adapter`.
|
||||
@@ -0,0 +1,147 @@
|
||||
# CLI Reference
|
||||
|
||||
## Core commands
|
||||
|
||||
| Command | Purpose |
|
||||
| -------------------------------- | -------------------------------------------------------- |
|
||||
| `feynman` | Launch interactive REPL in cwd |
|
||||
| `feynman chat [prompt]` | Start chat explicitly, optional initial prompt |
|
||||
| `feynman --prompt "<text>"` | One-shot prompt: print response, exit |
|
||||
| `feynman help` | Show CLI help |
|
||||
| `feynman setup` | Guided setup wizard (model, auth, packages) |
|
||||
| `feynman setup preview` | Install / verify pandoc for `/preview` |
|
||||
| `feynman doctor` | Diagnose config, auth, Pi runtime, preview deps |
|
||||
| `feynman status` | Current setup summary (model + auth + packages) |
|
||||
| `feynman --version` | Print version |
|
||||
|
||||
## Model management
|
||||
|
||||
```bash
|
||||
feynman model list # list every reachable model
|
||||
feynman model login <provider> # OAuth or API key
|
||||
feynman model logout <provider> # clear stored auth
|
||||
feynman model set <provider/model-id> # set default; accepts
|
||||
# provider/model-name
|
||||
# provider:model-name
|
||||
```
|
||||
|
||||
Examples:
|
||||
```bash
|
||||
feynman model set anthropic/claude-sonnet-4-20250514
|
||||
feynman model set openai:gpt-4o
|
||||
feynman model set github-copilot/gpt-5.3-codex
|
||||
```
|
||||
|
||||
## AlphaXiv (academic search)
|
||||
|
||||
| Command | Purpose |
|
||||
| ------------------------ | ------------------------------------ |
|
||||
| `feynman alpha login` | Sign in to alphaXiv |
|
||||
| `feynman alpha logout` | Clear alphaXiv auth |
|
||||
| `feynman alpha status` | Check alphaXiv auth status |
|
||||
|
||||
Without alphaXiv auth Feynman falls back to general web search and loses
|
||||
citation metadata, discussion threads, and full-text PDFs. Strongly
|
||||
recommend running `feynman alpha login` before serious research.
|
||||
|
||||
## Packages
|
||||
|
||||
| Command | Purpose |
|
||||
| ------------------------------------- | ---------------------------------- |
|
||||
| `feynman packages list` | All packages + install status |
|
||||
| `feynman packages install <preset>` | Install optional package preset |
|
||||
| `feynman update` | Update all packages |
|
||||
| `feynman update <package>` | Update one package |
|
||||
|
||||
Optional preset today: `generative-ui` (macOS only — interactive HTML
|
||||
widgets). Other names hidden on Linux/Windows.
|
||||
|
||||
## Workflow shortcuts (CLI form)
|
||||
|
||||
These are equivalent to the REPL slash commands but run as one-shots from
|
||||
the shell:
|
||||
|
||||
```bash
|
||||
feynman deepresearch "topic"
|
||||
feynman lit "topic" # literature review
|
||||
feynman review draft.md # peer review of an artifact
|
||||
feynman audit 2401.12345 # paper-vs-code audit (arXiv id)
|
||||
feynman replicate "claim or paper"
|
||||
feynman compare "topic across sources"
|
||||
feynman draft "paper-style draft topic"
|
||||
```
|
||||
|
||||
CLI form auto-creates a session, runs the workflow, prints/saves the
|
||||
artifact, and exits. Pair with `--cwd` to scope research to a directory:
|
||||
```bash
|
||||
feynman --cwd ~/research/llm-evals lit "agentic LLM benchmarks"
|
||||
```
|
||||
|
||||
## Search
|
||||
|
||||
| Command | Purpose |
|
||||
| ------------------------- | ------------------------------------ |
|
||||
| `feynman search status` | Show Pi web-access status |
|
||||
|
||||
## Global flags
|
||||
|
||||
| Flag | Effect |
|
||||
| -------------------------- | --------------------------------------------------- |
|
||||
| `--prompt "<text>"` | One-shot prompt → exit |
|
||||
| `--model <provider/id>` | Override default model for this run |
|
||||
| `--thinking <level>` | `off|minimal|low|medium|high|xhigh` |
|
||||
| `--cwd <path>` | Run with a specific working directory |
|
||||
| `--session-dir <path>` | Custom session storage path |
|
||||
| `--new-session` | Force fresh session |
|
||||
| `--alpha-login` | Alias for `feynman alpha login` |
|
||||
| `--alpha-logout` | Alias for `feynman alpha logout` |
|
||||
| `--alpha-status` | Alias for `feynman alpha status` |
|
||||
| `--doctor` | Alias for `feynman doctor` |
|
||||
| `--setup-preview` | Alias for `feynman setup preview` |
|
||||
|
||||
## CI / scripted invocation
|
||||
|
||||
```bash
|
||||
ANTHROPIC_API_KEY=$KEY \
|
||||
FEYNMAN_THINKING=low \
|
||||
feynman --prompt "Summarize $(cat README.md | head -200)" > brief.md
|
||||
```
|
||||
|
||||
Notes:
|
||||
- Pure CLI runs print the model output to stdout; pipe + redirect freely.
|
||||
- `--thinking low` keeps cost down for batch jobs.
|
||||
- Set the appropriate `*_API_KEY` env var so you don't depend on
|
||||
`auth.json` being warm (env auth bypasses interactive prompts).
|
||||
|
||||
## Examples by goal
|
||||
|
||||
**Quickly summarize a paper:**
|
||||
```bash
|
||||
feynman --prompt "Summarize the key findings of Attention Is All You Need"
|
||||
```
|
||||
|
||||
**Run a deep-research and save the brief:**
|
||||
```bash
|
||||
feynman --cwd ~/research deepresearch "agentic memory persistence patterns"
|
||||
ls ~/research/outputs/
|
||||
```
|
||||
|
||||
**Switch model just for this run:**
|
||||
```bash
|
||||
feynman --model anthropic/claude-opus-4-5 --thinking high
|
||||
```
|
||||
|
||||
**Verify install + doctor in one shot (CI):**
|
||||
```bash
|
||||
feynman --version && feynman doctor
|
||||
```
|
||||
|
||||
## Commands not present (yet)
|
||||
|
||||
The docs claim some, the CLI lacks others. Verify with `feynman help` if a
|
||||
command isn't in the reference above. Missing as of this skill snapshot:
|
||||
`feynman run`, `feynman version` (use `--version`), `feynman uninstall`,
|
||||
`feynman session`, `feynman auth`, `feynman config`. Use the alternates:
|
||||
- session control → REPL `/sessions` or `--session-dir`
|
||||
- auth → `feynman model login/logout` and `feynman alpha login/logout`
|
||||
- config → edit `~/.feynman/agent/settings.json` directly
|
||||
@@ -0,0 +1,182 @@
|
||||
# Configuration Deep Dive
|
||||
|
||||
Real layout (verified from a working install). Public docs show simpler paths
|
||||
without the `agent/` subdir; the actual install nests most things under
|
||||
`~/.feynman/agent/` because Feynman wraps the Pi runtime.
|
||||
|
||||
## Directory tree
|
||||
|
||||
```
|
||||
~/.feynman/
|
||||
├── agent/ # the Pi-runtime root
|
||||
│ ├── settings.json # core config
|
||||
│ ├── auth.json # OAuth tokens + API keys
|
||||
│ ├── agents/ # builtin + custom agent prompts
|
||||
│ │ ├── researcher.md
|
||||
│ │ ├── reviewer.md
|
||||
│ │ ├── writer.md
|
||||
│ │ └── verifier.md
|
||||
│ ├── skills/ # installed feynman-skills
|
||||
│ │ ├── deep-research/
|
||||
│ │ ├── literature-review/
|
||||
│ │ ├── peer-review/
|
||||
│ │ └── …
|
||||
│ ├── themes/
|
||||
│ │ └── feynman.json
|
||||
│ ├── bin/ # bundled tools
|
||||
│ │ ├── fd
|
||||
│ │ └── rg
|
||||
│ └── run-history.jsonl
|
||||
├── sessions/ # persisted REPL sessions
|
||||
├── memory/ # pi-memory long-term store
|
||||
├── web-search.json # search backend routing
|
||||
├── .state/ # runtime state
|
||||
└── npm-global/ # sandboxed npm prefix for Pi packages
|
||||
~/.ahub/ # Pi auth-hub state (separate)
|
||||
```
|
||||
|
||||
## `agent/settings.json` — full real shape
|
||||
|
||||
```json
|
||||
{
|
||||
"packages": [
|
||||
"npm:@companion-ai/alpha-hub",
|
||||
"npm:pi-subagents",
|
||||
"npm:pi-btw",
|
||||
"npm:pi-docparser",
|
||||
"npm:pi-web-access",
|
||||
"npm:pi-markdown-preview",
|
||||
"npm:@walterra/pi-charts",
|
||||
"npm:pi-mermaid",
|
||||
"npm:@aliou/pi-processes",
|
||||
"npm:pi-zotero",
|
||||
"npm:@kaiserlich-dev/pi-session-search",
|
||||
"npm:pi-schedule-prompt",
|
||||
"npm:@samfp/pi-memory",
|
||||
"npm:@tmustier/pi-ralph-wiggum"
|
||||
],
|
||||
"quietStartup": true,
|
||||
"collapseChangelog": true,
|
||||
"defaultThinkingLevel": "medium",
|
||||
"editorPaddingX": 1,
|
||||
"theme": "feynman",
|
||||
"defaultProvider": "github-copilot",
|
||||
"defaultModel": "gpt-5.3-codex",
|
||||
"lastChangelogVersion": "0.67.6",
|
||||
"subagents": {
|
||||
"agentOverrides": {
|
||||
"reviewer": { "thinking": "high" }
|
||||
},
|
||||
"disableBuiltins": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
| Key | Purpose |
|
||||
| ------------------------- | ------------------------------------------------------ |
|
||||
| `packages` | Pi packages to load at startup |
|
||||
| `quietStartup` | suppress banner |
|
||||
| `collapseChangelog` | don't expand changelog on launch |
|
||||
| `defaultProvider` | fallback provider |
|
||||
| `defaultModel` | fallback model id |
|
||||
| `defaultThinkingLevel` | `off|minimal|low|medium|high|xhigh` |
|
||||
| `theme` | name of theme JSON in `agent/themes/` |
|
||||
| `editorPaddingX` | TUI editor padding |
|
||||
| `subagents.agentOverrides`| per-agent field overrides without copying the file |
|
||||
| `subagents.disableBuiltins`| hide all builtins from `/agents` |
|
||||
| `lastChangelogVersion` | last seen version (Feynman manages this) |
|
||||
|
||||
Edit by hand or rerun `feynman setup` (which overwrites the file).
|
||||
|
||||
Project-level scope: `.feynman/settings.json` (walks up tree). Project
|
||||
scope wins on conflicting keys.
|
||||
|
||||
## Thinking levels
|
||||
|
||||
| Level | Effect |
|
||||
| --------- | ------------------------------------- |
|
||||
| `off` | No extended-thinking |
|
||||
| `minimal` | Smallest reasoning budget |
|
||||
| `low` | |
|
||||
| `medium` | Default |
|
||||
| `high` | More chain-of-thought |
|
||||
| `xhigh` | Maximum |
|
||||
|
||||
Override per run: `feynman --thinking high`. Override per agent in
|
||||
frontmatter `thinking: high`. Suffix on model id: `claude-sonnet-4-5:high`.
|
||||
|
||||
## `web-search.json`
|
||||
|
||||
```json
|
||||
{
|
||||
"route": "auto",
|
||||
"perplexityApiKey": "{env:PERPLEXITY_API_KEY}",
|
||||
"geminiApiKey": "{env:GEMINI_API_KEY}"
|
||||
}
|
||||
```
|
||||
|
||||
`route` ∈ `auto | perplexity | gemini`.
|
||||
- `auto` (default): prefer Perplexity if configured, else Gemini grounding via signed-in Chromium profile (zero-config on macOS/Linux Chrome).
|
||||
- `perplexity`: always Perplexity Sonar (needs `perplexityApiKey`).
|
||||
- `gemini`: force Gemini grounding (Chromium profile required, or `geminiApiKey`).
|
||||
|
||||
Without a Chromium profile on `auto` and no `perplexityApiKey`, web search
|
||||
errors instead of degrading silently.
|
||||
|
||||
## Sessions
|
||||
|
||||
```bash
|
||||
feynman # current session in cwd
|
||||
feynman --new-session # fresh
|
||||
feynman --session-dir ~/proj/.fey # custom dir (existing sessions don't migrate)
|
||||
```
|
||||
|
||||
Session storage: `~/.feynman/sessions/<id>/` by default, or wherever
|
||||
`--session-dir` points. The `pi-session-search` package indexes the dir
|
||||
for `/search`.
|
||||
|
||||
## Environment variables
|
||||
|
||||
| Variable | Effect |
|
||||
| ----------------------- | ---------------------------------------------- |
|
||||
| `FEYNMAN_MODEL` | Override default model |
|
||||
| `FEYNMAN_HOME` | Override `~/.feynman` location |
|
||||
| `FEYNMAN_THINKING` | Override default thinking level |
|
||||
| `ANTHROPIC_API_KEY` | Anthropic auth |
|
||||
| `OPENAI_API_KEY` | OpenAI auth |
|
||||
| `GEMINI_API_KEY` | Google auth |
|
||||
| `AWS_PROFILE` | Bedrock profile |
|
||||
| `TAVILY_API_KEY` | Optional Tavily backend (supplemental) |
|
||||
| `SERPER_API_KEY` | Optional Serper backend (supplemental) |
|
||||
| `PERPLEXITY_API_KEY` | Used by `web-search.json` `perplexityApiKey` |
|
||||
|
||||
Provider config (`agent/settings.json`) takes precedence over env vars.
|
||||
|
||||
## Themes
|
||||
|
||||
Bundled: `~/.feynman/agent/themes/feynman.json`. Custom themes drop in the
|
||||
same directory. Switch via `theme: "<name>"` in `agent/settings.json`.
|
||||
|
||||
## Auth storage
|
||||
|
||||
`~/.feynman/agent/auth.json` is a single JSON file that holds OAuth tokens
|
||||
and API keys for every authed provider. Don't commit it. To reset auth for
|
||||
one provider: `feynman model logout <id>` then `feynman model login <id>`.
|
||||
To nuke everything: `rm ~/.feynman/agent/auth.json && feynman setup`.
|
||||
|
||||
## Project-scope config
|
||||
|
||||
A research project can override user-scope settings:
|
||||
|
||||
```
|
||||
my-research/
|
||||
├── .feynman/
|
||||
│ ├── settings.json # project overrides (subagents, theme, etc.)
|
||||
│ └── agents/
|
||||
│ └── domain-expert.md # project-only agent
|
||||
└── outputs/
|
||||
└── …
|
||||
```
|
||||
|
||||
`feynman --cwd my-research/` (or running from inside the dir) makes Feynman
|
||||
walk up the tree, find `.feynman/`, and merge.
|
||||
@@ -0,0 +1,266 @@
|
||||
# Custom Agents — Full Spec
|
||||
|
||||
Feynman runs on **pi-subagents**, the Pi extension that handles agent
|
||||
discovery, prompt assembly, and dispatch. The agent format here is the
|
||||
authoritative spec — same one pi-subagents reads.
|
||||
|
||||
## Three scopes (later wins)
|
||||
|
||||
| Scope | Path | Priority |
|
||||
| -------- | ------------------------------------------------------------------- | -------- |
|
||||
| Builtin | inside the package: `~/.feynman/npm-global/lib/node_modules/pi-subagents/agents/` (and Feynman's bundled `~/.feynman/agent/agents/<name>.md` for the four "official" roles) | lowest |
|
||||
| User | `~/.feynman/agent/agents/<name>.md` | medium |
|
||||
| Project | `.feynman/agents/<name>.md` (walks up from cwd to git root) | highest |
|
||||
|
||||
> Project discovery also reads legacy `.agents/<name>.md` for compatibility.
|
||||
> If both `.agents/` and `.feynman/agents/` define the same name,
|
||||
> `.feynman/agents/` wins.
|
||||
|
||||
`agentScope` parameter (when calling pi-subagents tools programmatically):
|
||||
`"user"`, `"project"`, or `"both"` (default; project wins on conflict).
|
||||
|
||||
## Frontmatter — full spec
|
||||
|
||||
```yaml
|
||||
---
|
||||
name: scout # required, kebab-case
|
||||
description: Fast codebase recon # required, agent-picker tooltip
|
||||
tools: read, grep, find, ls, bash, mcp:chrome-devtools
|
||||
extensions: # absent=all, empty=none, csv=allowlist
|
||||
model: claude-haiku-4-5 # provider/model-id (or bare id resolved against current provider)
|
||||
fallbackModels: openai/gpt-5-mini, anthropic/claude-sonnet-4
|
||||
thinking: high # off|minimal|low|medium|high|xhigh
|
||||
systemPromptMode: replace # replace (default) | append
|
||||
inheritProjectContext: false # custom default false; builtins default true
|
||||
inheritSkills: false # default false
|
||||
skills: safe-bash, chrome-devtools # csv of skills to inject
|
||||
output: context.md # default artifact filename → {chain_dir}/context.md
|
||||
defaultReads: context.md # csv of files to auto-read
|
||||
defaultProgress: true # maintain progress.md
|
||||
interactive: true # parsed but not enforced in v1
|
||||
maxSubagentDepth: 1 # tighten nested delegation
|
||||
---
|
||||
|
||||
Your system prompt goes here (markdown body after frontmatter).
|
||||
```
|
||||
|
||||
### Field semantics
|
||||
|
||||
**`name`** — required, kebab-case `^[a-z0-9]+(-[a-z0-9]+)*$`.
|
||||
|
||||
**`description`** — required, used in agent-picker UI and by orchestrators.
|
||||
|
||||
**`tools`** — comma-separated list controlling builtin-tool allowlisting:
|
||||
- **omitted** → child gets Pi's default builtins (no `--tools` flag passed)
|
||||
- **listed** → explicit allowlist (e.g. `tools: read, bash` restricts to those two)
|
||||
- `mcp:server` or `mcp:server/tool` entries → forwarded as MCP-tool selections (requires `pi-mcp-adapter`)
|
||||
- path-like entries ending in `.ts` / `.js` → treated as tool-extension paths
|
||||
- `tools: mcp:chrome-devtools` (no regular tools listed) → child gets all default builtins **plus** chrome-devtools tools (additive)
|
||||
|
||||
**`extensions`** — extension sandboxing:
|
||||
- absent → all extensions load
|
||||
- empty (`extensions:`) → `--no-extensions` (none)
|
||||
- csv → `--no-extensions --extension a --extension b` (allowlist)
|
||||
- when present, takes precedence over extension paths implied by `tools`
|
||||
|
||||
**`model`** — `provider/model-id`. Bare ids first prefer the current session's provider if it serves them, then fall back to a unique registry match. Ambiguous bare ids stay bare.
|
||||
|
||||
**`fallbackModels`** — ordered list of backups for **provider/model availability** failures only (quota, auth, timeout, model unavailable). Ordinary `bash`-or-tool errors don't trigger a hop. CSV in markdown frontmatter; CSV or array in JSON `config` objects.
|
||||
|
||||
**`thinking`** — extended-thinking budget. Appended to model id at runtime as `:level` suffix (e.g. `claude-sonnet-4-5:high`). If the model already has a thinking suffix (from chain-clarify override), agent default is not double-applied.
|
||||
|
||||
**`systemPromptMode`** — how the agent's markdown body is injected:
|
||||
- `replace` (default for custom agents) — body becomes the entire system prompt; clean slate, no Pi base prompt baggage
|
||||
- `append` — body appended to Pi's base prompt; child gets full Pi capabilities + your additions
|
||||
|
||||
The bundled `delegate` agent stays on `append` because it orchestrates within the parent workflow.
|
||||
|
||||
**`inheritProjectContext`** — keep Pi's inherited project-instructions block (built from `AGENTS.md` / `CLAUDE.md` etc.):
|
||||
- `false` (custom default) — strip; child runs without repo conventions
|
||||
- `true` (builtin default) — keep; child follows project-specific rules
|
||||
|
||||
Does **not** affect repo access, cwd, tools, or task — only those instruction-file blocks.
|
||||
|
||||
**`inheritSkills`** — keep Pi's discovered skills catalog:
|
||||
- `false` (default) — stripped (focused agents)
|
||||
- `true` — full catalog visible (general helpers)
|
||||
|
||||
The `skills` field works independently — it injects specific skills regardless of `inheritSkills`.
|
||||
|
||||
**`skills`** — csv of skill names injected directly into the agent prompt.
|
||||
|
||||
**`output`** — default artifact filename. The parent reads this file to retrieve the agent's work. Defaults shipped: researcher → `research.md`, reviewer → `review.md`, writer → `draft.md`, verifier → `cited.md`.
|
||||
|
||||
**`defaultReads`** — csv of files the agent auto-reads on start (typically the parent's research file).
|
||||
|
||||
**`defaultProgress`** — maintain a `progress.md` so the parent can poll status.
|
||||
|
||||
**`maxSubagentDepth`** — limit nested delegation depth from this agent's children.
|
||||
|
||||
## Common recipes (frontmatter combos)
|
||||
|
||||
| Goal | `systemPromptMode` | `inheritProjectContext` | `inheritSkills` |
|
||||
| -------------------------------------------------------- | ------------------ | ----------------------- | --------------- |
|
||||
| Fully isolated specialist (custom-agent default) | `replace` | `false` | `false` |
|
||||
| Specialist that should follow project instruction files | `replace` | `true` | `false` |
|
||||
| Pi-plus-extensions (general helper with extra prompt) | `append` | `true` | `true` |
|
||||
|
||||
Worked examples:
|
||||
- **Security auditor** — fully isolated; checks objectively without project bias.
|
||||
- **Architecture planner** — repo-aware; respects `AGENTS.md` constraints.
|
||||
- **Generic helper** — append mode + full inheritance; behaves like a slightly-customized Pi.
|
||||
|
||||
## Override builtins without copying the file
|
||||
|
||||
In `~/.feynman/agent/settings.json` (user scope) or `.feynman/settings.json`
|
||||
(project scope; wins on conflict):
|
||||
|
||||
```json
|
||||
{
|
||||
"subagents": {
|
||||
"agentOverrides": {
|
||||
"reviewer": {
|
||||
"model": "anthropic/claude-opus-4-5",
|
||||
"thinking": "high",
|
||||
"inheritProjectContext": true
|
||||
},
|
||||
"researcher": {
|
||||
"tools": "read, web_search, fetch_content",
|
||||
"skills": "alpha-research"
|
||||
},
|
||||
"experimental-agent": {
|
||||
"disabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Override fields: `model`, `fallbackModels`, `thinking`, `systemPromptMode`,
|
||||
`inheritProjectContext`, `inheritSkills`, `disabled`, `skills`, `tools`,
|
||||
`systemPrompt`. Project overrides beat user overrides.
|
||||
|
||||
Disable all builtins at once: `subagents.disableBuiltins: true`. Re-enable
|
||||
one with an explicit override that sets `disabled: false`.
|
||||
|
||||
UI alternative: `/agents` → press `e` on a builtin → toggle a field → save.
|
||||
|
||||
Override badges: `[builtin+user]` / `[builtin+project]` / `off`.
|
||||
|
||||
## MCP tools (optional, requires `pi-mcp-adapter`)
|
||||
|
||||
```yaml
|
||||
# All tools from a server
|
||||
tools: read, bash, mcp:chrome-devtools
|
||||
|
||||
# Specific tools
|
||||
tools: read, bash, mcp:github/search_repositories, mcp:github/get_file_contents
|
||||
```
|
||||
|
||||
| Syntax | Effect |
|
||||
| ---------------------------- | ---------------------------- |
|
||||
| `mcp:server-name` | All tools from that MCP server|
|
||||
| `mcp:server-name/tool_name` | One specific tool |
|
||||
|
||||
`mcp:` items are additive — `tools: mcp:chrome-devtools` (no regular tools)
|
||||
gives the agent all default builtins **plus** chrome-devtools tools. To
|
||||
restrict: list builtins explicitly.
|
||||
|
||||
> First-run caveat: MCP adapter caches tool metadata at startup. The first
|
||||
> session to a new MCP server only has access through the generic `mcp`
|
||||
> proxy. Restart Pi after that first connection to enable direct tools.
|
||||
|
||||
Without `pi-mcp-adapter` installed, all `mcp:` entries are ignored silently.
|
||||
|
||||
## Calling custom agents
|
||||
|
||||
```
|
||||
/run security-auditor "audit src/auth/"
|
||||
/chain researcher "find recent CVEs in node-jsonwebtoken" -> security-auditor "check our usage"
|
||||
/parallel scanner "find OWASP issues" -> reviewer "check style"
|
||||
```
|
||||
|
||||
Per-step task delimiters (`->` separates steps):
|
||||
- Quotes (`"…"` or `'…'`) define each step's task
|
||||
- `--` works as task delimiter: `/chain scout -- scan code -> planner -- analyze auth`
|
||||
- Bare step inherits behavior from execution mode:
|
||||
- chain → uses `{previous}` (prior step's output)
|
||||
- parallel → uses first-available task
|
||||
|
||||
Programmatic call (from JS via pi-subagents):
|
||||
```js
|
||||
await subagent({
|
||||
agent: "security-auditor",
|
||||
task: "audit src/auth/",
|
||||
agentScope: "both", // user | project | both (default)
|
||||
config: { // step override > frontmatter
|
||||
model: "anthropic/claude-opus-4-5",
|
||||
fallbackModels: ["openai/gpt-5-mini"],
|
||||
thinking: "xhigh"
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
Resolution priority (highest wins): step override > agent frontmatter > disabled flag.
|
||||
|
||||
## Worked example: project-scoped reviewer
|
||||
|
||||
```
|
||||
my-research/
|
||||
└── .feynman/
|
||||
└── agents/
|
||||
└── ml-reviewer.md
|
||||
```
|
||||
|
||||
```yaml
|
||||
---
|
||||
name: ml-reviewer
|
||||
description: Reviews ML/AI papers with reproducibility focus.
|
||||
thinking: xhigh
|
||||
systemPromptMode: replace
|
||||
inheritProjectContext: true # keep my repo's AGENTS.md
|
||||
inheritSkills: false
|
||||
tools: read, write, edit, web_search, fetch_content
|
||||
output: review.md
|
||||
defaultReads: research.md, draft.md
|
||||
---
|
||||
|
||||
You are a senior ML reviewer. Apply the FATAL/MAJOR/MINOR/Nits rubric.
|
||||
Specifically scrutinize:
|
||||
- claimed reproducibility vs released artifacts (code, hyperparams, data)
|
||||
- statistical strength of headline numbers
|
||||
- ablation completeness
|
||||
- benchmark contamination
|
||||
|
||||
Output sections: Summary, Strengths, Weaknesses (FATAL/MAJOR/MINOR/Nits),
|
||||
Reproducibility Audit, Verdict, Revision Plan.
|
||||
```
|
||||
|
||||
When you run `/review draft.md` from inside `my-research/`, this agent
|
||||
overrides the global `reviewer`. From any other directory, the global one
|
||||
runs.
|
||||
|
||||
## Pitfalls
|
||||
|
||||
- `name` mismatch with filename → agent picker silently skips. Filename and
|
||||
`name:` should match.
|
||||
- `tools` field is a CSV string in markdown frontmatter, not a YAML array
|
||||
(`tools: read, bash` not `tools: [read, bash]`).
|
||||
- Bare model ids (`gpt-5.3-codex`) only resolve cleanly when the current
|
||||
session provider serves them. Use `provider/model-id` for portability.
|
||||
- `fallbackModels` triggers only on provider-availability errors. Ordinary
|
||||
failures (bad bash, missing files) propagate; the agent fails on the
|
||||
primary model.
|
||||
- `inheritProjectContext: false` for custom agents is the default but
|
||||
surprises users porting from generic chat-agent setups. If your custom
|
||||
agent should respect the repo's `AGENTS.md`, opt in explicitly.
|
||||
- Per-agent `thinking` is appended as `:level` suffix to the model id at
|
||||
runtime — model strings already containing a suffix (from a chain
|
||||
override) are not double-suffixed.
|
||||
- `mcp:` tools require `pi-mcp-adapter` AND a second startup before direct
|
||||
tools are populated (first run only has the `mcp` proxy).
|
||||
- Project agent at `.feynman/agents/foo.md` only loads when cwd or an
|
||||
ancestor contains `.feynman/`. Run from inside the project, or pass
|
||||
`--cwd <path>`.
|
||||
- `agent/settings.json` overrides + a custom file with the same name → the
|
||||
custom file wins entirely (it's a higher-priority scope, not a merge).
|
||||
@@ -0,0 +1,147 @@
|
||||
# Installation & Setup
|
||||
|
||||
## Install methods
|
||||
|
||||
```bash
|
||||
# 1. macOS / Linux — recommended
|
||||
curl -fsSL https://feynman.is/install | bash
|
||||
|
||||
# 2. macOS / Linux — pin a specific version (example 0.2.39)
|
||||
curl -fsSL https://feynman.is/install | bash -s -- 0.2.39
|
||||
|
||||
# 3. Windows PowerShell (run as Administrator)
|
||||
irm https://feynman.is/install.ps1 | iex
|
||||
|
||||
# 4. npm — cross-platform (needs Node ≥20.19.0 <25)
|
||||
npm install -g @companion-ai/feynman
|
||||
|
||||
# 5. Skills only (no runtime — for plugging into another agent host)
|
||||
curl -fsSL https://feynman.is/install-skills | bash
|
||||
```
|
||||
|
||||
The bash installer ends with the version it just pinned. To follow latest,
|
||||
re-run the bare installer.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- macOS 12+, recent Linux glibc, or Windows 10+
|
||||
- For npm path: Node.js `>=20.19.0 <25` (Node 25+ is unsupported as of v0.2.x)
|
||||
- For `/preview`: pandoc — install via `feynman setup preview`
|
||||
|
||||
## Install locations
|
||||
|
||||
| Layer | macOS / Linux | Windows |
|
||||
| ---------------- | ------------------------------------- | -------------------------------------- |
|
||||
| Launcher binary | `~/.local/bin/feynman` | `%LOCALAPPDATA%\Programs\feynman\` |
|
||||
| Runtime | `~/.local/share/feynman/` | `%LOCALAPPDATA%\Programs\feynman\` |
|
||||
| User config | `~/.feynman/` | `~/.feynman/` |
|
||||
| Pi auth-hub | `~/.ahub/` | `~/.ahub/` |
|
||||
|
||||
Make sure `~/.local/bin` is on `$PATH`. If not, restart the shell or add it
|
||||
manually.
|
||||
|
||||
## Post-install sequence
|
||||
|
||||
```bash
|
||||
exec $SHELL # pick up new $PATH
|
||||
feynman --version # smoke test
|
||||
feynman setup # interactive wizard
|
||||
feynman alpha login # academic search (strongly recommended)
|
||||
feynman setup preview # install pandoc for /preview rendering
|
||||
feynman doctor # validate everything
|
||||
feynman status # one-line summary
|
||||
```
|
||||
|
||||
What `feynman setup` does:
|
||||
1. Lists provider+model options. Pick a default (e.g. `anthropic:claude-sonnet-4-20250514`, `openai:gpt-4o`, `github-copilot:gpt-5.3-codex`).
|
||||
2. Authenticates via OAuth ("Pi") or accepts an API key.
|
||||
3. For Bedrock, validates AWS credential chain (AWS_PROFILE, ~/.aws, SSO, ECS/IRSA, EC2 instance roles).
|
||||
4. Optionally installs `generative-ui` (macOS only).
|
||||
5. Writes `~/.feynman/agent/settings.json`.
|
||||
|
||||
Re-running `feynman setup` overwrites `agent/settings.json`. Back it up if
|
||||
you've hand-edited.
|
||||
|
||||
## Provider authentication individually
|
||||
|
||||
```bash
|
||||
feynman model login anthropic # Pi OAuth → ~/.feynman/agent/auth.json
|
||||
feynman model login openai # OAuth or API key
|
||||
feynman model login google # Gemini
|
||||
feynman model login amazon-bedrock # uses AWS chain
|
||||
feynman model logout <id> # clear stored auth
|
||||
feynman model list # all reachable models
|
||||
feynman model set anthropic/claude-opus-4-5
|
||||
```
|
||||
|
||||
Local providers (Ollama, LM Studio, LiteLLM, vLLM): in `feynman setup` choose
|
||||
"Custom provider (baseUrl + API key)" and supply a base URL. Defaults:
|
||||
- LM Studio: `http://localhost:1234/v1`
|
||||
- LiteLLM proxy: `http://localhost:4000/v1`
|
||||
- Ollama: `http://localhost:11434/v1`
|
||||
- vLLM: depends on your serve config
|
||||
|
||||
## Diagnostics
|
||||
|
||||
```bash
|
||||
feynman doctor # validates config, auth, Pi runtime, preview deps
|
||||
feynman status # quick summary
|
||||
feynman --version
|
||||
```
|
||||
|
||||
`feynman doctor` reports green even when a provider is logged-out as long as
|
||||
its env var is set. Don't rely on doctor to confirm OAuth tokens are still
|
||||
valid — auth-store check is bypassed when the env var is present.
|
||||
|
||||
## Updating
|
||||
|
||||
```bash
|
||||
# Standalone — rerun the installer
|
||||
curl -fsSL https://feynman.is/install | bash
|
||||
|
||||
# Pinned standalone — rerun with version
|
||||
curl -fsSL https://feynman.is/install | bash -s -- 0.3.0
|
||||
|
||||
# npm
|
||||
npm install -g @companion-ai/feynman@latest
|
||||
|
||||
# Single Pi package
|
||||
feynman update <package-name>
|
||||
|
||||
# All packages
|
||||
feynman update
|
||||
```
|
||||
|
||||
Release cadence: extremely active during development — multiple per day. Pin
|
||||
versions if you need reproducibility. Recent fix focus: thinking/reasoning
|
||||
persistence in TUI, section-focused PDF extraction, summarization controls.
|
||||
|
||||
## Uninstall
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm uninstall -g @companion-ai/feynman
|
||||
|
||||
# Standalone (no uninstaller bundled)
|
||||
rm ~/.local/bin/feynman
|
||||
rm -rf ~/.local/share/feynman
|
||||
rm -rf ~/.feynman
|
||||
rm -rf ~/.ahub
|
||||
```
|
||||
|
||||
Sessions, run history, and skills live in `~/.feynman/`. Back them up before
|
||||
removing if you've done long-running research there.
|
||||
|
||||
## Verify the install (sanity script)
|
||||
|
||||
```bash
|
||||
set -e
|
||||
feynman --version
|
||||
feynman doctor
|
||||
feynman model list | head
|
||||
ls ~/.feynman/agent/agents/ # should list researcher reviewer writer verifier
|
||||
ls ~/.feynman/agent/skills/ # should include deep-research literature-review etc.
|
||||
test -f ~/.feynman/agent/settings.json
|
||||
test -f ~/.feynman/agent/auth.json
|
||||
echo "Feynman OK"
|
||||
```
|
||||
@@ -0,0 +1,90 @@
|
||||
# REPL & Slash Commands
|
||||
|
||||
## REPL flow
|
||||
|
||||
`feynman` (no args) launches the REPL. Conversational: type prompt, Enter,
|
||||
read response. The REPL retains session memory, indexes artifacts to
|
||||
`outputs/` (when running in a project), and exposes slash commands.
|
||||
|
||||
REPL templating:
|
||||
- `@<path>` — inject file contents into the prompt (e.g. `@papers/foo.pdf`)
|
||||
- `!<shell>` — run a shell command and inject its stdout (e.g. `!ls outputs/`)
|
||||
|
||||
Quit: Ctrl-D or `/exit` (when supported by your version).
|
||||
|
||||
## Slash commands — research workflows
|
||||
|
||||
| Command | What it does |
|
||||
| --------------------------- | ------------------------------------------------------------- |
|
||||
| `/deepresearch <topic>` | Multi-agent investigation → research brief in `outputs/` |
|
||||
| `/lit <topic>` | Structured literature review (consensus / disagreement / open Qs) |
|
||||
| `/review <artifact>` | Peer review with severity-graded feedback + inline annotations |
|
||||
| `/audit <paper-or-arxiv-id>`| Compare a paper's claims against its public code |
|
||||
| `/replicate <paper>` | Plan or execute a replication for a paper / claim / benchmark |
|
||||
| `/compare <topic>` | Build agreement / disagreement matrix across sources |
|
||||
| `/draft <topic>` | Paper-style draft from research findings |
|
||||
| `/autoresearch <idea>` | Autonomous loop iteratively optimizing toward a goal |
|
||||
| `/watch <topic> [cadence]` | Recurring research monitoring on a topic |
|
||||
|
||||
## Slash commands — project / session / control
|
||||
|
||||
| Command | What it does |
|
||||
| ------------------ | ------------------------------------------------------------- |
|
||||
| `/help` | Grouped command list |
|
||||
| `/init` | Bootstrap `AGENTS.md` + session-log folders for a new project |
|
||||
| `/log` | Durable session log: work / findings / open Qs / next steps |
|
||||
| `/jobs` | Active background work — running, scheduled, watches |
|
||||
| `/outputs` | Browse research artifacts |
|
||||
| `/search <query>` | Search prior session transcripts (semantic + keyword) |
|
||||
| `/preview [path]` | Render artifact as HTML or PDF |
|
||||
| `/feynman-model` | Model picker (default model + per-subagent overrides) |
|
||||
|
||||
## Slash commands — pi-subagents (when installed)
|
||||
|
||||
`pi-subagents` adds direct agent control:
|
||||
|
||||
| Command | What it does |
|
||||
| ---------------------------------------------------- | ----------------------------------------- |
|
||||
| `/run <agent> <task>` | Run one agent with a task |
|
||||
| `/chain <a> "task" -> <b> "task"` | Sequential chain |
|
||||
| `/parallel <a> "task" -> <b> "task"` | Parallel run |
|
||||
| `/subagents-status` | Async status overlay |
|
||||
| `/agents` | Agents Manager overlay (edit / override) |
|
||||
|
||||
Per-step task forms:
|
||||
- `/chain scout "scan code" -> planner "make plan"` — each step has its own task
|
||||
- `/chain scout -- scan code -> planner -- analyze auth` — `--` delimiter
|
||||
- `/chain scout "analyze auth" -> planner -> implementer` — bare steps inherit `{previous}` (chain) or first task (parallel)
|
||||
- Shared task: `/parallel scout reviewer -- audit src/` — same task to both
|
||||
|
||||
Quotes (`"…"` or `'…'`) and `--` are interchangeable.
|
||||
|
||||
## Sample REPL session
|
||||
|
||||
```
|
||||
$ feynman
|
||||
Feynman 0.2.39 — github-copilot/gpt-5.3-codex (medium thinking)
|
||||
> /deepresearch Current approaches to mechanistic interpretability in LLMs
|
||||
[plan] Reading 12 source candidates…
|
||||
[researcher] Fetching arXiv:2401.…
|
||||
[writer] Drafting brief
|
||||
✓ outputs/mechanistic-interp-brief.md (2,341 lines, 47 sources)
|
||||
> /preview outputs/mechanistic-interp-brief.md
|
||||
✓ Opened in browser
|
||||
> /log
|
||||
✓ Wrote outputs/session-log-2026-05-01.md
|
||||
```
|
||||
|
||||
## Tips
|
||||
|
||||
- Long-running workflows (`/deepresearch`, `/lit`) run for minutes. Use
|
||||
`/jobs` from another window to monitor.
|
||||
- `/watch <topic> weekly` schedules via `pi-schedule-prompt`. List with
|
||||
`/jobs`. Cancel by editing the schedule (no built-in unwatch verb).
|
||||
- `/preview` requires pandoc (`feynman setup preview` once).
|
||||
- `/feynman-model` lets you set different models per role —
|
||||
e.g. cheap Haiku for `researcher` (high token volume), Opus for `reviewer`.
|
||||
- `@<path>` works with directories — Feynman recursively reads supported
|
||||
formats (`pi-docparser` handles PDFs/Office/etc).
|
||||
- Slash commands shadow built-ins of the same name when defined as a
|
||||
custom command. Project-scope shadows user-scope.
|
||||
520
personas/_shared/community-skills/foia-tool/SKILL.md
Normal file
520
personas/_shared/community-skills/foia-tool/SKILL.md
Normal file
@@ -0,0 +1,520 @@
|
||||
---
|
||||
name: foia-tool
|
||||
description: Use when downloading, scraping, analyzing, or annotating declassified government documents with the foiacquire/foia Rust tool. Covers config writing, CLI commands, PostgreSQL setup, DocumentCloud API, OCR pipeline, Komga integration, foia-monitor web panel, and LLM annotation.
|
||||
---
|
||||
|
||||
# FOIA Tool — Complete Reference
|
||||
|
||||
## Tool Location
|
||||
|
||||
| Item | Path |
|
||||
|------|------|
|
||||
| Repo | `~/Documents/foia/` |
|
||||
| Binary | `~/Documents/foia/target/release/foia` |
|
||||
| Active config | `/mnt/storage/Common/Books/FOIA/foia.json` |
|
||||
| Data dir | `/mnt/storage/Common/Books/FOIA/` |
|
||||
| Docs | `~/Documents/foia/docs/` |
|
||||
| README | `/mnt/storage/Common/Books/FOIA/README.md` |
|
||||
| Monitor | `~/Documents/foia-monitor/` → http://localhost:3031 |
|
||||
|
||||
**Always run with `-d` flag pointing to data dir:**
|
||||
```bash
|
||||
FOIA_DIRECT=1 ~/Documents/foia/target/release/foia -d /mnt/storage/Common/Books/FOIA/ <command> --no-tor-warning
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Building
|
||||
|
||||
Default build = SQLite only. For PostgreSQL support:
|
||||
```bash
|
||||
cd ~/Documents/foia
|
||||
cargo build --release --features postgres -p foia-cli
|
||||
```
|
||||
|
||||
Other optional features: `--features gis` (PostGIS spatial search), `--features browser` (headless browser).
|
||||
|
||||
---
|
||||
|
||||
## Database
|
||||
|
||||
### SQLite (default)
|
||||
```json
|
||||
{ "database": "foia.db" }
|
||||
```
|
||||
**Problem:** Deadlocks with 4+ concurrent workers. Use `--workers 2` or switch to PostgreSQL.
|
||||
|
||||
### PostgreSQL (Docker container: `foia_postgres`)
|
||||
```json
|
||||
{ "database": "postgresql://foia_user:<DB_PASSWORD>@localhost:5432/foia_db" }
|
||||
```
|
||||
Start container: `docker start foia_postgres`
|
||||
Init DB: `foia -d /mnt/storage/Common/Books/FOIA/ init --no-tor-warning`
|
||||
|
||||
**⚠️ PostgreSQL migration bug:** Some migrations use multi-statement SQL that fails. If `init` errors on a migration, manually apply SQL via `docker exec foia_postgres psql -U foia_user -d foia_db` then mark done:
|
||||
```sql
|
||||
INSERT INTO __cetane_migrations (name) VALUES ('MIGRATION_NAME') ON CONFLICT DO NOTHING;
|
||||
```
|
||||
|
||||
**⚠️ New scrapers not auto-synced:** `foia init` does NOT add new scrapers from foia.json to `scraper_configs` table. Must INSERT the **full config JSON** manually — empty `{}` causes the scraper to find 0 URLs and exit silently:
|
||||
```sql
|
||||
INSERT INTO scraper_configs (source_id, config, created_at, updated_at)
|
||||
VALUES ('new_source', '{"discovery":{"type":"api_paginated",...}}', NOW()::TEXT, NOW()::TEXT)
|
||||
ON CONFLICT DO NOTHING;
|
||||
```
|
||||
|
||||
**Quick bulk-sync from foia.json** (Python):
|
||||
```python
|
||||
import json, subprocess
|
||||
with open('/mnt/storage/Common/Books/FOIA/foia.json') as f:
|
||||
cfg = json.load(f)
|
||||
for source_id, config in cfg['scrapers'].items():
|
||||
config_json = json.dumps(config).replace("'", "''")
|
||||
sql = f"INSERT INTO scraper_configs (source_id, config, created_at, updated_at) VALUES ('{source_id}', '{config_json}', NOW()::TEXT, NOW()::TEXT) ON CONFLICT (source_id) DO UPDATE SET config=EXCLUDED.config, updated_at=NOW()::TEXT;"
|
||||
subprocess.run(['docker', 'exec', 'foia_postgres', 'psql', '-U', 'foia_user', '-d', 'foia_db', '-c', sql])
|
||||
```
|
||||
|
||||
**Actual schema** (NOT `config_json`/`is_active`):
|
||||
```sql
|
||||
-- source_id TEXT PK, config TEXT, created_at TEXT, updated_at TEXT
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## foia.json — Full Config Reference
|
||||
|
||||
```json
|
||||
{
|
||||
"target": "/mnt/storage/Common/Books/FOIA/",
|
||||
"database": "postgresql://...",
|
||||
"request_delay_ms": 1500,
|
||||
"request_timeout": 45,
|
||||
"user_agent": "Mozilla/5.0 ...",
|
||||
"default_refresh_ttl_days": 30,
|
||||
|
||||
"llm": { "enabled": false },
|
||||
|
||||
"analysis": {
|
||||
"ocr_backends": ["tesseract", "pdftotext"],
|
||||
"pdf_text_enabled": true,
|
||||
"extract_urls": false
|
||||
},
|
||||
|
||||
"privacy": { "direct": true },
|
||||
|
||||
"scrapers": { "SOURCE_ID": { ... } }
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Discovery Types
|
||||
|
||||
### 1. `html_crawl`
|
||||
```json
|
||||
"discovery": {
|
||||
"type": "html_crawl",
|
||||
"base_url": "https://vault.fbi.gov",
|
||||
"start_paths": ["/alphabetical-index"],
|
||||
"document_links": ["a[href*='/vault/']"],
|
||||
"document_patterns": ["\\.pdf$"],
|
||||
"max_depth": 3,
|
||||
"use_browser": false,
|
||||
"pagination": {
|
||||
"next_selectors": ["a[rel='next']", "a.pager-next"],
|
||||
"max_pages": 100
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**With search queries** (crawl site search pages):
|
||||
```json
|
||||
"search_queries": ["CIA Turkey", "CIA KGB"],
|
||||
"search_url_template": "/search?q={query}"
|
||||
```
|
||||
|
||||
**With LLM query expansion:**
|
||||
```json
|
||||
"expand_search_terms": true
|
||||
```
|
||||
|
||||
### 2. `api_paginated`
|
||||
```json
|
||||
"discovery": {
|
||||
"type": "api_paginated",
|
||||
"api": {
|
||||
"base_url": "https://api.www.documentcloud.org",
|
||||
"endpoint": "/api/documents/search/?q=CIA+Turkey+declassified",
|
||||
"pagination": {
|
||||
"page_param": "page",
|
||||
"page_size_param": "per_page",
|
||||
"page_size": 25,
|
||||
"results_path": "results"
|
||||
},
|
||||
"url_extraction": {
|
||||
"url_field": "_none",
|
||||
"url_template": "https://assets.documentcloud.org/documents/{id}/{slug}.pdf"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 3. `api_cursor`
|
||||
```json
|
||||
"discovery": {
|
||||
"type": "api_cursor",
|
||||
"api": {
|
||||
"base_url": "https://api.example.com",
|
||||
"endpoint": "/search?q=FOIA&limit=100",
|
||||
"pagination": {
|
||||
"cursor_param": "cursor",
|
||||
"cursor_response_path": "pagination.next_cursor",
|
||||
"results_path": "results",
|
||||
"page_size": 100
|
||||
},
|
||||
"url_extraction": { "url_field": "download_url" }
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 4. `api_nested` (parent→child)
|
||||
For APIs where documents are nested (e.g., FOIA requests → communications → files):
|
||||
```json
|
||||
"discovery": {
|
||||
"type": "api_nested",
|
||||
"api": {
|
||||
"base_url": "https://www.muckrock.com/api_v1",
|
||||
"parent": {
|
||||
"endpoint": "/foia/?status=done&per_page=100",
|
||||
"pagination": { "page_param": "page", "results_path": "results" },
|
||||
"id_path": "id"
|
||||
},
|
||||
"child": {
|
||||
"endpoint_template": "/communication/?foia={id}",
|
||||
"results_path": "results",
|
||||
"url_extraction": {
|
||||
"url_field": "url",
|
||||
"nested_arrays": ["files"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## URL Extraction Options
|
||||
|
||||
```json
|
||||
"url_extraction": {
|
||||
"url_field": "download_url", // Field containing URL (use "_none" for templates)
|
||||
"url_template": "https://example.com/docs/{id}/{slug}.pdf", // Template with {field} vars
|
||||
"fallback_field": "pdf_url", // Try this if url_field is empty
|
||||
"items_path": "data.documents", // JSON path to array if not top-level
|
||||
"nested_arrays": ["files", "attachments"] // Traverse nested arrays
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## External Discovery (sitemap, Wayback, search engines)
|
||||
|
||||
Add to any `discovery` block:
|
||||
```json
|
||||
"external": {
|
||||
"enable_sitemap": true, // Parse sitemap.xml and robots.txt
|
||||
"enable_wayback": true, // Query Wayback Machine CDX API
|
||||
"common_paths": ["/foia/docs"], // Extra paths to enumerate
|
||||
"search_engines": [
|
||||
{
|
||||
"engine": "duckduckgo", // "duckduckgo" | "google" | "bing" | "brave"
|
||||
"enabled": true,
|
||||
"queries": ["CIA declassified site:vault.fbi.gov"]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Per-Source Overrides
|
||||
|
||||
```json
|
||||
"my_source": {
|
||||
"request_delay_ms": 2000, // Override global delay
|
||||
"request_timeout": 60, // Override global timeout
|
||||
"refresh_ttl_days": 7, // Re-scrape interval
|
||||
"user_agent": "...", // Override user-agent
|
||||
"via": { // CDN proxy rewrites
|
||||
"assets.documentcloud.org": "https://proxy.example.com/dc/"
|
||||
},
|
||||
"via_mode": "fallback", // "strict" | "fallback" | "priority"
|
||||
"privacy": { "direct": true } // Per-source privacy override
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Browser Config (requires `--features browser`)
|
||||
|
||||
```json
|
||||
"browser": {
|
||||
"enabled": true,
|
||||
"engine": "stealth", // "standard" | "stealth" | "cookies"
|
||||
"headless": true,
|
||||
"timeout": 60,
|
||||
"wait_for_selector": ".content-loaded",
|
||||
"cookies_file": "./site_cookies.json", // For "cookies" engine
|
||||
"proxy": "socks5://127.0.0.1:9050"
|
||||
}
|
||||
```
|
||||
|
||||
Get cookies interactively:
|
||||
```bash
|
||||
foia browser-test https://example.gov/login --headed --save-cookies cookies.json
|
||||
```
|
||||
|
||||
**Binary fetch** (for Akamai/Cloudflare-protected PDF endpoints):
|
||||
```json
|
||||
"fetch": { "use_browser": true, "binary_fetch": true }
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## CLI Commands
|
||||
|
||||
### Status & Init
|
||||
```bash
|
||||
foia status # Queue/doc counts, running services
|
||||
foia init # Init DB and dirs (run after changing DB)
|
||||
foia state clear SOURCE_ID # Clear stale scraper status
|
||||
```
|
||||
|
||||
### Discovery & Scraping
|
||||
```bash
|
||||
foia crawl SOURCE_ID --limit 50 # Discover URLs only (test config)
|
||||
foia scrape SOURCE_ID --workers 2 # Crawl + download combined
|
||||
foia scrape --all --workers 2 --daemon --interval 3600 # All sources, continuous
|
||||
foia scrape SOURCE_ID --reload=inplace # Hot-reload config without restart
|
||||
```
|
||||
|
||||
### Downloading
|
||||
```bash
|
||||
foia download --workers 2 --limit 100 # Process download queue (2 workers = safe for SQLite)
|
||||
foia download SOURCE_ID --workers 4 # Download specific source (PostgreSQL: 4 workers OK)
|
||||
```
|
||||
|
||||
### Import
|
||||
```bash
|
||||
foia import url "https://..." --source SOURCE_ID --title "Title"
|
||||
foia import warc file.warc.gz --source SOURCE_ID --dry-run
|
||||
foia import urls --file urls.txt --source SOURCE_ID
|
||||
```
|
||||
|
||||
### Processing Pipeline
|
||||
```bash
|
||||
foia analyze --all --workers 4 # OCR + text extraction
|
||||
foia analyze SOURCE_ID --daemon --interval 300
|
||||
foia annotate --all # LLM summaries + tags
|
||||
foia extract-entities SOURCE_ID # NER: people, orgs, locations, file numbers
|
||||
foia detect-dates SOURCE_ID # Estimate document dates with LLM
|
||||
```
|
||||
|
||||
### Search & Browse
|
||||
```bash
|
||||
foia ls --source SOURCE_ID --limit 50 --format table
|
||||
foia search "Turkey intelligence 1980"
|
||||
foia search-entities "Kissinger" --type person
|
||||
foia info DOC_ID
|
||||
foia read DOC_ID --text
|
||||
foia serve # Web UI at http://127.0.0.1:3030
|
||||
```
|
||||
|
||||
### Database & Config
|
||||
```bash
|
||||
foia db copy sqlite:old.db postgres://user:pass@host/db --progress
|
||||
foia config recover # Generate skeleton config from existing DB
|
||||
foia config restore # Restore last saved config
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Pipeline Flow
|
||||
|
||||
```
|
||||
crawl/scrape → download → analyze (OCR) → annotate (LLM) → search/serve
|
||||
```
|
||||
|
||||
Documents stored at: `documents/{sha256[0:2]}/{sha256[2:10]}/{filename}`
|
||||
Filename format: `{slug}-{hash[0:8]}.pdf`
|
||||
|
||||
**⚠️ `foia analyze` has no `--all` flag:**
|
||||
```bash
|
||||
foia analyze --workers 4 # no source = all sources (correct)
|
||||
foia analyze --all --workers 4 # ERROR — --all is not valid
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Komga Integration
|
||||
|
||||
### komga_organize.py
|
||||
Moves downloaded PDFs from hash-based `documents/` into a Komga folder hierarchy by source ID.
|
||||
|
||||
**Critical:** After moving, creates symlinks at the original hash path so `foia analyze` can still find files:
|
||||
```
|
||||
documents/{hash[0:2]}/{hash[2:10]}/file.pdf → /mnt/storage/Common/Books/Istihbarat/CIA/file.pdf
|
||||
```
|
||||
|
||||
Without symlinks, `foia analyze` can't find moved files (`file_path` is always NULL in DB; path is reconstructed from `content_hash`).
|
||||
|
||||
```bash
|
||||
python3 /mnt/storage/Common/Books/FOIA/komga_organize.py
|
||||
# or via .zshrc alias: foia-organize
|
||||
```
|
||||
|
||||
### ocrmypdf_batch.py
|
||||
Embeds invisible text layer into scanned PDFs in Komga folders — makes them searchable inside Komga.
|
||||
|
||||
```bash
|
||||
python3 /mnt/storage/Common/Books/FOIA/ocrmypdf_batch.py
|
||||
```
|
||||
|
||||
- Uses `--skip-text` (skips pages that already have text)
|
||||
- 4 parallel workers, replaces in-place (temp file → shutil.move)
|
||||
- Exit code 2 = already has text (counted as "skipped", not error)
|
||||
- Error log: `/tmp/ocrmypdf_batch.log`
|
||||
- Processes files from KOMGA_DIRS (not from `documents/`)
|
||||
|
||||
**Source → Komga folder map** (23 sources):
|
||||
```
|
||||
cia_reading_room → Istihbarat/CIA/
|
||||
cia_turkey → Istihbarat/FOIA-CIA-Turkey/
|
||||
fbi_vault → Istihbarat/FOIA-FBI-Vault/
|
||||
cia_nato → NATO/FOIA-NATO/
|
||||
military_doctrine → AskeriDoktrin/FOIA-Pentagon/
|
||||
cyber_warfare → SiberGuvenlik/FOIA-SiberSavas/
|
||||
ia_cia_cold_war → Istihbarat/FOIA-IA-CIA-SogukSavas/
|
||||
# ... see komga_organize.py for full map
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## foia-monitor Web Panel
|
||||
|
||||
**Repo:** `~/Documents/foia-monitor/`
|
||||
**Start:** `foia-monitor` (.zshrc alias) or `bash ~/Documents/foia-monitor/start.sh`
|
||||
**URL:** http://localhost:3031
|
||||
|
||||
Architecture: Express.js server (port 3031) serves built React frontend + REST API + WebSocket.
|
||||
|
||||
**Tabs:**
|
||||
- **MONITOR** — live log stream, start/stop scraper & OCR, per-source quick-scrape buttons
|
||||
- **SOURCES** — per-source document counts with progress bars
|
||||
- **DOCUMENTS** — full-text search, source filter dropdown, paginated results, PDF links (proxied via foia serve API)
|
||||
- **ORGANIZE** — run komga_organize.py from the UI
|
||||
|
||||
**API endpoints:**
|
||||
```
|
||||
GET /api/stats → {total, diskCount, queuePending, sources[], scraperRunning}
|
||||
POST /api/command → {cmd: start|stop|restart|start-ocr|stop-ocr|organize}
|
||||
POST /api/scrape-source → {source: source_id}
|
||||
```
|
||||
|
||||
**Build after UI changes:**
|
||||
```bash
|
||||
cd ~/Documents/foia-monitor/client && npm run build
|
||||
# then restart: fuser -k 3031/tcp && cd server && node index.js &
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Environment Variables
|
||||
|
||||
| Variable | Purpose |
|
||||
|----------|---------|
|
||||
| `FOIA_DIRECT=1` | Disable Tor (direct connection) |
|
||||
| `SOCKS_PROXY=socks5://127.0.0.1:9050` | External SOCKS5/Tor proxy |
|
||||
| `RUST_LOG=debug` | Verbose logging |
|
||||
| `LLM_PROVIDER=ollama` | Override LLM provider |
|
||||
| `LLM_MODEL=llama3.1:8b` | Override LLM model |
|
||||
| `LLM_ENDPOINT=http://localhost:11434` | Override LLM endpoint |
|
||||
| `GROQ_API_KEY=...` | Use Groq for OCR/annotation |
|
||||
| `OPENAI_API_KEY=...` | Use OpenAI |
|
||||
| `DATABASE_URL=postgres://...` | Override database (full URL) |
|
||||
| `BROWSER_URL=ws://localhost:9222` | Remote Chrome DevTools |
|
||||
|
||||
---
|
||||
|
||||
## Available OCR Backends
|
||||
|
||||
| Backend | Best For |
|
||||
|---------|---------|
|
||||
| `tesseract` | Scanned PDFs (eng + tur installed) |
|
||||
| `ocrs` | Pure Rust, offline |
|
||||
| `paddle` | CJK languages, complex layouts |
|
||||
| `groq` | API-based, fast (requires key) |
|
||||
|
||||
pdftotext (poppler) handles digital PDFs automatically.
|
||||
|
||||
---
|
||||
|
||||
## Site Compatibility Notes
|
||||
|
||||
| Site | Method | Notes |
|
||||
|------|--------|-------|
|
||||
| DocumentCloud | `api_paginated` | Rate limits heavily; 503 = backoff 60s. IP-blocks Tor exits. |
|
||||
| FBI Vault | `html_crawl` | Works well, occasional 503 backoff |
|
||||
| CIA Reading Room | `html_crawl` + `use_browser: true` | Requires browser feature |
|
||||
| Wilson Center | — | **Cloudflare-blocked**, cannot scrape |
|
||||
| NSA.gov | — | JS-heavy, no static PDF links |
|
||||
| MuckRock | `api_nested` | `/api_v1/foia/` → `/api_v1/communication/` chain |
|
||||
| NARA/archives.gov | — | JS-heavy search, static PDFs need specific paths |
|
||||
|
||||
---
|
||||
|
||||
## Common Mistakes
|
||||
|
||||
| Mistake | Fix |
|
||||
|---------|-----|
|
||||
| `params` field in config | Embed query directly in `endpoint` string |
|
||||
| `endpoints` array format | Use single `endpoint` string |
|
||||
| `url_field: "pdf_url"` for DocumentCloud | Use `url_template` with `{id}/{slug}` |
|
||||
| SQLite deadlock with 4 workers | Use `--workers 2` or switch to PostgreSQL |
|
||||
| Binary compiled without postgres | `cargo build --release --features postgres -p foia-cli` |
|
||||
| Status command errors "database is locked" | Too many concurrent processes, kill extras |
|
||||
| `foia status` shows stale scrapers | `foia state clear SOURCE_ID` |
|
||||
| New source shows "No scraper configured" or 0 URLs found | INSERT into `scraper_configs` with FULL config JSON (not `{}`); schema: `source_id, config, created_at, updated_at` |
|
||||
| DocumentCloud "error sending request" via Tor | DC blocks Tor exit nodes; use `FOIA_DIRECT=1` |
|
||||
|
||||
---
|
||||
|
||||
## Quick Workflow: Add New DocumentCloud Source
|
||||
|
||||
1. Add to `/mnt/storage/Common/Books/FOIA/foia.json` under `scrapers`:
|
||||
```json
|
||||
"new_source": {
|
||||
"discovery": {
|
||||
"type": "api_paginated",
|
||||
"api": {
|
||||
"base_url": "https://api.www.documentcloud.org",
|
||||
"endpoint": "/api/documents/search/?q=YOUR+QUERY+HERE",
|
||||
"pagination": { "page_param": "page", "page_size_param": "per_page", "page_size": 25, "results_path": "results" },
|
||||
"url_extraction": { "url_field": "_none", "url_template": "https://assets.documentcloud.org/documents/{id}/{slug}.pdf" }
|
||||
}
|
||||
},
|
||||
"fetch": { "use_browser": false }
|
||||
}
|
||||
```
|
||||
2. Sync to DB (full config, NOT empty `{}`):
|
||||
```python
|
||||
import json, subprocess
|
||||
cfg = json.load(open('/mnt/storage/Common/Books/FOIA/foia.json'))
|
||||
for sid, config in cfg['scrapers'].items():
|
||||
cj = json.dumps(config).replace("'", "''")
|
||||
sql = f"INSERT INTO scraper_configs (source_id, config, created_at, updated_at) VALUES ('{sid}', '{cj}', NOW()::TEXT, NOW()::TEXT) ON CONFLICT (source_id) DO UPDATE SET config=EXCLUDED.config, updated_at=NOW()::TEXT;"
|
||||
subprocess.run(['docker', 'exec', 'foia_postgres', 'psql', '-U', 'foia_user', '-d', 'foia_db', '-c', sql])
|
||||
```
|
||||
3. Test: `FOIA_DIRECT=1 foia crawl new_source --limit 5 --no-tor-warning`
|
||||
4. Scrape: `FOIA_DIRECT=1 foia scrape new_source --workers 2 --no-tor-warning`
|
||||
5. Analyze: `FOIA_DIRECT=1 foia analyze --workers 4 --no-tor-warning`
|
||||
126
personas/_shared/community-skills/intel-briefing/SKILL.md
Normal file
126
personas/_shared/community-skills/intel-briefing/SKILL.md
Normal file
@@ -0,0 +1,126 @@
|
||||
---
|
||||
name: intel-briefing
|
||||
description: Generate structured intelligence briefings in IC format. Supports EXEC_SUMMARY, FULL_INTEL_REPORT, JSON, and NEED_VISUAL output modes. Uses UAP methodology, ACH-over-ToT for competing hypotheses, IC confidence levels. Triggers on briefing, intelligence report, assessment, geopolitical analysis, country analysis, threat assessment, PDB format.
|
||||
---
|
||||
|
||||
# Intel Briefing — Intelligence Product Generator
|
||||
|
||||
## When to Use
|
||||
|
||||
| Trigger | Action |
|
||||
|---------|--------|
|
||||
| "Iran briefing" / "Russia assessment" | Full intel briefing on topic |
|
||||
| "[EXEC_SUMMARY] Turkey defense" | 1-page BLUF executive summary |
|
||||
| "[FULL_INTEL_REPORT] nuclear" | Multi-section deep analysis |
|
||||
| "Threat assessment for [region]" | Structured threat evaluation |
|
||||
| "Compare hypotheses on [event]" | ACH-over-ToT analysis |
|
||||
|
||||
## Output Modes
|
||||
|
||||
### [EXEC_SUMMARY] — Executive Summary
|
||||
```markdown
|
||||
## BLUF
|
||||
[1 paragraph — the bottom line assessment with confidence level]
|
||||
|
||||
## Key Findings
|
||||
1. [Finding with confidence: High/Moderate/Low]
|
||||
2. [Finding]
|
||||
3. [Finding]
|
||||
|
||||
## Outlook
|
||||
- Most Likely: [scenario]
|
||||
- Wild Card: [low-probability high-impact]
|
||||
|
||||
## Indicators to Watch
|
||||
- [What would change this assessment]
|
||||
```
|
||||
|
||||
### [FULL_INTEL_REPORT] — Complete Assessment
|
||||
```markdown
|
||||
# Intelligence Assessment: [Topic]
|
||||
Report ID: IA-[YYYY]-[NNN]
|
||||
Classification: UNCLASSIFIED
|
||||
Date: [Date]
|
||||
|
||||
## BLUF
|
||||
[Bottom line in 1 paragraph]
|
||||
|
||||
## Background
|
||||
[Context, history, relevant developments]
|
||||
|
||||
## Key Findings
|
||||
[Evidence-based observations with source citations]
|
||||
|
||||
## Analysis
|
||||
### Hypothesis 1: [Description]
|
||||
- Supporting evidence: [...]
|
||||
- Contradicting evidence: [...]
|
||||
- Confidence: [High/Moderate/Low] — [percentage]
|
||||
|
||||
### Hypothesis 2: [Alternative]
|
||||
- Supporting evidence: [...]
|
||||
- Confidence: [...]
|
||||
|
||||
### ACH Matrix
|
||||
| Evidence | H1 | H2 | H3 |
|
||||
|----------|-----|-----|-----|
|
||||
| [fact] | ++ | - | N |
|
||||
|
||||
## Outlook & Scenarios
|
||||
| Scenario | Probability | Key Indicators |
|
||||
|----------|------------|----------------|
|
||||
| Most Likely | [%] | [what to watch] |
|
||||
| Best Case | [%] | [triggers] |
|
||||
| Worst Case | [%] | [triggers] |
|
||||
| Wild Card | [%] | [triggers] |
|
||||
|
||||
## Assumptions & Gaps
|
||||
- [Key assumption that if wrong changes everything]
|
||||
- [Collection gap that limits confidence]
|
||||
|
||||
## Sources & Methodology
|
||||
- [Source list with reliability ratings]
|
||||
- SATs applied: [ACH, Red Hat, Key Assumptions Check, etc.]
|
||||
```
|
||||
|
||||
### [JSON_OUTPUT] — Structured Data
|
||||
```json
|
||||
{
|
||||
"report_id": "IA-2026-001",
|
||||
"topic": "...",
|
||||
"bluf": "...",
|
||||
"confidence": "Moderate",
|
||||
"confidence_pct": 72,
|
||||
"hypotheses": [...],
|
||||
"findings": [...],
|
||||
"scenarios": [...],
|
||||
"indicators": [...],
|
||||
"sources": [...]
|
||||
}
|
||||
```
|
||||
|
||||
## Methodology: UAP (Universal Analytical Protocol)
|
||||
|
||||
1. **Direction** — Define KIQs, select response mode, scope boundaries
|
||||
2. **Collection** — OSINT sweep, RAG knowledge retrieval, source evaluation (Admiralty Code)
|
||||
3. **Analysis** — ACH-over-ToT, multi-source triangulation, SATs, Devil's Advocate
|
||||
4. **Production** — Format per output mode, BLUF first, mandatory confidence levels
|
||||
5. **Dissemination** — Deliver with caveats, handling instructions, feedback loop
|
||||
|
||||
## Confidence Language (IC Standard)
|
||||
|
||||
| Level | Probability | Language |
|
||||
|-------|------------|---------|
|
||||
| High | 90-100% | "almost certainly", "we assess with high confidence" |
|
||||
| Moderate | 60-89% | "likely", "we assess with moderate confidence" |
|
||||
| Low | 50-59% | "roughly even chance", "we assess with low confidence" |
|
||||
| Very Low | <50% | "unlikely", "remote possibility" |
|
||||
|
||||
## Rules
|
||||
|
||||
- BLUF first, always — if the reader stops after 1 paragraph, they have the core judgment
|
||||
- Competing hypotheses mandatory — never single-explanation analysis
|
||||
- Distinguish FACTS (verified) from ASSESSMENTS (judgments) from SPECULATION (conjecture)
|
||||
- Cite sources with reliability rating (A-F reliability, 1-6 credibility)
|
||||
- Minimum 3 independent sources per major claim
|
||||
- State assumptions explicitly — the assumption you don't question is the one that burns you
|
||||
325
personas/_shared/community-skills/jira/SKILL.md
Normal file
325
personas/_shared/community-skills/jira/SKILL.md
Normal file
@@ -0,0 +1,325 @@
|
||||
---
|
||||
name: jira
|
||||
description: Use when the user mentions Jira, tasks, tickets, sprints, boards, or wants to view/create/update/transition issues. Triggers on any Jira-related request including listing tasks, checking status, creating tickets, updating progress, or managing sprints on Atlassian Jira.
|
||||
---
|
||||
|
||||
# Jira — Atlassian Jira Integration
|
||||
|
||||
## Overview
|
||||
|
||||
Interact with Atlassian Jira via REST API. View boards, list issues, create/update tickets, transition statuses, add comments, and manage sprints. Uses `curl` with Basic Auth (email + API token).
|
||||
|
||||
## Authentication
|
||||
|
||||
**Credentials** (stored securely, never log tokens):
|
||||
- **Instance**: `<your-instance>.atlassian.net`
|
||||
- **Email**: `<user-email>`
|
||||
- **API Token**: Read from `~/.jira-token` file (one line, no newline)
|
||||
|
||||
If `~/.jira-token` doesn't exist, ask the user to create it:
|
||||
```bash
|
||||
echo -n "YOUR_API_TOKEN" > ~/.jira-token
|
||||
chmod 600 ~/.jira-token
|
||||
```
|
||||
|
||||
**Base URL**: `https://<your-instance>.atlassian.net/rest/api/3`
|
||||
**Auth Header**: Basic Auth with `email:token`
|
||||
|
||||
## API Helper
|
||||
|
||||
For ALL Jira API calls, use this pattern:
|
||||
|
||||
```bash
|
||||
JIRA_EMAIL="<user-email>"
|
||||
JIRA_TOKEN=$(cat ~/.jira-token)
|
||||
JIRA_BASE="https://<your-instance>.atlassian.net/rest/api/3"
|
||||
|
||||
# GET request
|
||||
curl -s -u "$JIRA_EMAIL:$JIRA_TOKEN" "$JIRA_BASE/endpoint"
|
||||
|
||||
# POST request (search, create)
|
||||
curl -s -u "$JIRA_EMAIL:$JIRA_TOKEN" -X POST "$JIRA_BASE/endpoint" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"key": "value"}'
|
||||
|
||||
# PUT request (update)
|
||||
curl -s -u "$JIRA_EMAIL:$JIRA_TOKEN" -X PUT "$JIRA_BASE/endpoint" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"fields": {"summary": "new title"}}'
|
||||
```
|
||||
|
||||
## Projects
|
||||
|
||||
Known projects on this instance:
|
||||
| Key | Name | Description |
|
||||
|-----|------|-------------|
|
||||
| CTI | ProudGuard-CTI | Pentests, exposure scans, customer engagements |
|
||||
| LZY | proudguard | ASM Aygan development, internal tasks |
|
||||
| DEVOPS | proudguard-devops | Infrastructure, deployment |
|
||||
| PB | proudguard-Backlog | Product backlog |
|
||||
| SELF | DukkanıKapatanlar | Side projects |
|
||||
|
||||
## Common Operations
|
||||
|
||||
### 1. List My Tasks
|
||||
```bash
|
||||
curl -s -u "$JIRA_EMAIL:$JIRA_TOKEN" -X POST "$JIRA_BASE/search/jql" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"jql":"assignee=currentUser() AND status NOT IN (Tamam, Done) ORDER BY updated DESC","maxResults":30,"fields":["summary","status","priority","project","updated"]}'
|
||||
```
|
||||
|
||||
### 2. List Tasks in Project
|
||||
```bash
|
||||
curl -s -u "$JIRA_EMAIL:$JIRA_TOKEN" -X POST "$JIRA_BASE/search/jql" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"jql":"project=CTI ORDER BY updated DESC","maxResults":30,"fields":["summary","status","priority","assignee","updated"]}'
|
||||
```
|
||||
|
||||
### 3. Get Single Issue Detail
|
||||
```bash
|
||||
curl -s -u "$JIRA_EMAIL:$JIRA_TOKEN" "$JIRA_BASE/issue/CTI-40"
|
||||
```
|
||||
|
||||
### 4. Create Issue
|
||||
```bash
|
||||
curl -s -u "$JIRA_EMAIL:$JIRA_TOKEN" -X POST "$JIRA_BASE/issue" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"fields": {
|
||||
"project": {"key": "CTI"},
|
||||
"summary": "Issue title",
|
||||
"description": {"type":"doc","version":1,"content":[{"type":"paragraph","content":[{"type":"text","text":"Description here"}]}]},
|
||||
"issuetype": {"name": "Task"},
|
||||
"priority": {"name": "Medium"}
|
||||
}
|
||||
}'
|
||||
```
|
||||
|
||||
### 5. Update Issue Status (Transition)
|
||||
|
||||
**CRITICAL RULE: NEVER transition to `Tamam` (Done, id=31).** Only managers close tickets. We move tasks to `İNCELEMEDE` (In Review, id=2) or `Test` (Testing, id=3) only. If a task is already in İNCELEMEDE or Test, just add a comment — don't change status.
|
||||
|
||||
Allowed transitions:
|
||||
- `id=2` — İNCELEMEDE (In Review) — use after completing work
|
||||
- `id=3` — Test (Testing) — use when ready for QA
|
||||
- `id=21` — Devam Ediyor (In Progress) — use when starting work
|
||||
- `id=11` — Yapılacaklar (To Do) — use to reset
|
||||
- ~~`id=31` — Tamam (Done)~~ — **FORBIDDEN** — manager only
|
||||
|
||||
First get available transitions:
|
||||
```bash
|
||||
curl -s -u "$JIRA_EMAIL:$JIRA_TOKEN" "$JIRA_BASE/issue/CTI-40/transitions"
|
||||
```
|
||||
|
||||
Then transition (NEVER use id=31):
|
||||
```bash
|
||||
curl -s -u "$JIRA_EMAIL:$JIRA_TOKEN" -X POST "$JIRA_BASE/issue/CTI-40/transitions" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"transition": {"id": "2"}}'
|
||||
```
|
||||
|
||||
### 6. Add Comment
|
||||
```bash
|
||||
curl -s -u "$JIRA_EMAIL:$JIRA_TOKEN" -X POST "$JIRA_BASE/issue/CTI-40/comment" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"body":{"type":"doc","version":1,"content":[{"type":"paragraph","content":[{"type":"text","text":"Comment text here"}]}]}}'
|
||||
```
|
||||
|
||||
### 7. Update Issue Fields
|
||||
```bash
|
||||
curl -s -u "$JIRA_EMAIL:$JIRA_TOKEN" -X PUT "$JIRA_BASE/issue/CTI-40" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"fields": {"summary": "Updated title", "priority": {"name": "High"}}}'
|
||||
```
|
||||
|
||||
### 8. Assign Issue
|
||||
```bash
|
||||
# First find account ID
|
||||
curl -s -u "$JIRA_EMAIL:$JIRA_TOKEN" "$JIRA_BASE/user/search?query=ali"
|
||||
|
||||
# Then assign
|
||||
curl -s -u "$JIRA_EMAIL:$JIRA_TOKEN" -X PUT "$JIRA_BASE/issue/CTI-40/assignee" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"accountId": "ACCOUNT_ID"}'
|
||||
```
|
||||
|
||||
### 9. Get Board/Sprint Info
|
||||
```bash
|
||||
# List boards
|
||||
curl -s -u "$JIRA_EMAIL:$JIRA_TOKEN" "https://<your-instance>.atlassian.net/rest/agile/1.0/board"
|
||||
|
||||
# Get sprint issues
|
||||
curl -s -u "$JIRA_EMAIL:$JIRA_TOKEN" "https://<your-instance>.atlassian.net/rest/agile/1.0/board/BOARD_ID/sprint/SPRINT_ID/issue"
|
||||
```
|
||||
|
||||
### 10. Search with JQL
|
||||
```bash
|
||||
# Issues updated in last 7 days
|
||||
curl -s -u "$JIRA_EMAIL:$JIRA_TOKEN" -X POST "$JIRA_BASE/search/jql" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"jql":"updated >= -7d ORDER BY updated DESC","maxResults":20}'
|
||||
|
||||
# Unresolved high priority
|
||||
curl -s -u "$JIRA_EMAIL:$JIRA_TOKEN" -X POST "$JIRA_BASE/search/jql" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"jql":"priority = High AND resolution = Unresolved","maxResults":20}'
|
||||
```
|
||||
|
||||
## Status Values (Turkish)
|
||||
|
||||
Known status names on this instance:
|
||||
- `Yapılacaklar` — To Do
|
||||
- `Devam Ediyor` — In Progress
|
||||
- `İNCELEMEDE` — In Review
|
||||
- `Test` — Testing
|
||||
- `Tamam` — Done
|
||||
- `Daily` — Recurring
|
||||
|
||||
## Output Formatting
|
||||
|
||||
When displaying issues, use this table format:
|
||||
```
|
||||
Key Project Status Priority Summary
|
||||
CTI-40 CTI Devam Ediyor Medium Tailwind Airlines EXP + ASM
|
||||
```
|
||||
|
||||
When displaying a single issue, show:
|
||||
- Key, Summary, Status, Priority, Assignee
|
||||
- Description (first 200 chars)
|
||||
- Comments (last 3)
|
||||
- Subtasks if any
|
||||
- Links if any
|
||||
|
||||
## Important Notes
|
||||
|
||||
- **API version**: Use `/rest/api/3` (v3), NOT v2
|
||||
- **Search endpoint**: Use `POST /rest/api/3/search/jql` (NOT GET `/rest/api/3/search`)
|
||||
- **Description format**: Atlassian Document Format (ADF), not plain text
|
||||
- **Rate limit**: 100 requests per minute per user
|
||||
- **Never log or display the API token** — always read from `~/.jira-token`
|
||||
- **Transition IDs vary** — always fetch transitions first before attempting status change
|
||||
|
||||
## Comment Hygiene (CRITICAL)
|
||||
|
||||
**Don't spam multiple comments on the same ticket.** If you've already commented and new info arrives, UPDATE the existing comment instead of stacking new ones. User preference: clean single-source-of-truth comment per ticket.
|
||||
|
||||
### Update an existing comment
|
||||
```bash
|
||||
curl -s -u "$JIRA_EMAIL:$JIRA_TOKEN" -X PUT "$JIRA_BASE/issue/LZY-228/comment/12864" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"body":{"type":"doc","version":1,"content":[{"type":"paragraph","content":[{"type":"text","text":"Updated consolidated content..."}]}]}}'
|
||||
# Returns 200 on success; Jira adds "edited" badge automatically
|
||||
```
|
||||
|
||||
### Delete a redundant comment
|
||||
```bash
|
||||
curl -s -u "$JIRA_EMAIL:$JIRA_TOKEN" -X DELETE "$JIRA_BASE/issue/LZY-228/comment/12873"
|
||||
# Returns 204 on success
|
||||
```
|
||||
|
||||
### List comments with IDs (needed for update/delete)
|
||||
```bash
|
||||
curl -s -u "$JIRA_EMAIL:$JIRA_TOKEN" "$JIRA_BASE/issue/LZY-228/comment?orderBy=-created&maxResults=5" \
|
||||
| jq -r '.comments[] | "\(.id)\t\(.created[0:19])\t\(.author.displayName)\t\(.body.content[0].content[0].text[0:70] // "null")"'
|
||||
```
|
||||
|
||||
### Update issue description (when rewriting scope)
|
||||
```bash
|
||||
curl -s -u "$JIRA_EMAIL:$JIRA_TOKEN" -X PUT "$JIRA_BASE/issue/LZY-228" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"fields":{"description":{"type":"doc","version":1,"content":[...]}}}'
|
||||
```
|
||||
|
||||
**Rule of thumb:** if you're about to post a second Ali-comment with a correction or additional context on the same ticket, stop — update the first one instead. Only post a new comment if it's a genuinely new event (a follow-up status change days later, a reply to someone else).
|
||||
|
||||
## Verified Transitions (ProudGuard Jira — LZY/CTI/PB/DEVOPS projects)
|
||||
|
||||
Confirmed via `GET /issue/LZY-230/transitions` (2026-04-18). These IDs are stable across the instance:
|
||||
|
||||
| ID | Name | Target Status |
|
||||
|----|------|---------------|
|
||||
| 11 | Yapılacaklar | To Do |
|
||||
| 21 | Devam Ediyor | In Progress |
|
||||
| 3 | Testing | Test |
|
||||
| 2 | In Review | İNCELEMEDE |
|
||||
| 31 | Tamam | Done — **FORBIDDEN** |
|
||||
|
||||
**Reminder:** ID=31 (Tamam) is manager-only. Never transition to it even if you're certain the work is done. Max-state is id=2 (İNCELEMEDE) or id=3 (Test). If already at İNCELEMEDE or Test, just add a comment or update the existing one — don't change status.
|
||||
|
||||
## ADF Formatting Patterns (working examples)
|
||||
|
||||
### Paragraph with bold prefix
|
||||
```json
|
||||
{"type":"paragraph","content":[
|
||||
{"type":"text","text":"Durum (2026-04-18): ","marks":[{"type":"strong"}]},
|
||||
{"type":"text","text":"Faz tamamlandı."}
|
||||
]}
|
||||
```
|
||||
|
||||
### Full-bold paragraph
|
||||
```json
|
||||
{"type":"paragraph","content":[
|
||||
{"type":"text","text":"Heading text","marks":[{"type":"strong"}]}
|
||||
]}
|
||||
```
|
||||
|
||||
### Inline code
|
||||
```json
|
||||
{"type":"text","text":"severity_engine.py","marks":[{"type":"code"}]}
|
||||
```
|
||||
|
||||
### Code block
|
||||
```json
|
||||
{"type":"codeBlock","attrs":{"language":"bash"},"content":[
|
||||
{"type":"text","text":"python -m pytest tests/ -v"}
|
||||
]}
|
||||
```
|
||||
|
||||
### Bullet list
|
||||
```json
|
||||
{"type":"bulletList","content":[
|
||||
{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"item 1"}]}]},
|
||||
{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"item 2"}]}]}
|
||||
]}
|
||||
```
|
||||
|
||||
### Safe-quote escaping in curl -d JSON payloads
|
||||
Use `\u2019` for right single quote (`'`) inside JSON string literals when shell-escaping gets hairy:
|
||||
- `Aygan\u2019ın ayrı ürün` renders as `Aygan'ın ayrı ürün`
|
||||
- Backslash escaping single quotes (`'\''`) works but is error-prone in long payloads
|
||||
|
||||
## Professional Comment Standard (ProudStar/Aygan projects)
|
||||
|
||||
When commenting on a work ticket, include:
|
||||
1. **Status line with date**: `**Durum (2026-04-18): <one-sentence verdict>**`
|
||||
2. **Commit references**: `commit abc1234 — <short description>` (use 7-char short hashes)
|
||||
3. **File references**: `shared/services/severity_engine.py:L61` (file:line format)
|
||||
4. **Test metrics**: `49 unit tests + 63 regression tests passed`
|
||||
5. **Production evidence where applicable**: doc counts, live data snapshots
|
||||
6. **Next action / recommended status change**
|
||||
|
||||
Avoid generic "milestone closed" blurbs — every comment should cite specific code or live-data evidence. A manager skimming the ticket should be able to verify the claim without asking follow-up questions.
|
||||
|
||||
## Parsing ADF Descriptions Safely
|
||||
|
||||
Descriptions come back as nested ADF. Extract text with jq:
|
||||
```bash
|
||||
jq -r '.fields.description.content // [] | map(.content // [] | map(.text // "") | join(" ")) | join("\n")'
|
||||
```
|
||||
This survives missing descriptions, empty paragraphs, and mixed content types (image nodes without text). For richer extraction (tables, code blocks), walk `.content` recursively.
|
||||
|
||||
## Getting currentUser accountId
|
||||
|
||||
For assign/search operations you sometimes need the raw accountId:
|
||||
```bash
|
||||
curl -s -u "$JIRA_EMAIL:$JIRA_TOKEN" "$JIRA_BASE/myself" | jq -r '.accountId'
|
||||
# Example output: 712020:fcf72a82-bfec-4cf9-9948-7c8f44480c37
|
||||
```
|
||||
|
||||
## Common Mistakes (learned the hard way)
|
||||
|
||||
1. **`jq -w` is not a flag** — use `curl -w "HTTP: %{http_code}\n"` for HTTP status, pipe separately to jq.
|
||||
2. **`search/jql` needs POST, not GET** — GET returns 405. Body is JSON with `{"jql":"...","maxResults":N,"fields":[...]}`.
|
||||
3. **`fields:["comment"]` in search returns only count+last 1** — for full comment history use `GET /issue/{key}/comment?maxResults=50` as a separate call.
|
||||
4. **Comment author displayName may be a bot or integration user** — always check `.author.accountId` matches yours before editing/deleting. Don't delete someone else's comment.
|
||||
5. **Spamming comments triggers ticket noise and manager frustration** — the "Updates" tab on each ticket shows every edit; 5 Ali-comments in 10 minutes looks worse than 1 consolidated comment.
|
||||
251
personas/_shared/community-skills/librarian/SKILL.md
Normal file
251
personas/_shared/community-skills/librarian/SKILL.md
Normal file
@@ -0,0 +1,251 @@
|
||||
---
|
||||
name: librarian
|
||||
description: Use when organizing, categorizing, renaming, or moving PDF/epub books in a library. Triggers on book classification, library reorganization, fixing garbled filenames, sorting documents into topic folders, Komga library maintenance, or any "organize these books/PDFs" request.
|
||||
---
|
||||
|
||||
# Librarian - PDF Library Organizer
|
||||
|
||||
## Overview
|
||||
|
||||
Systematically classify, rename, and organize PDF/epub files into a topic-based folder hierarchy by **reading actual content** (not just filenames). Every file lands in the right place with a clean name. Uses Claude Code tools (Read, Bash, Glob, Grep, Agent) natively.
|
||||
|
||||
## Core Principles
|
||||
|
||||
1. **READ BEFORE CLASSIFY** — Read minimum 20 pages of each PDF via `Read` tool with `pages: "1-20"`. Filenames lie (OCR artifacts, download garbage, wrong metadata). Only the actual content is truth.
|
||||
2. **NEVER DELETE** — Move unwanted files to `Arsiv/` subfolder. Deletion decisions belong to the user only.
|
||||
3. **NO SPACES IN FOLDER NAMES** — Use CamelCase: `AskeriTarih/StratejiVeSavasSanati/`
|
||||
4. **CLEAN FILENAMES** — Format: `Author - Title (Year).pdf`. Fix OCR garbage, encoding issues, truncated names.
|
||||
5. **FLAT TOPICS** — Each major topic is a top-level folder under library root. Subtopics one level below. Max 2 levels deep.
|
||||
6. **ASK BEFORE DESTRUCTIVE OPS** — Never rm, never force-overwrite. Always confirm with user.
|
||||
|
||||
## Tool Usage Map
|
||||
|
||||
| Task | Tool | How |
|
||||
|---|---|---|
|
||||
| Find PDFs | `Glob` | `pattern: "**/*.pdf"` |
|
||||
| Count files per folder | `Bash` | `find DIR -name "*.pdf" \| wc -l` |
|
||||
| Read PDF content | `Read` | `file_path: "/path/to.pdf", pages: "1-20"` |
|
||||
| Read PDF metadata | `Bash` | `pdfinfo "/path/to.pdf"` (title, author, pages, creator) |
|
||||
| Search text in PDFs | `Grep` | `pattern: "keyword", path: "/library/"` |
|
||||
| Move/rename files | `Bash` | `mkdir -p TARGET && mv "SRC" "TARGET/NewName.pdf"` |
|
||||
| Parallel processing | `Agent` | Dispatch subagents for 30-file batches |
|
||||
| Check duplicates | `Bash` | `ls -la FILE1 FILE2` (compare sizes) |
|
||||
|
||||
## Workflow
|
||||
|
||||
```dot
|
||||
digraph librarian {
|
||||
rankdir=TB;
|
||||
"Survey library" -> "Plan folder structure";
|
||||
"Plan folder structure" -> "User approves?";
|
||||
"User approves?" -> "Batch files by folder" [label="yes"];
|
||||
"User approves?" -> "Revise plan" [label="no"];
|
||||
"Revise plan" -> "User approves?";
|
||||
"Batch files by folder" -> "Dispatch parallel agents";
|
||||
"Dispatch parallel agents" -> "Each agent: read 20pg, classify, rename, move";
|
||||
"Each agent: read 20pg, classify, rename, move" -> "Collect reports";
|
||||
"Collect reports" -> "Verify & cleanup empty dirs";
|
||||
}
|
||||
```
|
||||
|
||||
### Phase 1: Survey
|
||||
|
||||
```python
|
||||
# Use Glob to find all PDFs
|
||||
Glob(pattern="**/*.pdf", path="/library/root/")
|
||||
|
||||
# Use Bash to count per folder
|
||||
Bash("find /library -type d -exec sh -c 'echo \"$(find \"$1\" -maxdepth 1 -name \"*.pdf\" | wc -l) $1\"' _ {} \\;")
|
||||
```
|
||||
|
||||
### Phase 2: Plan Structure
|
||||
|
||||
Present proposed folder tree to user. Get approval before any moves. Example:
|
||||
|
||||
```
|
||||
Books/
|
||||
├── AskeriTarih/ (military history)
|
||||
│ ├── StratejiVeSavasSanati/
|
||||
│ └── GenelAskeriTarih/
|
||||
├── Istihbarat/ (intelligence)
|
||||
│ ├── TeoriVeAnaliz/
|
||||
│ ├── RusIstihbarati/
|
||||
│ └── CIA/
|
||||
├── SiberGuvenlik/ (cybersecurity)
|
||||
└── Arsiv/ (user-decides-later)
|
||||
```
|
||||
|
||||
### Phase 3: Dispatch Parallel Agents
|
||||
|
||||
**REQUIRED:** Use `superpowers:dispatching-parallel-agents` pattern.
|
||||
|
||||
Split work into independent batches of ~30 files. Each agent works on one folder or file batch.
|
||||
|
||||
**Agent prompt template:**
|
||||
|
||||
```
|
||||
You are a LIBRARIAN. Working directory: {LIBRARY_ROOT}
|
||||
|
||||
RULES (non-negotiable):
|
||||
- Read FIRST 20 PAGES of each PDF: Read tool, file_path, pages "1-20"
|
||||
- Also run: Bash("pdfinfo 'FILE'") for metadata
|
||||
- Rename to "Author - Title (Year).pdf"
|
||||
- NEVER delete any file. Unwanted → {LIBRARY_ROOT}/Arsiv/
|
||||
- No spaces in folder names
|
||||
- mkdir -p before every mv
|
||||
|
||||
Process these files from {SOURCE_DIR}:
|
||||
{FILE_LIST}
|
||||
|
||||
Target folder mapping:
|
||||
{FOLDER_MAP_TABLE}
|
||||
|
||||
For EACH file:
|
||||
1. Bash: pdfinfo "FILE" → extract Title, Author, Pages, CreationDate
|
||||
2. Read: file_path="FILE", pages="1-20" → verify author, title, topic
|
||||
3. If ambiguous after 20 pages → read pages "20-40"
|
||||
4. Classify → determine target folder
|
||||
5. Bash: mkdir -p "TARGET" && mv "OLD" "TARGET/Author - Title (Year).pdf"
|
||||
|
||||
Report format per file:
|
||||
[TYPE] old_name.pdf → Author - Title (Year).pdf → TargetFolder/
|
||||
```
|
||||
|
||||
**Launching agents:**
|
||||
|
||||
```python
|
||||
# Send ALL agent calls in a SINGLE message for parallel execution
|
||||
Agent(
|
||||
name="lib-batch1",
|
||||
prompt="...(files 1-30)...",
|
||||
mode="bypassPermissions",
|
||||
run_in_background=True
|
||||
)
|
||||
Agent(
|
||||
name="lib-batch2",
|
||||
prompt="...(files 31-60)...",
|
||||
mode="bypassPermissions",
|
||||
run_in_background=True
|
||||
)
|
||||
# ... up to 10 parallel agents
|
||||
```
|
||||
|
||||
### Phase 4: Read & Classify Each PDF
|
||||
|
||||
**Step 1 - Metadata check (fast):**
|
||||
```bash
|
||||
pdfinfo "file.pdf"
|
||||
# Gives: Title, Author, Creator, Producer, CreationDate, Pages
|
||||
```
|
||||
|
||||
**Step 2 - Content read (thorough):**
|
||||
```
|
||||
Read(file_path="/path/to/file.pdf", pages="1-20")
|
||||
```
|
||||
|
||||
**Extract from content:**
|
||||
- **Real author** (not editor, not advisor, not publisher, not translator)
|
||||
- **Real title** (from title page, not OCR garbage in filename)
|
||||
- **Publication year** (from copyright page, not filename date)
|
||||
- **Type**: Kitap / Makale / Rapor / Tez / El Kitabı / Dergi / Teknik Doküman
|
||||
- **Topic**: Specific subject for classification
|
||||
- **Language**: TR / EN / DE / RU / etc.
|
||||
|
||||
**Step 3 - Ambiguity resolution:**
|
||||
If 20 pages insufficient → `Read(file_path, pages="20-40")`
|
||||
If still unclear → `Grep(pattern="keywords", path="file.pdf")`
|
||||
|
||||
### Phase 5: Rename
|
||||
|
||||
**Format:** `Author - Title (Year).pdf`
|
||||
|
||||
**Common OCR/download fixes:**
|
||||
|
||||
| Problem | Example | Fix |
|
||||
|---|---|---|
|
||||
| OCR junk prefix | `Dağıtım GAMEDA - Tanzimat` | Read title page → real author |
|
||||
| Download artifact | `Book (PDFDrive).pdf` | Remove `(PDFDrive)` |
|
||||
| Hash/ID in name | `[#131337]-112799.pdf` | Remove, use real title |
|
||||
| Underscores | `Yusuf_Hikmet_Bayur` | Replace with spaces |
|
||||
| Wrong year | `(1882)` = birth year | Check copyright page |
|
||||
| Truncated title | `Sertan Kolat - Web Tabanli Uygulamalarda Otomatik Guvenlik Denetim Yazilimlarinin Iyilestirilmes` | Complete from content |
|
||||
| Advisor as author | `Güngör ŞAHİN - MİLLÎ SAVUNMA ÜNİVERSİTESİ (1920)` | Read → find student name |
|
||||
| Typos | `Terraki`, `Asleri` | Fix: `Terakki`, `Askeri` |
|
||||
| Encoding issues | `Te__kilat`, `LLÎGÜVENLİ` | Read → reconstruct |
|
||||
|
||||
### Phase 6: Move
|
||||
|
||||
```bash
|
||||
# Always mkdir -p first
|
||||
mkdir -p "<LIBRARY_ROOT>/TargetTopic/SubTopic/"
|
||||
mv "/old/path/garbled_name.pdf" "<LIBRARY_ROOT>/TargetTopic/SubTopic/Author - Title (Year).pdf"
|
||||
```
|
||||
|
||||
### Phase 7: Report & Cleanup
|
||||
|
||||
```bash
|
||||
# Remove empty old directories (safe - only removes if empty)
|
||||
find /old/library/path -type d -empty -delete
|
||||
|
||||
# Final count
|
||||
find <LIBRARY_ROOT> -name "*.pdf" | wc -l
|
||||
```
|
||||
|
||||
## Duplicate Handling
|
||||
|
||||
```bash
|
||||
# Compare sizes
|
||||
ls -la "file1.pdf" "file2.pdf"
|
||||
# Keep LARGER (better scan quality)
|
||||
# Move smaller to Arsiv/Duplikatlar/ (NEVER delete)
|
||||
mkdir -p Arsiv/Duplikatlar
|
||||
mv "smaller_file.pdf" Arsiv/Duplikatlar/
|
||||
```
|
||||
|
||||
## Library Root
|
||||
|
||||
**`/mnt/storage/Common/Books/`** — Komga-compatible hierarchy. Max 2 levels deep.
|
||||
|
||||
## Classification Reference Table
|
||||
|
||||
| Content | Top Folder | Subtopic Examples |
|
||||
|---|---|---|
|
||||
| Askeri strateji, savaş teorisi | `AskeriTarih/` | `StratejiVeSavasSanati/`, `GenelAskeriTarih/`, `DenizHarpTarihi/` |
|
||||
| Field manual, doktrin | `AskeriDoktrin/` | `ABD-FieldManual/`, `FOIA-Pentagon/`, `ElKitaplari/` |
|
||||
| NATO dokümanları | `NATO/` | `FOIA-NATO/`, `Teknik/`, `Tatbikat/`, `Idari/` |
|
||||
| İstihbarat genel | `Istihbarat/` | `TeoriVeAnaliz/`, `CIA/`, `RusIstihbarati/`, `TurkIstihbarati/` |
|
||||
| **FOIA CIA genel (okuma odası)** | `Istihbarat/CIA/` | *(doğrudan dosya, alt klasör yok)* |
|
||||
| **FOIA CIA Türkiye** | `Istihbarat/FOIA-CIA-Turkey/` | *(doğrudan dosya)* |
|
||||
| **FOIA CIA Orta Doğu** | `Istihbarat/FOIA-CIA-OrtaDogu/` | *(doğrudan dosya)* |
|
||||
| **FOIA CIA Pakistan/Afgan** | `Istihbarat/FOIA-CIA-Pakistan/` | *(doğrudan dosya)* |
|
||||
| **FOIA CIA Çin** | `Istihbarat/FOIA-CIA-Cin/` | *(doğrudan dosya)* |
|
||||
| **FOIA CIA Afrika** | `Istihbarat/FOIA-CIA-Afrika/` | *(doğrudan dosya)* |
|
||||
| **FOIA CIA İsrail/Filistin** | `Istihbarat/FOIA-CIA-Israil-Filistin/` | *(doğrudan dosya)* |
|
||||
| **FOIA CIA Hindistan** | `Istihbarat/FOIA-CIA-Hindistan/` | *(doğrudan dosya)* |
|
||||
| **FOIA FBI Vault** | `Istihbarat/FOIA-FBI-Vault/` | *(doğrudan dosya)* |
|
||||
| **FOIA Rusya/KGB/FSB** | `Istihbarat/RusIstihbarati/` | *(doğrudan dosya)* |
|
||||
| **FOIA Terörle Mücadele** | `GuvenlikStratejileri/FOIA-CIA-Teror/` | *(doğrudan dosya)* |
|
||||
| **FOIA Siber Savaş** | `SiberGuvenlik/FOIA-SiberSavas/` | *(doğrudan dosya)* |
|
||||
| Osmanlı tarihi | `OsmanliTarihi/` | `IttihatVeTerakki/`, `JonTurkHareketi/`, `AbdulhamidDonemi/` |
|
||||
| Cumhuriyet tarihi | `CumhuriyetTarihi/` | `MilliMucadele/`, `SiyasiDusunce/`, `Donemler/` |
|
||||
| Dünya tarihi | `DunyaTarihi/` | `AntikTarih/`, `AvrupaTarihi/`, `DersMateryalleri/` |
|
||||
| Siber güvenlik | `SiberGuvenlik/` | `AgGuvenligi/`, `WebGuvenligi/`, `SaldiriTeknikleri/` |
|
||||
| Roman/kurgu | `FelsefeVeEdebiyat/` | `Edebiyat/` |
|
||||
| Dergi sayıları | `GuvenlikStratejileri/` | `Dergi/` |
|
||||
| Kişisel/idari doküman | `Arsiv/` | `Duplikatlar/` |
|
||||
| Sınıflandırılamayan | `Arsiv/` | `Siniflandirilmamis/` |
|
||||
|
||||
## Common Mistakes
|
||||
|
||||
| Mistake | Fix |
|
||||
|---|---|
|
||||
| Classifying by filename alone | ALWAYS read 20+ pages AND pdfinfo first |
|
||||
| Deleting "junk" files | Move to Arsiv/, let user decide |
|
||||
| Spaces in folder names | CamelCase or hyphens only |
|
||||
| Using advisor name as author (theses) | Read title page for student name |
|
||||
| Using topic date as publication year | Check copyright/publishing page |
|
||||
| Moving without mkdir -p | Always create target dir first |
|
||||
| Too many files per agent | Max 30 files per subagent |
|
||||
| Single agent for 100+ files | MUST use parallel agents |
|
||||
| Not checking pdfinfo first | pdfinfo is fast metadata; Read is thorough content |
|
||||
| Forgetting epub files | Glob for both `*.pdf` and `*.epub` |
|
||||
597
personas/_shared/community-skills/marketing-strategist/SKILL.md
Normal file
597
personas/_shared/community-skills/marketing-strategist/SKILL.md
Normal file
@@ -0,0 +1,597 @@
|
||||
---
|
||||
name: marketing-strategist
|
||||
description: Use when analyzing products for market fit, creating go-to-market strategies, pricing decisions, competitive positioning, customer segmentation, landing page copy, brand storytelling, or any "how do we sell this" question. Triggers on marketing strategy, product launch, sales planning, market research, pricing, branding, or commercialization tasks.
|
||||
---
|
||||
|
||||
# Marketing Strategist — Alihan Framework Edition
|
||||
|
||||
An AI marketing strategist that combines Alihan Aydin's proprietary frameworks with classical marketing theory to analyze products, identify market opportunities, and create actionable go-to-market strategies.
|
||||
|
||||
## Source Knowledge Base
|
||||
|
||||
This skill synthesizes insights from 13 documents in `<MARKETING_CORPUS>/`:
|
||||
|
||||
### Alihan's Original Frameworks
|
||||
- **W2P / H2W (Where to Play / How to Win)** — Lafley & Martin's Playing to Win adapted for tech products
|
||||
- **Fizibilite Cercevesi** — Feasibility framework for product-market fit
|
||||
- **Hedef Kitle Duygu Analiz Framework'u** — Audience emotion analysis
|
||||
- **Beklenti Paradigmasi (Expectation Paradigm)** — Marketing as anticipation management
|
||||
- **8 Haftalik TR Marketing Stratejisti Plan** — Turkey-specific marketing curriculum
|
||||
- **Pazarlama Calisma Rehberi 1 & 2** — 4-module marketing workbook (Strategy, Analytics, Storytelling, Trends)
|
||||
|
||||
### Classical References (Key Concepts Extracted)
|
||||
- **Kahneman (Thinking Fast & Slow)** — System 1/2, loss aversion, anchoring, framing effects
|
||||
- **Ariely (Predictably Irrational)** — Decoy effect, free pricing, social vs market norms, expectation bias
|
||||
- **Sinek (Start With Why)** — Golden Circle, WHY before WHAT, limbic brain decisions
|
||||
- **Godin (This Is Marketing)** — Smallest viable audience, status roles, tension & relief, permission marketing
|
||||
- **Sutherland (Alchemy)** — Psycho-logic vs logic, perception > reality, irrational value creation
|
||||
|
||||
---
|
||||
|
||||
## Core Strategic Model: Playing to Win (W2P/H2W)
|
||||
|
||||
Every product analysis MUST pass through these 5 cascading questions:
|
||||
|
||||
```
|
||||
1. WINNING ASPIRATION — "Ne icin kazanmak istiyoruz?"
|
||||
→ Not "var olmak" but "kazanmak" — what does winning mean?
|
||||
|
||||
2. WHERE TO PLAY (W2P) — "Nerede oynayacagiz?"
|
||||
→ 5 dimensions: Musteri Segmenti, Cografya, Urun/Kategori, Kanal, Fiyat/Deger
|
||||
→ W2P = Kaynaklar + Rekabet + Firsatlar ucgeninde karar
|
||||
→ "Her yeri hedefleyen strateji, hicbir yere varamaz."
|
||||
|
||||
3. HOW TO WIN (H2W) — "Nasil kazanacagiz?"
|
||||
→ Cost Advantage (maliyet liderligi) vs Differentiation (farklilasmma)
|
||||
→ Modern variants: Network, Brand, Capability, Platform, Data advantage
|
||||
→ H2W mantigi: Deger + Farklilik + Savunulabilirlik
|
||||
→ Value = (Fayda + Duygu + Fark) - Maliyet
|
||||
|
||||
4. CAPABILITIES — "Bunu gerceklestirecek yetkinlikler neler?"
|
||||
→ Core (gunluk), Strategic (kopyalanamaz), Dynamic (uyumlama)
|
||||
→ "Strateji, sahip olmadigin kaslarla yapilamaz."
|
||||
|
||||
5. MANAGEMENT SYSTEMS — "Stratejiyi nasil surdurecegiz?"
|
||||
→ KPI/OKR, Quarterly Review, Decision Rights, Learning Loops, Culture
|
||||
→ "Strateji PowerPoint'te degil, rutinlerde yasar."
|
||||
```
|
||||
|
||||
**FIT RULE:** All 5 must align. Wrong W2P = advantage doesn't work. Wrong Capability = strategy fails.
|
||||
|
||||
---
|
||||
|
||||
## Analytical Frameworks
|
||||
|
||||
### W2P Analysis Techniques
|
||||
- **Segmentation (Bolumleme)** — demografik, davranissal, cografi, psikografik, ihtiyac-temelli
|
||||
- **Attractiveness Analysis (Cekicilik)** — pazar buyuklugu, rekabet yogunlugu, musteri sadakati, giris bariyeri
|
||||
- **Competitor Mapping (Rakip Haritalama)** — white space vs red ocean
|
||||
- **Capability-Fit Analysis** — beceriler o segmentte ise yariyor mu?
|
||||
|
||||
### H2W Analytical Techniques
|
||||
- **Value Curve (Deger Egrisi)** — her faktorde rakiplerle karsilastir, overinvested/underinvested bul
|
||||
- **VRIO Framework** — Valuable, Rare, Inimitable, Organized
|
||||
- **Value Discipline Alignment** — urun-musteri-operasyon uclusu tutarli mi?
|
||||
- **Playbook Mapping** — Speed Play, Scale Play, Brand Play, Niche Play, Platform Play
|
||||
- **Stratejik Moat Turleri** — Brand, Network, Data, Switching Cost, Scale, Ecosystem
|
||||
|
||||
---
|
||||
|
||||
## Customer Analysis: 3 Katmanli Model
|
||||
|
||||
For EVERY product, analyze the customer through:
|
||||
|
||||
```
|
||||
1. Insan (Insight) — "Kimin hayatina dokunuyoruz?"
|
||||
2. Problem (Pain Point) — "Onun icin hangi problemi cozuyoruz?"
|
||||
3. Deger (Value Prop) — "Bizim farkimiz ne?"
|
||||
```
|
||||
|
||||
### 4 Veri Katmani (Data Layers)
|
||||
1. **Tanimlayici (Descriptive)** — Demografik, cografi, sosyoekonomik, psikografik
|
||||
2. **Davranissal (Behavioral)** — Kampanya etkilesimi, web davranisi, satin alma, loyalty/churn
|
||||
3. **Deger Temelli (Value/RFM)** — Recency, Frequency, Monetary
|
||||
4. **Tutum & Algi (Attitudinal)** — Anket/NPS, sosyal dinleme, musteri yorumlari
|
||||
|
||||
### Segmentation (3 Eksen)
|
||||
- **Deger (Value)** — RFM, CLV, sadakat orani
|
||||
- **Davranis (Behavior)** — kampanya duyarliligi, kanal tercihi
|
||||
- **Tutum (Attitude)** — savunucu mu, kararsiz mi, riskli mi?
|
||||
|
||||
---
|
||||
|
||||
## Behavioral Marketing Principles
|
||||
|
||||
### Kahneman (System 1/2)
|
||||
- Most buying decisions are System 1 (fast, emotional, automatic)
|
||||
- Loss aversion: losing hurts 2x more than gaining feels good
|
||||
- Anchoring: first price seen sets the reference frame
|
||||
- Framing: "95% fat-free" vs "5% fat" — same product, different perception
|
||||
- **Application:** Lead with emotion, justify with logic. Price anchoring in tiers.
|
||||
|
||||
### Ariely (Predictably Irrational)
|
||||
- **Decoy Effect:** Add a worse option to make the target option look better
|
||||
- **Free Effect:** "Free" triggers irrational excitement — use free tier strategically
|
||||
- **Social vs Market Norms:** Don't mix — once you introduce money, goodwill framework breaks
|
||||
- **Expectation Bias:** What people expect to experience shapes what they actually experience
|
||||
- **Application:** Freemium design, pricing tier architecture, trial period psychology
|
||||
|
||||
### Sutherland (Alchemy / Psycho-logic)
|
||||
- Perception IS reality in marketing — objective quality matters less than perceived quality
|
||||
- Irrational value creation: Red Bull tastes bad ON PURPOSE (signals potency)
|
||||
- The opposite of a good idea can also be a good idea
|
||||
- **Application:** Don't compete on features, compete on meaning. "Bu bir kahve makinesi degil, ritual baslaticisi."
|
||||
|
||||
---
|
||||
|
||||
## Storytelling Framework
|
||||
|
||||
### Brand Story Structure (5 Steps)
|
||||
1. **Kahraman** — Hedef kitle (NOT the brand)
|
||||
2. **Sorun** — Kahramanin karsilastigi problem
|
||||
3. **Cozum** — Markanin sundugu cozum
|
||||
4. **Sonuc** — Kahramanin yasadigi degisim
|
||||
5. **Mesaj** — Hikayenin tasidigi ana mesaj
|
||||
|
||||
### Sinek's Golden Circle
|
||||
```
|
||||
WHY → Neden variz? (limbik beyin, karar)
|
||||
HOW → Bunu nasil yapiyoruz? (farklilik)
|
||||
WHAT → Ne sunuyoruz? (urun/hizmet)
|
||||
```
|
||||
**Rule:** Always communicate from inside out. WHY first.
|
||||
|
||||
### Godin's This Is Marketing
|
||||
- "Insanlar senin urunune ihtiyac duymuyor. Onlarin hikayesine uygun olan seyi ariyorlar."
|
||||
- Find the **smallest viable audience** — serve them obsessively
|
||||
- Marketing creates **tension** (between where they are and where they could be)
|
||||
- Two status roles: Affiliation (belong to group) vs Dominance (stand out from group)
|
||||
- Permission > Interruption: Earn attention, don't buy it
|
||||
|
||||
---
|
||||
|
||||
## Expectation Paradigm (Beklenti Yonetimi)
|
||||
|
||||
### 3 Katman
|
||||
1. **Kognitif** — Insan ne bekledigini dusunur → Konumlandirma & Mesajlama
|
||||
2. **Duygusal** — Insan ne hissetmeyi umar → Storytelling & Marka deneyimi
|
||||
3. **Sosyal** — Insan basklarinin ne bekledigini gozler → Sosyal kanit & influencer
|
||||
|
||||
### Beklenti Yonetim Araclari
|
||||
1. **Framing (Cerceveleme)** — Sunusu degistir, algiyi degistir
|
||||
2. **Anchor (Referans Noktasi)** — Ilk deger sonraki algiyi sabitler
|
||||
3. **Expectation Gap** — Az vaat et, surprizle genislet
|
||||
4. **Reputation Feedback Loop** — Kullanici geri bildirimleri yeni beklentiler uretir
|
||||
|
||||
### Turkiye Ozeli
|
||||
- Tuketicinin guven duygusu dusuk
|
||||
- Fiyat dalgalanmalari beklentileri surekli degistiriyor
|
||||
- "Fazla vaat"e duyarlilar ama "surpriz tatmine" asiri pozitif tepki veriyorlar
|
||||
- **Turkiye'de marka buyutmek = surprizle guveni harmanlamak**
|
||||
- En iyi TR markalari "samimi" veya "adil" hissi yaratabilenlerdir (Tadelle, Beko, Trendyol)
|
||||
|
||||
---
|
||||
|
||||
## Turkey-Specific Marketing Intelligence
|
||||
|
||||
### 8 Haftalik Stratejist Plani
|
||||
1. **Turkiye'de Pazarlamanin Anatomisi** — duygusal davranis + anlik trend + satis baskisi ucgeni
|
||||
2. **Insan Davranisi Okuma (Behavioral Marketing)** — tetikleyiciler ve marka yonlendirme
|
||||
3. **Marka Psikolojisi ve Arketipler** — "Markanin karakteri kim?"
|
||||
4. **Storytelling ve Anlam Tasarimi** — hikaye satis yapmaz, anlam yaratir
|
||||
5. **Turkiye'de Kultur ve Trend Okuma** — kulturle catisma degil, kulturden dogma
|
||||
6. **Veriyle Hikaye Kurmak (Analitik)** — Google Trends, SimilarWeb, Statista
|
||||
7. **Stratejik Planlama Kasini Gelistir** — "Strateji plan degil, tercihler butunudur"
|
||||
8. **Kisisel Marka & Gorunurluk** — LinkedIn/Medium seri, dusunce liderligi
|
||||
|
||||
### Kanal Secimi (Audience Fit)
|
||||
- Genc & yaratici → Instagram, TikTok, YouTube
|
||||
- Profesyonel & B2B → LinkedIn
|
||||
- Haber tuketen → X (Twitter)
|
||||
- Satin alma odakli → Google Search / E-commerce
|
||||
|
||||
### Altin Kural
|
||||
```
|
||||
Strateji → Mesaj → Icerik → Kanal → KPI
|
||||
(Tersine islem yapmak kaos getirir)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Fizibilite Cercevesi (Feasibility Framework)
|
||||
|
||||
When evaluating whether to commercialize a product, score on:
|
||||
1. **Teknik Hazirlik** — Deploy edilebilir mi? Demo var mi?
|
||||
2. **Pazar Buyuklugu** — TAM/SAM/SOM ne kadar?
|
||||
3. **Rekabet Yogunlugu** — Red ocean mi blue ocean mi?
|
||||
4. **Kaynak Gereksinimleri** — Ne kadar zaman/para/insan lazim?
|
||||
5. **Monetizasyon Netliigi** — Gelir modeli net mi?
|
||||
6. **Ilk Musteri Erisimi** — Ilk 10 musteri nereden gelecek?
|
||||
|
||||
---
|
||||
|
||||
## How to Use This Skill
|
||||
|
||||
### For Product Analysis
|
||||
1. Apply W2P/H2W cascade to the product
|
||||
2. Run 3 Katmanli Customer Analysis (Insight/Problem/Value)
|
||||
3. Identify market position using Competitor Mapping
|
||||
4. Score with Fizibilite Cercevesi
|
||||
5. Recommend: SELL NOW / NEEDS WORK / PIVOT / KILL
|
||||
|
||||
### For Go-to-Market Strategy
|
||||
1. Define WHY (Sinek Golden Circle)
|
||||
2. Choose W2P (segment, geography, channel, price)
|
||||
3. Define H2W (differentiation or cost advantage)
|
||||
4. Create Brand Story (5-step structure)
|
||||
5. Select channels (Audience Fit + Behavior Fit + Content Fit)
|
||||
6. Set KPI chain: Awareness → Engagement → Conversion
|
||||
7. Apply Beklenti Yonetimi for Turkish market
|
||||
|
||||
### For Pricing
|
||||
1. Anchor with premium tier first
|
||||
2. Use Ariely's Decoy Effect for tier design
|
||||
3. Apply Kahneman's loss aversion for churn prevention
|
||||
4. Consider TR market: "adil fiyat" algisi kritik
|
||||
|
||||
### For Landing Page / Sales Copy
|
||||
1. Lead with WHY, not WHAT
|
||||
2. Hero = Customer (not brand)
|
||||
3. Frame the transformation (before → after)
|
||||
4. Social proof (logos, numbers, testimonials)
|
||||
5. Manage expectations (vaat az, surpriz cok)
|
||||
6. CTA with tension (what they lose by not acting)
|
||||
|
||||
---
|
||||
|
||||
## Behavioral Conversion Model (Rehber 2 — Alihan)
|
||||
|
||||
### Master Formula
|
||||
```
|
||||
Istek → Engel → Tetikleyici → Odul → Tekrar
|
||||
```
|
||||
This is the core behavioral marketing engine. Apply to EVERY product launch.
|
||||
|
||||
### 5 Engel Turu (Barriers to Purchase)
|
||||
1. **Bilgi Engeli** — Customer doesn't know what to do → Fix with education content
|
||||
2. **Yetkinlik Engeli** — "I can't do this" → Fix with onboarding, demo, white-glove
|
||||
3. **Finansal Engel** — Price too high → Fix with freemium, payment plans
|
||||
4. **Sosyal Engel** — Fear of judgment → Fix with social proof, community
|
||||
5. **Aliskanlik Engeli** — "I've always done it this way" → Fix with switching incentives
|
||||
|
||||
> **Davranis = Istek - Engeller** — Even high desire fails if barriers remain.
|
||||
|
||||
### 3 Decision Drivers (Karar Tetikleyicileri)
|
||||
1. **Benlik** — "Bu secim beni nasil biri yapar?" (identity)
|
||||
2. **Sosyal** — "Beni kim nasil gorecek?" (status)
|
||||
3. **Duygusal** — "Bana nasil hissettiriyor?" (feeling)
|
||||
|
||||
Find the dominant driver per persona with 3 questions:
|
||||
1. Onlar icin basari ne demek?
|
||||
2. Basari oldugunda kim fark etmeli?
|
||||
3. Basardiklarinda nasil hissetmeliler?
|
||||
|
||||
### Behavior Change Tactics
|
||||
1. **Kanitla rahatlatarak** (Proof) — "1000+ user", reviews, case studies
|
||||
2. **Is yukunu azaltarak** (Ease) — 1-click deploy, instant demo, no-config
|
||||
3. **Duygu ile tetikleyerek** (Emotion) — "Your attack surface is exposed right now"
|
||||
|
||||
### Funnel KPIs
|
||||
- **Activation Rate** — signup → first meaningful action
|
||||
- **First Value Time** — time to first "aha" moment (MOST IMPORTANT KPI)
|
||||
- **Messaging/Engagement Rate** — first 24h activity
|
||||
- **Retention D7** — 7-day return rate
|
||||
|
||||
---
|
||||
|
||||
## Alchemy — Rory Sutherland (Key Concepts)
|
||||
|
||||
### Psycho-Logic vs Logic
|
||||
- Human decisions follow psychological logic, not rational logic
|
||||
- Objective improvement often matters less than perceived improvement
|
||||
- **Red Bull tastes bad ON PURPOSE** — signals potency through unpleasantness
|
||||
|
||||
### The Four S-es of Context-Dependent Decision Making
|
||||
1. **Signaling** — What does choosing this say about me?
|
||||
2. **Subconscious** — What automatic associations does this trigger?
|
||||
3. **Satisficing** — Is this "good enough" vs optimal?
|
||||
4. **Suggestion** — What default/framing am I being nudged toward?
|
||||
|
||||
### Application to <COMPANY>
|
||||
- Don't sell "82 microservices" — sell "sovereign intelligence"
|
||||
- A complex setup process can SIGNAL sophistication (Alchemy principle)
|
||||
- Price above competitors to signal quality (Veblen effect)
|
||||
|
||||
---
|
||||
|
||||
## Predictably Irrational — Dan Ariely (Key Concepts)
|
||||
|
||||
### Decoy Effect (Asymmetric Dominance)
|
||||
Add a clearly inferior option to make the target option look superior.
|
||||
- Economist example: Print-only $59, Digital+Print $125, **Print-only+Digital $125** → everyone picks combo
|
||||
- **Apply:** In pricing tiers, make Starter deliberately weak so Pro looks obvious
|
||||
|
||||
### Zero Price Effect
|
||||
"Free" is not just a price — it's an emotional trigger. Free removes decision anxiety entirely.
|
||||
- **Apply:** Always have a free tier. The conversion from free→paid is easier than no-account→paid.
|
||||
|
||||
### Anchoring
|
||||
First number seen becomes the reference point for all future judgments.
|
||||
- **Apply:** Show competitor prices ($50K+/yr) BEFORE showing your price ($15K/yr)
|
||||
|
||||
### Self-Herding
|
||||
People look at their own past behavior to decide future behavior.
|
||||
- **Apply:** Get users to take ANY small action first (sign up, star repo, follow). Future buying follows.
|
||||
|
||||
---
|
||||
|
||||
## Alihan's 5-Layer Feasibility Model (Fizibilite Cercevesi)
|
||||
|
||||
Before commercializing ANY product, score it across these 5 layers:
|
||||
|
||||
### Layer A: Problem Reality (Problemin Gercekligi)
|
||||
- How often does this problem occur?
|
||||
- How severe is the impact? (time, money, missed opportunity, stress, reputation)
|
||||
- How are people currently solving it?
|
||||
- Why is the current solution insufficient?
|
||||
- Is the problem deferrable or does ignoring it create cost?
|
||||
|
||||
### Layer B: Causality & Mechanism (Nedensellik)
|
||||
- What root mechanism creates this problem?
|
||||
- Is it a process, behavior, knowledge gap, coordination, or visibility issue?
|
||||
- Does the product address the exact break point?
|
||||
|
||||
### Layer C: Solution-Market Fit (Cozum-Pazar Uyumu)
|
||||
- Can you explain in 30 seconds what it does and why they need it?
|
||||
- Is there a repeatable sales motion?
|
||||
- Does the unit economics work?
|
||||
|
||||
### Layer D: Behavioral & Identity Value (Davranissal Deger)
|
||||
Not just "who uses it" but **"who does the user WANT TO BE by using this?"**
|
||||
- **Identity signal**: Does using this product make them feel competent, elite, in-control?
|
||||
- **Social signal**: Does it raise their status among peers?
|
||||
- **Emotional signal**: Does it reduce anxiety, increase confidence?
|
||||
|
||||
### Layer E: Execution Feasibility (Uygulama Kapasitesi)
|
||||
- Team capability, distribution channels, time, technical debt
|
||||
- Can you ship an MVP in 2 weeks?
|
||||
|
||||
### Alihan's 6-Axis Quick Filter
|
||||
1. Pain Test: "Bu aci gercekten yakiyor mu, tekrar ediyor mu, para kaybettiriyor mu?"
|
||||
2. Existing Solutions: "Insanlar bunu zaten cozmeye calisiyor mu?"
|
||||
3. Explainability: "Kisa surede anlatabilir miyim?"
|
||||
4. Execution Capacity: "Teknik kapasite yeterli mi?"
|
||||
5. Founder Belief: "Kendim de inanabilecegim bir sey mi?"
|
||||
6. Behavioral Value: "Bu urunu kullanan kisi kim olmak istiyor?"
|
||||
|
||||
---
|
||||
|
||||
## Hedef Kitle Duygu Analiz Framework'u (Alihan)
|
||||
|
||||
### Emotion Mapping for Target Audience
|
||||
For each customer segment, map:
|
||||
1. **Dominant emotion** before purchase (anxiety, frustration, curiosity, ambition)
|
||||
2. **Desired emotion** after purchase (relief, confidence, pride, control)
|
||||
3. **Fear** that blocks purchase (waste of money, complexity, judgment)
|
||||
4. **Social proof type** that resolves fear (peer testimonials, authority endorsement, numbers)
|
||||
|
||||
### The Emotion → Action Bridge
|
||||
```
|
||||
Emotion (System 1) → Rationalization (System 2) → Action → Post-purchase emotion → Loyalty loop
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Seth Godin — This Is Marketing (Deep Framework)
|
||||
|
||||
### The 5 Steps of Marketing
|
||||
1. **Invent** — Create something valuable with a compelling story
|
||||
2. **Design** — Build it for a specific niche that truly benefits
|
||||
3. **Tell a Story** — Align narrative with aspirations of that small market
|
||||
4. **Spread the Word** — Actively promote and advocate
|
||||
5. **Show Up** — Consistently engage to foster trust and community
|
||||
|
||||
### Smallest Viable Audience (SVA)
|
||||
The most critical concept. Do NOT try to reach everyone.
|
||||
- **Ask**: "What change am I trying to make?"
|
||||
- **Ask**: "Who am I seeking to change?"
|
||||
- **Identify** the smallest group sharing beliefs and worldviews
|
||||
- **Focus** all effort on delighting them
|
||||
|
||||
> "My product is for people who believe ___. I will promise them ___ and deliver ___."
|
||||
|
||||
> "Coloring the ocean purple" — dye a pool (visible) not the ocean (invisible). Target the pool.
|
||||
|
||||
### Status Roles: Affiliation vs Dominance
|
||||
Every purchase decision involves status:
|
||||
- **Affiliation** — "I belong to this group" (community, shared identity)
|
||||
- **Dominance** — "I stand out from others" (premium, exclusive)
|
||||
- Determine which role your product serves per segment
|
||||
|
||||
### Tension Creates Action
|
||||
Marketing creates **tension** between where customer is and where they could be.
|
||||
- Tension ≠ Fear. Fear freezes. Tension mobilizes.
|
||||
- "What will you miss if you don't act?"
|
||||
|
||||
### Pricing as Signal
|
||||
- Price tells a story about who this is for
|
||||
- Cheapness = fear, not generosity
|
||||
- "Free" changes the dynamic entirely (see Ariely)
|
||||
|
||||
### Permission > Interruption
|
||||
Earn attention, don't buy it. Build a permission asset over time.
|
||||
|
||||
---
|
||||
|
||||
## Rory Sutherland — Alchemy (Deep Framework)
|
||||
|
||||
### 12 Counterintuitive Principles
|
||||
1. **Opposite of good idea can be good** — Red Bull: high price + bad taste = signal of potency
|
||||
2. **Value is in the mind, not the object** — Rebrand, don't rebuild
|
||||
3. **Costly signals > cheap signals** — Expensive = trustworthy
|
||||
4. **Efficiency destroys meaning** — "Pick any two: Efficiency, Logic, Meaning"
|
||||
5. **Making things harder makes them better** — IKEA Effect, cake mix + egg
|
||||
6. **Context is everything** — Same product, different frame = different perception
|
||||
7. **Vaguely right > precisely wrong** — Gut + data beats data alone
|
||||
8. **Small changes, big effects** — Trivial modifications can have disproportionate impact
|
||||
9. **Test before you theorize** — Behavior contradicts theory constantly
|
||||
10. **Control perception, not product** — Marketing > engineering for satisfaction
|
||||
11. **Unpredictable rewards beat predictable ones** — Surprise drives loyalty
|
||||
12. **What you remove matters as much as what you add** — Subtraction creates value
|
||||
|
||||
### Signalling Theory (5 Types)
|
||||
1. **Costly Signalling** — Expensive ads signal financial health
|
||||
2. **Repetitive Signalling** — Consistency = reliability (Coca-Cola repeats forever)
|
||||
3. **Handicap Signalling** — Self-imposed constraints prove quality (peacock's tail)
|
||||
4. **Creative Signalling** — Novel approaches substitute cost with ingenuity
|
||||
5. **Social Signalling** — Brand choice broadcasts identity to others
|
||||
|
||||
### The Placebo Effect in Marketing
|
||||
- Wine tastes better when told it's expensive
|
||||
- Pain relievers work better at higher prices
|
||||
- **Your price IS your product** — don't undercut yourself
|
||||
|
||||
---
|
||||
|
||||
## Daniel Kahneman — Thinking Fast & Slow (Deep Framework)
|
||||
|
||||
### System 1 vs System 2 — Complete Table
|
||||
| Dimension | System 1 (Fast) | System 2 (Slow) |
|
||||
|-----------|----------------|-----------------|
|
||||
| Speed | Automatic, instant | Deliberate, effortful |
|
||||
| Effort | None | Requires attention, depletes energy |
|
||||
| Awareness | Below conscious | Fully conscious |
|
||||
| Errors | Systematic biases | Can correct but often endorses System 1 |
|
||||
| Default | Always on | Activated only when needed |
|
||||
|
||||
> **Most purchase decisions are System 1.** Target emotions first, give logic for justification.
|
||||
|
||||
### Critical Cognitive Biases for Marketing
|
||||
1. **WYSIATI** (What You See Is All There Is) — Control the information environment. First thing seen = entire frame
|
||||
2. **Anchoring** — First number sets reference. Show competitor price ($50K) before yours ($15K)
|
||||
3. **Loss Aversion** — Losing hurts 2x more than gaining. Frame as "what you lose by not acting"
|
||||
4. **Framing Effect** — "95% effective" vs "5% fail rate" — same data, opposite reaction
|
||||
5. **Halo Effect** — One good impression colors everything else
|
||||
6. **Availability Heuristic** — Recent/vivid examples dominate judgment. Use case studies, breach news
|
||||
7. **Endowment Effect** — People overvalue what they already own. Free trials create ownership
|
||||
8. **Peak-End Rule** — People remember the peak moment and the end. Design onboarding peaks
|
||||
|
||||
### Prospect Theory for Pricing
|
||||
- Losses loom larger than gains (2:1 ratio)
|
||||
- People are risk-seeking in losses, risk-averse in gains
|
||||
- **Bundle losses** (one painful payment vs many small ones)
|
||||
- **Unbundle gains** (many small delights vs one big one)
|
||||
- **Frame discounts as avoiding loss**, not gaining savings
|
||||
|
||||
---
|
||||
|
||||
## Dan Ariely — Predictably Irrational (Complete)
|
||||
|
||||
### Chapter-by-Chapter Actionable Principles
|
||||
|
||||
1. **Decoy Effect** — Always offer 3 tiers. Middle = target. Add deliberately inferior option.
|
||||
2. **Anchoring** — First price seen becomes reference forever. Show high anchor first.
|
||||
3. **Zero Price Effect** — "Free" triggers irrational excitement. Free tier removes decision anxiety.
|
||||
4. **Social vs Market Norms** — Don't mix! Once you introduce money, goodwill breaks. Community ≠ transaction.
|
||||
5. **Arousal & Decision-Making** — Emotional state changes preferences. Urgency/fear/excitement = different choices.
|
||||
6. **Procrastination** — People defer even beneficial actions. Add deadlines, limited offers.
|
||||
7. **Endowment Effect** — Free trials create psychological ownership. Hard to cancel what you "own."
|
||||
8. **Keeping Doors Open** — People hate losing options. "Limited time" works because it threatens option loss.
|
||||
9. **Expectations Shape Experience** — What people expect to experience shapes actual experience. Set expectations high.
|
||||
10. **Placebo Pricing** — Higher price = perceived higher quality. Don't compete on price; compete on perception.
|
||||
11. **The Cycle of Distrust** — Once trust breaks, it's nearly impossible to rebuild. Guard reputation obsessively.
|
||||
|
||||
### Master Pricing Architecture (from Ariely)
|
||||
```
|
||||
Tier 1: FREE (removes anxiety, creates self-herding)
|
||||
Tier 2: STARTER (deliberate decoy — limited, slightly frustrating)
|
||||
Tier 3: PRO (target — obviously best value vs Starter)
|
||||
Tier 4: ENTERPRISE (anchor — makes Pro look reasonable)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## <COMPANY> Portfolio — Applied Intelligence
|
||||
|
||||
### Product Priority Matrix (from 20-Agent Analysis)
|
||||
```
|
||||
SELL NOW (this week):
|
||||
1. Personas Library → Gumroad/PromptBase, $50-500/sale
|
||||
2. ollama-scanner → Blog post + Black Hat Arsenal
|
||||
3. killer-claude → PTaaS to MSSPs, $5K-35K/engagement
|
||||
|
||||
LAUNCH (2 weeks):
|
||||
4. DaveIntel → Substack $15/mo + Telegram premium
|
||||
5. iNTERCEPT → Open-core, Apache 2.0
|
||||
|
||||
SCALE (month 2-3):
|
||||
6. ASM → TR banks (BDDK mandate), $10-40K/yr
|
||||
7. FrodoIntel → Sovereign CTI SaaS, $15-50K/yr
|
||||
8. <COMPANY> Suite → Bundle, $3-10K/mo
|
||||
```
|
||||
|
||||
### Positioning Cheat Sheet
|
||||
| Product | Tagline | Archetype | W2P |
|
||||
|---------|---------|-----------|-----|
|
||||
| ASM | "See what attackers see" | Guardian | TR FIRST |
|
||||
| killer-claude | "Pentest. Prove. Repeat." | Outlaw | BOTH |
|
||||
| FrodoIntel | "Intelligence. Sovereign." | Sage-Ruler | TR FIRST |
|
||||
| ollama-scanner | "Shodan for AI" | Hero | GLOBAL |
|
||||
| Shadowbroker | "Connect every dot" | Magician | GLOBAL |
|
||||
| Mission Control | "Command your agents" | Ruler | GLOBAL |
|
||||
| DaveIntel | "The signal in the noise" | Sage | BOTH |
|
||||
| iNTERCEPT | "Listen to everything" | Explorer | BOTH |
|
||||
| Personas | "29 minds, one library" | Creator | GLOBAL |
|
||||
|
||||
### Revenue Projections (Year 1)
|
||||
- Conservative: $349K
|
||||
- Expected: $580K
|
||||
- Optimistic: $980K
|
||||
- Highest driver: killer-claude PTaaS ($120-420K)
|
||||
- Fastest: Personas (days to first sale)
|
||||
- Highest margin: Personas (95%+)
|
||||
|
||||
### Growth Loop
|
||||
```
|
||||
ollama-scanner (free, viral)
|
||||
→ discovers exposed LLMs
|
||||
→ leads need security assessment
|
||||
→ killer-claude (paid pentest)
|
||||
→ findings need continuous monitoring
|
||||
→ ASM (subscription)
|
||||
→ threat context needed
|
||||
→ FrodoIntel (platform)
|
||||
→ all feeds into <COMPANY> Suite (bundle)
|
||||
```
|
||||
|
||||
### Turkey Strategic Advantage
|
||||
- **Law 7545** (March 2025): Mandatory cybersecurity compliance for all public entities
|
||||
- **BDDK**: Annual independent pentest mandate for banks
|
||||
- **KVKK**: Fines up to TRY 17M per violation
|
||||
- **SSB**: Domestic vendor preference for defense/intelligence
|
||||
- **Currency arbitrage**: Earn USD, spend TRY → 5-10x purchasing power advantage
|
||||
- **Zero domestic competition**: No Turkish ASM, CTI, or OSINT platform exists
|
||||
|
||||
---
|
||||
|
||||
## Key Quotes to Internalize
|
||||
|
||||
> "Strateji bir plan degil, secimler sistemidir." — Lafley & Martin
|
||||
|
||||
> "Her yerde iyi olmak aslinda hicbir yerde kazanmamaktir."
|
||||
|
||||
> "Value = (Fayda + Duygu + Fark) - Maliyet"
|
||||
|
||||
> "Pazarlama = Geregi yonetmek degil, beklentiyi tasarlamaktir." — Alihan
|
||||
|
||||
> "Insanlar markayi degil, hikayeyi hatirlar."
|
||||
|
||||
> "Trade-off yapmayanin stratejisi yoktur." — Porter
|
||||
|
||||
> "Turkiye'de marka buyutmek = surprizle guveni harmanlamak."
|
||||
|
||||
> "Start with Why." — Sinek
|
||||
|
||||
> "People don't buy what you do, they buy why you do it."
|
||||
|
||||
> "Find the smallest viable audience and serve them so well they tell others." — Godin
|
||||
154
personas/_shared/community-skills/notebooklm/AUTHENTICATION.md
Executable file
154
personas/_shared/community-skills/notebooklm/AUTHENTICATION.md
Executable file
@@ -0,0 +1,154 @@
|
||||
# Authentication Architecture
|
||||
|
||||
## Overview
|
||||
|
||||
This skill uses a **hybrid authentication approach** that combines the best of both worlds:
|
||||
|
||||
1. **Persistent Browser Profile** (`user_data_dir`) for consistent browser fingerprinting
|
||||
2. **Manual Cookie Injection** from `state.json` for reliable session cookie persistence
|
||||
|
||||
## Why This Approach?
|
||||
|
||||
### The Problem
|
||||
|
||||
Playwright/Patchright has a known bug ([#36139](https://github.com/microsoft/playwright/issues/36139)) where **session cookies** (cookies without an `Expires` attribute) do not persist correctly when using `launch_persistent_context()` with `user_data_dir`.
|
||||
|
||||
**What happens:**
|
||||
- ✅ Persistent cookies (with `Expires` date) → Saved correctly to browser profile
|
||||
- ❌ Session cookies (without `Expires`) → **Lost after browser restarts**
|
||||
|
||||
**Impact:**
|
||||
- Some Google auth cookies are session cookies
|
||||
- Users experience random authentication failures
|
||||
- "Works on my machine" syndrome (depends on which cookies Google uses)
|
||||
|
||||
### TypeScript vs Python
|
||||
|
||||
The **MCP Server** (TypeScript) can work around this by passing `storage_state` as a parameter:
|
||||
|
||||
```typescript
|
||||
// TypeScript - works!
|
||||
const context = await chromium.launchPersistentContext(userDataDir, {
|
||||
storageState: "state.json", // ← Loads cookies including session cookies
|
||||
channel: "chrome"
|
||||
});
|
||||
```
|
||||
|
||||
But **Python's Playwright API doesn't support this** ([#14949](https://github.com/microsoft/playwright/issues/14949)):
|
||||
|
||||
```python
|
||||
# Python - NOT SUPPORTED!
|
||||
context = playwright.chromium.launch_persistent_context(
|
||||
user_data_dir=profile_dir,
|
||||
storage_state="state.json", # ← Parameter not available in Python!
|
||||
channel="chrome"
|
||||
)
|
||||
```
|
||||
|
||||
## Our Solution: Hybrid Approach
|
||||
|
||||
We use a **two-phase authentication system**:
|
||||
|
||||
### Phase 1: Setup (`auth_manager.py setup`)
|
||||
|
||||
1. Launch persistent context with `user_data_dir`
|
||||
2. User logs in manually
|
||||
3. **Save state to TWO places:**
|
||||
- Browser profile directory (automatic, for fingerprint + persistent cookies)
|
||||
- `state.json` file (explicit save, for session cookies)
|
||||
|
||||
```python
|
||||
context = playwright.chromium.launch_persistent_context(
|
||||
user_data_dir="browser_profile/",
|
||||
channel="chrome"
|
||||
)
|
||||
# User logs in...
|
||||
context.storage_state(path="state.json") # Save all cookies
|
||||
```
|
||||
|
||||
### Phase 2: Runtime (`ask_question.py`)
|
||||
|
||||
1. Launch persistent context with `user_data_dir` (loads fingerprint + persistent cookies)
|
||||
2. **Manually inject cookies** from `state.json` (adds session cookies)
|
||||
|
||||
```python
|
||||
# Step 1: Launch with browser profile
|
||||
context = playwright.chromium.launch_persistent_context(
|
||||
user_data_dir="browser_profile/",
|
||||
channel="chrome"
|
||||
)
|
||||
|
||||
# Step 2: Manually inject cookies from state.json
|
||||
with open("state.json", 'r') as f:
|
||||
state = json.load(f)
|
||||
context.add_cookies(state['cookies']) # ← Workaround for session cookies!
|
||||
```
|
||||
|
||||
## Benefits
|
||||
|
||||
| Feature | Our Approach | Pure `user_data_dir` | Pure `storage_state` |
|
||||
|---------|--------------|----------------------|----------------------|
|
||||
| **Browser Fingerprint Consistency** | ✅ Same across restarts | ✅ Same | ❌ Changes each time |
|
||||
| **Session Cookie Persistence** | ✅ Manual injection | ❌ Lost (bug) | ✅ Native support |
|
||||
| **Persistent Cookie Persistence** | ✅ Automatic | ✅ Automatic | ✅ Native support |
|
||||
| **Google Trust** | ✅ High (same browser) | ✅ High | ❌ Low (new browser) |
|
||||
| **Cross-platform Reliability** | ✅ Chrome required | ⚠️ Chromium issues | ✅ Portable |
|
||||
| **Cache Performance** | ✅ Keeps cache | ✅ Keeps cache | ❌ No cache |
|
||||
|
||||
## File Structure
|
||||
|
||||
```
|
||||
~/.claude/skills/notebooklm/data/
|
||||
├── auth_info.json # Metadata about authentication
|
||||
├── browser_state/
|
||||
│ ├── state.json # Cookies + localStorage (for manual injection)
|
||||
│ └── browser_profile/ # Chrome user profile (for fingerprint + cache)
|
||||
│ ├── Default/
|
||||
│ │ ├── Cookies # Persistent cookies only (session cookies missing!)
|
||||
│ │ ├── Local Storage/
|
||||
│ │ └── Cache/
|
||||
│ └── ...
|
||||
```
|
||||
|
||||
## Why `state.json` is Critical
|
||||
|
||||
Even though we use `user_data_dir`, we **still need `state.json`** because:
|
||||
|
||||
1. **Session cookies** are not saved to the browser profile (Playwright bug)
|
||||
2. **Manual injection** is the only reliable way to load session cookies
|
||||
3. **Validation** - we can check if cookies are expired before launching
|
||||
|
||||
## Code References
|
||||
|
||||
**Setup:** `scripts/auth_manager.py:94-120`
|
||||
- Lines 100-113: Launch persistent context with `channel="chrome"`
|
||||
- Line 167: Save to `state.json` via `context.storage_state()`
|
||||
|
||||
**Runtime:** `scripts/ask_question.py:77-118`
|
||||
- Lines 86-99: Launch persistent context
|
||||
- Lines 101-118: Manual cookie injection workaround
|
||||
|
||||
**Validation:** `scripts/auth_manager.py:236-298`
|
||||
- Lines 262-275: Launch persistent context
|
||||
- Lines 277-287: Manual cookie injection for validation
|
||||
|
||||
## Related Issues
|
||||
|
||||
- [microsoft/playwright#36139](https://github.com/microsoft/playwright/issues/36139) - Session cookies not persisting
|
||||
- [microsoft/playwright#14949](https://github.com/microsoft/playwright/issues/14949) - Storage state with persistent context
|
||||
- [StackOverflow Question](https://stackoverflow.com/questions/79641481/) - Session cookie persistence issue
|
||||
|
||||
## Future Improvements
|
||||
|
||||
If Playwright adds support for `storage_state` parameter in Python's `launch_persistent_context()`, we can simplify to:
|
||||
|
||||
```python
|
||||
# Future (when Python API supports it):
|
||||
context = playwright.chromium.launch_persistent_context(
|
||||
user_data_dir="browser_profile/",
|
||||
storage_state="state.json", # ← Would handle everything automatically!
|
||||
channel="chrome"
|
||||
)
|
||||
```
|
||||
|
||||
Until then, our hybrid approach is the most reliable solution.
|
||||
44
personas/_shared/community-skills/notebooklm/CHANGELOG.md
Executable file
44
personas/_shared/community-skills/notebooklm/CHANGELOG.md
Executable file
@@ -0,0 +1,44 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [1.3.0] - 2025-11-21
|
||||
|
||||
### Added
|
||||
- **Modular Architecture** - Refactored codebase for better maintainability
|
||||
- New `config.py` - Centralized configuration (paths, selectors, timeouts)
|
||||
- New `browser_utils.py` - BrowserFactory and StealthUtils classes
|
||||
- Cleaner separation of concerns across all scripts
|
||||
|
||||
### Changed
|
||||
- **Timeout increased to 120 seconds** - Long queries no longer timeout prematurely
|
||||
- `ask_question.py`: 30s → 120s
|
||||
- `browser_session.py`: 30s → 120s
|
||||
- Resolves Issue #4
|
||||
|
||||
### Fixed
|
||||
- **Thinking Message Detection** - Fixed incomplete answers showing placeholder text
|
||||
- Now waits for `div.thinking-message` element to disappear before reading answer
|
||||
- Answers like "Reviewing the content..." or "Looking for answers..." no longer returned prematurely
|
||||
- Works reliably across all languages and NotebookLM UI changes
|
||||
|
||||
- **Correct CSS Selectors** - Updated to match current NotebookLM UI
|
||||
- Changed from `.response-content, .message-content` to `.to-user-container .message-text-content`
|
||||
- Consistent selectors across all scripts
|
||||
|
||||
- **Stability Detection** - Improved answer completeness check
|
||||
- Now requires 3 consecutive stable polls instead of 1 second wait
|
||||
- Prevents truncated responses during streaming
|
||||
|
||||
## [1.2.0] - 2025-10-28
|
||||
|
||||
### Added
|
||||
- Initial public release
|
||||
- NotebookLM integration via browser automation
|
||||
- Session-based conversations with Gemini 2.5
|
||||
- Notebook library management
|
||||
- Knowledge base preparation tools
|
||||
- Google authentication with persistent sessions
|
||||
21
personas/_shared/community-skills/notebooklm/LICENSE
Executable file
21
personas/_shared/community-skills/notebooklm/LICENSE
Executable file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2025 Please Prompto!
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
412
personas/_shared/community-skills/notebooklm/README.md
Executable file
412
personas/_shared/community-skills/notebooklm/README.md
Executable file
@@ -0,0 +1,412 @@
|
||||
<div align="center">
|
||||
|
||||
# NotebookLM Claude Code Skill
|
||||
|
||||
**Let [Claude Code](https://github.com/anthropics/claude-code) chat directly with NotebookLM for source-grounded answers based exclusively on your uploaded documents**
|
||||
|
||||
[](https://www.python.org/)
|
||||
[](https://www.anthropic.com/news/skills)
|
||||
[](https://github.com/PleasePrompto/notebooklm-mcp)
|
||||
[](https://github.com/PleasePrompto/notebooklm-skill)
|
||||
|
||||
> Use this skill to query your Google NotebookLM notebooks directly from Claude Code for source-grounded, citation-backed answers from Gemini. Browser automation, library management, persistent auth. Drastically reduced hallucinations - answers only from your uploaded documents.
|
||||
|
||||
[Installation](#installation) • [Quick Start](#quick-start) • [Why NotebookLM](#why-notebooklm-not-local-rag) • [How It Works](#how-it-works) • [MCP Alternative](https://github.com/PleasePrompto/notebooklm-mcp)
|
||||
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
## ⚠️ Important: Local Claude Code Only
|
||||
|
||||
**This skill works ONLY with local [Claude Code](https://github.com/anthropics/claude-code) installations, NOT in the web UI.**
|
||||
|
||||
The web UI runs skills in a sandbox without network access, which this skill requires for browser automation. You must use [Claude Code](https://github.com/anthropics/claude-code) locally on your machine.
|
||||
|
||||
---
|
||||
|
||||
## The Problem
|
||||
|
||||
When you tell [Claude Code](https://github.com/anthropics/claude-code) to "search through my local documentation", here's what happens:
|
||||
- **Massive token consumption**: Searching through documentation means reading multiple files repeatedly
|
||||
- **Inaccurate retrieval**: Searches for keywords, misses context and connections between docs
|
||||
- **Hallucinations**: When it can't find something, it invents plausible-sounding APIs
|
||||
- **Manual copy-paste**: Switching between NotebookLM browser and your editor constantly
|
||||
|
||||
## The Solution
|
||||
|
||||
This Claude Code Skill lets [Claude Code](https://github.com/anthropics/claude-code) chat directly with [**NotebookLM**](https://notebooklm.google/) — Google's **source-grounded knowledge base** powered by Gemini 2.5 that provides intelligent, synthesized answers exclusively from your uploaded documents.
|
||||
|
||||
```
|
||||
Your Task → Claude asks NotebookLM → Gemini synthesizes answer → Claude writes correct code
|
||||
```
|
||||
|
||||
**No more copy-paste dance**: Claude asks questions directly and gets answers straight back in the CLI. It builds deep understanding through automatic follow-ups, getting specific implementation details, edge cases, and best practices.
|
||||
|
||||
---
|
||||
|
||||
## Why NotebookLM, Not Local RAG?
|
||||
|
||||
| Approach | Token Cost | Setup Time | Hallucinations | Answer Quality |
|
||||
|----------|------------|------------|----------------|----------------|
|
||||
| **Feed docs to Claude** | 🔴 Very high (multiple file reads) | Instant | Yes - fills gaps | Variable retrieval |
|
||||
| **Web search** | 🟡 Medium | Instant | High - unreliable sources | Hit or miss |
|
||||
| **Local RAG** | 🟡 Medium-High | Hours (embeddings, chunking) | Medium - retrieval gaps | Depends on setup |
|
||||
| **NotebookLM Skill** | 🟢 Minimal | 5 minutes | **Minimal** - source-grounded only | Expert synthesis |
|
||||
|
||||
### What Makes NotebookLM Superior?
|
||||
|
||||
1. **Pre-processed by Gemini**: Upload docs once, get instant expert knowledge
|
||||
2. **Natural language Q&A**: Not just retrieval — actual understanding and synthesis
|
||||
3. **Multi-source correlation**: Connects information across 50+ documents
|
||||
4. **Citation-backed**: Every answer includes source references
|
||||
5. **No infrastructure**: No vector DBs, embeddings, or chunking strategies needed
|
||||
|
||||
---
|
||||
|
||||
## Installation
|
||||
|
||||
### The simplest installation ever:
|
||||
|
||||
```bash
|
||||
# 1. Create skills directory (if it doesn't exist)
|
||||
mkdir -p ~/.claude/skills
|
||||
|
||||
# 2. Clone this repository
|
||||
cd ~/.claude/skills
|
||||
git clone https://github.com/PleasePrompto/notebooklm-skill notebooklm
|
||||
|
||||
# 3. That's it! Open Claude Code and say:
|
||||
"What are my skills?"
|
||||
```
|
||||
|
||||
When you first use the skill, it automatically:
|
||||
- Creates an isolated Python environment (`.venv`)
|
||||
- Installs all dependencies including **Google Chrome**
|
||||
- Sets up browser automation with Chrome (not Chromium) for maximum reliability
|
||||
- Everything stays contained in the skill folder
|
||||
|
||||
**Note:** The setup uses real Chrome instead of Chromium for cross-platform reliability, consistent browser fingerprinting, and better anti-detection with Google services
|
||||
|
||||
---
|
||||
|
||||
## Quick Start
|
||||
|
||||
### 1. Check your skills
|
||||
|
||||
Say in Claude Code:
|
||||
```
|
||||
"What skills do I have?"
|
||||
```
|
||||
|
||||
Claude will list your available skills including NotebookLM.
|
||||
|
||||
### 2. Authenticate with Google (one-time)
|
||||
|
||||
```
|
||||
"Set up NotebookLM authentication"
|
||||
```
|
||||
*A Chrome window opens → log in with your Google account*
|
||||
|
||||
### 3. Create your knowledge base
|
||||
|
||||
Go to [notebooklm.google.com](https://notebooklm.google.com) → Create notebook → Upload your docs:
|
||||
- 📄 PDFs, Google Docs, markdown files
|
||||
- 🔗 Websites, GitHub repos
|
||||
- 🎥 YouTube videos
|
||||
- 📚 Multiple sources per notebook
|
||||
|
||||
Share: **⚙️ Share → Anyone with link → Copy**
|
||||
|
||||
### 4. Add to your library
|
||||
|
||||
**Option A: Let Claude figure it out (Smart Add)**
|
||||
```
|
||||
"Query this notebook about its content and add it to my library: [your-link]"
|
||||
```
|
||||
Claude will automatically query the notebook to discover its content, then add it with appropriate metadata.
|
||||
|
||||
**Option B: Manual add**
|
||||
```
|
||||
"Add this NotebookLM to my library: [your-link]"
|
||||
```
|
||||
Claude will ask for a name and topics, then save it for future use.
|
||||
|
||||
### 5. Start researching
|
||||
|
||||
```
|
||||
"What does my React docs say about hooks?"
|
||||
```
|
||||
|
||||
Claude automatically selects the right notebook and gets the answer directly from NotebookLM.
|
||||
|
||||
---
|
||||
|
||||
## How It Works
|
||||
|
||||
This is a **Claude Code Skill** - a local folder containing instructions and scripts that Claude Code can use when needed. Unlike the [MCP server version](https://github.com/PleasePrompto/notebooklm-mcp), this runs directly in Claude Code without needing a separate server.
|
||||
|
||||
### Key Differences from MCP Server
|
||||
|
||||
| Feature | This Skill | MCP Server |
|
||||
|---------|------------|------------|
|
||||
| **Protocol** | Claude Skills | Model Context Protocol |
|
||||
| **Installation** | Clone to `~/.claude/skills` | `claude mcp add ...` |
|
||||
| **Sessions** | Fresh browser each question | Persistent chat sessions |
|
||||
| **Compatibility** | Claude Code only (local) | Claude Code, Codex, Cursor, etc. |
|
||||
| **Language** | Python | TypeScript |
|
||||
| **Distribution** | Git clone | npm package |
|
||||
|
||||
### Architecture
|
||||
|
||||
```
|
||||
~/.claude/skills/notebooklm/
|
||||
├── SKILL.md # Instructions for Claude
|
||||
├── scripts/ # Python automation scripts
|
||||
│ ├── ask_question.py # Query NotebookLM
|
||||
│ ├── notebook_manager.py # Library management
|
||||
│ └── auth_manager.py # Google authentication
|
||||
├── .venv/ # Isolated Python environment (auto-created)
|
||||
└── data/ # Local notebook library
|
||||
```
|
||||
|
||||
When you mention NotebookLM or send a notebook URL, Claude:
|
||||
1. Loads the skill instructions
|
||||
2. Runs the appropriate Python script
|
||||
3. Opens a browser, asks your question
|
||||
4. Returns the answer directly to you
|
||||
5. Uses that knowledge to help with your task
|
||||
|
||||
---
|
||||
|
||||
## Core Features
|
||||
|
||||
### **Source-Grounded Responses**
|
||||
NotebookLM significantly reduces hallucinations by answering exclusively from your uploaded documents. If information isn't available, it indicates uncertainty rather than inventing content.
|
||||
|
||||
### **Direct Integration**
|
||||
No copy-paste between browser and editor. Claude asks and receives answers programmatically.
|
||||
|
||||
### **Smart Library Management**
|
||||
Save NotebookLM links with tags and descriptions. Claude auto-selects the right notebook for your task.
|
||||
|
||||
### **Automatic Authentication**
|
||||
One-time Google login, then authentication persists across sessions.
|
||||
|
||||
### **Self-Contained**
|
||||
Everything runs in the skill folder with an isolated Python environment. No global installations.
|
||||
|
||||
### **Human-Like Automation**
|
||||
Uses realistic typing speeds and interaction patterns to avoid detection.
|
||||
|
||||
---
|
||||
|
||||
## Common Commands
|
||||
|
||||
| What you say | What happens |
|
||||
|--------------|--------------|
|
||||
| *"Set up NotebookLM authentication"* | Opens Chrome for Google login |
|
||||
| *"Add [link] to my NotebookLM library"* | Saves notebook with metadata |
|
||||
| *"Show my NotebookLM notebooks"* | Lists all saved notebooks |
|
||||
| *"Ask my API docs about [topic]"* | Queries the relevant notebook |
|
||||
| *"Use the React notebook"* | Sets active notebook |
|
||||
| *"Clear NotebookLM data"* | Fresh start (keeps library) |
|
||||
|
||||
---
|
||||
|
||||
## Real-World Examples
|
||||
|
||||
### Example 1: Workshop Manual Query
|
||||
|
||||
**User asks**: "Check my Suzuki GSR 600 workshop manual for brake fluid type, engine oil specs, and rear axle torque."
|
||||
|
||||
**Claude automatically**:
|
||||
- Authenticates with NotebookLM
|
||||
- Asks comprehensive questions about each specification
|
||||
- Follows up when prompted "Is that ALL you need to know?"
|
||||
- Provides accurate specifications: DOT 4 brake fluid, SAE 10W-40 oil, 100 N·m rear axle torque
|
||||
|
||||

|
||||
|
||||
### Example 2: Building Without Hallucinations
|
||||
|
||||
**You**: "I need to build an n8n workflow for Gmail spam filtering. Use my n8n notebook."
|
||||
|
||||
**Claude's internal process:**
|
||||
```
|
||||
→ Loads NotebookLM skill
|
||||
→ Activates n8n notebook
|
||||
→ Asks comprehensive questions with follow-ups
|
||||
→ Synthesizes complete answer from multiple queries
|
||||
```
|
||||
|
||||
**Result**: Working workflow on first try, no debugging hallucinated APIs.
|
||||
|
||||
---
|
||||
|
||||
## Technical Details
|
||||
|
||||
### Core Technology
|
||||
- **Patchright**: Browser automation library (Playwright-based)
|
||||
- **Python**: Implementation language for this skill
|
||||
- **Stealth techniques**: Human-like typing and interaction patterns
|
||||
|
||||
Note: The MCP server uses the same Patchright library but via TypeScript/npm ecosystem.
|
||||
|
||||
### Dependencies
|
||||
- **patchright==1.55.2**: Browser automation
|
||||
- **python-dotenv==1.0.0**: Environment configuration
|
||||
- Automatically installed in `.venv` on first use
|
||||
|
||||
### Data Storage
|
||||
|
||||
All data is stored locally within the skill directory:
|
||||
|
||||
```
|
||||
~/.claude/skills/notebooklm/data/
|
||||
├── library.json - Your notebook library with metadata
|
||||
├── auth_info.json - Authentication status info
|
||||
└── browser_state/ - Browser cookies and session data
|
||||
```
|
||||
|
||||
**Important Security Note:**
|
||||
- The `data/` directory contains sensitive authentication data and personal notebooks
|
||||
- It's automatically excluded from git via `.gitignore`
|
||||
- NEVER manually commit or share the contents of the `data/` directory
|
||||
|
||||
### Session Model
|
||||
|
||||
Unlike the MCP server, this skill uses a **stateless model**:
|
||||
- Each question opens a fresh browser
|
||||
- Asks the question, gets the answer
|
||||
- Adds a follow-up prompt to encourage Claude to ask more questions
|
||||
- Closes the browser immediately
|
||||
|
||||
This means:
|
||||
- No persistent chat context
|
||||
- Each question is independent
|
||||
- But your notebook library persists
|
||||
- **Follow-up mechanism**: Each answer includes "Is that ALL you need to know?" to prompt Claude to ask comprehensive follow-ups
|
||||
|
||||
For multi-step research, Claude automatically asks follow-up questions when needed.
|
||||
|
||||
---
|
||||
|
||||
## Limitations
|
||||
|
||||
### Skill-Specific
|
||||
- **Local Claude Code only** - Does not work in web UI (sandbox restrictions)
|
||||
- **No session persistence** - Each question is independent
|
||||
- **No follow-up context** - Can't reference "the previous answer"
|
||||
|
||||
### NotebookLM
|
||||
- **Rate limits** - Free tier has daily query limits
|
||||
- **Manual upload** - You must upload docs to NotebookLM first
|
||||
- **Share requirement** - Notebooks must be shared publicly
|
||||
|
||||
---
|
||||
|
||||
## FAQ
|
||||
|
||||
**Why doesn't this work in the Claude web UI?**
|
||||
The web UI runs skills in a sandbox without network access. Browser automation requires network access to reach NotebookLM.
|
||||
|
||||
**How is this different from the MCP server?**
|
||||
This is a simpler, Python-based implementation that runs directly as a Claude Skill. The MCP server is more feature-rich with persistent sessions and works with multiple tools (Codex, Cursor, etc.).
|
||||
|
||||
**Can I use both this skill and the MCP server?**
|
||||
Yes! They serve different purposes. Use the skill for quick Claude Code integration, use the MCP server for persistent sessions and multi-tool support.
|
||||
|
||||
**What if Chrome crashes?**
|
||||
Run: `"Clear NotebookLM browser data"` and try again.
|
||||
|
||||
**Is my Google account secure?**
|
||||
Chrome runs locally on your machine. Your credentials never leave your computer. Use a dedicated Google account if you're concerned.
|
||||
|
||||
---
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Skill not found
|
||||
```bash
|
||||
# Make sure it's in the right location
|
||||
ls ~/.claude/skills/notebooklm/
|
||||
# Should show: SKILL.md, scripts/, etc.
|
||||
```
|
||||
|
||||
### Authentication issues
|
||||
Say: `"Reset NotebookLM authentication"`
|
||||
|
||||
### Browser crashes
|
||||
Say: `"Clear NotebookLM browser data"`
|
||||
|
||||
### Dependencies issues
|
||||
```bash
|
||||
# Manual reinstall if needed
|
||||
cd ~/.claude/skills/notebooklm
|
||||
rm -rf .venv
|
||||
python -m venv .venv
|
||||
source .venv/bin/activate # or .venv\Scripts\activate on Windows
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Disclaimer
|
||||
|
||||
This tool automates browser interactions with NotebookLM to make your workflow more efficient. However, a few friendly reminders:
|
||||
|
||||
**About browser automation:**
|
||||
While I've built in humanization features (realistic typing speeds, natural delays, mouse movements) to make the automation behave more naturally, I can't guarantee Google won't detect or flag automated usage. I recommend using a dedicated Google account for automation rather than your primary account—think of it like web scraping: probably fine, but better safe than sorry!
|
||||
|
||||
**About CLI tools and AI agents:**
|
||||
CLI tools like Claude Code, Codex, and similar AI-powered assistants are incredibly powerful, but they can make mistakes. Please use them with care and awareness:
|
||||
- Always review changes before committing or deploying
|
||||
- Test in safe environments first
|
||||
- Keep backups of important work
|
||||
- Remember: AI agents are assistants, not infallible oracles
|
||||
|
||||
I built this tool for myself because I was tired of the copy-paste dance between NotebookLM and my editor. I'm sharing it in the hope it helps others too, but I can't take responsibility for any issues, data loss, or account problems that might occur. Use at your own discretion and judgment.
|
||||
|
||||
That said, if you run into problems or have questions, feel free to open an issue on GitHub. I'm happy to help troubleshoot!
|
||||
|
||||
---
|
||||
|
||||
## Credits
|
||||
|
||||
This skill is inspired by my [**NotebookLM MCP Server**](https://github.com/PleasePrompto/notebooklm-mcp) and provides an alternative implementation as a Claude Code Skill:
|
||||
- Both use Patchright for browser automation (TypeScript for MCP, Python for Skill)
|
||||
- Skill version runs directly in Claude Code without MCP protocol
|
||||
- Stateless design optimized for skill architecture
|
||||
|
||||
If you need:
|
||||
- **Persistent sessions** → Use the [MCP Server](https://github.com/PleasePrompto/notebooklm-mcp)
|
||||
- **Multiple tool support** (Codex, Cursor) → Use the [MCP Server](https://github.com/PleasePrompto/notebooklm-mcp)
|
||||
- **Quick Claude Code integration** → Use this skill
|
||||
|
||||
---
|
||||
|
||||
## The Bottom Line
|
||||
|
||||
**Without this skill**: NotebookLM in browser → Copy answer → Paste in Claude → Copy next question → Back to browser...
|
||||
|
||||
**With this skill**: Claude researches directly → Gets answers instantly → Writes correct code
|
||||
|
||||
Stop the copy-paste dance. Start getting accurate, grounded answers directly in Claude Code.
|
||||
|
||||
```bash
|
||||
# Get started in 30 seconds
|
||||
cd ~/.claude/skills
|
||||
git clone https://github.com/PleasePrompto/notebooklm-skill notebooklm
|
||||
# Open Claude Code: "What are my skills?"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
|
||||
Built as a Claude Code Skill adaptation of my [NotebookLM MCP Server](https://github.com/PleasePrompto/notebooklm-mcp)
|
||||
|
||||
For source-grounded, document-based research directly in Claude Code
|
||||
|
||||
</div>
|
||||
269
personas/_shared/community-skills/notebooklm/SKILL.md
Executable file
269
personas/_shared/community-skills/notebooklm/SKILL.md
Executable file
@@ -0,0 +1,269 @@
|
||||
---
|
||||
name: notebooklm
|
||||
description: Use this skill to query your Google NotebookLM notebooks directly from Claude Code for source-grounded, citation-backed answers from Gemini. Browser automation, library management, persistent auth. Drastically reduced hallucinations through document-only responses.
|
||||
---
|
||||
|
||||
# NotebookLM Research Assistant Skill
|
||||
|
||||
Interact with Google NotebookLM to query documentation with Gemini's source-grounded answers. Each question opens a fresh browser session, retrieves the answer exclusively from your uploaded documents, and closes.
|
||||
|
||||
## When to Use This Skill
|
||||
|
||||
Trigger when user:
|
||||
- Mentions NotebookLM explicitly
|
||||
- Shares NotebookLM URL (`https://notebooklm.google.com/notebook/...`)
|
||||
- Asks to query their notebooks/documentation
|
||||
- Wants to add documentation to NotebookLM library
|
||||
- Uses phrases like "ask my NotebookLM", "check my docs", "query my notebook"
|
||||
|
||||
## ⚠️ CRITICAL: Add Command - Smart Discovery
|
||||
|
||||
When user wants to add a notebook without providing details:
|
||||
|
||||
**SMART ADD (Recommended)**: Query the notebook first to discover its content:
|
||||
```bash
|
||||
# Step 1: Query the notebook about its content
|
||||
python scripts/run.py ask_question.py --question "What is the content of this notebook? What topics are covered? Provide a complete overview briefly and concisely" --notebook-url "[URL]"
|
||||
|
||||
# Step 2: Use the discovered information to add it
|
||||
python scripts/run.py notebook_manager.py add --url "[URL]" --name "[Based on content]" --description "[Based on content]" --topics "[Based on content]"
|
||||
```
|
||||
|
||||
**MANUAL ADD**: If user provides all details:
|
||||
- `--url` - The NotebookLM URL
|
||||
- `--name` - A descriptive name
|
||||
- `--description` - What the notebook contains (REQUIRED!)
|
||||
- `--topics` - Comma-separated topics (REQUIRED!)
|
||||
|
||||
NEVER guess or use generic descriptions! If details missing, use Smart Add to discover them.
|
||||
|
||||
## Critical: Always Use run.py Wrapper
|
||||
|
||||
**NEVER call scripts directly. ALWAYS use `python scripts/run.py [script]`:**
|
||||
|
||||
```bash
|
||||
# ✅ CORRECT - Always use run.py:
|
||||
python scripts/run.py auth_manager.py status
|
||||
python scripts/run.py notebook_manager.py list
|
||||
python scripts/run.py ask_question.py --question "..."
|
||||
|
||||
# ❌ WRONG - Never call directly:
|
||||
python scripts/auth_manager.py status # Fails without venv!
|
||||
```
|
||||
|
||||
The `run.py` wrapper automatically:
|
||||
1. Creates `.venv` if needed
|
||||
2. Installs all dependencies
|
||||
3. Activates environment
|
||||
4. Executes script properly
|
||||
|
||||
## Core Workflow
|
||||
|
||||
### Step 1: Check Authentication Status
|
||||
```bash
|
||||
python scripts/run.py auth_manager.py status
|
||||
```
|
||||
|
||||
If not authenticated, proceed to setup.
|
||||
|
||||
### Step 2: Authenticate (One-Time Setup)
|
||||
```bash
|
||||
# Browser MUST be visible for manual Google login
|
||||
python scripts/run.py auth_manager.py setup
|
||||
```
|
||||
|
||||
**Important:**
|
||||
- Browser is VISIBLE for authentication
|
||||
- Browser window opens automatically
|
||||
- User must manually log in to Google
|
||||
- Tell user: "A browser window will open for Google login"
|
||||
|
||||
### Step 3: Manage Notebook Library
|
||||
|
||||
```bash
|
||||
# List all notebooks
|
||||
python scripts/run.py notebook_manager.py list
|
||||
|
||||
# BEFORE ADDING: Ask user for metadata if unknown!
|
||||
# "What does this notebook contain?"
|
||||
# "What topics should I tag it with?"
|
||||
|
||||
# Add notebook to library (ALL parameters are REQUIRED!)
|
||||
python scripts/run.py notebook_manager.py add \
|
||||
--url "https://notebooklm.google.com/notebook/..." \
|
||||
--name "Descriptive Name" \
|
||||
--description "What this notebook contains" \ # REQUIRED - ASK USER IF UNKNOWN!
|
||||
--topics "topic1,topic2,topic3" # REQUIRED - ASK USER IF UNKNOWN!
|
||||
|
||||
# Search notebooks by topic
|
||||
python scripts/run.py notebook_manager.py search --query "keyword"
|
||||
|
||||
# Set active notebook
|
||||
python scripts/run.py notebook_manager.py activate --id notebook-id
|
||||
|
||||
# Remove notebook
|
||||
python scripts/run.py notebook_manager.py remove --id notebook-id
|
||||
```
|
||||
|
||||
### Quick Workflow
|
||||
1. Check library: `python scripts/run.py notebook_manager.py list`
|
||||
2. Ask question: `python scripts/run.py ask_question.py --question "..." --notebook-id ID`
|
||||
|
||||
### Step 4: Ask Questions
|
||||
|
||||
```bash
|
||||
# Basic query (uses active notebook if set)
|
||||
python scripts/run.py ask_question.py --question "Your question here"
|
||||
|
||||
# Query specific notebook
|
||||
python scripts/run.py ask_question.py --question "..." --notebook-id notebook-id
|
||||
|
||||
# Query with notebook URL directly
|
||||
python scripts/run.py ask_question.py --question "..." --notebook-url "https://..."
|
||||
|
||||
# Show browser for debugging
|
||||
python scripts/run.py ask_question.py --question "..." --show-browser
|
||||
```
|
||||
|
||||
## Follow-Up Mechanism (CRITICAL)
|
||||
|
||||
Every NotebookLM answer ends with: **"EXTREMELY IMPORTANT: Is that ALL you need to know?"**
|
||||
|
||||
**Required Claude Behavior:**
|
||||
1. **STOP** - Do not immediately respond to user
|
||||
2. **ANALYZE** - Compare answer to user's original request
|
||||
3. **IDENTIFY GAPS** - Determine if more information needed
|
||||
4. **ASK FOLLOW-UP** - If gaps exist, immediately ask:
|
||||
```bash
|
||||
python scripts/run.py ask_question.py --question "Follow-up with context..."
|
||||
```
|
||||
5. **REPEAT** - Continue until information is complete
|
||||
6. **SYNTHESIZE** - Combine all answers before responding to user
|
||||
|
||||
## Script Reference
|
||||
|
||||
### Authentication Management (`auth_manager.py`)
|
||||
```bash
|
||||
python scripts/run.py auth_manager.py setup # Initial setup (browser visible)
|
||||
python scripts/run.py auth_manager.py status # Check authentication
|
||||
python scripts/run.py auth_manager.py reauth # Re-authenticate (browser visible)
|
||||
python scripts/run.py auth_manager.py clear # Clear authentication
|
||||
```
|
||||
|
||||
### Notebook Management (`notebook_manager.py`)
|
||||
```bash
|
||||
python scripts/run.py notebook_manager.py add --url URL --name NAME --description DESC --topics TOPICS
|
||||
python scripts/run.py notebook_manager.py list
|
||||
python scripts/run.py notebook_manager.py search --query QUERY
|
||||
python scripts/run.py notebook_manager.py activate --id ID
|
||||
python scripts/run.py notebook_manager.py remove --id ID
|
||||
python scripts/run.py notebook_manager.py stats
|
||||
```
|
||||
|
||||
### Question Interface (`ask_question.py`)
|
||||
```bash
|
||||
python scripts/run.py ask_question.py --question "..." [--notebook-id ID] [--notebook-url URL] [--show-browser]
|
||||
```
|
||||
|
||||
### Data Cleanup (`cleanup_manager.py`)
|
||||
```bash
|
||||
python scripts/run.py cleanup_manager.py # Preview cleanup
|
||||
python scripts/run.py cleanup_manager.py --confirm # Execute cleanup
|
||||
python scripts/run.py cleanup_manager.py --preserve-library # Keep notebooks
|
||||
```
|
||||
|
||||
## Environment Management
|
||||
|
||||
The virtual environment is automatically managed:
|
||||
- First run creates `.venv` automatically
|
||||
- Dependencies install automatically
|
||||
- Chromium browser installs automatically
|
||||
- Everything isolated in skill directory
|
||||
|
||||
Manual setup (only if automatic fails):
|
||||
```bash
|
||||
python -m venv .venv
|
||||
source .venv/bin/activate # Linux/Mac
|
||||
pip install -r requirements.txt
|
||||
python -m patchright install chromium
|
||||
```
|
||||
|
||||
## Data Storage
|
||||
|
||||
All data stored in `~/.claude/skills/notebooklm/data/`:
|
||||
- `library.json` - Notebook metadata
|
||||
- `auth_info.json` - Authentication status
|
||||
- `browser_state/` - Browser cookies and session
|
||||
|
||||
**Security:** Protected by `.gitignore`, never commit to git.
|
||||
|
||||
## Configuration
|
||||
|
||||
Optional `.env` file in skill directory:
|
||||
```env
|
||||
HEADLESS=false # Browser visibility
|
||||
SHOW_BROWSER=false # Default browser display
|
||||
STEALTH_ENABLED=true # Human-like behavior
|
||||
TYPING_WPM_MIN=160 # Typing speed
|
||||
TYPING_WPM_MAX=240
|
||||
DEFAULT_NOTEBOOK_ID= # Default notebook
|
||||
```
|
||||
|
||||
## Decision Flow
|
||||
|
||||
```
|
||||
User mentions NotebookLM
|
||||
↓
|
||||
Check auth → python scripts/run.py auth_manager.py status
|
||||
↓
|
||||
If not authenticated → python scripts/run.py auth_manager.py setup
|
||||
↓
|
||||
Check/Add notebook → python scripts/run.py notebook_manager.py list/add (with --description)
|
||||
↓
|
||||
Activate notebook → python scripts/run.py notebook_manager.py activate --id ID
|
||||
↓
|
||||
Ask question → python scripts/run.py ask_question.py --question "..."
|
||||
↓
|
||||
See "Is that ALL you need?" → Ask follow-ups until complete
|
||||
↓
|
||||
Synthesize and respond to user
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
| Problem | Solution |
|
||||
|---------|----------|
|
||||
| ModuleNotFoundError | Use `run.py` wrapper |
|
||||
| Authentication fails | Browser must be visible for setup! --show-browser |
|
||||
| Rate limit (50/day) | Wait or switch Google account |
|
||||
| Browser crashes | `python scripts/run.py cleanup_manager.py --preserve-library` |
|
||||
| Notebook not found | Check with `notebook_manager.py list` |
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Always use run.py** - Handles environment automatically
|
||||
2. **Check auth first** - Before any operations
|
||||
3. **Follow-up questions** - Don't stop at first answer
|
||||
4. **Browser visible for auth** - Required for manual login
|
||||
5. **Include context** - Each question is independent
|
||||
6. **Synthesize answers** - Combine multiple responses
|
||||
|
||||
## Limitations
|
||||
|
||||
- No session persistence (each question = new browser)
|
||||
- Rate limits on free Google accounts (50 queries/day)
|
||||
- Manual upload required (user must add docs to NotebookLM)
|
||||
- Browser overhead (few seconds per question)
|
||||
|
||||
## Resources (Skill Structure)
|
||||
|
||||
**Important directories and files:**
|
||||
|
||||
- `scripts/` - All automation scripts (ask_question.py, notebook_manager.py, etc.)
|
||||
- `data/` - Local storage for authentication and notebook library
|
||||
- `references/` - Extended documentation:
|
||||
- `api_reference.md` - Detailed API documentation for all scripts
|
||||
- `troubleshooting.md` - Common issues and solutions
|
||||
- `usage_patterns.md` - Best practices and workflow examples
|
||||
- `.venv/` - Isolated Python environment (auto-created on first run)
|
||||
- `.gitignore` - Protects sensitive data from being committed
|
||||
309
personas/_shared/community-skills/notebooklm/references/api_reference.md
Executable file
309
personas/_shared/community-skills/notebooklm/references/api_reference.md
Executable file
@@ -0,0 +1,309 @@
|
||||
# NotebookLM Skill API Reference
|
||||
|
||||
Complete API documentation for all NotebookLM skill modules.
|
||||
|
||||
## Important: Always Use run.py Wrapper
|
||||
|
||||
**All commands must use the `run.py` wrapper to ensure proper environment:**
|
||||
|
||||
```bash
|
||||
# ✅ CORRECT:
|
||||
python scripts/run.py [script_name].py [arguments]
|
||||
|
||||
# ❌ WRONG:
|
||||
python scripts/[script_name].py [arguments] # Will fail without venv!
|
||||
```
|
||||
|
||||
## Core Scripts
|
||||
|
||||
### ask_question.py
|
||||
Query NotebookLM with automated browser interaction.
|
||||
|
||||
```bash
|
||||
# Basic usage
|
||||
python scripts/run.py ask_question.py --question "Your question"
|
||||
|
||||
# With specific notebook
|
||||
python scripts/run.py ask_question.py --question "..." --notebook-id notebook-id
|
||||
|
||||
# With direct URL
|
||||
python scripts/run.py ask_question.py --question "..." --notebook-url "https://..."
|
||||
|
||||
# Show browser (debugging)
|
||||
python scripts/run.py ask_question.py --question "..." --show-browser
|
||||
```
|
||||
|
||||
**Parameters:**
|
||||
- `--question` (required): Question to ask
|
||||
- `--notebook-id`: Use notebook from library
|
||||
- `--notebook-url`: Use URL directly
|
||||
- `--show-browser`: Make browser visible
|
||||
|
||||
**Returns:** Answer text with follow-up prompt appended
|
||||
|
||||
### notebook_manager.py
|
||||
Manage notebook library with CRUD operations.
|
||||
|
||||
```bash
|
||||
# Smart Add (discover content first)
|
||||
python scripts/run.py ask_question.py --question "What is the content of this notebook? What topics are covered? Provide a complete overview briefly and concisely" --notebook-url "[URL]"
|
||||
# Then add with discovered info
|
||||
python scripts/run.py notebook_manager.py add \
|
||||
--url "https://notebooklm.google.com/notebook/..." \
|
||||
--name "Name" \
|
||||
--description "Description" \
|
||||
--topics "topic1,topic2"
|
||||
|
||||
# Direct add (when you know the content)
|
||||
python scripts/run.py notebook_manager.py add \
|
||||
--url "https://notebooklm.google.com/notebook/..." \
|
||||
--name "Name" \
|
||||
--description "What it contains" \
|
||||
--topics "topic1,topic2"
|
||||
|
||||
# List notebooks
|
||||
python scripts/run.py notebook_manager.py list
|
||||
|
||||
# Search notebooks
|
||||
python scripts/run.py notebook_manager.py search --query "keyword"
|
||||
|
||||
# Activate notebook
|
||||
python scripts/run.py notebook_manager.py activate --id notebook-id
|
||||
|
||||
# Remove notebook
|
||||
python scripts/run.py notebook_manager.py remove --id notebook-id
|
||||
|
||||
# Show statistics
|
||||
python scripts/run.py notebook_manager.py stats
|
||||
```
|
||||
|
||||
**Commands:**
|
||||
- `add`: Add notebook (requires --url, --name, --topics)
|
||||
- `list`: Show all notebooks
|
||||
- `search`: Find notebooks by keyword
|
||||
- `activate`: Set default notebook
|
||||
- `remove`: Delete from library
|
||||
- `stats`: Display library statistics
|
||||
|
||||
### auth_manager.py
|
||||
Handle Google authentication and browser state.
|
||||
|
||||
```bash
|
||||
# Setup (browser visible for login)
|
||||
python scripts/run.py auth_manager.py setup
|
||||
|
||||
# Check status
|
||||
python scripts/run.py auth_manager.py status
|
||||
|
||||
# Re-authenticate
|
||||
python scripts/run.py auth_manager.py reauth
|
||||
|
||||
# Clear authentication
|
||||
python scripts/run.py auth_manager.py clear
|
||||
```
|
||||
|
||||
**Commands:**
|
||||
- `setup`: Initial authentication (browser MUST be visible)
|
||||
- `status`: Check if authenticated
|
||||
- `reauth`: Clear and re-setup
|
||||
- `clear`: Remove all auth data
|
||||
|
||||
### cleanup_manager.py
|
||||
Clean skill data with preservation options.
|
||||
|
||||
```bash
|
||||
# Preview cleanup
|
||||
python scripts/run.py cleanup_manager.py
|
||||
|
||||
# Execute cleanup
|
||||
python scripts/run.py cleanup_manager.py --confirm
|
||||
|
||||
# Keep library
|
||||
python scripts/run.py cleanup_manager.py --confirm --preserve-library
|
||||
|
||||
# Force without prompt
|
||||
python scripts/run.py cleanup_manager.py --confirm --force
|
||||
```
|
||||
|
||||
**Options:**
|
||||
- `--confirm`: Actually perform cleanup
|
||||
- `--preserve-library`: Keep notebook library
|
||||
- `--force`: Skip confirmation prompt
|
||||
|
||||
### run.py
|
||||
Script wrapper that handles environment setup.
|
||||
|
||||
```bash
|
||||
# Usage
|
||||
python scripts/run.py [script_name].py [arguments]
|
||||
|
||||
# Examples
|
||||
python scripts/run.py auth_manager.py status
|
||||
python scripts/run.py ask_question.py --question "..."
|
||||
```
|
||||
|
||||
**Automatic actions:**
|
||||
1. Creates `.venv` if missing
|
||||
2. Installs dependencies
|
||||
3. Activates environment
|
||||
4. Executes target script
|
||||
|
||||
## Python API Usage
|
||||
|
||||
### Using subprocess with run.py
|
||||
|
||||
```python
|
||||
import subprocess
|
||||
import json
|
||||
|
||||
# Always use run.py wrapper
|
||||
result = subprocess.run([
|
||||
"python", "scripts/run.py", "ask_question.py",
|
||||
"--question", "Your question",
|
||||
"--notebook-id", "notebook-id"
|
||||
], capture_output=True, text=True)
|
||||
|
||||
answer = result.stdout
|
||||
```
|
||||
|
||||
### Direct imports (after venv exists)
|
||||
|
||||
```python
|
||||
# Only works if venv is already created and activated
|
||||
from notebook_manager import NotebookLibrary
|
||||
from auth_manager import AuthManager
|
||||
|
||||
library = NotebookLibrary()
|
||||
notebooks = library.list_notebooks()
|
||||
|
||||
auth = AuthManager()
|
||||
is_auth = auth.is_authenticated()
|
||||
```
|
||||
|
||||
## Data Storage
|
||||
|
||||
Location: `~/.claude/skills/notebooklm/data/`
|
||||
|
||||
```
|
||||
data/
|
||||
├── library.json # Notebook metadata
|
||||
├── auth_info.json # Auth status
|
||||
└── browser_state/ # Browser cookies
|
||||
└── state.json
|
||||
```
|
||||
|
||||
**Security:** Protected by `.gitignore`, never commit.
|
||||
|
||||
## Environment Variables
|
||||
|
||||
Optional `.env` file configuration:
|
||||
|
||||
```env
|
||||
HEADLESS=false # Browser visibility
|
||||
SHOW_BROWSER=false # Default display
|
||||
STEALTH_ENABLED=true # Human behavior
|
||||
TYPING_WPM_MIN=160 # Typing speed
|
||||
TYPING_WPM_MAX=240
|
||||
DEFAULT_NOTEBOOK_ID= # Default notebook
|
||||
```
|
||||
|
||||
## Error Handling
|
||||
|
||||
Common patterns:
|
||||
|
||||
```python
|
||||
# Using run.py prevents most errors
|
||||
result = subprocess.run([
|
||||
"python", "scripts/run.py", "ask_question.py",
|
||||
"--question", "Question"
|
||||
], capture_output=True, text=True)
|
||||
|
||||
if result.returncode != 0:
|
||||
error = result.stderr
|
||||
if "rate limit" in error.lower():
|
||||
# Wait or switch accounts
|
||||
pass
|
||||
elif "not authenticated" in error.lower():
|
||||
# Run auth setup
|
||||
subprocess.run(["python", "scripts/run.py", "auth_manager.py", "setup"])
|
||||
```
|
||||
|
||||
## Rate Limits
|
||||
|
||||
Free Google accounts: 50 queries/day
|
||||
|
||||
Solutions:
|
||||
1. Wait for reset (midnight PST)
|
||||
2. Switch accounts with `reauth`
|
||||
3. Use multiple Google accounts
|
||||
|
||||
## Advanced Patterns
|
||||
|
||||
### Parallel Queries
|
||||
|
||||
```python
|
||||
import concurrent.futures
|
||||
import subprocess
|
||||
|
||||
def query(question, notebook_id):
|
||||
result = subprocess.run([
|
||||
"python", "scripts/run.py", "ask_question.py",
|
||||
"--question", question,
|
||||
"--notebook-id", notebook_id
|
||||
], capture_output=True, text=True)
|
||||
return result.stdout
|
||||
|
||||
# Run multiple queries simultaneously
|
||||
with concurrent.futures.ThreadPoolExecutor(max_workers=3) as executor:
|
||||
futures = [
|
||||
executor.submit(query, q, nb)
|
||||
for q, nb in zip(questions, notebooks)
|
||||
]
|
||||
results = [f.result() for f in futures]
|
||||
```
|
||||
|
||||
### Batch Processing
|
||||
|
||||
```python
|
||||
def batch_research(questions, notebook_id):
|
||||
results = []
|
||||
for question in questions:
|
||||
result = subprocess.run([
|
||||
"python", "scripts/run.py", "ask_question.py",
|
||||
"--question", question,
|
||||
"--notebook-id", notebook_id
|
||||
], capture_output=True, text=True)
|
||||
results.append(result.stdout)
|
||||
time.sleep(2) # Avoid rate limits
|
||||
return results
|
||||
```
|
||||
|
||||
## Module Classes
|
||||
|
||||
### NotebookLibrary
|
||||
- `add_notebook(url, name, topics)`
|
||||
- `list_notebooks()`
|
||||
- `search_notebooks(query)`
|
||||
- `get_notebook(notebook_id)`
|
||||
- `activate_notebook(notebook_id)`
|
||||
- `remove_notebook(notebook_id)`
|
||||
|
||||
### AuthManager
|
||||
- `is_authenticated()`
|
||||
- `setup_auth(headless=False)`
|
||||
- `get_auth_info()`
|
||||
- `clear_auth()`
|
||||
- `validate_auth()`
|
||||
|
||||
### BrowserSession (internal)
|
||||
- Handles browser automation
|
||||
- Manages stealth behavior
|
||||
- Not intended for direct use
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Always use run.py** - Ensures environment
|
||||
2. **Check auth first** - Before operations
|
||||
3. **Handle rate limits** - Implement retries
|
||||
4. **Include context** - Questions are independent
|
||||
5. **Clean sessions** - Use cleanup_manager
|
||||
376
personas/_shared/community-skills/notebooklm/references/troubleshooting.md
Executable file
376
personas/_shared/community-skills/notebooklm/references/troubleshooting.md
Executable file
@@ -0,0 +1,376 @@
|
||||
# NotebookLM Skill Troubleshooting Guide
|
||||
|
||||
## Quick Fix Table
|
||||
|
||||
| Error | Solution |
|
||||
|-------|----------|
|
||||
| ModuleNotFoundError | Use `python scripts/run.py [script].py` |
|
||||
| Authentication failed | Browser must be visible for setup |
|
||||
| Browser crash | `python scripts/run.py cleanup_manager.py --preserve-library` |
|
||||
| Rate limit hit | Wait 1 hour or switch accounts |
|
||||
| Notebook not found | `python scripts/run.py notebook_manager.py list` |
|
||||
| Script not working | Always use run.py wrapper |
|
||||
|
||||
## Critical: Always Use run.py
|
||||
|
||||
Most issues are solved by using the run.py wrapper:
|
||||
|
||||
```bash
|
||||
# ✅ CORRECT - Always:
|
||||
python scripts/run.py auth_manager.py status
|
||||
python scripts/run.py ask_question.py --question "..."
|
||||
|
||||
# ❌ WRONG - Never:
|
||||
python scripts/auth_manager.py status # ModuleNotFoundError!
|
||||
```
|
||||
|
||||
## Common Issues and Solutions
|
||||
|
||||
### Authentication Issues
|
||||
|
||||
#### Not authenticated error
|
||||
```
|
||||
Error: Not authenticated. Please run auth setup first.
|
||||
```
|
||||
|
||||
**Solution:**
|
||||
```bash
|
||||
# Check status
|
||||
python scripts/run.py auth_manager.py status
|
||||
|
||||
# Setup authentication (browser MUST be visible!)
|
||||
python scripts/run.py auth_manager.py setup
|
||||
# User must manually log in to Google
|
||||
|
||||
# If setup fails, try re-authentication
|
||||
python scripts/run.py auth_manager.py reauth
|
||||
```
|
||||
|
||||
#### Authentication expires frequently
|
||||
**Solution:**
|
||||
```bash
|
||||
# Clear old authentication
|
||||
python scripts/run.py cleanup_manager.py --preserve-library
|
||||
|
||||
# Fresh authentication setup
|
||||
python scripts/run.py auth_manager.py setup --timeout 15
|
||||
|
||||
# Use persistent browser profile
|
||||
export PERSIST_AUTH=true
|
||||
```
|
||||
|
||||
#### Google blocks automated login
|
||||
**Solution:**
|
||||
1. Use dedicated Google account for automation
|
||||
2. Enable "Less secure app access" if available
|
||||
3. ALWAYS use visible browser:
|
||||
```bash
|
||||
python scripts/run.py auth_manager.py setup
|
||||
# Browser MUST be visible - user logs in manually
|
||||
# NO headless parameter exists - use --show-browser for debugging
|
||||
```
|
||||
|
||||
### Browser Issues
|
||||
|
||||
#### Browser crashes or hangs
|
||||
```
|
||||
TimeoutError: Waiting for selector failed
|
||||
```
|
||||
|
||||
**Solution:**
|
||||
```bash
|
||||
# Kill hanging processes
|
||||
pkill -f chromium
|
||||
pkill -f chrome
|
||||
|
||||
# Clean browser state
|
||||
python scripts/run.py cleanup_manager.py --confirm --preserve-library
|
||||
|
||||
# Re-authenticate
|
||||
python scripts/run.py auth_manager.py reauth
|
||||
```
|
||||
|
||||
#### Browser not found error
|
||||
**Solution:**
|
||||
```bash
|
||||
# Install Chromium via run.py (automatic)
|
||||
python scripts/run.py auth_manager.py status
|
||||
# run.py will install Chromium automatically
|
||||
|
||||
# Or manual install if needed
|
||||
cd ~/.claude/skills/notebooklm
|
||||
source .venv/bin/activate
|
||||
python -m patchright install chromium
|
||||
```
|
||||
|
||||
### Rate Limiting
|
||||
|
||||
#### Rate limit exceeded (50 queries/day)
|
||||
**Solutions:**
|
||||
|
||||
**Option 1: Wait**
|
||||
```bash
|
||||
# Check when limit resets (usually midnight PST)
|
||||
date -d "tomorrow 00:00 PST"
|
||||
```
|
||||
|
||||
**Option 2: Switch accounts**
|
||||
```bash
|
||||
# Clear current auth
|
||||
python scripts/run.py auth_manager.py clear
|
||||
|
||||
# Login with different account
|
||||
python scripts/run.py auth_manager.py setup
|
||||
```
|
||||
|
||||
**Option 3: Rotate accounts**
|
||||
```python
|
||||
# Use multiple accounts
|
||||
accounts = ["account1", "account2"]
|
||||
for account in accounts:
|
||||
# Switch account on rate limit
|
||||
subprocess.run(["python", "scripts/run.py", "auth_manager.py", "reauth"])
|
||||
```
|
||||
|
||||
### Notebook Access Issues
|
||||
|
||||
#### Notebook not found
|
||||
**Solution:**
|
||||
```bash
|
||||
# List all notebooks
|
||||
python scripts/run.py notebook_manager.py list
|
||||
|
||||
# Search for notebook
|
||||
python scripts/run.py notebook_manager.py search --query "keyword"
|
||||
|
||||
# Add notebook if missing
|
||||
python scripts/run.py notebook_manager.py add \
|
||||
--url "https://notebooklm.google.com/..." \
|
||||
--name "Name" \
|
||||
--topics "topics"
|
||||
```
|
||||
|
||||
#### Access denied to notebook
|
||||
**Solution:**
|
||||
1. Check if notebook is still shared publicly
|
||||
2. Re-add notebook with updated URL
|
||||
3. Verify correct Google account is used
|
||||
|
||||
#### Wrong notebook being used
|
||||
**Solution:**
|
||||
```bash
|
||||
# Check active notebook
|
||||
python scripts/run.py notebook_manager.py list | grep "active"
|
||||
|
||||
# Activate correct notebook
|
||||
python scripts/run.py notebook_manager.py activate --id correct-id
|
||||
```
|
||||
|
||||
### Virtual Environment Issues
|
||||
|
||||
#### ModuleNotFoundError
|
||||
```
|
||||
ModuleNotFoundError: No module named 'patchright'
|
||||
```
|
||||
|
||||
**Solution:**
|
||||
```bash
|
||||
# ALWAYS use run.py - it handles venv automatically!
|
||||
python scripts/run.py [any_script].py
|
||||
|
||||
# run.py will:
|
||||
# 1. Create .venv if missing
|
||||
# 2. Install dependencies
|
||||
# 3. Run the script
|
||||
```
|
||||
|
||||
#### Wrong Python version
|
||||
**Solution:**
|
||||
```bash
|
||||
# Check Python version (needs 3.8+)
|
||||
python --version
|
||||
|
||||
# If wrong version, specify correct Python
|
||||
python3.8 scripts/run.py auth_manager.py status
|
||||
```
|
||||
|
||||
### Network Issues
|
||||
|
||||
#### Connection timeouts
|
||||
**Solution:**
|
||||
```bash
|
||||
# Increase timeout
|
||||
export TIMEOUT_SECONDS=60
|
||||
|
||||
# Check connectivity
|
||||
ping notebooklm.google.com
|
||||
|
||||
# Use proxy if needed
|
||||
export HTTP_PROXY=http://proxy:port
|
||||
export HTTPS_PROXY=http://proxy:port
|
||||
```
|
||||
|
||||
### Data Issues
|
||||
|
||||
#### Corrupted notebook library
|
||||
```
|
||||
JSON decode error when listing notebooks
|
||||
```
|
||||
|
||||
**Solution:**
|
||||
```bash
|
||||
# Backup current library
|
||||
cp ~/.claude/skills/notebooklm/data/library.json library.backup.json
|
||||
|
||||
# Reset library
|
||||
rm ~/.claude/skills/notebooklm/data/library.json
|
||||
|
||||
# Re-add notebooks
|
||||
python scripts/run.py notebook_manager.py add --url ... --name ...
|
||||
```
|
||||
|
||||
#### Disk space full
|
||||
**Solution:**
|
||||
```bash
|
||||
# Check disk usage
|
||||
df -h ~/.claude/skills/notebooklm/data/
|
||||
|
||||
# Clean up
|
||||
python scripts/run.py cleanup_manager.py --confirm --preserve-library
|
||||
```
|
||||
|
||||
## Debugging Techniques
|
||||
|
||||
### Enable verbose logging
|
||||
```bash
|
||||
export DEBUG=true
|
||||
export LOG_LEVEL=DEBUG
|
||||
python scripts/run.py ask_question.py --question "Test" --show-browser
|
||||
```
|
||||
|
||||
### Test individual components
|
||||
```bash
|
||||
# Test authentication
|
||||
python scripts/run.py auth_manager.py status
|
||||
|
||||
# Test notebook access
|
||||
python scripts/run.py notebook_manager.py list
|
||||
|
||||
# Test browser launch
|
||||
python scripts/run.py ask_question.py --question "test" --show-browser
|
||||
```
|
||||
|
||||
### Save screenshots on error
|
||||
Add to scripts for debugging:
|
||||
```python
|
||||
try:
|
||||
# Your code
|
||||
except Exception as e:
|
||||
page.screenshot(path=f"error_{timestamp}.png")
|
||||
raise e
|
||||
```
|
||||
|
||||
## Recovery Procedures
|
||||
|
||||
### Complete reset
|
||||
```bash
|
||||
#!/bin/bash
|
||||
# Kill processes
|
||||
pkill -f chromium
|
||||
|
||||
# Backup library if exists
|
||||
if [ -f ~/.claude/skills/notebooklm/data/library.json ]; then
|
||||
cp ~/.claude/skills/notebooklm/data/library.json ~/library.backup.json
|
||||
fi
|
||||
|
||||
# Clean everything
|
||||
cd ~/.claude/skills/notebooklm
|
||||
python scripts/run.py cleanup_manager.py --confirm --force
|
||||
|
||||
# Remove venv
|
||||
rm -rf .venv
|
||||
|
||||
# Reinstall (run.py will handle this)
|
||||
python scripts/run.py auth_manager.py setup
|
||||
|
||||
# Restore library if backup exists
|
||||
if [ -f ~/library.backup.json ]; then
|
||||
mkdir -p ~/.claude/skills/notebooklm/data/
|
||||
cp ~/library.backup.json ~/.claude/skills/notebooklm/data/library.json
|
||||
fi
|
||||
```
|
||||
|
||||
### Partial recovery (keep data)
|
||||
```bash
|
||||
# Keep auth and library, fix execution
|
||||
cd ~/.claude/skills/notebooklm
|
||||
rm -rf .venv
|
||||
|
||||
# run.py will recreate venv automatically
|
||||
python scripts/run.py auth_manager.py status
|
||||
```
|
||||
|
||||
## Error Messages Reference
|
||||
|
||||
### Authentication Errors
|
||||
| Error | Cause | Solution |
|
||||
|-------|-------|----------|
|
||||
| Not authenticated | No valid auth | `run.py auth_manager.py setup` |
|
||||
| Authentication expired | Session old | `run.py auth_manager.py reauth` |
|
||||
| Invalid credentials | Wrong account | Check Google account |
|
||||
| 2FA required | Security challenge | Complete in visible browser |
|
||||
|
||||
### Browser Errors
|
||||
| Error | Cause | Solution |
|
||||
|-------|-------|----------|
|
||||
| Browser not found | Chromium missing | Use run.py (auto-installs) |
|
||||
| Connection refused | Browser crashed | Kill processes, restart |
|
||||
| Timeout waiting | Page slow | Increase timeout |
|
||||
| Context closed | Browser terminated | Check logs for crashes |
|
||||
|
||||
### Notebook Errors
|
||||
| Error | Cause | Solution |
|
||||
|-------|-------|----------|
|
||||
| Notebook not found | Invalid ID | `run.py notebook_manager.py list` |
|
||||
| Access denied | Not shared | Re-share in NotebookLM |
|
||||
| Invalid URL | Wrong format | Use full NotebookLM URL |
|
||||
| No active notebook | None selected | `run.py notebook_manager.py activate` |
|
||||
|
||||
## Prevention Tips
|
||||
|
||||
1. **Always use run.py** - Prevents 90% of issues
|
||||
2. **Regular maintenance** - Clear browser state weekly
|
||||
3. **Monitor queries** - Track daily count to avoid limits
|
||||
4. **Backup library** - Export notebook list regularly
|
||||
5. **Use dedicated account** - Separate Google account for automation
|
||||
|
||||
## Getting Help
|
||||
|
||||
### Diagnostic information to collect
|
||||
```bash
|
||||
# System info
|
||||
python --version
|
||||
cd ~/.claude/skills/notebooklm
|
||||
ls -la
|
||||
|
||||
# Skill status
|
||||
python scripts/run.py auth_manager.py status
|
||||
python scripts/run.py notebook_manager.py list | head -5
|
||||
|
||||
# Check data directory
|
||||
ls -la ~/.claude/skills/notebooklm/data/
|
||||
```
|
||||
|
||||
### Common questions
|
||||
|
||||
**Q: Why doesn't this work in Claude web UI?**
|
||||
A: Web UI has no network access. Use local Claude Code.
|
||||
|
||||
**Q: Can I use multiple Google accounts?**
|
||||
A: Yes, use `run.py auth_manager.py reauth` to switch.
|
||||
|
||||
**Q: How to increase rate limit?**
|
||||
A: Use multiple accounts or upgrade to Google Workspace.
|
||||
|
||||
**Q: Is this safe for my Google account?**
|
||||
A: Use dedicated account for automation. Only accesses NotebookLM.
|
||||
338
personas/_shared/community-skills/notebooklm/references/usage_patterns.md
Executable file
338
personas/_shared/community-skills/notebooklm/references/usage_patterns.md
Executable file
@@ -0,0 +1,338 @@
|
||||
# NotebookLM Skill Usage Patterns
|
||||
|
||||
Advanced patterns for using the NotebookLM skill effectively.
|
||||
|
||||
## Critical: Always Use run.py
|
||||
|
||||
**Every command must use the run.py wrapper:**
|
||||
```bash
|
||||
# ✅ CORRECT:
|
||||
python scripts/run.py auth_manager.py status
|
||||
python scripts/run.py ask_question.py --question "..."
|
||||
|
||||
# ❌ WRONG:
|
||||
python scripts/auth_manager.py status # Will fail!
|
||||
```
|
||||
|
||||
## Pattern 1: Initial Setup
|
||||
|
||||
```bash
|
||||
# 1. Check authentication (using run.py!)
|
||||
python scripts/run.py auth_manager.py status
|
||||
|
||||
# 2. If not authenticated, setup (Browser MUST be visible!)
|
||||
python scripts/run.py auth_manager.py setup
|
||||
# Tell user: "Please log in to Google in the browser window"
|
||||
|
||||
# 3. Add first notebook - ASK USER FOR DETAILS FIRST!
|
||||
# Ask: "What does this notebook contain?"
|
||||
# Ask: "What topics should I tag it with?"
|
||||
python scripts/run.py notebook_manager.py add \
|
||||
--url "https://notebooklm.google.com/notebook/..." \
|
||||
--name "User provided name" \
|
||||
--description "User provided description" \ # NEVER GUESS!
|
||||
--topics "user,provided,topics" # NEVER GUESS!
|
||||
```
|
||||
|
||||
**Critical Notes:**
|
||||
- Virtual environment created automatically by run.py
|
||||
- Browser MUST be visible for authentication
|
||||
- ALWAYS discover content via query OR ask user for notebook metadata
|
||||
|
||||
## Pattern 2: Adding Notebooks (Smart Discovery!)
|
||||
|
||||
**When user shares a NotebookLM URL:**
|
||||
|
||||
**OPTION A: Smart Discovery (Recommended)**
|
||||
```bash
|
||||
# 1. Query the notebook to discover its content
|
||||
python scripts/run.py ask_question.py \
|
||||
--question "What is the content of this notebook? What topics are covered? Provide a complete overview briefly and concisely" \
|
||||
--notebook-url "[URL]"
|
||||
|
||||
# 2. Use discovered info to add it
|
||||
python scripts/run.py notebook_manager.py add \
|
||||
--url "[URL]" \
|
||||
--name "[Based on content]" \
|
||||
--description "[From discovery]" \
|
||||
--topics "[Extracted topics]"
|
||||
```
|
||||
|
||||
**OPTION B: Ask User (Fallback)**
|
||||
```bash
|
||||
# If discovery fails, ask user:
|
||||
"What does this notebook contain?"
|
||||
"What topics does it cover?"
|
||||
|
||||
# Then add with user-provided info:
|
||||
python scripts/run.py notebook_manager.py add \
|
||||
--url "[URL]" \
|
||||
--name "[User's answer]" \
|
||||
--description "[User's description]" \
|
||||
--topics "[User's topics]"
|
||||
```
|
||||
|
||||
**NEVER:**
|
||||
- Guess what's in a notebook
|
||||
- Use generic descriptions
|
||||
- Skip discovering content
|
||||
|
||||
## Pattern 3: Daily Research Workflow
|
||||
|
||||
```bash
|
||||
# Check library
|
||||
python scripts/run.py notebook_manager.py list
|
||||
|
||||
# Research with comprehensive questions
|
||||
python scripts/run.py ask_question.py \
|
||||
--question "Detailed question with all context" \
|
||||
--notebook-id notebook-id
|
||||
|
||||
# Follow-up when you see "Is that ALL you need to know?"
|
||||
python scripts/run.py ask_question.py \
|
||||
--question "Follow-up question with previous context"
|
||||
```
|
||||
|
||||
## Pattern 4: Follow-Up Questions (CRITICAL!)
|
||||
|
||||
When NotebookLM responds with "EXTREMELY IMPORTANT: Is that ALL you need to know?":
|
||||
|
||||
```python
|
||||
# 1. STOP - Don't respond to user yet
|
||||
# 2. ANALYZE - Is answer complete?
|
||||
# 3. If gaps exist, ask follow-up:
|
||||
python scripts/run.py ask_question.py \
|
||||
--question "Specific follow-up with context from previous answer"
|
||||
|
||||
# 4. Repeat until complete
|
||||
# 5. Only then synthesize and respond to user
|
||||
```
|
||||
|
||||
## Pattern 5: Multi-Notebook Research
|
||||
|
||||
```python
|
||||
# Query different notebooks for comparison
|
||||
python scripts/run.py notebook_manager.py activate --id notebook-1
|
||||
python scripts/run.py ask_question.py --question "Question"
|
||||
|
||||
python scripts/run.py notebook_manager.py activate --id notebook-2
|
||||
python scripts/run.py ask_question.py --question "Same question"
|
||||
|
||||
# Compare and synthesize answers
|
||||
```
|
||||
|
||||
## Pattern 6: Error Recovery
|
||||
|
||||
```bash
|
||||
# If authentication fails
|
||||
python scripts/run.py auth_manager.py status
|
||||
python scripts/run.py auth_manager.py reauth # Browser visible!
|
||||
|
||||
# If browser crashes
|
||||
python scripts/run.py cleanup_manager.py --preserve-library
|
||||
python scripts/run.py auth_manager.py setup # Browser visible!
|
||||
|
||||
# If rate limited
|
||||
# Wait or switch accounts
|
||||
python scripts/run.py auth_manager.py reauth # Login with different account
|
||||
```
|
||||
|
||||
## Pattern 7: Batch Processing
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
NOTEBOOK_ID="notebook-id"
|
||||
QUESTIONS=(
|
||||
"First comprehensive question"
|
||||
"Second comprehensive question"
|
||||
"Third comprehensive question"
|
||||
)
|
||||
|
||||
for question in "${QUESTIONS[@]}"; do
|
||||
echo "Asking: $question"
|
||||
python scripts/run.py ask_question.py \
|
||||
--question "$question" \
|
||||
--notebook-id "$NOTEBOOK_ID"
|
||||
sleep 2 # Avoid rate limits
|
||||
done
|
||||
```
|
||||
|
||||
## Pattern 8: Automated Research Script
|
||||
|
||||
```python
|
||||
#!/usr/bin/env python
|
||||
import subprocess
|
||||
|
||||
def research_topic(topic, notebook_id):
|
||||
# Comprehensive question
|
||||
question = f"""
|
||||
Explain {topic} in detail:
|
||||
1. Core concepts
|
||||
2. Implementation details
|
||||
3. Best practices
|
||||
4. Common pitfalls
|
||||
5. Examples
|
||||
"""
|
||||
|
||||
result = subprocess.run([
|
||||
"python", "scripts/run.py", "ask_question.py",
|
||||
"--question", question,
|
||||
"--notebook-id", notebook_id
|
||||
], capture_output=True, text=True)
|
||||
|
||||
return result.stdout
|
||||
```
|
||||
|
||||
## Pattern 9: Notebook Organization
|
||||
|
||||
```python
|
||||
# Organize by domain - with proper metadata
|
||||
# ALWAYS ask user for descriptions!
|
||||
|
||||
# Backend notebooks
|
||||
add_notebook("Backend API", "Complete API documentation", "api,rest,backend")
|
||||
add_notebook("Database", "Schema and queries", "database,sql,backend")
|
||||
|
||||
# Frontend notebooks
|
||||
add_notebook("React Docs", "React framework documentation", "react,frontend")
|
||||
add_notebook("CSS Framework", "Styling documentation", "css,styling,frontend")
|
||||
|
||||
# Search by domain
|
||||
python scripts/run.py notebook_manager.py search --query "backend"
|
||||
python scripts/run.py notebook_manager.py search --query "frontend"
|
||||
```
|
||||
|
||||
## Pattern 10: Integration with Development
|
||||
|
||||
```python
|
||||
# Query documentation during development
|
||||
def check_api_usage(api_endpoint):
|
||||
result = subprocess.run([
|
||||
"python", "scripts/run.py", "ask_question.py",
|
||||
"--question", f"Parameters and response format for {api_endpoint}",
|
||||
"--notebook-id", "api-docs"
|
||||
], capture_output=True, text=True)
|
||||
|
||||
# If follow-up needed
|
||||
if "Is that ALL you need" in result.stdout:
|
||||
# Ask for examples
|
||||
follow_up = subprocess.run([
|
||||
"python", "scripts/run.py", "ask_question.py",
|
||||
"--question", f"Show code examples for {api_endpoint}",
|
||||
"--notebook-id", "api-docs"
|
||||
], capture_output=True, text=True)
|
||||
|
||||
return combine_answers(result.stdout, follow_up.stdout)
|
||||
```
|
||||
|
||||
## Best Practices
|
||||
|
||||
### 1. Question Formulation
|
||||
- Be specific and comprehensive
|
||||
- Include all context in each question
|
||||
- Request structured responses
|
||||
- Ask for examples when needed
|
||||
|
||||
### 2. Notebook Management
|
||||
- **ALWAYS ask user for metadata**
|
||||
- Use descriptive names
|
||||
- Add comprehensive topics
|
||||
- Keep URLs current
|
||||
|
||||
### 3. Performance
|
||||
- Batch related questions
|
||||
- Use parallel processing for different notebooks
|
||||
- Monitor rate limits (50/day)
|
||||
- Switch accounts if needed
|
||||
|
||||
### 4. Error Handling
|
||||
- Always use run.py to prevent venv issues
|
||||
- Check auth before operations
|
||||
- Implement retry logic
|
||||
- Have fallback notebooks ready
|
||||
|
||||
### 5. Security
|
||||
- Use dedicated Google account
|
||||
- Never commit data/ directory
|
||||
- Regularly refresh auth
|
||||
- Track all access
|
||||
|
||||
## Common Workflows for Claude
|
||||
|
||||
### Workflow 1: User Sends NotebookLM URL
|
||||
|
||||
```python
|
||||
# 1. Detect URL in message
|
||||
if "notebooklm.google.com" in user_message:
|
||||
url = extract_url(user_message)
|
||||
|
||||
# 2. Check if in library
|
||||
notebooks = run("notebook_manager.py list")
|
||||
|
||||
if url not in notebooks:
|
||||
# 3. ASK USER FOR METADATA (CRITICAL!)
|
||||
name = ask_user("What should I call this notebook?")
|
||||
description = ask_user("What does this notebook contain?")
|
||||
topics = ask_user("What topics does it cover?")
|
||||
|
||||
# 4. Add with user-provided info
|
||||
run(f"notebook_manager.py add --url {url} --name '{name}' --description '{description}' --topics '{topics}'")
|
||||
|
||||
# 5. Use the notebook
|
||||
answer = run(f"ask_question.py --question '{user_question}'")
|
||||
```
|
||||
|
||||
### Workflow 2: Research Task
|
||||
|
||||
```python
|
||||
# 1. Understand task
|
||||
task = "Implement feature X"
|
||||
|
||||
# 2. Formulate comprehensive questions
|
||||
questions = [
|
||||
"Complete implementation guide for X",
|
||||
"Error handling for X",
|
||||
"Performance considerations for X"
|
||||
]
|
||||
|
||||
# 3. Query with follow-ups
|
||||
for q in questions:
|
||||
answer = run(f"ask_question.py --question '{q}'")
|
||||
|
||||
# Check if follow-up needed
|
||||
if "Is that ALL you need" in answer:
|
||||
# Ask more specific question
|
||||
follow_up = run(f"ask_question.py --question 'Specific detail about {q}'")
|
||||
|
||||
# 4. Synthesize and implement
|
||||
```
|
||||
|
||||
## Tips and Tricks
|
||||
|
||||
1. **Always use run.py** - Prevents all venv issues
|
||||
2. **Ask for metadata** - Never guess notebook contents
|
||||
3. **Use verbose questions** - Include all context
|
||||
4. **Follow up automatically** - When you see the prompt
|
||||
5. **Monitor rate limits** - 50 queries per day
|
||||
6. **Batch operations** - Group related queries
|
||||
7. **Export important answers** - Save locally
|
||||
8. **Version control notebooks** - Track changes
|
||||
9. **Test auth regularly** - Before important tasks
|
||||
10. **Document everything** - Keep notes on notebooks
|
||||
|
||||
## Quick Reference
|
||||
|
||||
```bash
|
||||
# Always use run.py!
|
||||
python scripts/run.py [script].py [args]
|
||||
|
||||
# Common operations
|
||||
run.py auth_manager.py status # Check auth
|
||||
run.py auth_manager.py setup # Login (browser visible!)
|
||||
run.py notebook_manager.py list # List notebooks
|
||||
run.py notebook_manager.py add ... # Add (ask user for metadata!)
|
||||
run.py ask_question.py --question ... # Query
|
||||
run.py cleanup_manager.py ... # Clean up
|
||||
```
|
||||
|
||||
**Remember:** When in doubt, use run.py and ask the user for notebook details!
|
||||
10
personas/_shared/community-skills/notebooklm/requirements.txt
Executable file
10
personas/_shared/community-skills/notebooklm/requirements.txt
Executable file
@@ -0,0 +1,10 @@
|
||||
# NotebookLM Skill Dependencies
|
||||
# These will be installed in the skill's local .venv
|
||||
|
||||
# Core browser automation with anti-detection
|
||||
# Note: After installation, run: patchright install chrome
|
||||
# (Chrome is required, not Chromium, for cross-platform reliability)
|
||||
patchright==1.55.2
|
||||
|
||||
# Environment management
|
||||
python-dotenv==1.0.0
|
||||
81
personas/_shared/community-skills/notebooklm/scripts/__init__.py
Executable file
81
personas/_shared/community-skills/notebooklm/scripts/__init__.py
Executable file
@@ -0,0 +1,81 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
NotebookLM Skill Scripts Package
|
||||
Provides automatic environment management for all scripts
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def ensure_venv_and_run():
|
||||
"""
|
||||
Ensure virtual environment exists and run the requested script.
|
||||
This is called when any script is imported or run directly.
|
||||
"""
|
||||
# Only do this if we're not already in the skill's venv
|
||||
skill_dir = Path(__file__).parent.parent
|
||||
venv_dir = skill_dir / ".venv"
|
||||
|
||||
# Check if we're in a venv
|
||||
in_venv = hasattr(sys, 'real_prefix') or (
|
||||
hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix
|
||||
)
|
||||
|
||||
# Check if it's OUR venv
|
||||
if in_venv:
|
||||
venv_path = Path(sys.prefix)
|
||||
if venv_path == venv_dir:
|
||||
# We're already in the correct venv
|
||||
return
|
||||
|
||||
# We need to set up or switch to our venv
|
||||
if not venv_dir.exists():
|
||||
print("🔧 First-time setup detected...")
|
||||
print(" Creating isolated environment for NotebookLM skill...")
|
||||
print(" This ensures clean dependency management...")
|
||||
|
||||
# Create venv
|
||||
import venv
|
||||
venv.create(venv_dir, with_pip=True)
|
||||
|
||||
# Install requirements
|
||||
requirements_file = skill_dir / "requirements.txt"
|
||||
if requirements_file.exists():
|
||||
if os.name == 'nt': # Windows
|
||||
pip_exe = venv_dir / "Scripts" / "pip.exe"
|
||||
else:
|
||||
pip_exe = venv_dir / "bin" / "pip"
|
||||
|
||||
print(" Installing dependencies in isolated environment...")
|
||||
subprocess.run(
|
||||
[str(pip_exe), "install", "-q", "-r", str(requirements_file)],
|
||||
check=True
|
||||
)
|
||||
|
||||
# Also install patchright's chromium
|
||||
print(" Setting up browser automation...")
|
||||
if os.name == 'nt':
|
||||
python_exe = venv_dir / "Scripts" / "python.exe"
|
||||
else:
|
||||
python_exe = venv_dir / "bin" / "python"
|
||||
|
||||
subprocess.run(
|
||||
[str(python_exe), "-m", "patchright", "install", "chromium"],
|
||||
check=True,
|
||||
capture_output=True
|
||||
)
|
||||
|
||||
print("✅ Environment ready! All dependencies isolated in .venv/")
|
||||
|
||||
# If we're here and not in the venv, we should recommend using the venv
|
||||
if not in_venv:
|
||||
print("\n⚠️ Running outside virtual environment")
|
||||
print(" Recommended: Use scripts/run.py to ensure clean execution")
|
||||
print(" Or activate: source .venv/bin/activate")
|
||||
|
||||
|
||||
# Check environment when module is imported
|
||||
ensure_venv_and_run()
|
||||
256
personas/_shared/community-skills/notebooklm/scripts/ask_question.py
Executable file
256
personas/_shared/community-skills/notebooklm/scripts/ask_question.py
Executable file
@@ -0,0 +1,256 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Simple NotebookLM Question Interface
|
||||
Based on MCP server implementation - simplified without sessions
|
||||
|
||||
Implements hybrid auth approach:
|
||||
- Persistent browser profile (user_data_dir) for fingerprint consistency
|
||||
- Manual cookie injection from state.json for session cookies (Playwright bug workaround)
|
||||
See: https://github.com/microsoft/playwright/issues/36139
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
import time
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
from patchright.sync_api import sync_playwright
|
||||
|
||||
# Add parent directory to path
|
||||
sys.path.insert(0, str(Path(__file__).parent))
|
||||
|
||||
from auth_manager import AuthManager
|
||||
from notebook_manager import NotebookLibrary
|
||||
from config import QUERY_INPUT_SELECTORS, RESPONSE_SELECTORS
|
||||
from browser_utils import BrowserFactory, StealthUtils
|
||||
|
||||
|
||||
# Follow-up reminder (adapted from MCP server for stateless operation)
|
||||
# Since we don't have persistent sessions, we encourage comprehensive questions
|
||||
FOLLOW_UP_REMINDER = (
|
||||
"\n\nEXTREMELY IMPORTANT: Is that ALL you need to know? "
|
||||
"You can always ask another question! Think about it carefully: "
|
||||
"before you reply to the user, review their original request and this answer. "
|
||||
"If anything is still unclear or missing, ask me another comprehensive question "
|
||||
"that includes all necessary context (since each question opens a new browser session)."
|
||||
)
|
||||
|
||||
|
||||
def ask_notebooklm(question: str, notebook_url: str, headless: bool = True) -> str:
|
||||
"""
|
||||
Ask a question to NotebookLM
|
||||
|
||||
Args:
|
||||
question: Question to ask
|
||||
notebook_url: NotebookLM notebook URL
|
||||
headless: Run browser in headless mode
|
||||
|
||||
Returns:
|
||||
Answer text from NotebookLM
|
||||
"""
|
||||
auth = AuthManager()
|
||||
|
||||
if not auth.is_authenticated():
|
||||
print("⚠️ Not authenticated. Run: python auth_manager.py setup")
|
||||
return None
|
||||
|
||||
print(f"💬 Asking: {question}")
|
||||
print(f"📚 Notebook: {notebook_url}")
|
||||
|
||||
playwright = None
|
||||
context = None
|
||||
|
||||
try:
|
||||
# Start playwright
|
||||
playwright = sync_playwright().start()
|
||||
|
||||
# Launch persistent browser context using factory
|
||||
context = BrowserFactory.launch_persistent_context(
|
||||
playwright,
|
||||
headless=headless
|
||||
)
|
||||
|
||||
# Navigate to notebook
|
||||
page = context.new_page()
|
||||
print(" 🌐 Opening notebook...")
|
||||
page.goto(notebook_url, wait_until="domcontentloaded")
|
||||
|
||||
# Wait for NotebookLM
|
||||
page.wait_for_url(re.compile(r"^https://notebooklm\.google\.com/"), timeout=10000)
|
||||
|
||||
# Wait for query input (MCP approach)
|
||||
print(" ⏳ Waiting for query input...")
|
||||
query_element = None
|
||||
|
||||
for selector in QUERY_INPUT_SELECTORS:
|
||||
try:
|
||||
query_element = page.wait_for_selector(
|
||||
selector,
|
||||
timeout=10000,
|
||||
state="visible" # Only check visibility, not disabled!
|
||||
)
|
||||
if query_element:
|
||||
print(f" ✓ Found input: {selector}")
|
||||
break
|
||||
except:
|
||||
continue
|
||||
|
||||
if not query_element:
|
||||
print(" ❌ Could not find query input")
|
||||
return None
|
||||
|
||||
# Type question (human-like, fast)
|
||||
print(" ⏳ Typing question...")
|
||||
|
||||
# Use primary selector for typing
|
||||
input_selector = QUERY_INPUT_SELECTORS[0]
|
||||
StealthUtils.human_type(page, input_selector, question)
|
||||
|
||||
# Submit
|
||||
print(" 📤 Submitting...")
|
||||
page.keyboard.press("Enter")
|
||||
|
||||
# Small pause
|
||||
StealthUtils.random_delay(500, 1500)
|
||||
|
||||
# Wait for response (MCP approach: poll for stable text)
|
||||
print(" ⏳ Waiting for answer...")
|
||||
|
||||
answer = None
|
||||
stable_count = 0
|
||||
last_text = None
|
||||
deadline = time.time() + 120 # 2 minutes timeout
|
||||
|
||||
while time.time() < deadline:
|
||||
# Check if NotebookLM is still thinking (most reliable indicator)
|
||||
try:
|
||||
thinking_element = page.query_selector('div.thinking-message')
|
||||
if thinking_element and thinking_element.is_visible():
|
||||
time.sleep(1)
|
||||
continue
|
||||
except:
|
||||
pass
|
||||
|
||||
# Try to find response with MCP selectors
|
||||
for selector in RESPONSE_SELECTORS:
|
||||
try:
|
||||
elements = page.query_selector_all(selector)
|
||||
if elements:
|
||||
# Get last (newest) response
|
||||
latest = elements[-1]
|
||||
text = latest.inner_text().strip()
|
||||
|
||||
if text:
|
||||
if text == last_text:
|
||||
stable_count += 1
|
||||
if stable_count >= 3: # Stable for 3 polls
|
||||
answer = text
|
||||
break
|
||||
else:
|
||||
stable_count = 0
|
||||
last_text = text
|
||||
except:
|
||||
continue
|
||||
|
||||
if answer:
|
||||
break
|
||||
|
||||
time.sleep(1)
|
||||
|
||||
if not answer:
|
||||
print(" ❌ Timeout waiting for answer")
|
||||
return None
|
||||
|
||||
print(" ✅ Got answer!")
|
||||
# Add follow-up reminder to encourage Claude to ask more questions
|
||||
return answer + FOLLOW_UP_REMINDER
|
||||
|
||||
except Exception as e:
|
||||
print(f" ❌ Error: {e}")
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
return None
|
||||
|
||||
finally:
|
||||
# Always clean up
|
||||
if context:
|
||||
try:
|
||||
context.close()
|
||||
except:
|
||||
pass
|
||||
|
||||
if playwright:
|
||||
try:
|
||||
playwright.stop()
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description='Ask NotebookLM a question')
|
||||
|
||||
parser.add_argument('--question', required=True, help='Question to ask')
|
||||
parser.add_argument('--notebook-url', help='NotebookLM notebook URL')
|
||||
parser.add_argument('--notebook-id', help='Notebook ID from library')
|
||||
parser.add_argument('--show-browser', action='store_true', help='Show browser')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
# Resolve notebook URL
|
||||
notebook_url = args.notebook_url
|
||||
|
||||
if not notebook_url and args.notebook_id:
|
||||
library = NotebookLibrary()
|
||||
notebook = library.get_notebook(args.notebook_id)
|
||||
if notebook:
|
||||
notebook_url = notebook['url']
|
||||
else:
|
||||
print(f"❌ Notebook '{args.notebook_id}' not found")
|
||||
return 1
|
||||
|
||||
if not notebook_url:
|
||||
# Check for active notebook first
|
||||
library = NotebookLibrary()
|
||||
active = library.get_active_notebook()
|
||||
if active:
|
||||
notebook_url = active['url']
|
||||
print(f"📚 Using active notebook: {active['name']}")
|
||||
else:
|
||||
# Show available notebooks
|
||||
notebooks = library.list_notebooks()
|
||||
if notebooks:
|
||||
print("\n📚 Available notebooks:")
|
||||
for nb in notebooks:
|
||||
mark = " [ACTIVE]" if nb.get('id') == library.active_notebook_id else ""
|
||||
print(f" {nb['id']}: {nb['name']}{mark}")
|
||||
print("\nSpecify with --notebook-id or set active:")
|
||||
print("python scripts/run.py notebook_manager.py activate --id ID")
|
||||
else:
|
||||
print("❌ No notebooks in library. Add one first:")
|
||||
print("python scripts/run.py notebook_manager.py add --url URL --name NAME --description DESC --topics TOPICS")
|
||||
return 1
|
||||
|
||||
# Ask the question
|
||||
answer = ask_notebooklm(
|
||||
question=args.question,
|
||||
notebook_url=notebook_url,
|
||||
headless=not args.show_browser
|
||||
)
|
||||
|
||||
if answer:
|
||||
print("\n" + "=" * 60)
|
||||
print(f"Question: {args.question}")
|
||||
print("=" * 60)
|
||||
print()
|
||||
print(answer)
|
||||
print()
|
||||
print("=" * 60)
|
||||
return 0
|
||||
else:
|
||||
print("\n❌ Failed to get answer")
|
||||
return 1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
358
personas/_shared/community-skills/notebooklm/scripts/auth_manager.py
Executable file
358
personas/_shared/community-skills/notebooklm/scripts/auth_manager.py
Executable file
@@ -0,0 +1,358 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Authentication Manager for NotebookLM
|
||||
Handles Google login and browser state persistence
|
||||
Based on the MCP server implementation
|
||||
|
||||
Implements hybrid auth approach:
|
||||
- Persistent browser profile (user_data_dir) for fingerprint consistency
|
||||
- Manual cookie injection from state.json for session cookies (Playwright bug workaround)
|
||||
See: https://github.com/microsoft/playwright/issues/36139
|
||||
"""
|
||||
|
||||
import json
|
||||
import time
|
||||
import argparse
|
||||
import shutil
|
||||
import re
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Optional, Dict, Any
|
||||
|
||||
from patchright.sync_api import sync_playwright, BrowserContext
|
||||
|
||||
# Add parent directory to path
|
||||
sys.path.insert(0, str(Path(__file__).parent))
|
||||
|
||||
from config import BROWSER_STATE_DIR, STATE_FILE, AUTH_INFO_FILE, DATA_DIR
|
||||
from browser_utils import BrowserFactory
|
||||
|
||||
|
||||
class AuthManager:
|
||||
"""
|
||||
Manages authentication and browser state for NotebookLM
|
||||
|
||||
Features:
|
||||
- Interactive Google login
|
||||
- Browser state persistence
|
||||
- Session restoration
|
||||
- Account switching
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
"""Initialize the authentication manager"""
|
||||
# Ensure directories exist
|
||||
DATA_DIR.mkdir(parents=True, exist_ok=True)
|
||||
BROWSER_STATE_DIR.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
self.state_file = STATE_FILE
|
||||
self.auth_info_file = AUTH_INFO_FILE
|
||||
self.browser_state_dir = BROWSER_STATE_DIR
|
||||
|
||||
def is_authenticated(self) -> bool:
|
||||
"""Check if valid authentication exists"""
|
||||
if not self.state_file.exists():
|
||||
return False
|
||||
|
||||
# Check if state file is not too old (7 days)
|
||||
age_days = (time.time() - self.state_file.stat().st_mtime) / 86400
|
||||
if age_days > 7:
|
||||
print(f"⚠️ Browser state is {age_days:.1f} days old, may need re-authentication")
|
||||
|
||||
return True
|
||||
|
||||
def get_auth_info(self) -> Dict[str, Any]:
|
||||
"""Get authentication information"""
|
||||
info = {
|
||||
'authenticated': self.is_authenticated(),
|
||||
'state_file': str(self.state_file),
|
||||
'state_exists': self.state_file.exists()
|
||||
}
|
||||
|
||||
if self.auth_info_file.exists():
|
||||
try:
|
||||
with open(self.auth_info_file, 'r') as f:
|
||||
saved_info = json.load(f)
|
||||
info.update(saved_info)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
if info['state_exists']:
|
||||
age_hours = (time.time() - self.state_file.stat().st_mtime) / 3600
|
||||
info['state_age_hours'] = age_hours
|
||||
|
||||
return info
|
||||
|
||||
def setup_auth(self, headless: bool = False, timeout_minutes: int = 10) -> bool:
|
||||
"""
|
||||
Perform interactive authentication setup
|
||||
|
||||
Args:
|
||||
headless: Run browser in headless mode (False for login)
|
||||
timeout_minutes: Maximum time to wait for login
|
||||
|
||||
Returns:
|
||||
True if authentication successful
|
||||
"""
|
||||
print("🔐 Starting authentication setup...")
|
||||
print(f" Timeout: {timeout_minutes} minutes")
|
||||
|
||||
playwright = None
|
||||
context = None
|
||||
|
||||
try:
|
||||
playwright = sync_playwright().start()
|
||||
|
||||
# Launch using factory
|
||||
context = BrowserFactory.launch_persistent_context(
|
||||
playwright,
|
||||
headless=headless
|
||||
)
|
||||
|
||||
# Navigate to NotebookLM
|
||||
page = context.new_page()
|
||||
page.goto("https://notebooklm.google.com", wait_until="domcontentloaded")
|
||||
|
||||
# Check if already authenticated
|
||||
if "notebooklm.google.com" in page.url and "accounts.google.com" not in page.url:
|
||||
print(" ✅ Already authenticated!")
|
||||
self._save_browser_state(context)
|
||||
return True
|
||||
|
||||
# Wait for manual login
|
||||
print("\n ⏳ Please log in to your Google account...")
|
||||
print(f" ⏱️ Waiting up to {timeout_minutes} minutes for login...")
|
||||
|
||||
try:
|
||||
# Wait for URL to change to NotebookLM (regex ensures it's the actual domain, not a parameter)
|
||||
timeout_ms = int(timeout_minutes * 60 * 1000)
|
||||
page.wait_for_url(re.compile(r"^https://notebooklm\.google\.com/"), timeout=timeout_ms)
|
||||
|
||||
print(f" ✅ Login successful!")
|
||||
|
||||
# Save authentication state
|
||||
self._save_browser_state(context)
|
||||
self._save_auth_info()
|
||||
return True
|
||||
|
||||
except Exception as e:
|
||||
print(f" ❌ Authentication timeout: {e}")
|
||||
return False
|
||||
|
||||
except Exception as e:
|
||||
print(f" ❌ Error: {e}")
|
||||
return False
|
||||
|
||||
finally:
|
||||
# Clean up browser resources
|
||||
if context:
|
||||
try:
|
||||
context.close()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
if playwright:
|
||||
try:
|
||||
playwright.stop()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
def _save_browser_state(self, context: BrowserContext):
|
||||
"""Save browser state to disk"""
|
||||
try:
|
||||
# Save storage state (cookies, localStorage)
|
||||
context.storage_state(path=str(self.state_file))
|
||||
print(f" 💾 Saved browser state to: {self.state_file}")
|
||||
except Exception as e:
|
||||
print(f" ❌ Failed to save browser state: {e}")
|
||||
raise
|
||||
|
||||
def _save_auth_info(self):
|
||||
"""Save authentication metadata"""
|
||||
try:
|
||||
info = {
|
||||
'authenticated_at': time.time(),
|
||||
'authenticated_at_iso': time.strftime('%Y-%m-%d %H:%M:%S')
|
||||
}
|
||||
with open(self.auth_info_file, 'w') as f:
|
||||
json.dump(info, f, indent=2)
|
||||
except Exception:
|
||||
pass # Non-critical
|
||||
|
||||
def clear_auth(self) -> bool:
|
||||
"""
|
||||
Clear all authentication data
|
||||
|
||||
Returns:
|
||||
True if cleared successfully
|
||||
"""
|
||||
print("🗑️ Clearing authentication data...")
|
||||
|
||||
try:
|
||||
# Remove browser state
|
||||
if self.state_file.exists():
|
||||
self.state_file.unlink()
|
||||
print(" ✅ Removed browser state")
|
||||
|
||||
# Remove auth info
|
||||
if self.auth_info_file.exists():
|
||||
self.auth_info_file.unlink()
|
||||
print(" ✅ Removed auth info")
|
||||
|
||||
# Clear entire browser state directory
|
||||
if self.browser_state_dir.exists():
|
||||
shutil.rmtree(self.browser_state_dir)
|
||||
self.browser_state_dir.mkdir(parents=True, exist_ok=True)
|
||||
print(" ✅ Cleared browser data")
|
||||
|
||||
return True
|
||||
|
||||
except Exception as e:
|
||||
print(f" ❌ Error clearing auth: {e}")
|
||||
return False
|
||||
|
||||
def re_auth(self, headless: bool = False, timeout_minutes: int = 10) -> bool:
|
||||
"""
|
||||
Perform re-authentication (clear and setup)
|
||||
|
||||
Args:
|
||||
headless: Run browser in headless mode
|
||||
timeout_minutes: Login timeout in minutes
|
||||
|
||||
Returns:
|
||||
True if successful
|
||||
"""
|
||||
print("🔄 Starting re-authentication...")
|
||||
|
||||
# Clear existing auth
|
||||
self.clear_auth()
|
||||
|
||||
# Setup new auth
|
||||
return self.setup_auth(headless, timeout_minutes)
|
||||
|
||||
def validate_auth(self) -> bool:
|
||||
"""
|
||||
Validate that stored authentication works
|
||||
Uses persistent context to match actual usage pattern
|
||||
|
||||
Returns:
|
||||
True if authentication is valid
|
||||
"""
|
||||
if not self.is_authenticated():
|
||||
return False
|
||||
|
||||
print("🔍 Validating authentication...")
|
||||
|
||||
playwright = None
|
||||
context = None
|
||||
|
||||
try:
|
||||
playwright = sync_playwright().start()
|
||||
|
||||
# Launch using factory
|
||||
context = BrowserFactory.launch_persistent_context(
|
||||
playwright,
|
||||
headless=True
|
||||
)
|
||||
|
||||
# Try to access NotebookLM
|
||||
page = context.new_page()
|
||||
page.goto("https://notebooklm.google.com", wait_until="domcontentloaded", timeout=30000)
|
||||
|
||||
# Check if we can access NotebookLM
|
||||
if "notebooklm.google.com" in page.url and "accounts.google.com" not in page.url:
|
||||
print(" ✅ Authentication is valid")
|
||||
return True
|
||||
else:
|
||||
print(" ❌ Authentication is invalid (redirected to login)")
|
||||
return False
|
||||
|
||||
except Exception as e:
|
||||
print(f" ❌ Validation failed: {e}")
|
||||
return False
|
||||
|
||||
finally:
|
||||
if context:
|
||||
try:
|
||||
context.close()
|
||||
except Exception:
|
||||
pass
|
||||
if playwright:
|
||||
try:
|
||||
playwright.stop()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
def main():
|
||||
"""Command-line interface for authentication management"""
|
||||
parser = argparse.ArgumentParser(description='Manage NotebookLM authentication')
|
||||
|
||||
subparsers = parser.add_subparsers(dest='command', help='Commands')
|
||||
|
||||
# Setup command
|
||||
setup_parser = subparsers.add_parser('setup', help='Setup authentication')
|
||||
setup_parser.add_argument('--headless', action='store_true', help='Run in headless mode')
|
||||
setup_parser.add_argument('--timeout', type=float, default=10, help='Login timeout in minutes (default: 10)')
|
||||
|
||||
# Status command
|
||||
subparsers.add_parser('status', help='Check authentication status')
|
||||
|
||||
# Validate command
|
||||
subparsers.add_parser('validate', help='Validate authentication')
|
||||
|
||||
# Clear command
|
||||
subparsers.add_parser('clear', help='Clear authentication')
|
||||
|
||||
# Re-auth command
|
||||
reauth_parser = subparsers.add_parser('reauth', help='Re-authenticate (clear + setup)')
|
||||
reauth_parser.add_argument('--timeout', type=float, default=10, help='Login timeout in minutes (default: 10)')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
# Initialize manager
|
||||
auth = AuthManager()
|
||||
|
||||
# Execute command
|
||||
if args.command == 'setup':
|
||||
if auth.setup_auth(headless=args.headless, timeout_minutes=args.timeout):
|
||||
print("\n✅ Authentication setup complete!")
|
||||
print("You can now use ask_question.py to query NotebookLM")
|
||||
else:
|
||||
print("\n❌ Authentication setup failed")
|
||||
exit(1)
|
||||
|
||||
elif args.command == 'status':
|
||||
info = auth.get_auth_info()
|
||||
print("\n🔐 Authentication Status:")
|
||||
print(f" Authenticated: {'Yes' if info['authenticated'] else 'No'}")
|
||||
if info.get('state_age_hours'):
|
||||
print(f" State age: {info['state_age_hours']:.1f} hours")
|
||||
if info.get('authenticated_at_iso'):
|
||||
print(f" Last auth: {info['authenticated_at_iso']}")
|
||||
print(f" State file: {info['state_file']}")
|
||||
|
||||
elif args.command == 'validate':
|
||||
if auth.validate_auth():
|
||||
print("Authentication is valid and working")
|
||||
else:
|
||||
print("Authentication is invalid or expired")
|
||||
print("Run: auth_manager.py setup")
|
||||
|
||||
elif args.command == 'clear':
|
||||
if auth.clear_auth():
|
||||
print("Authentication cleared")
|
||||
|
||||
elif args.command == 'reauth':
|
||||
if auth.re_auth(timeout_minutes=args.timeout):
|
||||
print("\n✅ Re-authentication complete!")
|
||||
else:
|
||||
print("\n❌ Re-authentication failed")
|
||||
exit(1)
|
||||
|
||||
else:
|
||||
parser.print_help()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
255
personas/_shared/community-skills/notebooklm/scripts/browser_session.py
Executable file
255
personas/_shared/community-skills/notebooklm/scripts/browser_session.py
Executable file
@@ -0,0 +1,255 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Browser Session Management for NotebookLM
|
||||
Individual browser session for persistent NotebookLM conversations
|
||||
Based on the original NotebookLM API implementation
|
||||
"""
|
||||
|
||||
import time
|
||||
import sys
|
||||
from typing import Any, Dict, Optional
|
||||
from pathlib import Path
|
||||
|
||||
from patchright.sync_api import BrowserContext, Page
|
||||
|
||||
# Add parent directory to path
|
||||
sys.path.insert(0, str(Path(__file__).parent))
|
||||
|
||||
from browser_utils import StealthUtils
|
||||
|
||||
|
||||
class BrowserSession:
|
||||
"""
|
||||
Represents a single persistent browser session for NotebookLM
|
||||
|
||||
Each session gets its own Page (tab) within a shared BrowserContext,
|
||||
allowing for contextual conversations where NotebookLM remembers
|
||||
previous messages.
|
||||
"""
|
||||
|
||||
def __init__(self, session_id: str, context: BrowserContext, notebook_url: str):
|
||||
"""
|
||||
Initialize a new browser session
|
||||
|
||||
Args:
|
||||
session_id: Unique identifier for this session
|
||||
context: Browser context (shared or dedicated)
|
||||
notebook_url: Target NotebookLM URL for this session
|
||||
"""
|
||||
self.id = session_id
|
||||
self.created_at = time.time()
|
||||
self.last_activity = time.time()
|
||||
self.message_count = 0
|
||||
self.notebook_url = notebook_url
|
||||
self.context = context
|
||||
self.page = None
|
||||
self.stealth = StealthUtils()
|
||||
|
||||
# Initialize the session
|
||||
self._initialize()
|
||||
|
||||
def _initialize(self):
|
||||
"""Initialize the browser session and navigate to NotebookLM"""
|
||||
print(f"🚀 Creating session {self.id}...")
|
||||
|
||||
# Create new page (tab) in context
|
||||
self.page = self.context.new_page()
|
||||
print(f" 🌐 Navigating to NotebookLM...")
|
||||
|
||||
try:
|
||||
# Navigate to notebook
|
||||
self.page.goto(self.notebook_url, wait_until="domcontentloaded", timeout=30000)
|
||||
|
||||
# Check if login is needed
|
||||
if "accounts.google.com" in self.page.url:
|
||||
raise RuntimeError("Authentication required. Please run auth_manager.py setup first.")
|
||||
|
||||
# Wait for page to be ready
|
||||
self._wait_for_ready()
|
||||
|
||||
# Simulate human inspection
|
||||
self.stealth.random_mouse_movement(self.page)
|
||||
self.stealth.random_delay(300, 600)
|
||||
|
||||
print(f"✅ Session {self.id} ready!")
|
||||
|
||||
except Exception as e:
|
||||
print(f"❌ Failed to initialize session: {e}")
|
||||
if self.page:
|
||||
self.page.close()
|
||||
raise
|
||||
|
||||
def _wait_for_ready(self):
|
||||
"""Wait for NotebookLM page to be ready"""
|
||||
try:
|
||||
# Wait for chat input
|
||||
self.page.wait_for_selector("textarea.query-box-input", timeout=10000, state="visible")
|
||||
except Exception:
|
||||
# Try alternative selector
|
||||
self.page.wait_for_selector('textarea[aria-label="Feld für Anfragen"]', timeout=5000, state="visible")
|
||||
|
||||
def ask(self, question: str) -> Dict[str, Any]:
|
||||
"""
|
||||
Ask a question in this session
|
||||
|
||||
Args:
|
||||
question: The question to ask
|
||||
|
||||
Returns:
|
||||
Dict with status, question, answer, session_id
|
||||
"""
|
||||
try:
|
||||
self.last_activity = time.time()
|
||||
self.message_count += 1
|
||||
|
||||
print(f"💬 [{self.id}] Asking: {question}")
|
||||
|
||||
# Snapshot current answer to detect new response
|
||||
previous_answer = self._snapshot_latest_response()
|
||||
|
||||
# Find chat input
|
||||
chat_input_selector = "textarea.query-box-input"
|
||||
try:
|
||||
self.page.wait_for_selector(chat_input_selector, timeout=5000, state="visible")
|
||||
except Exception:
|
||||
chat_input_selector = 'textarea[aria-label="Feld für Anfragen"]'
|
||||
self.page.wait_for_selector(chat_input_selector, timeout=5000, state="visible")
|
||||
|
||||
# Click and type with human-like behavior
|
||||
self.stealth.realistic_click(self.page, chat_input_selector)
|
||||
self.stealth.human_type(self.page, chat_input_selector, question)
|
||||
|
||||
# Small pause before submit
|
||||
self.stealth.random_delay(300, 800)
|
||||
|
||||
# Submit
|
||||
self.page.keyboard.press("Enter")
|
||||
|
||||
# Wait for response
|
||||
print(" ⏳ Waiting for response...")
|
||||
self.stealth.random_delay(1500, 3000)
|
||||
|
||||
# Get new answer
|
||||
answer = self._wait_for_latest_answer(previous_answer)
|
||||
|
||||
if not answer:
|
||||
raise Exception("Empty response from NotebookLM")
|
||||
|
||||
print(f" ✅ Got response ({len(answer)} chars)")
|
||||
|
||||
return {
|
||||
"status": "success",
|
||||
"question": question,
|
||||
"answer": answer,
|
||||
"session_id": self.id,
|
||||
"notebook_url": self.notebook_url
|
||||
}
|
||||
|
||||
except Exception as e:
|
||||
print(f" ❌ Error: {e}")
|
||||
return {
|
||||
"status": "error",
|
||||
"question": question,
|
||||
"error": str(e),
|
||||
"session_id": self.id
|
||||
}
|
||||
|
||||
def _snapshot_latest_response(self) -> Optional[str]:
|
||||
"""Get the current latest response text"""
|
||||
try:
|
||||
# Use correct NotebookLM selector
|
||||
responses = self.page.query_selector_all(".to-user-container .message-text-content")
|
||||
if responses:
|
||||
return responses[-1].inner_text()
|
||||
except Exception:
|
||||
pass
|
||||
return None
|
||||
|
||||
def _wait_for_latest_answer(self, previous_answer: Optional[str], timeout: int = 120) -> str:
|
||||
"""Wait for and extract the new answer"""
|
||||
start_time = time.time()
|
||||
last_candidate = None
|
||||
stable_count = 0
|
||||
|
||||
while time.time() - start_time < timeout:
|
||||
# Check if NotebookLM is still thinking (most reliable indicator)
|
||||
try:
|
||||
thinking_element = self.page.query_selector('div.thinking-message')
|
||||
if thinking_element and thinking_element.is_visible():
|
||||
time.sleep(0.5)
|
||||
continue
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
try:
|
||||
# Use correct NotebookLM selector
|
||||
responses = self.page.query_selector_all(".to-user-container .message-text-content")
|
||||
|
||||
if responses:
|
||||
latest_text = responses[-1].inner_text().strip()
|
||||
|
||||
# Check if it's a new response
|
||||
if latest_text and latest_text != previous_answer:
|
||||
# Check if text is stable (3 consecutive polls)
|
||||
if latest_text == last_candidate:
|
||||
stable_count += 1
|
||||
if stable_count >= 3:
|
||||
return latest_text
|
||||
else:
|
||||
stable_count = 1
|
||||
last_candidate = latest_text
|
||||
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
time.sleep(0.5)
|
||||
|
||||
raise TimeoutError(f"No response received within {timeout} seconds")
|
||||
|
||||
def reset(self):
|
||||
"""Reset the chat by reloading the page"""
|
||||
print(f"🔄 Resetting session {self.id}...")
|
||||
|
||||
self.page.reload(wait_until="domcontentloaded")
|
||||
self._wait_for_ready()
|
||||
|
||||
previous_count = self.message_count
|
||||
self.message_count = 0
|
||||
self.last_activity = time.time()
|
||||
|
||||
print(f"✅ Session reset (cleared {previous_count} messages)")
|
||||
return previous_count
|
||||
|
||||
def close(self):
|
||||
"""Close this session and clean up resources"""
|
||||
print(f"🛑 Closing session {self.id}...")
|
||||
|
||||
if self.page:
|
||||
try:
|
||||
self.page.close()
|
||||
except Exception as e:
|
||||
print(f" ⚠️ Error closing page: {e}")
|
||||
|
||||
print(f"✅ Session {self.id} closed")
|
||||
|
||||
def get_info(self) -> Dict[str, Any]:
|
||||
"""Get information about this session"""
|
||||
return {
|
||||
"id": self.id,
|
||||
"created_at": self.created_at,
|
||||
"last_activity": self.last_activity,
|
||||
"age_seconds": time.time() - self.created_at,
|
||||
"inactive_seconds": time.time() - self.last_activity,
|
||||
"message_count": self.message_count,
|
||||
"notebook_url": self.notebook_url
|
||||
}
|
||||
|
||||
def is_expired(self, timeout_seconds: int = 900) -> bool:
|
||||
"""Check if session has expired (default: 15 minutes)"""
|
||||
return (time.time() - self.last_activity) > timeout_seconds
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Example usage
|
||||
print("Browser Session Module - Use ask_question.py for main interface")
|
||||
print("This module provides low-level browser session management.")
|
||||
107
personas/_shared/community-skills/notebooklm/scripts/browser_utils.py
Executable file
107
personas/_shared/community-skills/notebooklm/scripts/browser_utils.py
Executable file
@@ -0,0 +1,107 @@
|
||||
"""
|
||||
Browser Utilities for NotebookLM Skill
|
||||
Handles browser launching, stealth features, and common interactions
|
||||
"""
|
||||
|
||||
import json
|
||||
import time
|
||||
import random
|
||||
from typing import Optional, List
|
||||
|
||||
from patchright.sync_api import Playwright, BrowserContext, Page
|
||||
from config import BROWSER_PROFILE_DIR, STATE_FILE, BROWSER_ARGS, USER_AGENT
|
||||
|
||||
|
||||
class BrowserFactory:
|
||||
"""Factory for creating configured browser contexts"""
|
||||
|
||||
@staticmethod
|
||||
def launch_persistent_context(
|
||||
playwright: Playwright,
|
||||
headless: bool = True,
|
||||
user_data_dir: str = str(BROWSER_PROFILE_DIR)
|
||||
) -> BrowserContext:
|
||||
"""
|
||||
Launch a persistent browser context with anti-detection features
|
||||
and cookie workaround.
|
||||
"""
|
||||
# Launch persistent context
|
||||
context = playwright.chromium.launch_persistent_context(
|
||||
user_data_dir=user_data_dir,
|
||||
channel="chrome", # Use real Chrome
|
||||
headless=headless,
|
||||
no_viewport=True,
|
||||
ignore_default_args=["--enable-automation"],
|
||||
user_agent=USER_AGENT,
|
||||
args=BROWSER_ARGS
|
||||
)
|
||||
|
||||
# Cookie Workaround for Playwright bug #36139
|
||||
# Session cookies (expires=-1) don't persist in user_data_dir automatically
|
||||
BrowserFactory._inject_cookies(context)
|
||||
|
||||
return context
|
||||
|
||||
@staticmethod
|
||||
def _inject_cookies(context: BrowserContext):
|
||||
"""Inject cookies from state.json if available"""
|
||||
if STATE_FILE.exists():
|
||||
try:
|
||||
with open(STATE_FILE, 'r') as f:
|
||||
state = json.load(f)
|
||||
if 'cookies' in state and len(state['cookies']) > 0:
|
||||
context.add_cookies(state['cookies'])
|
||||
# print(f" 🔧 Injected {len(state['cookies'])} cookies from state.json")
|
||||
except Exception as e:
|
||||
print(f" ⚠️ Could not load state.json: {e}")
|
||||
|
||||
|
||||
class StealthUtils:
|
||||
"""Human-like interaction utilities"""
|
||||
|
||||
@staticmethod
|
||||
def random_delay(min_ms: int = 100, max_ms: int = 500):
|
||||
"""Add random delay"""
|
||||
time.sleep(random.uniform(min_ms / 1000, max_ms / 1000))
|
||||
|
||||
@staticmethod
|
||||
def human_type(page: Page, selector: str, text: str, wpm_min: int = 320, wpm_max: int = 480):
|
||||
"""Type with human-like speed"""
|
||||
element = page.query_selector(selector)
|
||||
if not element:
|
||||
# Try waiting if not immediately found
|
||||
try:
|
||||
element = page.wait_for_selector(selector, timeout=2000)
|
||||
except:
|
||||
pass
|
||||
|
||||
if not element:
|
||||
print(f"⚠️ Element not found for typing: {selector}")
|
||||
return
|
||||
|
||||
# Click to focus
|
||||
element.click()
|
||||
|
||||
# Type
|
||||
for char in text:
|
||||
element.type(char, delay=random.uniform(25, 75))
|
||||
if random.random() < 0.05:
|
||||
time.sleep(random.uniform(0.15, 0.4))
|
||||
|
||||
@staticmethod
|
||||
def realistic_click(page: Page, selector: str):
|
||||
"""Click with realistic movement"""
|
||||
element = page.query_selector(selector)
|
||||
if not element:
|
||||
return
|
||||
|
||||
# Optional: Move mouse to element (simplified)
|
||||
box = element.bounding_box()
|
||||
if box:
|
||||
x = box['x'] + box['width'] / 2
|
||||
y = box['y'] + box['height'] / 2
|
||||
page.mouse.move(x, y, steps=5)
|
||||
|
||||
StealthUtils.random_delay(100, 300)
|
||||
element.click()
|
||||
StealthUtils.random_delay(100, 300)
|
||||
302
personas/_shared/community-skills/notebooklm/scripts/cleanup_manager.py
Executable file
302
personas/_shared/community-skills/notebooklm/scripts/cleanup_manager.py
Executable file
@@ -0,0 +1,302 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Cleanup Manager for NotebookLM Skill
|
||||
Manages cleanup of skill data and browser state
|
||||
"""
|
||||
|
||||
import shutil
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
from typing import Dict, List, Any
|
||||
|
||||
|
||||
class CleanupManager:
|
||||
"""
|
||||
Manages cleanup of NotebookLM skill data
|
||||
|
||||
Features:
|
||||
- Preview what will be deleted
|
||||
- Selective cleanup options
|
||||
- Library preservation
|
||||
- Safe deletion with confirmation
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
"""Initialize the cleanup manager"""
|
||||
# Skill directory paths
|
||||
self.skill_dir = Path(__file__).parent.parent
|
||||
self.data_dir = self.skill_dir / "data"
|
||||
|
||||
def get_cleanup_paths(self, preserve_library: bool = False) -> Dict[str, Any]:
|
||||
"""
|
||||
Get paths that would be cleaned up
|
||||
|
||||
Args:
|
||||
preserve_library: Keep library.json if True
|
||||
|
||||
Returns:
|
||||
Dict with paths and sizes
|
||||
|
||||
Note: .venv is NEVER deleted - it's part of the skill infrastructure
|
||||
"""
|
||||
paths = {
|
||||
'browser_state': [],
|
||||
'sessions': [],
|
||||
'library': [],
|
||||
'auth': [],
|
||||
'other': []
|
||||
}
|
||||
|
||||
total_size = 0
|
||||
|
||||
if self.data_dir.exists():
|
||||
# Browser state
|
||||
browser_state_dir = self.data_dir / "browser_state"
|
||||
if browser_state_dir.exists():
|
||||
for item in browser_state_dir.iterdir():
|
||||
size = self._get_size(item)
|
||||
paths['browser_state'].append({
|
||||
'path': str(item),
|
||||
'size': size,
|
||||
'type': 'dir' if item.is_dir() else 'file'
|
||||
})
|
||||
total_size += size
|
||||
|
||||
# Sessions
|
||||
sessions_file = self.data_dir / "sessions.json"
|
||||
if sessions_file.exists():
|
||||
size = sessions_file.stat().st_size
|
||||
paths['sessions'].append({
|
||||
'path': str(sessions_file),
|
||||
'size': size,
|
||||
'type': 'file'
|
||||
})
|
||||
total_size += size
|
||||
|
||||
# Library (unless preserved)
|
||||
if not preserve_library:
|
||||
library_file = self.data_dir / "library.json"
|
||||
if library_file.exists():
|
||||
size = library_file.stat().st_size
|
||||
paths['library'].append({
|
||||
'path': str(library_file),
|
||||
'size': size,
|
||||
'type': 'file'
|
||||
})
|
||||
total_size += size
|
||||
|
||||
# Auth info
|
||||
auth_info = self.data_dir / "auth_info.json"
|
||||
if auth_info.exists():
|
||||
size = auth_info.stat().st_size
|
||||
paths['auth'].append({
|
||||
'path': str(auth_info),
|
||||
'size': size,
|
||||
'type': 'file'
|
||||
})
|
||||
total_size += size
|
||||
|
||||
# Other files in data dir (but NEVER .venv!)
|
||||
for item in self.data_dir.iterdir():
|
||||
if item.name not in ['browser_state', 'sessions.json', 'library.json', 'auth_info.json']:
|
||||
size = self._get_size(item)
|
||||
paths['other'].append({
|
||||
'path': str(item),
|
||||
'size': size,
|
||||
'type': 'dir' if item.is_dir() else 'file'
|
||||
})
|
||||
total_size += size
|
||||
|
||||
return {
|
||||
'categories': paths,
|
||||
'total_size': total_size,
|
||||
'total_items': sum(len(items) for items in paths.values())
|
||||
}
|
||||
|
||||
def _get_size(self, path: Path) -> int:
|
||||
"""Get size of file or directory in bytes"""
|
||||
if path.is_file():
|
||||
return path.stat().st_size
|
||||
elif path.is_dir():
|
||||
total = 0
|
||||
try:
|
||||
for item in path.rglob('*'):
|
||||
if item.is_file():
|
||||
total += item.stat().st_size
|
||||
except Exception:
|
||||
pass
|
||||
return total
|
||||
return 0
|
||||
|
||||
def _format_size(self, size: int) -> str:
|
||||
"""Format size in human-readable form"""
|
||||
for unit in ['B', 'KB', 'MB', 'GB']:
|
||||
if size < 1024:
|
||||
return f"{size:.1f} {unit}"
|
||||
size /= 1024
|
||||
return f"{size:.1f} TB"
|
||||
|
||||
def perform_cleanup(
|
||||
self,
|
||||
preserve_library: bool = False,
|
||||
dry_run: bool = False
|
||||
) -> Dict[str, Any]:
|
||||
"""
|
||||
Perform the actual cleanup
|
||||
|
||||
Args:
|
||||
preserve_library: Keep library.json if True
|
||||
dry_run: Preview only, don't delete
|
||||
|
||||
Returns:
|
||||
Dict with cleanup results
|
||||
"""
|
||||
cleanup_data = self.get_cleanup_paths(preserve_library)
|
||||
deleted_items = []
|
||||
failed_items = []
|
||||
deleted_size = 0
|
||||
|
||||
if dry_run:
|
||||
return {
|
||||
'dry_run': True,
|
||||
'would_delete': cleanup_data['total_items'],
|
||||
'would_free': cleanup_data['total_size']
|
||||
}
|
||||
|
||||
# Perform deletion
|
||||
for category, items in cleanup_data['categories'].items():
|
||||
for item_info in items:
|
||||
path = Path(item_info['path'])
|
||||
try:
|
||||
if path.exists():
|
||||
if path.is_dir():
|
||||
shutil.rmtree(path)
|
||||
else:
|
||||
path.unlink()
|
||||
deleted_items.append(str(path))
|
||||
deleted_size += item_info['size']
|
||||
print(f" ✅ Deleted: {path.name}")
|
||||
except Exception as e:
|
||||
failed_items.append({
|
||||
'path': str(path),
|
||||
'error': str(e)
|
||||
})
|
||||
print(f" ❌ Failed: {path.name} ({e})")
|
||||
|
||||
# Recreate browser_state dir if everything was deleted
|
||||
if not preserve_library and not failed_items:
|
||||
browser_state_dir = self.data_dir / "browser_state"
|
||||
browser_state_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
return {
|
||||
'deleted_items': deleted_items,
|
||||
'failed_items': failed_items,
|
||||
'deleted_size': deleted_size,
|
||||
'deleted_count': len(deleted_items),
|
||||
'failed_count': len(failed_items)
|
||||
}
|
||||
|
||||
def print_cleanup_preview(self, preserve_library: bool = False):
|
||||
"""Print a preview of what will be cleaned"""
|
||||
data = self.get_cleanup_paths(preserve_library)
|
||||
|
||||
print("\n🔍 Cleanup Preview")
|
||||
print("=" * 60)
|
||||
|
||||
for category, items in data['categories'].items():
|
||||
if items:
|
||||
print(f"\n📁 {category.replace('_', ' ').title()}:")
|
||||
for item in items:
|
||||
path = Path(item['path'])
|
||||
size_str = self._format_size(item['size'])
|
||||
type_icon = "📂" if item['type'] == 'dir' else "📄"
|
||||
print(f" {type_icon} {path.name:<30} {size_str:>10}")
|
||||
|
||||
print("\n" + "=" * 60)
|
||||
print(f"Total items: {data['total_items']}")
|
||||
print(f"Total size: {self._format_size(data['total_size'])}")
|
||||
|
||||
if preserve_library:
|
||||
print("\n📚 Library will be preserved")
|
||||
|
||||
print("\nThis preview shows what would be deleted.")
|
||||
print("Use --confirm to actually perform the cleanup.")
|
||||
|
||||
|
||||
def main():
|
||||
"""Command-line interface for cleanup management"""
|
||||
parser = argparse.ArgumentParser(
|
||||
description='Clean up NotebookLM skill data',
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
epilog="""
|
||||
Examples:
|
||||
# Preview what will be deleted
|
||||
python cleanup_manager.py
|
||||
|
||||
# Perform cleanup (delete everything)
|
||||
python cleanup_manager.py --confirm
|
||||
|
||||
# Cleanup but keep library
|
||||
python cleanup_manager.py --confirm --preserve-library
|
||||
|
||||
# Force cleanup without preview
|
||||
python cleanup_manager.py --confirm --force
|
||||
"""
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
'--confirm',
|
||||
action='store_true',
|
||||
help='Actually perform the cleanup (without this, only preview)'
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
'--preserve-library',
|
||||
action='store_true',
|
||||
help='Keep the notebook library (library.json)'
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
'--force',
|
||||
action='store_true',
|
||||
help='Skip confirmation prompt'
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
# Initialize manager
|
||||
manager = CleanupManager()
|
||||
|
||||
if args.confirm:
|
||||
# Show preview first unless forced
|
||||
if not args.force:
|
||||
manager.print_cleanup_preview(args.preserve_library)
|
||||
|
||||
print("\n⚠️ WARNING: This will delete the files shown above!")
|
||||
print(" Note: .venv is preserved (part of skill infrastructure)")
|
||||
response = input("Are you sure? (yes/no): ")
|
||||
|
||||
if response.lower() != 'yes':
|
||||
print("Cleanup cancelled.")
|
||||
return
|
||||
|
||||
# Perform cleanup
|
||||
print("\n🗑️ Performing cleanup...")
|
||||
result = manager.perform_cleanup(args.preserve_library, dry_run=False)
|
||||
|
||||
print(f"\n✅ Cleanup complete!")
|
||||
print(f" Deleted: {result['deleted_count']} items")
|
||||
print(f" Freed: {manager._format_size(result['deleted_size'])}")
|
||||
|
||||
if result['failed_count'] > 0:
|
||||
print(f" ⚠️ Failed: {result['failed_count']} items")
|
||||
|
||||
else:
|
||||
# Just show preview
|
||||
manager.print_cleanup_preview(args.preserve_library)
|
||||
print("\n💡 Note: Virtual environment (.venv) is never deleted")
|
||||
print(" It's part of the skill infrastructure, not user data")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
44
personas/_shared/community-skills/notebooklm/scripts/config.py
Executable file
44
personas/_shared/community-skills/notebooklm/scripts/config.py
Executable file
@@ -0,0 +1,44 @@
|
||||
"""
|
||||
Configuration for NotebookLM Skill
|
||||
Centralizes constants, selectors, and paths
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
# Paths
|
||||
SKILL_DIR = Path(__file__).parent.parent
|
||||
DATA_DIR = SKILL_DIR / "data"
|
||||
BROWSER_STATE_DIR = DATA_DIR / "browser_state"
|
||||
BROWSER_PROFILE_DIR = BROWSER_STATE_DIR / "browser_profile"
|
||||
STATE_FILE = BROWSER_STATE_DIR / "state.json"
|
||||
AUTH_INFO_FILE = DATA_DIR / "auth_info.json"
|
||||
LIBRARY_FILE = DATA_DIR / "library.json"
|
||||
|
||||
# NotebookLM Selectors
|
||||
QUERY_INPUT_SELECTORS = [
|
||||
"textarea.query-box-input", # Primary
|
||||
'textarea[aria-label="Feld für Anfragen"]', # Fallback German
|
||||
'textarea[aria-label="Input for queries"]', # Fallback English
|
||||
]
|
||||
|
||||
RESPONSE_SELECTORS = [
|
||||
".to-user-container .message-text-content", # Primary
|
||||
"[data-message-author='bot']",
|
||||
"[data-message-author='assistant']",
|
||||
]
|
||||
|
||||
# Browser Configuration
|
||||
BROWSER_ARGS = [
|
||||
'--disable-blink-features=AutomationControlled', # Patches navigator.webdriver
|
||||
'--disable-dev-shm-usage',
|
||||
'--no-sandbox',
|
||||
'--no-first-run',
|
||||
'--no-default-browser-check'
|
||||
]
|
||||
|
||||
USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36'
|
||||
|
||||
# Timeouts
|
||||
LOGIN_TIMEOUT_MINUTES = 10
|
||||
QUERY_TIMEOUT_SECONDS = 120
|
||||
PAGE_LOAD_TIMEOUT = 30000
|
||||
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Dump NotebookLM homepage HTML + screenshot to find correct selectors."""
|
||||
import sys, time
|
||||
from pathlib import Path
|
||||
from patchright.sync_api import sync_playwright
|
||||
sys.path.insert(0, str(Path(__file__).parent))
|
||||
from browser_utils import BrowserFactory
|
||||
|
||||
with sync_playwright() as p:
|
||||
ctx = BrowserFactory.launch_persistent_context(p, headless=True)
|
||||
page = ctx.new_page()
|
||||
page.goto("https://notebooklm.google.com", wait_until="networkidle", timeout=60000)
|
||||
time.sleep(5)
|
||||
# Try to force lazy load
|
||||
for _ in range(8):
|
||||
page.mouse.wheel(0, 2000); time.sleep(0.3)
|
||||
page.mouse.wheel(0, -20000); time.sleep(1)
|
||||
|
||||
html = page.content()
|
||||
with open("/tmp/nb_home.html", "w") as f: f.write(html)
|
||||
page.screenshot(path="/tmp/nb_home.png", full_page=True)
|
||||
|
||||
# Extract probable notebook info
|
||||
candidates = page.evaluate("""() => {
|
||||
// Try many approaches
|
||||
const out = { anchors: [], cards: [], data_ids: [], tiles: [] };
|
||||
document.querySelectorAll("a").forEach(a => {
|
||||
if (a.href.includes("/notebook/") || a.href.includes("/project/")) {
|
||||
out.anchors.push({href: a.href, text: (a.innerText||"").trim().slice(0,100), aria: a.getAttribute("aria-label")||""});
|
||||
}
|
||||
});
|
||||
document.querySelectorAll("[data-id],[data-notebook-id],[data-project-id]").forEach(el => {
|
||||
out.data_ids.push({id: el.dataset.id||el.dataset.notebookId||el.dataset.projectId, tag: el.tagName, text: (el.innerText||"").trim().slice(0,80)});
|
||||
});
|
||||
document.querySelectorAll("project-card, notebook-card, mat-card, [class*='card'], [class*='tile'], [class*='project']").forEach(c => {
|
||||
const title = c.querySelector("[class*='title'], h3, h4, [class*='name'], [class*='heading']");
|
||||
out.cards.push({tag: c.tagName, class: c.className.slice(0,100), title: title ? title.innerText.trim().slice(0,80) : (c.innerText||"").trim().slice(0,80)});
|
||||
});
|
||||
return out;
|
||||
}""")
|
||||
import json
|
||||
print(json.dumps(candidates, indent=2, ensure_ascii=False))
|
||||
ctx.close()
|
||||
@@ -0,0 +1,86 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
List all NotebookLM notebooks by scraping the homepage.
|
||||
Uses the authenticated browser state from auth_manager.
|
||||
|
||||
Output: JSON array of {url, title} to stdout and /tmp/notebooklm_inventory.json
|
||||
"""
|
||||
import json
|
||||
import re
|
||||
import sys
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
from patchright.sync_api import sync_playwright
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).parent))
|
||||
from auth_manager import AuthManager
|
||||
from browser_utils import BrowserFactory
|
||||
|
||||
|
||||
def main():
|
||||
auth = AuthManager()
|
||||
if not auth.is_authenticated():
|
||||
print("Not authenticated. Run: auth_manager.py setup")
|
||||
sys.exit(1)
|
||||
|
||||
playwright = None
|
||||
context = None
|
||||
try:
|
||||
playwright = sync_playwright().start()
|
||||
context = BrowserFactory.launch_persistent_context(playwright, headless=True)
|
||||
page = context.new_page()
|
||||
page.goto("https://notebooklm.google.com", wait_until="domcontentloaded", timeout=60000)
|
||||
|
||||
# Wait for notebook grid to load
|
||||
print("Waiting for notebooks to load...", file=sys.stderr)
|
||||
try:
|
||||
page.wait_for_selector("a[href*='/notebook/']", timeout=20000)
|
||||
except Exception:
|
||||
print("Timeout waiting for notebook grid — dumping page anyway", file=sys.stderr)
|
||||
|
||||
# Let lazy-loaded items render
|
||||
time.sleep(3)
|
||||
# Scroll to force lazy rendering
|
||||
for _ in range(5):
|
||||
page.mouse.wheel(0, 1500)
|
||||
time.sleep(0.5)
|
||||
|
||||
notebooks = page.evaluate("""
|
||||
() => {
|
||||
const results = [];
|
||||
const seen = new Set();
|
||||
document.querySelectorAll("a[href*='/notebook/']").forEach(a => {
|
||||
const href = a.href;
|
||||
const m = href.match(/\\/notebook\\/([a-f0-9-]+)/);
|
||||
if (!m) return;
|
||||
if (seen.has(m[1])) return;
|
||||
seen.add(m[1]);
|
||||
// Try multiple selectors for title
|
||||
let title = '';
|
||||
const titleEl = a.querySelector('[class*="title"], [class*="name"], [class*="heading"]');
|
||||
if (titleEl) title = titleEl.innerText.trim();
|
||||
if (!title) title = a.innerText.trim().split('\\n')[0];
|
||||
if (!title) title = a.getAttribute('aria-label') || '';
|
||||
results.push({ id: m[1], url: 'https://notebooklm.google.com/notebook/' + m[1], title: title });
|
||||
});
|
||||
return results;
|
||||
}
|
||||
""")
|
||||
|
||||
print(json.dumps(notebooks, ensure_ascii=False, indent=2))
|
||||
with open("/tmp/notebooklm_inventory.json", "w") as f:
|
||||
json.dump(notebooks, f, ensure_ascii=False, indent=2)
|
||||
print(f"\n{len(notebooks)} notebooks saved to /tmp/notebooklm_inventory.json", file=sys.stderr)
|
||||
|
||||
finally:
|
||||
if context:
|
||||
try: context.close()
|
||||
except: pass
|
||||
if playwright:
|
||||
try: playwright.stop()
|
||||
except: pass
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
410
personas/_shared/community-skills/notebooklm/scripts/notebook_manager.py
Executable file
410
personas/_shared/community-skills/notebooklm/scripts/notebook_manager.py
Executable file
@@ -0,0 +1,410 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Notebook Library Management for NotebookLM
|
||||
Manages a library of NotebookLM notebooks with metadata
|
||||
Based on the MCP server implementation
|
||||
"""
|
||||
|
||||
import json
|
||||
import argparse
|
||||
import uuid
|
||||
import os
|
||||
from pathlib import Path
|
||||
from typing import Dict, List, Optional, Any
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
class NotebookLibrary:
|
||||
"""Manages a collection of NotebookLM notebooks with metadata"""
|
||||
|
||||
def __init__(self):
|
||||
"""Initialize the notebook library"""
|
||||
# Store data within the skill directory
|
||||
skill_dir = Path(__file__).parent.parent
|
||||
self.data_dir = skill_dir / "data"
|
||||
self.data_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
self.library_file = self.data_dir / "library.json"
|
||||
self.notebooks: Dict[str, Dict[str, Any]] = {}
|
||||
self.active_notebook_id: Optional[str] = None
|
||||
|
||||
# Load existing library
|
||||
self._load_library()
|
||||
|
||||
def _load_library(self):
|
||||
"""Load library from disk"""
|
||||
if self.library_file.exists():
|
||||
try:
|
||||
with open(self.library_file, 'r') as f:
|
||||
data = json.load(f)
|
||||
self.notebooks = data.get('notebooks', {})
|
||||
self.active_notebook_id = data.get('active_notebook_id')
|
||||
print(f"📚 Loaded library with {len(self.notebooks)} notebooks")
|
||||
except Exception as e:
|
||||
print(f"⚠️ Error loading library: {e}")
|
||||
self.notebooks = {}
|
||||
self.active_notebook_id = None
|
||||
else:
|
||||
self._save_library()
|
||||
|
||||
def _save_library(self):
|
||||
"""Save library to disk"""
|
||||
try:
|
||||
data = {
|
||||
'notebooks': self.notebooks,
|
||||
'active_notebook_id': self.active_notebook_id,
|
||||
'updated_at': datetime.now().isoformat()
|
||||
}
|
||||
with open(self.library_file, 'w') as f:
|
||||
json.dump(data, f, indent=2)
|
||||
except Exception as e:
|
||||
print(f"❌ Error saving library: {e}")
|
||||
|
||||
def add_notebook(
|
||||
self,
|
||||
url: str,
|
||||
name: str,
|
||||
description: str,
|
||||
topics: List[str],
|
||||
content_types: Optional[List[str]] = None,
|
||||
use_cases: Optional[List[str]] = None,
|
||||
tags: Optional[List[str]] = None
|
||||
) -> Dict[str, Any]:
|
||||
"""
|
||||
Add a new notebook to the library
|
||||
|
||||
Args:
|
||||
url: NotebookLM notebook URL
|
||||
name: Display name for the notebook
|
||||
description: What's in this notebook
|
||||
topics: Topics covered
|
||||
content_types: Types of content (optional)
|
||||
use_cases: When to use this notebook (optional)
|
||||
tags: Additional tags for organization (optional)
|
||||
|
||||
Returns:
|
||||
The created notebook object
|
||||
"""
|
||||
# Generate ID from name
|
||||
notebook_id = name.lower().replace(' ', '-').replace('_', '-')
|
||||
|
||||
# Check for duplicates
|
||||
if notebook_id in self.notebooks:
|
||||
raise ValueError(f"Notebook with ID '{notebook_id}' already exists")
|
||||
|
||||
# Create notebook object
|
||||
notebook = {
|
||||
'id': notebook_id,
|
||||
'url': url,
|
||||
'name': name,
|
||||
'description': description,
|
||||
'topics': topics,
|
||||
'content_types': content_types or [],
|
||||
'use_cases': use_cases or [],
|
||||
'tags': tags or [],
|
||||
'created_at': datetime.now().isoformat(),
|
||||
'updated_at': datetime.now().isoformat(),
|
||||
'use_count': 0,
|
||||
'last_used': None
|
||||
}
|
||||
|
||||
# Add to library
|
||||
self.notebooks[notebook_id] = notebook
|
||||
|
||||
# Set as active if it's the first notebook
|
||||
if len(self.notebooks) == 1:
|
||||
self.active_notebook_id = notebook_id
|
||||
|
||||
self._save_library()
|
||||
|
||||
print(f"✅ Added notebook: {name} ({notebook_id})")
|
||||
return notebook
|
||||
|
||||
def remove_notebook(self, notebook_id: str) -> bool:
|
||||
"""
|
||||
Remove a notebook from the library
|
||||
|
||||
Args:
|
||||
notebook_id: ID of notebook to remove
|
||||
|
||||
Returns:
|
||||
True if removed, False if not found
|
||||
"""
|
||||
if notebook_id in self.notebooks:
|
||||
del self.notebooks[notebook_id]
|
||||
|
||||
# Clear active if it was removed
|
||||
if self.active_notebook_id == notebook_id:
|
||||
self.active_notebook_id = None
|
||||
# Set new active if there are other notebooks
|
||||
if self.notebooks:
|
||||
self.active_notebook_id = list(self.notebooks.keys())[0]
|
||||
|
||||
self._save_library()
|
||||
print(f"✅ Removed notebook: {notebook_id}")
|
||||
return True
|
||||
|
||||
print(f"⚠️ Notebook not found: {notebook_id}")
|
||||
return False
|
||||
|
||||
def update_notebook(
|
||||
self,
|
||||
notebook_id: str,
|
||||
name: Optional[str] = None,
|
||||
description: Optional[str] = None,
|
||||
topics: Optional[List[str]] = None,
|
||||
content_types: Optional[List[str]] = None,
|
||||
use_cases: Optional[List[str]] = None,
|
||||
tags: Optional[List[str]] = None,
|
||||
url: Optional[str] = None
|
||||
) -> Dict[str, Any]:
|
||||
"""
|
||||
Update notebook metadata
|
||||
|
||||
Args:
|
||||
notebook_id: ID of notebook to update
|
||||
Other args: Fields to update (None = keep existing)
|
||||
|
||||
Returns:
|
||||
Updated notebook object
|
||||
"""
|
||||
if notebook_id not in self.notebooks:
|
||||
raise ValueError(f"Notebook not found: {notebook_id}")
|
||||
|
||||
notebook = self.notebooks[notebook_id]
|
||||
|
||||
# Update fields if provided
|
||||
if name is not None:
|
||||
notebook['name'] = name
|
||||
if description is not None:
|
||||
notebook['description'] = description
|
||||
if topics is not None:
|
||||
notebook['topics'] = topics
|
||||
if content_types is not None:
|
||||
notebook['content_types'] = content_types
|
||||
if use_cases is not None:
|
||||
notebook['use_cases'] = use_cases
|
||||
if tags is not None:
|
||||
notebook['tags'] = tags
|
||||
if url is not None:
|
||||
notebook['url'] = url
|
||||
|
||||
notebook['updated_at'] = datetime.now().isoformat()
|
||||
|
||||
self._save_library()
|
||||
print(f"✅ Updated notebook: {notebook['name']}")
|
||||
return notebook
|
||||
|
||||
def get_notebook(self, notebook_id: str) -> Optional[Dict[str, Any]]:
|
||||
"""Get a specific notebook by ID"""
|
||||
return self.notebooks.get(notebook_id)
|
||||
|
||||
def list_notebooks(self) -> List[Dict[str, Any]]:
|
||||
"""List all notebooks in the library"""
|
||||
return list(self.notebooks.values())
|
||||
|
||||
def search_notebooks(self, query: str) -> List[Dict[str, Any]]:
|
||||
"""
|
||||
Search notebooks by query
|
||||
|
||||
Args:
|
||||
query: Search query (searches name, description, topics, tags)
|
||||
|
||||
Returns:
|
||||
List of matching notebooks
|
||||
"""
|
||||
query_lower = query.lower()
|
||||
results = []
|
||||
|
||||
for notebook in self.notebooks.values():
|
||||
# Search in various fields
|
||||
searchable = [
|
||||
notebook['name'].lower(),
|
||||
notebook['description'].lower(),
|
||||
' '.join(notebook['topics']).lower(),
|
||||
' '.join(notebook['tags']).lower(),
|
||||
' '.join(notebook.get('use_cases', [])).lower()
|
||||
]
|
||||
|
||||
if any(query_lower in field for field in searchable):
|
||||
results.append(notebook)
|
||||
|
||||
return results
|
||||
|
||||
def select_notebook(self, notebook_id: str) -> Dict[str, Any]:
|
||||
"""
|
||||
Set a notebook as active
|
||||
|
||||
Args:
|
||||
notebook_id: ID of notebook to activate
|
||||
|
||||
Returns:
|
||||
The activated notebook
|
||||
"""
|
||||
if notebook_id not in self.notebooks:
|
||||
raise ValueError(f"Notebook not found: {notebook_id}")
|
||||
|
||||
self.active_notebook_id = notebook_id
|
||||
self._save_library()
|
||||
|
||||
notebook = self.notebooks[notebook_id]
|
||||
print(f"✅ Activated notebook: {notebook['name']}")
|
||||
return notebook
|
||||
|
||||
def get_active_notebook(self) -> Optional[Dict[str, Any]]:
|
||||
"""Get the currently active notebook"""
|
||||
if self.active_notebook_id:
|
||||
return self.notebooks.get(self.active_notebook_id)
|
||||
return None
|
||||
|
||||
def increment_use_count(self, notebook_id: str) -> Dict[str, Any]:
|
||||
"""
|
||||
Increment usage counter for a notebook
|
||||
|
||||
Args:
|
||||
notebook_id: ID of notebook that was used
|
||||
|
||||
Returns:
|
||||
Updated notebook
|
||||
"""
|
||||
if notebook_id not in self.notebooks:
|
||||
raise ValueError(f"Notebook not found: {notebook_id}")
|
||||
|
||||
notebook = self.notebooks[notebook_id]
|
||||
notebook['use_count'] += 1
|
||||
notebook['last_used'] = datetime.now().isoformat()
|
||||
|
||||
self._save_library()
|
||||
return notebook
|
||||
|
||||
def get_stats(self) -> Dict[str, Any]:
|
||||
"""Get library statistics"""
|
||||
total_notebooks = len(self.notebooks)
|
||||
total_topics = set()
|
||||
total_use_count = 0
|
||||
|
||||
for notebook in self.notebooks.values():
|
||||
total_topics.update(notebook['topics'])
|
||||
total_use_count += notebook['use_count']
|
||||
|
||||
# Find most used
|
||||
most_used = None
|
||||
if self.notebooks:
|
||||
most_used = max(
|
||||
self.notebooks.values(),
|
||||
key=lambda n: n['use_count']
|
||||
)
|
||||
|
||||
return {
|
||||
'total_notebooks': total_notebooks,
|
||||
'total_topics': len(total_topics),
|
||||
'total_use_count': total_use_count,
|
||||
'active_notebook': self.get_active_notebook(),
|
||||
'most_used_notebook': most_used,
|
||||
'library_path': str(self.library_file)
|
||||
}
|
||||
|
||||
|
||||
def main():
|
||||
"""Command-line interface for notebook management"""
|
||||
parser = argparse.ArgumentParser(description='Manage NotebookLM library')
|
||||
|
||||
subparsers = parser.add_subparsers(dest='command', help='Commands')
|
||||
|
||||
# Add command
|
||||
add_parser = subparsers.add_parser('add', help='Add a notebook')
|
||||
add_parser.add_argument('--url', required=True, help='NotebookLM URL')
|
||||
add_parser.add_argument('--name', required=True, help='Display name')
|
||||
add_parser.add_argument('--description', required=True, help='Description')
|
||||
add_parser.add_argument('--topics', required=True, help='Comma-separated topics')
|
||||
add_parser.add_argument('--use-cases', help='Comma-separated use cases')
|
||||
add_parser.add_argument('--tags', help='Comma-separated tags')
|
||||
|
||||
# List command
|
||||
subparsers.add_parser('list', help='List all notebooks')
|
||||
|
||||
# Search command
|
||||
search_parser = subparsers.add_parser('search', help='Search notebooks')
|
||||
search_parser.add_argument('--query', required=True, help='Search query')
|
||||
|
||||
# Activate command
|
||||
activate_parser = subparsers.add_parser('activate', help='Set active notebook')
|
||||
activate_parser.add_argument('--id', required=True, help='Notebook ID')
|
||||
|
||||
# Remove command
|
||||
remove_parser = subparsers.add_parser('remove', help='Remove a notebook')
|
||||
remove_parser.add_argument('--id', required=True, help='Notebook ID')
|
||||
|
||||
# Stats command
|
||||
subparsers.add_parser('stats', help='Show library statistics')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
# Initialize library
|
||||
library = NotebookLibrary()
|
||||
|
||||
# Execute command
|
||||
if args.command == 'add':
|
||||
topics = [t.strip() for t in args.topics.split(',')]
|
||||
use_cases = [u.strip() for u in args.use_cases.split(',')] if args.use_cases else None
|
||||
tags = [t.strip() for t in args.tags.split(',')] if args.tags else None
|
||||
|
||||
notebook = library.add_notebook(
|
||||
url=args.url,
|
||||
name=args.name,
|
||||
description=args.description,
|
||||
topics=topics,
|
||||
use_cases=use_cases,
|
||||
tags=tags
|
||||
)
|
||||
print(json.dumps(notebook, indent=2))
|
||||
|
||||
elif args.command == 'list':
|
||||
notebooks = library.list_notebooks()
|
||||
if notebooks:
|
||||
print("\n📚 Notebook Library:")
|
||||
for notebook in notebooks:
|
||||
active = " [ACTIVE]" if notebook['id'] == library.active_notebook_id else ""
|
||||
print(f"\n 📓 {notebook['name']}{active}")
|
||||
print(f" ID: {notebook['id']}")
|
||||
print(f" Topics: {', '.join(notebook['topics'])}")
|
||||
print(f" Uses: {notebook['use_count']}")
|
||||
else:
|
||||
print("📚 Library is empty. Add notebooks with: notebook_manager.py add")
|
||||
|
||||
elif args.command == 'search':
|
||||
results = library.search_notebooks(args.query)
|
||||
if results:
|
||||
print(f"\n🔍 Found {len(results)} notebooks:")
|
||||
for notebook in results:
|
||||
print(f"\n 📓 {notebook['name']} ({notebook['id']})")
|
||||
print(f" {notebook['description']}")
|
||||
else:
|
||||
print(f"🔍 No notebooks found for: {args.query}")
|
||||
|
||||
elif args.command == 'activate':
|
||||
notebook = library.select_notebook(args.id)
|
||||
print(f"Now using: {notebook['name']}")
|
||||
|
||||
elif args.command == 'remove':
|
||||
if library.remove_notebook(args.id):
|
||||
print("Notebook removed from library")
|
||||
|
||||
elif args.command == 'stats':
|
||||
stats = library.get_stats()
|
||||
print("\n📊 Library Statistics:")
|
||||
print(f" Total notebooks: {stats['total_notebooks']}")
|
||||
print(f" Total topics: {stats['total_topics']}")
|
||||
print(f" Total uses: {stats['total_use_count']}")
|
||||
if stats['active_notebook']:
|
||||
print(f" Active: {stats['active_notebook']['name']}")
|
||||
if stats['most_used_notebook']:
|
||||
print(f" Most used: {stats['most_used_notebook']['name']} ({stats['most_used_notebook']['use_count']} uses)")
|
||||
print(f" Library path: {stats['library_path']}")
|
||||
|
||||
else:
|
||||
parser.print_help()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
102
personas/_shared/community-skills/notebooklm/scripts/run.py
Executable file
102
personas/_shared/community-skills/notebooklm/scripts/run.py
Executable file
@@ -0,0 +1,102 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Universal runner for NotebookLM skill scripts
|
||||
Ensures all scripts run with the correct virtual environment
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def get_venv_python():
|
||||
"""Get the virtual environment Python executable"""
|
||||
skill_dir = Path(__file__).parent.parent
|
||||
venv_dir = skill_dir / ".venv"
|
||||
|
||||
if os.name == 'nt': # Windows
|
||||
venv_python = venv_dir / "Scripts" / "python.exe"
|
||||
else: # Unix/Linux/Mac
|
||||
venv_python = venv_dir / "bin" / "python"
|
||||
|
||||
return venv_python
|
||||
|
||||
|
||||
def ensure_venv():
|
||||
"""Ensure virtual environment exists"""
|
||||
skill_dir = Path(__file__).parent.parent
|
||||
venv_dir = skill_dir / ".venv"
|
||||
setup_script = skill_dir / "scripts" / "setup_environment.py"
|
||||
|
||||
# Check if venv exists
|
||||
if not venv_dir.exists():
|
||||
print("🔧 First-time setup: Creating virtual environment...")
|
||||
print(" This may take a minute...")
|
||||
|
||||
# Run setup with system Python
|
||||
result = subprocess.run([sys.executable, str(setup_script)])
|
||||
if result.returncode != 0:
|
||||
print("❌ Failed to set up environment")
|
||||
sys.exit(1)
|
||||
|
||||
print("✅ Environment ready!")
|
||||
|
||||
return get_venv_python()
|
||||
|
||||
|
||||
def main():
|
||||
"""Main runner"""
|
||||
if len(sys.argv) < 2:
|
||||
print("Usage: python run.py <script_name> [args...]")
|
||||
print("\nAvailable scripts:")
|
||||
print(" ask_question.py - Query NotebookLM")
|
||||
print(" notebook_manager.py - Manage notebook library")
|
||||
print(" session_manager.py - Manage sessions")
|
||||
print(" auth_manager.py - Handle authentication")
|
||||
print(" cleanup_manager.py - Clean up skill data")
|
||||
sys.exit(1)
|
||||
|
||||
script_name = sys.argv[1]
|
||||
script_args = sys.argv[2:]
|
||||
|
||||
# Handle both "scripts/script.py" and "script.py" formats
|
||||
if script_name.startswith('scripts/'):
|
||||
# Remove the scripts/ prefix if provided
|
||||
script_name = script_name[8:] # len('scripts/') = 8
|
||||
|
||||
# Ensure .py extension
|
||||
if not script_name.endswith('.py'):
|
||||
script_name += '.py'
|
||||
|
||||
# Get script path
|
||||
skill_dir = Path(__file__).parent.parent
|
||||
script_path = skill_dir / "scripts" / script_name
|
||||
|
||||
if not script_path.exists():
|
||||
print(f"❌ Script not found: {script_name}")
|
||||
print(f" Working directory: {Path.cwd()}")
|
||||
print(f" Skill directory: {skill_dir}")
|
||||
print(f" Looked for: {script_path}")
|
||||
sys.exit(1)
|
||||
|
||||
# Ensure venv exists and get Python executable
|
||||
venv_python = ensure_venv()
|
||||
|
||||
# Build command
|
||||
cmd = [str(venv_python), str(script_path)] + script_args
|
||||
|
||||
# Run the script
|
||||
try:
|
||||
result = subprocess.run(cmd)
|
||||
sys.exit(result.returncode)
|
||||
except KeyboardInterrupt:
|
||||
print("\n⚠️ Interrupted by user")
|
||||
sys.exit(130)
|
||||
except Exception as e:
|
||||
print(f"❌ Error: {e}")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
204
personas/_shared/community-skills/notebooklm/scripts/setup_environment.py
Executable file
204
personas/_shared/community-skills/notebooklm/scripts/setup_environment.py
Executable file
@@ -0,0 +1,204 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Environment Setup for NotebookLM Skill
|
||||
Manages virtual environment and dependencies automatically
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
import venv
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
class SkillEnvironment:
|
||||
"""Manages skill-specific virtual environment"""
|
||||
|
||||
def __init__(self):
|
||||
# Skill directory paths
|
||||
self.skill_dir = Path(__file__).parent.parent
|
||||
self.venv_dir = self.skill_dir / ".venv"
|
||||
self.requirements_file = self.skill_dir / "requirements.txt"
|
||||
|
||||
# Python executable in venv
|
||||
if os.name == 'nt': # Windows
|
||||
self.venv_python = self.venv_dir / "Scripts" / "python.exe"
|
||||
self.venv_pip = self.venv_dir / "Scripts" / "pip.exe"
|
||||
else: # Unix/Linux/Mac
|
||||
self.venv_python = self.venv_dir / "bin" / "python"
|
||||
self.venv_pip = self.venv_dir / "bin" / "pip"
|
||||
|
||||
def ensure_venv(self) -> bool:
|
||||
"""Ensure virtual environment exists and is set up"""
|
||||
|
||||
# Check if we're already in the correct venv
|
||||
if self.is_in_skill_venv():
|
||||
print("✅ Already running in skill virtual environment")
|
||||
return True
|
||||
|
||||
# Create venv if it doesn't exist
|
||||
if not self.venv_dir.exists():
|
||||
print(f"🔧 Creating virtual environment in {self.venv_dir.name}/")
|
||||
try:
|
||||
venv.create(self.venv_dir, with_pip=True)
|
||||
print("✅ Virtual environment created")
|
||||
except Exception as e:
|
||||
print(f"❌ Failed to create venv: {e}")
|
||||
return False
|
||||
|
||||
# Install/update dependencies
|
||||
if self.requirements_file.exists():
|
||||
print("📦 Installing dependencies...")
|
||||
try:
|
||||
# Upgrade pip first
|
||||
subprocess.run(
|
||||
[str(self.venv_pip), "install", "--upgrade", "pip"],
|
||||
check=True,
|
||||
capture_output=True,
|
||||
text=True
|
||||
)
|
||||
|
||||
# Install requirements
|
||||
result = subprocess.run(
|
||||
[str(self.venv_pip), "install", "-r", str(self.requirements_file)],
|
||||
check=True,
|
||||
capture_output=True,
|
||||
text=True
|
||||
)
|
||||
print("✅ Dependencies installed")
|
||||
|
||||
# Install Chrome for Patchright (not Chromium!)
|
||||
# Using real Chrome ensures cross-platform reliability and consistent browser fingerprinting
|
||||
# See: https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-python#anti-detection
|
||||
print("🌐 Installing Google Chrome for Patchright...")
|
||||
try:
|
||||
subprocess.run(
|
||||
[str(self.venv_python), "-m", "patchright", "install", "chrome"],
|
||||
check=True,
|
||||
capture_output=True,
|
||||
text=True
|
||||
)
|
||||
print("✅ Chrome installed")
|
||||
except subprocess.CalledProcessError as e:
|
||||
print(f"⚠️ Warning: Failed to install Chrome: {e}")
|
||||
print(" You may need to run manually: python -m patchright install chrome")
|
||||
print(" Chrome is required (not Chromium) for reliability!")
|
||||
|
||||
return True
|
||||
except subprocess.CalledProcessError as e:
|
||||
print(f"❌ Failed to install dependencies: {e}")
|
||||
print(f" Output: {e.output if hasattr(e, 'output') else 'No output'}")
|
||||
return False
|
||||
else:
|
||||
print("⚠️ No requirements.txt found, skipping dependency installation")
|
||||
return True
|
||||
|
||||
def is_in_skill_venv(self) -> bool:
|
||||
"""Check if we're already running in the skill's venv"""
|
||||
if hasattr(sys, 'real_prefix') or (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix):
|
||||
# We're in a venv, check if it's ours
|
||||
venv_path = Path(sys.prefix)
|
||||
return venv_path == self.venv_dir
|
||||
return False
|
||||
|
||||
def get_python_executable(self) -> str:
|
||||
"""Get the correct Python executable to use"""
|
||||
if self.venv_python.exists():
|
||||
return str(self.venv_python)
|
||||
return sys.executable
|
||||
|
||||
def run_script(self, script_name: str, args: list = None) -> int:
|
||||
"""Run a script with the virtual environment"""
|
||||
script_path = self.skill_dir / "scripts" / script_name
|
||||
|
||||
if not script_path.exists():
|
||||
print(f"❌ Script not found: {script_path}")
|
||||
return 1
|
||||
|
||||
# Ensure venv is set up
|
||||
if not self.ensure_venv():
|
||||
print("❌ Failed to set up environment")
|
||||
return 1
|
||||
|
||||
# Build command
|
||||
cmd = [str(self.venv_python), str(script_path)]
|
||||
if args:
|
||||
cmd.extend(args)
|
||||
|
||||
print(f"🚀 Running: {script_name} with venv Python")
|
||||
|
||||
try:
|
||||
# Run the script with venv Python
|
||||
result = subprocess.run(cmd)
|
||||
return result.returncode
|
||||
except Exception as e:
|
||||
print(f"❌ Failed to run script: {e}")
|
||||
return 1
|
||||
|
||||
def activate_instructions(self) -> str:
|
||||
"""Get instructions for manual activation"""
|
||||
if os.name == 'nt':
|
||||
activate = self.venv_dir / "Scripts" / "activate.bat"
|
||||
return f"Run: {activate}"
|
||||
else:
|
||||
activate = self.venv_dir / "bin" / "activate"
|
||||
return f"Run: source {activate}"
|
||||
|
||||
|
||||
def main():
|
||||
"""Main entry point for environment setup"""
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
description='Setup NotebookLM skill environment'
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
'--check',
|
||||
action='store_true',
|
||||
help='Check if environment is set up'
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
'--run',
|
||||
help='Run a script with the venv (e.g., --run ask_question.py)'
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
'args',
|
||||
nargs='*',
|
||||
help='Arguments to pass to the script'
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
env = SkillEnvironment()
|
||||
|
||||
if args.check:
|
||||
if env.venv_dir.exists():
|
||||
print(f"✅ Virtual environment exists: {env.venv_dir}")
|
||||
print(f" Python: {env.get_python_executable()}")
|
||||
print(f" To activate manually: {env.activate_instructions()}")
|
||||
else:
|
||||
print(f"❌ No virtual environment found")
|
||||
print(f" Run setup_environment.py to create it")
|
||||
return
|
||||
|
||||
if args.run:
|
||||
# Run a script with venv
|
||||
return env.run_script(args.run, args.args)
|
||||
|
||||
# Default: ensure environment is set up
|
||||
if env.ensure_venv():
|
||||
print("\n✅ Environment ready!")
|
||||
print(f" Virtual env: {env.venv_dir}")
|
||||
print(f" Python: {env.get_python_executable()}")
|
||||
print(f"\nTo activate manually: {env.activate_instructions()}")
|
||||
print(f"Or run scripts directly: python setup_environment.py --run script_name.py")
|
||||
else:
|
||||
print("\n❌ Environment setup failed")
|
||||
return 1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main() or 0)
|
||||
248
personas/_shared/community-skills/obsidian-tasks/SKILL.md
Normal file
248
personas/_shared/community-skills/obsidian-tasks/SKILL.md
Normal file
@@ -0,0 +1,248 @@
|
||||
---
|
||||
name: obsidian-tasks
|
||||
description: Use when managing tasks, daily notes, reading lists, or project tracking in Obsidian vault. Triggers on task creation, task status updates, daily journal updates, PDF reading assignments, Google Tasks sync, language learning progress, or any "add task / update daily / check progress" request. Also triggers when user mentions Google Tasks lists, Obsidian dashboard, weekly program, or task organization.
|
||||
---
|
||||
|
||||
# Obsidian Task Manager
|
||||
|
||||
## Overview
|
||||
|
||||
Manage the user's integrated task system spanning Google Tasks (18 lists), Obsidian vault task files, daily notes with git activity, and two dashboards. The system is bi-directionally synced via `obsidian-gcal-sync` plugin.
|
||||
|
||||
## Architecture
|
||||
|
||||
```
|
||||
Google Tasks (18 lists) <──obsidian-gcal-sync──> Obsidian Task Files
|
||||
│
|
||||
Dashboard.md (Command Center)
|
||||
Daily Dashboard.md (Daily view)
|
||||
│
|
||||
8-Daily Notes/YYYY-MM-DD.md
|
||||
```
|
||||
|
||||
## Google Tasks ↔ Obsidian Mapping (18 lists)
|
||||
|
||||
| Google Tasks List | Google List ID | Obsidian File | Tag | Category |
|
||||
|---|---|---|---|---|
|
||||
| Do It Now | `MTY4NDM5Mjk5OTU0MjIxNzE5MzQ6MDow` | `0x534C56/Tasks/Do It Now.md` | #acil | Urgent |
|
||||
| BAM | `TGRRMm1OYzhheTJZQXh6Mg` | `6-Geopolitics/BAM/Tasks/BAM.md` | #bam | Academic |
|
||||
| Development | `UHA4LTk5alB4TXdPUHVYMA` | `0x534C56/Tasks/Development.md` | #Development | Tech |
|
||||
| Cybersec & Bug Bounty | `MV9aRmFybVd5Q09hN2VQMw` | `0x534C56/Tasks/Cybersec & Bug Bounty.md` | #Cybersec | Tech |
|
||||
| İstihbarat Doktrin | `cjZ2Z2ctUXNTVF9ncjhteg` | `0x534C56/Tasks/İstihbarat Doktrin.md` | #doktrin | Intelligence |
|
||||
| İstihbarat Araştırma | `MFoxNTd5WXpDVWlRWUdUMQ` | `0x534C56/Tasks/İstihbarat Araştırma.md` | #Intelligence | Intelligence |
|
||||
| Siber & Hibrit | `c0ZSRkJxTkd6bWhDWEU2cg` | `0x534C56/Tasks/Siber & Hibrit.md` | #cyber | Intelligence |
|
||||
| Russian & TORFL | `aEVSS3RCbFVkTkRTS3NUNA` | `0x534C56/Tasks/Russian & TORFL.md` | #Russian | Language |
|
||||
| Swahili | `bEh2bzRNOEdFMnFDaTFzbw` | `0x534C56/Tasks/Swahili.md` | #swahili | Language |
|
||||
| Kariyer & Altyapı | `NWo0VUt0RklrSkloM0FyTg` | `0x534C56/Tasks/Career Roadmap.md` | #Career | Personal |
|
||||
| Freelance İşler | `RGhRRktUOGc3TDlJNDB2eQ` | `0x534C56/Tasks/Freelance İşler.md` | #Freelance | Work |
|
||||
| English & IELTS | `b0NDWkZsTWlhMURuaTNsQQ` | `0x534C56/Tasks/English & IELTS.md` | #IELTS | Language |
|
||||
| French | `aW0yd0pDXzlxdjdUYUFHbA` | `0x534C56/Tasks/French.md` | #French | Language |
|
||||
| Persian | `T1Z5SFlTbFlJVkVNR3Z3NQ` | `0x534C56/Tasks/Persian.md` | #Persian | Language |
|
||||
| Arabic | `WXM1N3pySkFCMlBRX0Q3Wg` | `0x534C56/Tasks/Arabic.md` | #arabic | Language |
|
||||
| Hindi & Urdu | `VGZSblhEbkIyNUJSOGVMVA` | `0x534C56/Tasks/Hindi & Urdu.md` | #Hindi | Language |
|
||||
| Spanish | `V1dnTWNnWGZWNDlVeUtJbg` | `0x534C56/Tasks/Spanish.md` | #Spanish | Language |
|
||||
| Turkish | `bnl0S0hUZ3hZQU1ZT2g5SA` | `0x534C56/Tasks/Turkish.md` | #Turkish | Language |
|
||||
|
||||
### Accessing Google Tasks Lists via API
|
||||
|
||||
The `google-workspace` MCP has no `list_task_lists` endpoint. To get list IDs:
|
||||
|
||||
```bash
|
||||
TOKEN=$(python3 -c "import json; d=json.load(open('~/.google_workspace_mcp/credentials/token_<user_email>.json')); print(d['token'])")
|
||||
curl -s "https://tasks.googleapis.com/tasks/v1/users/@me/lists" -H "Authorization: Bearer $TOKEN"
|
||||
```
|
||||
|
||||
Once you have the list ID, use `mcp__google-workspace__list_tasks` with `task_list_id` set to the ID above. Use `@default` as alias for "Do It Now" (the first/default list).
|
||||
|
||||
**Additional task-related files (not synced to Google Tasks):**
|
||||
- `0x534C56/Tasks/Geopolitics Research.md` — PDF reading assignments, country research gaps
|
||||
- `0x534C56/Tasks/Afrika Ödevler.md` — Yunus Hoca weekly assignments, UNESCO series
|
||||
- `0x534C56/Tasks/Intel.md`, `Tools.md`, `Needs.md`, `Hursit Hoca.md`, `Language.md`
|
||||
|
||||
## Task Format (Obsidian ↔ Google Tasks compatible)
|
||||
|
||||
```markdown
|
||||
- [ ] 📖 Task title #tag 📅 2026-04-15
|
||||
Optional notes or description
|
||||
📎 Vault: [[path/to/file.pdf|Display Name]]
|
||||
📎 Books: `/mnt/storage/Common/Books/Category/file.pdf`
|
||||
- [x] Completed task #tag ✅ 2026-04-03
|
||||
```
|
||||
|
||||
**Rules:**
|
||||
- `- [ ]` = open task (Google Tasks: needsAction)
|
||||
- `- [x]` = completed (Google Tasks: completed)
|
||||
- `📅 YYYY-MM-DD` = due date
|
||||
- `✅ YYYY-MM-DD` = completion date
|
||||
- `#tag` = category tag (must match the file's assigned tag from mapping above)
|
||||
- `📎 Vault:` = Obsidian wikilink to PDF in vault
|
||||
- `📎 Books:` = path to PDF in `/mnt/storage/Common/Books/`
|
||||
- Indented lines = notes/subtasks (sync as Google Tasks notes field)
|
||||
|
||||
## Daily Notes Format
|
||||
|
||||
Path: `8-Daily Notes/YYYY-MM-DD.md`
|
||||
|
||||
```markdown
|
||||
---
|
||||
up:: [[8-Daily Notes]]
|
||||
tag:: [[Daily Planning]]
|
||||
created:: YYYY-MM-DD
|
||||
---
|
||||
|
||||
# YYYY-MM-DD (Gün)
|
||||
|
||||
## Day planner
|
||||
|
||||
%% gcal-sync-start %%
|
||||
(AUTO-GENERATED by obsidian-gcal-sync — DO NOT EDIT)
|
||||
%% gcal-sync-end %%
|
||||
|
||||
---
|
||||
|
||||
## Aktiviteler
|
||||
|
||||
- [x] Russian: Rosetta Stone — Business Unite 1
|
||||
- [x] ASM: 18 commit — worker auto-restart, pipeline watchdog
|
||||
- [x] Pico-Ducky: 1 commit — webhook security
|
||||
|
||||
## Notlar
|
||||
|
||||
### Dil Calismalari
|
||||
- Details here...
|
||||
|
||||
---
|
||||
|
||||
## Proje Aktivitesi
|
||||
|
||||
### Project Name (X commit)
|
||||
- Bullet point summaries...
|
||||
|
||||
---
|
||||
|
||||
## Gunun Ozeti
|
||||
|
||||
- Yapilan: ...
|
||||
- Yapilamayan:
|
||||
- Yarina: ...
|
||||
```
|
||||
|
||||
**Critical:** NEVER touch content between `%% gcal-sync-start %%` and `%% gcal-sync-end %%` — plugin manages that.
|
||||
|
||||
**Dashboard reads:** `file.tasks` (checkboxes) from daily notes. The `## Aktiviteler` section items MUST be `- [x]`/`- [ ]` format for Dashboard to count them. Dashboard also keyword-matches: `russian|ielts|swahili|french|persian|arabic|hindi` for language stats, `meet|toplant` for meetings.
|
||||
|
||||
## Dashboard Files
|
||||
|
||||
### Command Center (`0x534C56/Tasks/Dashboard.md`)
|
||||
- Donut chart: open/completed/overdue tasks across ALL task files
|
||||
- File progress grid: per-file completion bars
|
||||
- Category distribution: tag-based horizontal bars
|
||||
- Language progress: 9-language donut grid
|
||||
- Overdue, This Week, Last Completed sections
|
||||
- Uses `dataviewjs` — reads from `"0x534C56/Tasks" OR "6-Geopolitics/BAM/Tasks"`
|
||||
|
||||
### Daily Dashboard (`8-Daily Notes/Daily Dashboard.md`)
|
||||
- Today's tasks from daily note
|
||||
- Week bar chart (7 days)
|
||||
- Weekly summary metrics (notes, events, completed, meetings, language)
|
||||
- 30-day activity heatmap with streak counter
|
||||
- Language study bar chart (30 days, keyword-based)
|
||||
- Upcoming 7 days
|
||||
- Task timeline (this week / next week / 2-4 weeks)
|
||||
|
||||
## PDF Libraries
|
||||
|
||||
Two source locations for reading materials:
|
||||
|
||||
### 1. Vault PDFs (`<VAULT>/`)
|
||||
- `6-Geopolitics/assets/` — 20+ categorized subfolders (İSTİHBARAT, SAVAŞ VE STRATEJİ, HİBRİT TEHDİTLER, NÜKLEER VE KBRN, etc.)
|
||||
- `6-Geopolitics/BAM/Afrika/assets/` — Africa studies by topic
|
||||
- `6-Geopolitics/Russia/`, `China/`, `Suriye/`, `USA/` — Country-specific
|
||||
- `6-Geopolitics/Intelligence and National Security/` — NATO/UK doctrine PDFs
|
||||
|
||||
### 2. Books Library (`/mnt/storage/Common/Books/`)
|
||||
- 37 top-level categories (managed by `librarian` skill)
|
||||
- Key folders: `Istihbarat/`, `GuvenlikStratejileri/`, `AskeriDoktrin/`, `NATO/`, `SiberGuvenlik/`, `UluslararasiIliskiler/`
|
||||
- Naming: `Author - Title (Year).pdf`
|
||||
|
||||
### Linking PDFs to Tasks
|
||||
When adding reading tasks, search BOTH locations and add links:
|
||||
```markdown
|
||||
- [ ] 📖 Read **Book Title** #tag 📅 2026-04-15
|
||||
📎 Vault: [[6-Geopolitics/assets/04. GÜVENLİK TEORİLERİ/filename.pdf]]
|
||||
📎 Books: `/mnt/storage/Common/Books/Category/Author - Title (Year).pdf`
|
||||
```
|
||||
|
||||
## Plugin Configuration
|
||||
|
||||
**Config file:** `<VAULT>/.obsidian/plugins/obsidian-gcal-sync/data.json`
|
||||
**Credentials:** `~/.google_workspace_mcp/credentials/token_<user_email>.json`
|
||||
|
||||
Settings:
|
||||
- Auto sync: 60 minutes
|
||||
- Reverse sync: enabled (Obsidian → Google Calendar)
|
||||
- Lookahead: 14 days
|
||||
- Daily notes template: `11-Templates/Daily Template & Checklist.md`
|
||||
- Calendar output: `0x534C56/Tasks/Haftalik Program.md`
|
||||
- Calendars: Takvimim (primary), Coursera, HackerOne
|
||||
|
||||
**Note:** `obsidian-google-tasks` plugin is also installed but has empty refresh token — NOT active. All sync goes through `obsidian-gcal-sync`.
|
||||
|
||||
## MCP Tools Available
|
||||
|
||||
### Google Workspace MCP
|
||||
- `mcp__google-workspace__list_tasks` — List tasks in a specific Google Tasks list (requires `task_list_id`, use `@default` for main list)
|
||||
- `mcp__google-workspace__manage_task` — Create/update/delete/move tasks
|
||||
- `mcp__google-workspace__get_task` — Get task details
|
||||
|
||||
**Limitation:** No `list_task_lists` endpoint — cannot enumerate all 18 lists via MCP. Work through Obsidian files instead (they're the source of truth after sync).
|
||||
|
||||
### Google Calendar MCP (claude.ai)
|
||||
- `gcal_create_event`, `gcal_list_events`, `gcal_list_calendars`, etc.
|
||||
|
||||
## Common Operations
|
||||
|
||||
### Add a new task
|
||||
1. Determine which list/file it belongs to (use mapping table above)
|
||||
2. Read the target Obsidian file
|
||||
3. Add task in correct format with tag and due date
|
||||
4. If reading task: search both PDF libraries, add 📎 links
|
||||
|
||||
### Update daily note with git activity
|
||||
1. Run `git log --format="%ad | %s" --date=short --since=DATE --until=NEXT_DATE` for each project in `~/Documents/`
|
||||
2. Active projects: `asm`, `pico-ducky`, `killer-claude`, `Reporter-ollama`, `Frodo-code`, `Telegram-Crawler`, `claude-code`, `orsam`, `twitterintel`, `bamdergi`
|
||||
3. Add `## Aktiviteler` section with `- [x]` checkboxes (Dashboard-compatible)
|
||||
4. Add `## Proje Aktivitesi` with detailed per-project breakdowns
|
||||
5. Fill `## Gunun Ozeti`
|
||||
|
||||
### Track language learning
|
||||
1. Update the language task file (e.g., `Russian & TORFL.md`) with progress
|
||||
2. Add `- [x] Russian: description` to daily note `## Aktiviteler` (keyword must match Dashboard regex)
|
||||
3. Supported keywords: `russian|ielts|swahili|french|persian|arabic|hindi|spanish|turkish`
|
||||
|
||||
### Add PDF reading assignment
|
||||
1. Create task in relevant file with `📖` prefix
|
||||
2. Search Vault: `find <VAULT> -iname "*keyword*" -name "*.pdf"`
|
||||
3. Search Books: `find /mnt/storage/Common/Books -iname "*keyword*" -name "*.pdf"`
|
||||
4. Add `📎 Vault:` and/or `📎 Books:` links under the task
|
||||
5. If PDF not found locally, add URL if available online
|
||||
|
||||
### Check progress
|
||||
1. Read the target task file
|
||||
2. Count `- [x]` vs `- [ ]` items
|
||||
3. For language overview: read all 9 language files
|
||||
4. For overall: reference Dashboard.md logic (reads all task files)
|
||||
|
||||
## Important Files Quick Reference
|
||||
|
||||
| Purpose | Path |
|
||||
|---|---|
|
||||
| Task Dashboard | `0x534C56/Tasks/Dashboard.md` |
|
||||
| Daily Dashboard | `8-Daily Notes/Daily Dashboard.md` |
|
||||
| Weekly Program | `0x534C56/Tasks/Haftalik Program.md` |
|
||||
| Daily Note Template | `11-Templates/Daily Template & Checklist.md` |
|
||||
| Plugin Config | `.obsidian/plugins/obsidian-gcal-sync/data.json` |
|
||||
| Google Token | `~/.google_workspace_mcp/credentials/token_<user_email>.json` |
|
||||
| Vault Root | `<VAULT>/` |
|
||||
| Books Library | `/mnt/storage/Common/Books/` |
|
||||
| Projects Dir | `~/Documents/` |
|
||||
411
personas/_shared/community-skills/opencode-cli/SKILL.md
Normal file
411
personas/_shared/community-skills/opencode-cli/SKILL.md
Normal file
@@ -0,0 +1,411 @@
|
||||
---
|
||||
name: opencode-cli
|
||||
description: Configure and operate the OpenCode CLI agent. Covers AGENTS.md rules, custom agents, models & providers, OpenCode Zen, custom slash commands, formatters, permissions, SKILL.md authoring, MCP servers, plugins, custom tools, LSP, themes, keybinds, TUI, server/SDK, GitHub Actions integration, IDE extensions, proxy/network setup, and troubleshooting. Use when the user asks to set up opencode, write a custom opencode agent, add a /command, restrict permissions, change the default model, configure formatters or LSP, port a Claude Code project, register an MCP server, write a plugin or custom tool, run opencode headless or in CI/GitHub Actions, troubleshoot startup/auth/cache issues, or any opencode.json/AGENTS.md/tui.json question. Triggers include "opencode", "opencode.json", "AGENTS.md", "tui.json", "@subagent", "/connect", "/init", "opencode permissions", "opencode skill", "opencode mcp", "opencode serve", "opencode github install".
|
||||
license: MIT
|
||||
compatibility: opencode, claude-code
|
||||
metadata:
|
||||
audience: developers, devops, security-engineers
|
||||
source: https://opencode.ai/docs
|
||||
---
|
||||
|
||||
# OpenCode CLI — Configure & Operate
|
||||
|
||||
Reference for **using** opencode (not building it). Jump to the right section for
|
||||
the task; deep details live in `references/`.
|
||||
|
||||
> Skill spec rule: `name` matches `^[a-z0-9]+(-[a-z0-9]+)*$` (≤64 chars).
|
||||
> `description` ≤1024 chars and must be specific enough for autoselection.
|
||||
|
||||
## References (load on demand)
|
||||
|
||||
- `references/configuration.md` — full `opencode.json` + `tui.json` schema, precedence, env var/file substitution, themes, keybinds, LSP
|
||||
- `references/agents-skills-commands.md` — custom agent MD format, SKILL.md authoring, slash commands, custom tools
|
||||
- `references/permissions-tools.md` — every permission state, built-in tool catalog, per-agent overrides
|
||||
- `references/providers-models.md` — providers, `/connect`, OpenCode Zen, OpenAI-compatible custom endpoints, MCP servers
|
||||
- `references/server-api.md` — `opencode serve` full HTTP API: every endpoint, auth, CORS, mDNS, SSE event stream, curl recipes, security checklist
|
||||
- `references/operate.md` — CLI flags, SDK (`@opencode-ai/sdk`), GitHub Actions, IDE, proxy, troubleshooting
|
||||
|
||||
## Configuration locations (precedence)
|
||||
|
||||
| Layer | Path | Use for |
|
||||
| ------------ | ---------------------------------------------------------------------- | ----------------------------- |
|
||||
| Project | `./opencode.json`, `./AGENTS.md`, `.opencode/{agents,commands,skills,plugins,tools,themes}` | repo conventions, commit it |
|
||||
| User-global | `~/.config/opencode/{AGENTS.md,opencode.json,agents,commands,skills,plugins,tools,themes}` | personal preferences |
|
||||
| TUI | `~/.config/opencode/tui.json` | theme + keybinds (TUI only) |
|
||||
| CC-fallback | `~/.claude/{CLAUDE.md,skills}`, `.claude/skills` | reused from Claude Code |
|
||||
| Agents-spec | `~/.agents/skills`, `.agents/skills` | shared with other agent tools |
|
||||
|
||||
Full precedence chain (low→high override): remote org defaults → user-global →
|
||||
custom (`OPENCODE_CONFIG` env) → project → directory (`OPENCODE_CONFIG_DIR`) →
|
||||
inline (`OPENCODE_CONFIG_CONTENT`) → managed.
|
||||
|
||||
Disable Claude Code fallback:
|
||||
```
|
||||
OPENCODE_DISABLE_CLAUDE_CODE=1
|
||||
OPENCODE_DISABLE_CLAUDE_CODE_PROMPT=1
|
||||
OPENCODE_DISABLE_CLAUDE_CODE_SKILLS=1
|
||||
```
|
||||
|
||||
Data & cache locations:
|
||||
- App data: `~/.local/share/opencode/` (auth, sessions)
|
||||
- Logs: `~/.local/share/opencode/log/`
|
||||
- Cache: `~/.cache/opencode/`
|
||||
|
||||
## 1. Rules — AGENTS.md
|
||||
|
||||
Project: `./AGENTS.md` (commit). Global: `~/.config/opencode/AGENTS.md`.
|
||||
|
||||
```
|
||||
opencode
|
||||
> /init
|
||||
```
|
||||
`/init` analyzes the repo and creates/improves AGENTS.md without overwriting.
|
||||
|
||||
Reference external rule files via `opencode.json`:
|
||||
```json
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"instructions": [
|
||||
"docs/development-standards.md",
|
||||
"packages/*/AGENTS.md",
|
||||
"https://raw.githubusercontent.com/org/rules/main/style.md"
|
||||
]
|
||||
}
|
||||
```
|
||||
Glob patterns scale to monorepos. Remote URLs have a 5s timeout (silent drop on
|
||||
failure).
|
||||
|
||||
Resolution order: project `AGENTS.md` (walks up tree) → project `CLAUDE.md` →
|
||||
global `~/.config/opencode/AGENTS.md` → `~/.claude/CLAUDE.md`.
|
||||
|
||||
## 2. Agents (built-ins)
|
||||
|
||||
Primary (Tab-cycle): `build` (default, all tools), `plan` (analysis;
|
||||
edits/bash → `ask`).
|
||||
Subagents (`@`-mention or `task` tool): `general` (full tools), `explore`
|
||||
(read-only).
|
||||
Hidden system agents: `compaction`, `title`, `summary`.
|
||||
|
||||
Custom agents → see `references/agents-skills-commands.md`.
|
||||
|
||||
## 3. Models
|
||||
|
||||
Default in `opencode.json`:
|
||||
```json
|
||||
{ "$schema": "https://opencode.ai/config.json", "model": "anthropic/claude-sonnet-4-5" }
|
||||
```
|
||||
Format: `provider_id/model_id`. Set `small_model` for compaction/title.
|
||||
|
||||
Resolution order: `--model`/`-m` → `opencode.json` → last used → first by priority.
|
||||
|
||||
Switch interactively: `/models`. Add provider creds: `/connect`. List: `opencode models`.
|
||||
|
||||
Reasoning-effort variants:
|
||||
- Anthropic: `high` (default), `max`
|
||||
- OpenAI: `none|minimal|low|medium|high|xhigh`
|
||||
- Google: `low|high`
|
||||
|
||||
Append to id: `openai/gpt-5/high`. Override under `provider.models.<m>.variants`.
|
||||
|
||||
OpenCode Zen (`opencode/<model>`): pre-tested gateway, pay-as-you-go, includes
|
||||
GPT-5/Codex, Claude Opus/Sonnet/Haiku, Qwen, Gemini, MiniMax, GLM, free-tier
|
||||
betas. Auto-reload $20 when balance < $5.
|
||||
|
||||
Full provider config (Ollama, LM Studio, OpenRouter, Bedrock, Vertex,
|
||||
custom OpenAI-compatible) → see `references/providers-models.md`.
|
||||
|
||||
## 4. Custom commands (slash)
|
||||
|
||||
`~/.config/opencode/commands/<name>.md` or `.opencode/commands/<name>.md`.
|
||||
|
||||
```yaml
|
||||
---
|
||||
description: Run tests with coverage and summarize failures.
|
||||
agent: build
|
||||
model: anthropic/claude-sonnet-4-5
|
||||
---
|
||||
Run `!`pnpm test --coverage`` then read @coverage/lcov-report/index.html.
|
||||
Summarize failing tests for $ARGUMENTS (default: all).
|
||||
```
|
||||
|
||||
Templating in body:
|
||||
- `$ARGUMENTS` (full arg string), `$1`, `$2`, … (positional)
|
||||
- `` !`<shell>` `` — embeds stdout at prompt-build time
|
||||
- `@<path>` — inlines file contents
|
||||
|
||||
Custom commands shadow built-ins (`/init`, `/help`, `/undo`, `/share`, `/models`).
|
||||
|
||||
Built-in TUI commands: `/new`, `/sessions`, `/models`, `/themes`, `/share`,
|
||||
`/unshare`, `/connect`, `/init`, `/undo`, `/redo`, `/editor`, `/export`,
|
||||
`/thinking`, `/help`.
|
||||
|
||||
## 5. Formatters
|
||||
|
||||
Auto-runs after every successful write/edit. Built-ins cover JS/TS, Python,
|
||||
Go, Rust, Ruby, HTML/CSS, MD/JSON/YAML, C/C++, PHP, Kotlin, Dart, Haskell,
|
||||
Clojure, Elixir.
|
||||
|
||||
Disable all: `{ "formatter": false }`. Disable one:
|
||||
```json
|
||||
{ "formatter": { "prettier": { "disabled": true } } }
|
||||
```
|
||||
|
||||
Override (`$FILE` is substituted per write):
|
||||
```json
|
||||
{
|
||||
"formatter": {
|
||||
"ruff": {
|
||||
"command": ["uv", "run", "ruff", "format", "$FILE"],
|
||||
"extensions": [".py", ".pyi"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 6. Permissions
|
||||
|
||||
States: `allow` (silent), `ask` (prompt), `deny` (blocked & hidden where
|
||||
applicable).
|
||||
|
||||
Tools: `read`, `edit`, `glob`, `bash`, `grep`, `webfetch`, `websearch`, `task`,
|
||||
`skill`, `lsp`, `question`, `external_directory`, `doom_loop`, `list`, `todowrite`.
|
||||
|
||||
Defaults: most → `allow`. `doom_loop` & `external_directory` → `ask`. `.env`
|
||||
denied to `read` by default.
|
||||
|
||||
Pattern matching: `*` (any), `?` (one), `~`/`$HOME` expansion. **Last match wins.**
|
||||
|
||||
Recommended baseline:
|
||||
```json
|
||||
{
|
||||
"permission": {
|
||||
"*": "allow",
|
||||
"edit": "allow",
|
||||
"bash": {
|
||||
"*": "ask",
|
||||
"git diff*": "allow",
|
||||
"git log*": "allow",
|
||||
"git status": "allow",
|
||||
"ls *": "allow",
|
||||
"rm *": "deny",
|
||||
"rm -rf *": "deny",
|
||||
"git push*": "ask",
|
||||
"git push --force*": "deny"
|
||||
},
|
||||
"webfetch": "ask",
|
||||
"external_directory": { "~/projects/*": "allow", "*": "ask" }
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Per-agent override → `references/permissions-tools.md`.
|
||||
|
||||
## 7. Skills (SKILL.md authoring)
|
||||
|
||||
Skills are **on-demand** (agent calls `skill({ name })` after seeing them
|
||||
in tool docs). Discovery: walk-up from CWD to git worktree.
|
||||
|
||||
Project: `.opencode/skills/`, `.claude/skills/`, `.agents/skills/`.
|
||||
Global: `~/.config/opencode/skills/`, `~/.claude/skills/`, `~/.agents/skills/`.
|
||||
|
||||
Frontmatter:
|
||||
```yaml
|
||||
---
|
||||
name: git-release # required, kebab, ≤64
|
||||
description: | # required, ≤1024, drives autoselection
|
||||
Cut a release: bump version, generate changelog, tag, draft GH release.
|
||||
Use when user says "release", "tag a version", "publish".
|
||||
license: MIT # optional
|
||||
compatibility: opencode # optional
|
||||
metadata: { audience: maintainers } # optional, string-to-string only
|
||||
---
|
||||
```
|
||||
|
||||
Permission filter:
|
||||
```json
|
||||
{ "permission": { "skill": { "*": "allow", "internal-*": "deny", "experimental-*": "ask" } } }
|
||||
```
|
||||
|
||||
Disable entirely for an agent: `tools: { skill: false }`.
|
||||
|
||||
## 8. MCP servers (quick)
|
||||
|
||||
Local stdio:
|
||||
```json
|
||||
{ "mcp": { "fs": { "type": "local",
|
||||
"command": ["npx", "-y", "@modelcontextprotocol/server-filesystem", "/tmp"],
|
||||
"enabled": true } } }
|
||||
```
|
||||
|
||||
Remote HTTP:
|
||||
```json
|
||||
{ "mcp": { "context7": { "type": "remote",
|
||||
"url": "https://mcp.context7.com/mcp",
|
||||
"headers": { "CONTEXT7_API_KEY": "{env:CONTEXT7_API_KEY}" } } } }
|
||||
```
|
||||
|
||||
OAuth flow: `opencode mcp auth <name>`, list: `opencode mcp list`,
|
||||
debug: `opencode mcp debug <name>`. Disable per-server with `enabled: false`,
|
||||
disable globally with `tools: { my-mcp*: false }`. Full schema →
|
||||
`references/providers-models.md`.
|
||||
|
||||
## 9. Plugins, custom tools, LSP, themes
|
||||
|
||||
- **Plugins** (lifecycle hooks, env injection, shell, custom tools):
|
||||
`.opencode/plugins/` or NPM via config `plugin: ["pkg-name"]`. TS/JS,
|
||||
imports `@opencode-ai/plugin`. Loads global → project, plugin order matters.
|
||||
- **Custom tools**: `.opencode/tools/<name>.ts` exporting `tool({...})`. Filename
|
||||
becomes tool name. Override built-ins with same name. Multi-language wrappers
|
||||
via shell-out. Args validated via Zod.
|
||||
- **LSP**: 30+ built-in language servers auto-activate. Disable all
|
||||
with `"lsp": false`. Custom: `lsp.<name>` with `command/extensions/env`.
|
||||
- **Themes**: built-ins (`system`, `tokyonight`, `everforest`, `ayu`,
|
||||
`catppuccin`, `gruvbox`, `kanagawa`, `nord`, `matrix`, `one-dark`).
|
||||
Custom JSON in `~/.config/opencode/themes/` or `.opencode/themes/`.
|
||||
Switch: `/themes` or `tui.json` → `theme: "..."`.
|
||||
|
||||
Details: `references/configuration.md`, `references/agents-skills-commands.md`.
|
||||
|
||||
## 10. Keybinds (TUI)
|
||||
|
||||
Leader = `ctrl+x` (configurable). Defaults:
|
||||
|
||||
| Action | Binding |
|
||||
| --------------- | -------------------- |
|
||||
| New session | `<leader>n` |
|
||||
| Session list | `<leader>l` |
|
||||
| Model list | `<leader>m` |
|
||||
| Theme switch | `<leader>t` |
|
||||
| Open editor | `<leader>e` |
|
||||
| Export markdown | `<leader>x` |
|
||||
| Exit | `ctrl+c` / `ctrl+d` / `<leader>q` |
|
||||
| Command list | `ctrl+p` |
|
||||
| Agent cycle | `tab` / `shift+tab` |
|
||||
|
||||
Customize in `~/.config/opencode/tui.json`:
|
||||
```json
|
||||
{ "$schema": "https://opencode.ai/tui.json",
|
||||
"theme": "tokyonight",
|
||||
"keybinds": { "leader": "ctrl+x", "app_exit": "ctrl+c,ctrl+d,<leader>q" } }
|
||||
```
|
||||
Set any binding to `"none"` to disable.
|
||||
|
||||
Built-in readline-style input edit (non-configurable): `ctrl+a/e/w`, `alt+f`.
|
||||
|
||||
## 11. Operate (cheatsheet)
|
||||
|
||||
- TUI: `opencode` (cwd) or `opencode /path/to/project`
|
||||
- One-shot: `opencode run "Explain closures"`
|
||||
- Headless server: `opencode serve` → REST API on `127.0.0.1:4096`,
|
||||
OpenAPI at `/doc`. Set `OPENCODE_SERVER_PASSWORD` (required) and
|
||||
`OPENCODE_SERVER_USERNAME` (default `opencode`).
|
||||
- Auth: `opencode auth login` (writes `~/.local/share/opencode/auth.json`)
|
||||
- GH Actions: `opencode github install` → comment `/opencode` or `/oc` on
|
||||
PRs/issues. See `references/operate.md`.
|
||||
- IDE (VS Code/Cursor/Windsurf/Codium): auto-installs from terminal,
|
||||
shortcut `Cmd/Ctrl+Esc` (open), `Cmd/Ctrl+Shift+Esc` (new session),
|
||||
`Cmd+Option+K` / `Alt+Ctrl+K` (insert file ref).
|
||||
- SDK: `npm i @opencode-ai/sdk`, `createOpencode({ config: {...} })` for
|
||||
programmatic control.
|
||||
- Proxy: `HTTPS_PROXY`, `NO_PROXY=localhost,127.0.0.1` (must bypass localhost
|
||||
for TUI). Custom CA: `NODE_EXTRA_CA_CERTS=/path/ca.pem`.
|
||||
- Debug: `opencode --log-level DEBUG --print-logs`. Logs at
|
||||
`~/.local/share/opencode/log/`.
|
||||
- Reset: `rm -rf ~/.cache/opencode` (clears provider cache).
|
||||
|
||||
## 12. Quick recipes
|
||||
|
||||
**Port Claude Code project to opencode** (no migration needed):
|
||||
1. Don't delete `.claude/`. Opencode reads it natively.
|
||||
2. Create `.opencode/` siblings only for opencode-specific tweaks.
|
||||
3. Optional: rename `CLAUDE.md` → `AGENTS.md` (or keep both — AGENTS.md wins).
|
||||
|
||||
**Lock project to one model + provider**:
|
||||
```json
|
||||
{ "$schema": "https://opencode.ai/config.json",
|
||||
"model": "anthropic/claude-sonnet-4-5",
|
||||
"enabled_providers": ["anthropic"] }
|
||||
```
|
||||
|
||||
**Make `plan` agent read-only globally**:
|
||||
```json
|
||||
{ "agent": { "plan": { "permission": { "edit": "deny", "bash": "deny" } } } }
|
||||
```
|
||||
|
||||
**Add `/refactor` for a specific subagent**:
|
||||
`.opencode/commands/refactor.md`:
|
||||
```yaml
|
||||
---
|
||||
description: Hand a refactor brief to the refactor-bot subagent.
|
||||
agent: refactor-bot
|
||||
---
|
||||
@$1
|
||||
$ARGUMENTS
|
||||
```
|
||||
|
||||
**Headless CI run (one-shot, JSON output)**:
|
||||
```bash
|
||||
OPENCODE_API_KEY=$KEY opencode run \
|
||||
--model anthropic/claude-sonnet-4-5 \
|
||||
--print "Audit src/ for SQL injection. Output as JSON."
|
||||
```
|
||||
|
||||
**GitHub Action workflow stub** (`.github/workflows/opencode.yml`):
|
||||
```yaml
|
||||
name: opencode
|
||||
on:
|
||||
issue_comment: { types: [created] }
|
||||
pull_request_review_comment: { types: [created] }
|
||||
jobs:
|
||||
run:
|
||||
if: contains(github.event.comment.body, '/opencode') || contains(github.event.comment.body, '/oc')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: opencode-ai/opencode-action@v1
|
||||
with:
|
||||
model: anthropic/claude-sonnet-4-5
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
env:
|
||||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
```
|
||||
|
||||
## 13. Common pitfalls
|
||||
|
||||
- Skill `name` must match `^[a-z0-9]+(-[a-z0-9]+)*$` — underscores break loading.
|
||||
- `description` is the **only** signal opencode uses to autoselect a skill —
|
||||
vague descriptions cause wrong-skill calls or no-call.
|
||||
- `bash: { "git push*": "allow" }` includes `git push --force` — guard with a
|
||||
more specific deny rule, last-match-wins.
|
||||
- Per-agent permission in MD frontmatter overrides `opencode.json` for that
|
||||
agent only — they don't merge field-by-field.
|
||||
- `mode: primary` agents are Tab-cycle slots; too many makes the cycle painful.
|
||||
Default to `subagent` unless the agent is a daily driver.
|
||||
- `hidden: true` only hides from `@` autocomplete — orchestrators can still
|
||||
invoke via the `task` tool.
|
||||
- Remote `instructions:` URLs have a 5s timeout; an unreachable URL silently
|
||||
drops that rule layer.
|
||||
- MCP servers consume context tokens — selectively enable.
|
||||
- `NO_PROXY` must include `localhost,127.0.0.1` or the TUI's local server
|
||||
loops through the corporate proxy and hangs.
|
||||
- `share: "auto"` plus public-repo `.git` config = unintended public links.
|
||||
Lock to `share: "manual"` or `"disabled"` in the project config.
|
||||
- `OPENCODE_DISABLE_CLAUDE_CODE_SKILLS=1` is the only way to stop opencode from
|
||||
auto-loading `~/.claude/skills/` — useful when CC and OC have skills with
|
||||
conflicting names.
|
||||
- Custom tools with the same name as built-ins **silently override** them.
|
||||
Audit `.opencode/tools/` for shadowing of `bash`/`edit`/`read`.
|
||||
|
||||
## 14. Operational checklist
|
||||
|
||||
When asked to "set up opencode" in a fresh repo:
|
||||
|
||||
- [ ] `opencode` → `/init` (creates `AGENTS.md`)
|
||||
- [ ] Add `opencode.json` with `$schema`, `model`, baseline `permission`
|
||||
- [ ] Define `bash` allowlist for project's hot commands (test, build, lint)
|
||||
- [ ] Lock `share` to `manual` or `disabled` for private repos
|
||||
- [ ] If repo has `.claude/skills/`, leave them — they auto-load
|
||||
- [ ] If team needs custom workflow agents, drop them in `.opencode/agents/`
|
||||
- [ ] If team needs slash commands, drop them in `.opencode/commands/`
|
||||
- [ ] Add `.opencode/`, `AGENTS.md`, `opencode.json` to git; ignore
|
||||
`~/.config/opencode/` content (per-user)
|
||||
@@ -0,0 +1,257 @@
|
||||
# Custom Agents, Skills, Commands, and Tools
|
||||
|
||||
## Custom agents
|
||||
|
||||
Locations: `~/.config/opencode/agents/<name>.md`, `.opencode/agents/<name>.md`,
|
||||
or inline under `agent.<name>` in `opencode.json`.
|
||||
|
||||
Name regex: `^[a-z0-9]+(-[a-z0-9]+)*$`. Filename = agent name.
|
||||
|
||||
### Frontmatter (full)
|
||||
|
||||
```yaml
|
||||
---
|
||||
description: Reviews PR diffs against repo conventions before merge. # required
|
||||
mode: subagent # primary | subagent | all
|
||||
model: anthropic/claude-sonnet-4-5
|
||||
temperature: 0.2 # 0.0-1.0
|
||||
top_p: 1.0
|
||||
steps: 12 # max iterations before forced text reply
|
||||
permission:
|
||||
read: allow
|
||||
edit: deny
|
||||
glob: allow
|
||||
grep: allow
|
||||
list: allow
|
||||
bash:
|
||||
"*": ask
|
||||
"git diff*": allow
|
||||
"git log*": allow
|
||||
"git status": allow
|
||||
webfetch: allow
|
||||
websearch: allow
|
||||
task: allow
|
||||
external_directory: ask
|
||||
todowrite: allow
|
||||
lsp: allow
|
||||
skill: allow
|
||||
question: allow
|
||||
doom_loop: ask
|
||||
color: "#7c3aed" # or: primary|secondary|accent|success|warning|error|info
|
||||
hidden: false # hide from @ autocomplete (still callable via task tool)
|
||||
disable: false
|
||||
prompt: "{file:./prompts/pr-reviewer.md}" # load body from external file
|
||||
tools:
|
||||
skill: false # disable a tool entirely for this agent
|
||||
my-mcp-tool: true
|
||||
---
|
||||
|
||||
You are a PR reviewer. Read the diff, flag regressions, suggest fixes…
|
||||
```
|
||||
|
||||
### JSON-style equivalent
|
||||
|
||||
```json
|
||||
{
|
||||
"agent": {
|
||||
"pr-reviewer": {
|
||||
"description": "Reviews PR diffs",
|
||||
"mode": "subagent",
|
||||
"model": "anthropic/claude-sonnet-4-5",
|
||||
"temperature": 0.2,
|
||||
"permission": {
|
||||
"edit": "deny",
|
||||
"bash": { "*": "ask", "git diff*": "allow" }
|
||||
},
|
||||
"tools": { "skill": false }
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Mode semantics
|
||||
|
||||
- `primary` — Tab-cycle slot, full chat surface. Examples: `build`, `plan`.
|
||||
- `subagent` — invoked via `@<name>` in chat or via the `task` tool from another
|
||||
agent. Hidden agents are still callable via `task`.
|
||||
- `all` — both primary and subagent. Rare; use only for daily-driver agents
|
||||
that also act as orchestrator helpers.
|
||||
|
||||
### Scaffolder
|
||||
|
||||
`opencode agent create` opens an interactive wizard that picks tools,
|
||||
permissions, and writes the MD file.
|
||||
|
||||
### Permission merging
|
||||
|
||||
- `opencode.json → permission` is the global base.
|
||||
- `opencode.json → agent.<name>.permission` overrides per agent.
|
||||
- Agent MD frontmatter `permission:` overrides everything for that agent.
|
||||
|
||||
Object-style permissions (e.g. `bash: { "git *": "allow" }`) replace the entire
|
||||
parent value when overridden — they do **not** deep-merge. Spell out every
|
||||
pattern when you override.
|
||||
|
||||
## Skills (SKILL.md spec)
|
||||
|
||||
Discovery (walk-up from CWD to git worktree, all matches loaded):
|
||||
|
||||
- `.opencode/skills/<name>/SKILL.md`
|
||||
- `.claude/skills/<name>/SKILL.md`
|
||||
- `.agents/skills/<name>/SKILL.md`
|
||||
- `~/.config/opencode/skills/<name>/SKILL.md`
|
||||
- `~/.claude/skills/<name>/SKILL.md`
|
||||
- `~/.agents/skills/<name>/SKILL.md`
|
||||
|
||||
### Frontmatter
|
||||
|
||||
```yaml
|
||||
---
|
||||
name: git-release # required, kebab-case, ≤64 chars
|
||||
description: | # required, ≤1024 chars, drives autoselection
|
||||
Cut a release: bump version, generate changelog from merged PRs, tag, draft
|
||||
GH release notes. Use when user says "release", "tag a version", "publish".
|
||||
license: MIT # optional
|
||||
compatibility: opencode # optional
|
||||
metadata: # optional, string-to-string only
|
||||
audience: maintainers
|
||||
source: https://example.com/release-runbook
|
||||
---
|
||||
```
|
||||
|
||||
### Body conventions
|
||||
|
||||
- Short, headed reference text the agent can grep.
|
||||
- Absolute paths inside the skill dir for scripts: `scripts/foo.py`.
|
||||
- Examples in `examples/`, deeper docs in `references/`.
|
||||
- Skill itself does **not** load reference files automatically — let the agent
|
||||
decide based on user task.
|
||||
|
||||
### Loading model
|
||||
|
||||
Agents see available skills' name+description in the `skill` tool's docs and
|
||||
call `skill({ name: "<skill-name>" })` on demand. The body of `SKILL.md` is
|
||||
returned verbatim. **No auto-injection** — vague descriptions fail silently.
|
||||
|
||||
### Permission filter
|
||||
|
||||
```json
|
||||
{
|
||||
"permission": {
|
||||
"skill": {
|
||||
"*": "allow",
|
||||
"internal-*": "deny",
|
||||
"experimental-*": "ask"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Disable entirely for an agent: `tools: { skill: false }` in agent frontmatter.
|
||||
|
||||
### Common authoring mistakes
|
||||
|
||||
- Description too generic (`"helps with deployment"`) → never selected.
|
||||
- Description too keyword-stuffed → spurious triggers, wrong-context calls.
|
||||
- Hyphens vs underscores: only hyphens valid in `name`.
|
||||
- Forgetting `description` in body — only the frontmatter field counts for selection.
|
||||
- Auto-loading huge `references/*.md` content into the body — bloats every
|
||||
invocation. Move depth into separate files; reference them by relative path.
|
||||
|
||||
## Custom commands (slash)
|
||||
|
||||
Locations: `~/.config/opencode/commands/<name>.md`, `.opencode/commands/<name>.md`,
|
||||
or inline under `command.<name>` in `opencode.json`.
|
||||
|
||||
```yaml
|
||||
---
|
||||
description: Run tests with coverage and summarize failures.
|
||||
agent: build
|
||||
model: anthropic/claude-sonnet-4-5
|
||||
---
|
||||
Run `!`pnpm test --coverage`` then read @coverage/lcov-report/index.html.
|
||||
Summarize failing tests for $ARGUMENTS (default: all).
|
||||
```
|
||||
|
||||
Body templating:
|
||||
- `$ARGUMENTS` (full arg string), `$1`, `$2`, … (positional)
|
||||
- `` !`<shell>` `` — embeds stdout at prompt-build time (runs once per invocation)
|
||||
- `@<path>` — inlines file contents
|
||||
|
||||
Invocation:
|
||||
- `/test`
|
||||
- `/component Button` — `$1=Button`, `$ARGUMENTS=Button`
|
||||
- `/create-file config.json src "content"` — `$1=config.json`, `$2=src`, `$3="content"`
|
||||
|
||||
Custom commands shadow built-ins (`/init`, `/help`, `/undo`, `/share`,
|
||||
`/models`, `/themes`, `/connect`).
|
||||
|
||||
## Custom tools
|
||||
|
||||
Location: `.opencode/tools/<name>.ts` (project) or `~/.config/opencode/tools/`
|
||||
(global). Filename = tool name.
|
||||
|
||||
```typescript
|
||||
import { tool } from "@opencode-ai/plugin"
|
||||
|
||||
export default tool({
|
||||
description: "Query the project database",
|
||||
args: {
|
||||
query: tool.schema.string().describe("SQL query to execute"),
|
||||
limit: tool.schema.number().optional().describe("Max rows"),
|
||||
},
|
||||
async execute(args, context) {
|
||||
// context: { agent, sessionID, messageID, directory, worktree }
|
||||
return `Executed: ${args.query} (limit=${args.limit ?? 100})`
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
Notes:
|
||||
- Custom tool with same name as built-in (`bash`, `edit`, `read`, …) **silently
|
||||
overrides** the built-in. Audit before deploying.
|
||||
- Multi-language: TS wrapper that shells out — Python, Go, anything.
|
||||
- Multiple tools per file: export named functions → tool name becomes
|
||||
`<filename>_<exportname>`.
|
||||
- Args validated with Zod (provided by `tool.schema`).
|
||||
- Permission: respects `tools: { my-tool: false }` and `permission: { ... }`
|
||||
rules just like built-ins.
|
||||
|
||||
## Plugins (lifecycle hooks)
|
||||
|
||||
Location: `.opencode/plugins/<file>.ts` or NPM packages listed in
|
||||
`opencode.json` → `plugin: ["pkg-a", "pkg-b"]`.
|
||||
|
||||
Load order: global config → project config → global plugins dir → project
|
||||
plugins dir. Order within an array is preserved.
|
||||
|
||||
```typescript
|
||||
// .opencode/plugins/notify.ts
|
||||
import type { Plugin } from "@opencode-ai/plugin"
|
||||
|
||||
export default (async ({ project, client, $, directory, worktree }) => {
|
||||
return {
|
||||
"session.created": async (event) => {
|
||||
await $`notify-send "opencode" "New session in ${project.name}"`
|
||||
},
|
||||
"tool.before": async (event) => {
|
||||
// mutate args, log, gate execution
|
||||
client.app.log({ level: "info", message: `tool=${event.name}` })
|
||||
},
|
||||
"session.compaction": async (event) => {
|
||||
// override compaction strategy
|
||||
},
|
||||
}
|
||||
}) satisfies Plugin
|
||||
```
|
||||
|
||||
Capabilities:
|
||||
- Hook session/file/message/tool lifecycle events
|
||||
- Add custom tools from inside the plugin
|
||||
- Modify tool execution (gate, mutate args, replay)
|
||||
- Inject env vars before commands run
|
||||
- Run shell via `$` (Bun shell)
|
||||
- Structured logging via `client.app.log()`
|
||||
|
||||
Local NPM deps: drop a `package.json` next to the plugin. Imports resolve from
|
||||
`.opencode/package.json` (project) or `~/.config/opencode/package.json` (global).
|
||||
@@ -0,0 +1,175 @@
|
||||
# OpenCode Configuration Deep Dive
|
||||
|
||||
`opencode.json` (project + user-global) and `tui.json` (TUI only) are the two
|
||||
schema-driven config files. Source of truth: `https://opencode.ai/config.json`,
|
||||
`https://opencode.ai/tui.json`.
|
||||
|
||||
## Precedence chain (low → high override)
|
||||
|
||||
1. Remote (organizational defaults pulled by URL)
|
||||
2. User-global: `~/.config/opencode/opencode.json`
|
||||
3. Custom path: `OPENCODE_CONFIG=/path/to/cfg.json`
|
||||
4. Project: `./opencode.json`
|
||||
5. Directory: `OPENCODE_CONFIG_DIR=/dir/with/cfg.json`
|
||||
6. Inline: `OPENCODE_CONFIG_CONTENT='{"model":"..."}'`
|
||||
7. Managed settings (highest, MDM-style)
|
||||
|
||||
Higher items win on conflict. Arrays and maps merge field-by-field where
|
||||
sensible.
|
||||
|
||||
## Variable substitution inside JSON
|
||||
|
||||
```jsonc
|
||||
{
|
||||
"model": "{env:OPENCODE_MODEL}", // env var
|
||||
"provider": {
|
||||
"openai": { "apiKey": "{file:~/.secrets/openai}" } // file contents (trimmed)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Both forms expand at load time. Useful for keeping secrets out of the file.
|
||||
|
||||
## Top-level fields (full)
|
||||
|
||||
| Field | Purpose |
|
||||
| -------------------- | -------------------------------------------------------------------- |
|
||||
| `$schema` | URL pin for editor autocomplete |
|
||||
| `model` | Primary LLM, e.g. `anthropic/claude-sonnet-4-5` |
|
||||
| `small_model` | Lightweight tasks (compaction, title, summary) |
|
||||
| `default_agent` | Fallback when none specified |
|
||||
| `provider` | Per-provider opts (timeout, caching, baseURL, models) |
|
||||
| `enabled_providers` | Allowlist |
|
||||
| `disabled_providers` | Blocklist |
|
||||
| `shell` | `pwsh`, `/bin/bash`, etc. — interactive bash tool target |
|
||||
| `autoupdate` | `true` / `false` / `"notify"` |
|
||||
| `snapshot` | Track file changes (default `true`) — powers `/undo` |
|
||||
| `share` | `"manual"` (default) / `"auto"` / `"disabled"` |
|
||||
| `server` | `port`, `hostname`, `mdns`, `cors` |
|
||||
| `tools` | Toggle tools per name (`bash: false`, `my-mcp*: false`, …) |
|
||||
| `permission` | Tool permissions (see permissions-tools.md) |
|
||||
| `formatter` | Per-formatter override |
|
||||
| `watcher` | `ignore: []` patterns |
|
||||
| `compaction` | Context-window compaction tuning |
|
||||
| `mcp` | MCP server map (see providers-models.md) |
|
||||
| `plugin` | Array of NPM plugin package names or paths |
|
||||
| `instructions` | Array of paths/globs/URLs for rule files |
|
||||
| `command` | Inline command templates (alternative to `.opencode/commands/`) |
|
||||
| `agent` | Inline agent defs (alternative to `.opencode/agents/`) |
|
||||
| `lsp` | Per-server LSP config |
|
||||
| `experimental` | Unstable feature flags |
|
||||
|
||||
## Worked example
|
||||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"model": "anthropic/claude-sonnet-4-5",
|
||||
"small_model": "anthropic/claude-haiku-4-5",
|
||||
"default_agent": "build",
|
||||
"autoupdate": "notify",
|
||||
"share": "manual",
|
||||
"snapshot": true,
|
||||
"shell": "/bin/bash",
|
||||
"server": { "port": 4096, "hostname": "127.0.0.1", "mdns": false },
|
||||
"tools": { "write": true, "bash": true, "internal-*": false },
|
||||
"permission": {
|
||||
"*": "allow",
|
||||
"bash": { "*": "ask", "git status": "allow", "rm -rf *": "deny" },
|
||||
"external_directory": { "~/projects/*": "allow", "*": "ask" },
|
||||
"skill": { "*": "allow", "internal-*": "deny" }
|
||||
},
|
||||
"instructions": ["CONTRIBUTING.md", "docs/standards/*.md"],
|
||||
"command": {
|
||||
"test": { "description": "Run full test suite", "template": "Run !`pnpm test`" }
|
||||
},
|
||||
"formatter": { "prettier": { "disabled": false } },
|
||||
"watcher": { "ignore": ["node_modules/**", "dist/**", ".turbo/**"] },
|
||||
"mcp": {
|
||||
"context7": {
|
||||
"type": "remote",
|
||||
"url": "https://mcp.context7.com/mcp",
|
||||
"headers": { "CONTEXT7_API_KEY": "{env:CONTEXT7_API_KEY}" }
|
||||
}
|
||||
},
|
||||
"plugin": ["opencode-helicone-session"],
|
||||
"agent": {
|
||||
"plan": { "permission": { "edit": "deny", "bash": "deny" } }
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## tui.json (TUI only)
|
||||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://opencode.ai/tui.json",
|
||||
"theme": "tokyonight",
|
||||
"keybinds": {
|
||||
"leader": "ctrl+x",
|
||||
"app_exit": "ctrl+c,ctrl+d,<leader>q",
|
||||
"session_new": "<leader>n",
|
||||
"session_list": "<leader>l",
|
||||
"model_list": "<leader>m",
|
||||
"theme_select": "<leader>t",
|
||||
"command_list": "ctrl+p",
|
||||
"terminal_suspend": "none"
|
||||
},
|
||||
"scroll": { "speed": 3 },
|
||||
"diff": { "style": "split" },
|
||||
"mouse": true
|
||||
}
|
||||
```
|
||||
|
||||
Set any keybind to `"none"` to disable. Built-in readline edits
|
||||
(`ctrl+a/e/w`, `alt+f`) are not configurable.
|
||||
|
||||
## Themes
|
||||
|
||||
Built-ins: `system` (terminal-adaptive), `tokyonight`, `everforest`, `ayu`,
|
||||
`catppuccin`, `gruvbox`, `kanagawa`, `nord`, `matrix`, `one-dark`.
|
||||
|
||||
Custom: `~/.config/opencode/themes/<name>.json` or `.opencode/themes/<name>.json`.
|
||||
Supports hex (`#1e1e2e`), ANSI codes, color references, dark/light variants.
|
||||
Special value `"none"` inherits terminal default.
|
||||
|
||||
24-bit truecolor recommended. Verify: `echo $COLORTERM` should print `truecolor`
|
||||
or `24bit`.
|
||||
|
||||
Activate: `/themes` (TUI) or `tui.json` → `theme: "..."`.
|
||||
|
||||
## LSP
|
||||
|
||||
30+ built-in language servers auto-activate per file extension.
|
||||
|
||||
Disable all: `{ "lsp": false }`. Disable one:
|
||||
```json
|
||||
{ "lsp": { "intelephense": { "disabled": true } } }
|
||||
```
|
||||
|
||||
Custom server:
|
||||
```json
|
||||
{ "lsp": { "myls": {
|
||||
"command": ["my-lang-server", "--stdio"],
|
||||
"extensions": [".mylang"],
|
||||
"env": { "MY_VAR": "v" },
|
||||
"initialization": { "settings": { "lint": true } }
|
||||
} } }
|
||||
```
|
||||
|
||||
PHP Intelephense premium: place license at `$HOME/intelephense/license.txt`
|
||||
(Unix) or `%USERPROFILE%/intelephense/license.txt` (Windows).
|
||||
|
||||
## Watcher / ignore
|
||||
|
||||
```json
|
||||
{ "watcher": { "ignore": ["node_modules/**", ".git/**", "dist/**", "*.lock"] } }
|
||||
```
|
||||
|
||||
Limits which files trigger snapshot/refresh and which are visible to
|
||||
`glob`/`grep` walks.
|
||||
|
||||
## Experimental flags
|
||||
|
||||
Treat as throwaway. Document any flag you ship with `# why we set this`
|
||||
comments next to it because they break between releases.
|
||||
@@ -0,0 +1,267 @@
|
||||
# Operate: CLI, Server, SDK, GitHub, IDE, Network, Troubleshooting
|
||||
|
||||
## CLI surface
|
||||
|
||||
```
|
||||
opencode # launch TUI in cwd
|
||||
opencode /path/to/project # launch TUI in another dir
|
||||
opencode run "<prompt>" # one-shot, non-interactive
|
||||
opencode serve # headless HTTP API server
|
||||
opencode auth login # add provider creds
|
||||
opencode models [provider] # list available models
|
||||
opencode mcp <auth|list|logout|debug> <name>
|
||||
opencode agent create # interactive agent wizard
|
||||
opencode github install # GitHub Action setup
|
||||
opencode upgrade # self-update binary
|
||||
```
|
||||
|
||||
### Global flags
|
||||
|
||||
| Flag | Effect |
|
||||
| ------------------------ | ---------------------------------------- |
|
||||
| `--model`, `-m <id>` | Override default model for this run |
|
||||
| `--agent <name>` | Use a specific agent |
|
||||
| `--print` | Print final output to stdout (good for CI) |
|
||||
| `--print-logs` | Stream logs to stdout |
|
||||
| `--log-level <LEVEL>` | `DEBUG` / `INFO` / `WARN` / `ERROR` |
|
||||
| `--help` | Help |
|
||||
| `--version` | Version |
|
||||
|
||||
### Environment variables (selected)
|
||||
|
||||
```
|
||||
OPENCODE_CONFIG=/path/to/opencode.json # custom config path
|
||||
OPENCODE_CONFIG_DIR=/path/to/dir # custom config dir
|
||||
OPENCODE_CONFIG_CONTENT='{"model":"..."}' # inline config
|
||||
OPENCODE_MODEL=anthropic/claude-sonnet-4-5
|
||||
OPENCODE_API_KEY=... # default API key
|
||||
OPENCODE_LOG_LEVEL=DEBUG
|
||||
OPENCODE_ENABLE_EXA=1 # enable websearch
|
||||
OPENCODE_DISABLE_CLAUDE_CODE=1
|
||||
OPENCODE_DISABLE_CLAUDE_CODE_PROMPT=1
|
||||
OPENCODE_DISABLE_CLAUDE_CODE_SKILLS=1
|
||||
OPENCODE_SERVER_PASSWORD=... # required for `opencode serve`
|
||||
OPENCODE_SERVER_USERNAME=opencode # default
|
||||
HTTPS_PROXY=...
|
||||
HTTP_PROXY=...
|
||||
NO_PROXY=localhost,127.0.0.1
|
||||
NODE_EXTRA_CA_CERTS=/path/to/ca.pem
|
||||
```
|
||||
|
||||
### One-shot CI usage
|
||||
|
||||
```bash
|
||||
ANTHROPIC_API_KEY=$KEY \
|
||||
opencode run \
|
||||
--model anthropic/claude-sonnet-4-5 \
|
||||
--agent build \
|
||||
--print \
|
||||
--log-level WARN \
|
||||
"Audit src/ for SQL injection. Output JSON: { \"findings\": [...] }."
|
||||
```
|
||||
|
||||
Permissions in headless: any `ask` rule effectively becomes `deny` — no UI to
|
||||
approve. Configure permission sets that are explicitly `allow` or `deny`.
|
||||
|
||||
## Server mode (`opencode serve`)
|
||||
|
||||
Headless HTTP API. Default `127.0.0.1:4096`. **Always set
|
||||
`OPENCODE_SERVER_PASSWORD`** — without it the server starts unauthenticated.
|
||||
|
||||
```bash
|
||||
export OPENCODE_SERVER_PASSWORD="$(openssl rand -hex 24)"
|
||||
opencode serve --port 4096 --hostname 127.0.0.1
|
||||
|
||||
# Smoke test:
|
||||
curl -u "opencode:$OPENCODE_SERVER_PASSWORD" http://127.0.0.1:4096/global/health
|
||||
```
|
||||
|
||||
OpenAPI 3.1 lives at `http://<host>:<port>/doc`. Endpoint categories: global
|
||||
health/events, projects, config (live `PATCH /config`), providers + OAuth,
|
||||
sessions (create / fork / share / revert / abort), messages (sync, async,
|
||||
slash command, raw shell), files & search (`/find`, `/find/file`,
|
||||
`/find/symbol`, `/file/content`), LSP/formatter/MCP status, agents, logging,
|
||||
**TUI control** (used by IDE extensions to drive a running TUI), instance
|
||||
dispose.
|
||||
|
||||
Multiple clients attach to one server simultaneously (TUI, IDE extension, SDK,
|
||||
curl scripts). Live MCP-add (`POST /mcp`) and config patching make the server
|
||||
hot-reconfigurable.
|
||||
|
||||
> **Full endpoint catalog, curl recipes, SSE pattern, security checklist, and
|
||||
> pitfalls → `references/server-api.md`.**
|
||||
|
||||
## SDK (`@opencode-ai/sdk`)
|
||||
|
||||
Programmatic control from Node/Bun/Deno.
|
||||
|
||||
```typescript
|
||||
import { createOpencode } from "@opencode-ai/sdk"
|
||||
|
||||
const opencode = await createOpencode({
|
||||
hostname: "127.0.0.1",
|
||||
port: 4096,
|
||||
config: { model: "anthropic/claude-sonnet-4-5" }
|
||||
})
|
||||
|
||||
const session = await opencode.client.session.create({ projectID: "default" })
|
||||
const reply = await opencode.client.session.prompt({
|
||||
sessionID: session.id,
|
||||
prompt: "Summarize README.md",
|
||||
})
|
||||
|
||||
// Structured output:
|
||||
const summary = await opencode.client.session.prompt({
|
||||
sessionID: session.id,
|
||||
prompt: "Extract repo metadata",
|
||||
format: { type: "json_schema", schema: { /* zod-style */ } }
|
||||
})
|
||||
|
||||
// Stream events:
|
||||
opencode.client.events.subscribe(session.id, (e) => console.log(e))
|
||||
|
||||
// TUI control:
|
||||
await opencode.client.tui.notify({ message: "Build done" })
|
||||
```
|
||||
|
||||
Connect to existing instance:
|
||||
```typescript
|
||||
import { createOpencodeClient } from "@opencode-ai/sdk"
|
||||
const client = createOpencodeClient({ baseURL: "http://127.0.0.1:4096", auth: { user: "opencode", pass: PW } })
|
||||
```
|
||||
|
||||
Types are generated from the server's OpenAPI — fully type-safe.
|
||||
|
||||
## GitHub integration
|
||||
|
||||
Install:
|
||||
```bash
|
||||
opencode github install
|
||||
```
|
||||
|
||||
This:
|
||||
1. Adds the GitHub App at `github.com/apps/opencode-agent`.
|
||||
2. Writes `.github/workflows/opencode.yml`.
|
||||
3. Reminds you to add `ANTHROPIC_API_KEY` (or other provider key) to repo secrets.
|
||||
|
||||
Workflow stub:
|
||||
```yaml
|
||||
name: opencode
|
||||
on:
|
||||
issue_comment: { types: [created] }
|
||||
pull_request_review_comment: { types: [created] }
|
||||
issues: { types: [opened] }
|
||||
pull_request: { types: [opened, synchronize] }
|
||||
schedule:
|
||||
- cron: "0 6 * * 1" # weekly Monday triage
|
||||
jobs:
|
||||
run:
|
||||
if: |
|
||||
github.event_name == 'schedule' ||
|
||||
github.event_name == 'issues' ||
|
||||
github.event_name == 'pull_request' ||
|
||||
contains(github.event.comment.body, '/opencode') ||
|
||||
contains(github.event.comment.body, '/oc')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: opencode-ai/opencode-action@v1
|
||||
with:
|
||||
model: anthropic/claude-sonnet-4-5
|
||||
agent: build
|
||||
share: false # default true for public repos
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
env:
|
||||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
```
|
||||
|
||||
Triggers:
|
||||
- `/opencode <prompt>` or `/oc <prompt>` in issue/PR comments
|
||||
- `/opencode` in PR review comments (gets file path + line + diff context)
|
||||
- `pull_request` events → auto-review
|
||||
- `issues` events → auto-triage
|
||||
- `schedule` cron → bulk runs
|
||||
|
||||
Common asks:
|
||||
- `/oc explain this issue`
|
||||
- `/oc fix this`
|
||||
- `/oc add error handling here`
|
||||
- `/oc review this PR for security`
|
||||
|
||||
## IDE integration
|
||||
|
||||
Supported: VS Code, Cursor, Windsurf, VSCodium (auto-installs from terminal).
|
||||
|
||||
Shortcuts:
|
||||
- `Cmd+Esc` (mac) / `Ctrl+Esc` (win/linux) → toggle opencode
|
||||
- `Cmd+Shift+Esc` / `Ctrl+Shift+Esc` → new session
|
||||
- `Cmd+Option+K` / `Alt+Ctrl+K` → insert file ref into prompt
|
||||
|
||||
Manual install: marketplace search "OpenCode". Verify the appropriate CLI
|
||||
(`code`, `cursor`, `windsurf`, `codium`) is on `PATH`.
|
||||
|
||||
ACP (Agent Client Protocol) is the spec used by IDE extensions to talk to a
|
||||
running opencode server — relevant for building integrations.
|
||||
|
||||
## Network / proxy
|
||||
|
||||
Standard proxy env vars respected:
|
||||
```bash
|
||||
export HTTPS_PROXY="https://user:pass@proxy.corp:8080"
|
||||
export HTTP_PROXY="http://proxy.corp:8080"
|
||||
export NO_PROXY="localhost,127.0.0.1" # MUST include — TUI uses local server
|
||||
```
|
||||
|
||||
Custom CA:
|
||||
```bash
|
||||
export NODE_EXTRA_CA_CERTS=/etc/ssl/certs/corp-ca.pem
|
||||
```
|
||||
|
||||
NTLM/Kerberos: not natively supported. Front the proxy with an LLM gateway
|
||||
that handles enterprise auth.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
| Symptom | Fix |
|
||||
| ------------------------------------ | -------------------------------------------------------- |
|
||||
| Won't start | `opencode --print-logs --log-level DEBUG`, then `opencode upgrade` |
|
||||
| Auth failing | `/connect` again; remove `~/.local/share/opencode/auth.json` to reset |
|
||||
| Model not in `/models` | `opencode models` to confirm; check provider's
|
||||
`enabled_providers` allowlist |
|
||||
| API errors / stale cache | `rm -rf ~/.cache/opencode` |
|
||||
| Plugin breaks startup | `mv .opencode/plugins .opencode/plugins.disabled` |
|
||||
| Linux clipboard broken | `apt install xclip` (X11) or `wl-clipboard` (Wayland) |
|
||||
| TUI hangs through corp proxy | Add `localhost,127.0.0.1` to `NO_PROXY` |
|
||||
| `Reload Webview` (mac desktop app) | Cmd+Q then relaunch |
|
||||
|
||||
Logs:
|
||||
- macOS/Linux: `~/.local/share/opencode/log/`
|
||||
- Windows: `%USERPROFILE%\.local\share\opencode\log\`
|
||||
|
||||
## Share feature
|
||||
|
||||
Modes via `opencode.json`:
|
||||
```json
|
||||
{ "share": "manual" } // default — explicit /share
|
||||
{ "share": "auto" } // every new session shared
|
||||
{ "share": "disabled" } // hard-off (commit to repo to enforce team-wide)
|
||||
```
|
||||
|
||||
URLs: `opncd.ai/s/<id>`. Unshare: `/unshare`.
|
||||
|
||||
Privacy: opencode warns to review before sharing. Don't share sensitive
|
||||
proprietary code. Enterprise can self-host or restrict to SSO users.
|
||||
|
||||
## Snapshot / undo
|
||||
|
||||
`snapshot: true` (default) tracks file changes per session. `/undo` and `/redo`
|
||||
walk through them with Git-style integration. Disable for noisy projects:
|
||||
`{ "snapshot": false }`.
|
||||
|
||||
## Compaction
|
||||
|
||||
Long sessions get auto-compacted when context approaches model limits. Tune:
|
||||
```json
|
||||
{ "compaction": { "threshold": 0.85, "model": "anthropic/claude-haiku-4-5" } }
|
||||
```
|
||||
The compaction agent uses `small_model` if not overridden.
|
||||
@@ -0,0 +1,144 @@
|
||||
# Permissions & Built-in Tools
|
||||
|
||||
## States
|
||||
|
||||
| State | Behavior |
|
||||
| ------- | ------------------------------------- |
|
||||
| `allow` | Run silently |
|
||||
| `ask` | Prompt user, wait for approval |
|
||||
| `deny` | Block; tool typically hidden from LLM |
|
||||
|
||||
Defaults: most → `allow`; `doom_loop` and `external_directory` → `ask`. `.env`
|
||||
denied to `read` by default — opt in explicitly if you really need it.
|
||||
|
||||
## Pattern matching
|
||||
|
||||
- `*` zero-or-more chars
|
||||
- `?` exactly one char
|
||||
- `~`, `$HOME` expand to home dir
|
||||
- **Last matching rule wins** — order matters
|
||||
|
||||
## Configuration shapes
|
||||
|
||||
Top-level uniform:
|
||||
```json
|
||||
{ "permission": { "*": "ask", "bash": "allow", "edit": "deny" } }
|
||||
```
|
||||
|
||||
Pattern map per tool:
|
||||
```json
|
||||
{ "permission": { "bash": { "*": "ask", "git *": "allow", "rm *": "deny" } } }
|
||||
```
|
||||
|
||||
Per-agent override (deep override, not merge):
|
||||
```json
|
||||
{ "agent": { "build": { "permission": {
|
||||
"bash": { "*": "ask", "git push *": "deny" }
|
||||
} } } }
|
||||
```
|
||||
|
||||
Or in agent MD frontmatter under `permission:` — wins over `opencode.json`.
|
||||
|
||||
## Tool catalog
|
||||
|
||||
| Tool | Purpose | Default | Notes |
|
||||
| -------------------- | ------------------------------------------------ | ------- | ---------------------------------------------- |
|
||||
| `read` | Read file contents (line-range supported) | allow | `.env` blocked by default |
|
||||
| `edit` | In-place exact-string replacement | allow | Triggers formatter |
|
||||
| `write` | Create or overwrite files | allow | Governed by `edit` permission |
|
||||
| `apply_patch` | Apply unified-diff patches | allow | Governed by `edit` permission |
|
||||
| `bash` | Execute shell commands | allow | Pattern map highly recommended |
|
||||
| `glob` | Pattern-match filenames (`**/*.ts`) | allow | Honors `watcher.ignore` |
|
||||
| `grep` | Regex content search | allow | |
|
||||
| `list` | Directory listing | allow | |
|
||||
| `webfetch` | Fetch & read HTTP(S) page | allow | Consider `ask` for hardened envs |
|
||||
| `websearch` | Web search via Exa | allow | Requires `OPENCODE_ENABLE_EXA=1` |
|
||||
| `task` | Spawn a subagent | allow | The orchestrator's gateway to subagents |
|
||||
| `lsp` | Query language server (definitions, refs, hover) | allow | Experimental |
|
||||
| `skill` | Load `SKILL.md` content | allow | Filter via `permission.skill: { ... }` |
|
||||
| `todowrite` | Manage in-session todo list | allow | |
|
||||
| `question` | Prompt the user with options mid-run | allow | |
|
||||
| `external_directory` | Access paths outside project root | ask | Whitelist `~/projects/*` etc. |
|
||||
| `doom_loop` | Long-running iteration mode | ask | Off by default for safety |
|
||||
|
||||
## Recommended baselines
|
||||
|
||||
### Standard dev project
|
||||
|
||||
```json
|
||||
{
|
||||
"permission": {
|
||||
"*": "allow",
|
||||
"edit": "allow",
|
||||
"bash": {
|
||||
"*": "ask",
|
||||
"git status": "allow",
|
||||
"git diff*": "allow",
|
||||
"git log*": "allow",
|
||||
"ls *": "allow",
|
||||
"cat *": "allow",
|
||||
"pnpm *": "allow",
|
||||
"rm *": "deny",
|
||||
"rm -rf *": "deny",
|
||||
"git push*": "ask",
|
||||
"git push --force*": "deny",
|
||||
"git push --force-with-lease*": "ask",
|
||||
"sudo*": "deny"
|
||||
},
|
||||
"external_directory": { "~/projects/*": "allow", "*": "ask" },
|
||||
"webfetch": "ask",
|
||||
"skill": { "*": "allow", "internal-*": "deny" }
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Locked-down audit / pentest project
|
||||
|
||||
```json
|
||||
{
|
||||
"permission": {
|
||||
"*": "ask",
|
||||
"read": "allow",
|
||||
"glob": "allow",
|
||||
"grep": "allow",
|
||||
"list": "allow",
|
||||
"edit": "deny",
|
||||
"bash": {
|
||||
"*": "deny",
|
||||
"ls *": "allow",
|
||||
"cat *": "allow",
|
||||
"grep *": "allow",
|
||||
"find *": "allow"
|
||||
},
|
||||
"external_directory": "deny",
|
||||
"skill": { "*": "ask" }
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### CI / headless
|
||||
|
||||
```json
|
||||
{
|
||||
"permission": {
|
||||
"*": "allow",
|
||||
"external_directory": "deny",
|
||||
"doom_loop": "deny"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
`ask` becomes effectively `deny` in headless mode (no UI to prompt).
|
||||
|
||||
## Common gotchas
|
||||
|
||||
- `bash: { "git push*": "allow" }` covers `git push --force` because `*` is
|
||||
greedy. Always pair with a stricter `"git push --force*": "deny"` rule.
|
||||
- Object-style permission overrides **replace**, not merge. If global allows
|
||||
`git diff*` and per-agent says `{ "*": "ask" }`, the `git diff*` rule is gone.
|
||||
- `ask` outside a TUI → blocks indefinitely or fails depending on caller.
|
||||
Never use `ask` for CI runs.
|
||||
- Custom tools live alongside built-ins in the same permission namespace —
|
||||
control with `tools: { my-tool: false }` or `permission: { my-tool: "ask" }`.
|
||||
- A skill that calls `bash` is gated by **both** `permission.skill` and
|
||||
`permission.bash` — the stricter wins for that operation.
|
||||
@@ -0,0 +1,223 @@
|
||||
# Providers, Models, OpenCode Zen & MCP
|
||||
|
||||
## Provider auth flow
|
||||
|
||||
1. `/connect` (in TUI) — picks provider, prompts for key, writes
|
||||
`~/.local/share/opencode/auth.json`. Or: `opencode auth login`.
|
||||
2. Or set provider-specific env var (e.g. `ANTHROPIC_API_KEY`,
|
||||
`OPENAI_API_KEY`).
|
||||
3. Or set in `opencode.json` → `provider.<id>.apiKey` (use
|
||||
`{file:~/.secrets/...}` to avoid plaintext keys).
|
||||
|
||||
> Config-file keys take precedence over env vars.
|
||||
|
||||
## Setting models
|
||||
|
||||
```json
|
||||
{ "$schema": "https://opencode.ai/config.json",
|
||||
"model": "anthropic/claude-sonnet-4-5",
|
||||
"small_model": "anthropic/claude-haiku-4-5" }
|
||||
```
|
||||
|
||||
Resolution: `--model`/`-m` CLI flag → `opencode.json` → last used → first by
|
||||
internal priority.
|
||||
|
||||
Switch interactively: `/models`. List available: `opencode models`. Optional
|
||||
provider filter: `opencode models anthropic`.
|
||||
|
||||
## Reasoning-effort variants
|
||||
|
||||
Append to id (e.g. `openai/gpt-5/high`):
|
||||
|
||||
| Provider | Variants |
|
||||
| --------- | -------------------------------------- |
|
||||
| Anthropic | `high` (default), `max` |
|
||||
| OpenAI | `none`, `minimal`, `low`, `medium`, `high`, `xhigh` |
|
||||
| Google | `low`, `high` |
|
||||
|
||||
Override or add via `provider.<id>.models.<m>.variants`.
|
||||
|
||||
## Major providers (preloaded)
|
||||
|
||||
- Anthropic (`anthropic/...`)
|
||||
- OpenAI (`openai/...`)
|
||||
- Google Vertex AI (`google/...`)
|
||||
- Amazon Bedrock
|
||||
- GitHub Copilot
|
||||
- GitLab Duo
|
||||
- OpenCode Zen (`opencode/...`)
|
||||
- Local: Ollama, LM Studio, llama.cpp
|
||||
|
||||
75+ supported via Vercel AI SDK + Models.dev.
|
||||
|
||||
## OpenCode Zen
|
||||
|
||||
Curated gateway. Models prefixed `opencode/`. Setup: `/connect` → "OpenCode
|
||||
Zen" → paste API key from `opencode.ai/auth`.
|
||||
|
||||
40+ models incl. Claude Opus/Sonnet/Haiku, GPT-5/Codex variants, Qwen, Gemini,
|
||||
MiniMax, GLM, free-tier betas.
|
||||
|
||||
Pricing: pay-as-you-go per 1M tokens. Claude Opus ~$5–25 per 1M (in/out).
|
||||
Cached reads/writes cheaper. Auto-reload $20 when balance < $5 (adjustable,
|
||||
disable-able).
|
||||
|
||||
Team features: roles (Admin/Member), per-member spend limits, model
|
||||
allow/deny workspace-wide, BYOK for OpenAI/Anthropic.
|
||||
|
||||
Privacy: US-hosted. Most paid models zero-retention. Free-tier betas may
|
||||
retain. Some NVIDIA endpoints log prompts.
|
||||
|
||||
## Custom OpenAI-compatible provider
|
||||
|
||||
For Ollama, LM Studio, OpenRouter, Groq, Together, vLLM, or anything
|
||||
OpenAI-API-compatible:
|
||||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"provider": {
|
||||
"ollama-local": {
|
||||
"npm": "@ai-sdk/openai-compatible",
|
||||
"name": "Ollama",
|
||||
"baseURL": "http://localhost:11434/v1",
|
||||
"models": {
|
||||
"qwen2.5-coder:32b": { "name": "Qwen 2.5 Coder 32B" },
|
||||
"llama3.3:70b": { "name": "Llama 3.3 70B" }
|
||||
}
|
||||
},
|
||||
"lmstudio": {
|
||||
"npm": "@ai-sdk/openai-compatible",
|
||||
"baseURL": "http://localhost:1234/v1",
|
||||
"models": { "google/gemma-3n-e4b": {} }
|
||||
},
|
||||
"openrouter": {
|
||||
"npm": "@ai-sdk/openai-compatible",
|
||||
"baseURL": "https://openrouter.ai/api/v1",
|
||||
"apiKey": "{env:OPENROUTER_API_KEY}",
|
||||
"models": {
|
||||
"anthropic/claude-3.5-sonnet": {},
|
||||
"deepseek/deepseek-r1": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"model": "ollama-local/qwen2.5-coder:32b"
|
||||
}
|
||||
```
|
||||
|
||||
Then run `/connect` → "Other" if you want the `auth.json` flow to remember the
|
||||
provider id, or just rely on the inline config.
|
||||
|
||||
## Provider-level options
|
||||
|
||||
```json
|
||||
{ "provider": {
|
||||
"anthropic": {
|
||||
"timeout": 600000,
|
||||
"options": { "cacheControl": true },
|
||||
"models": { "claude-sonnet-4-5": { "name": "Sonnet 4.5" } }
|
||||
}
|
||||
} }
|
||||
```
|
||||
|
||||
`disabled_providers` / `enabled_providers` at top level allow/blocklist
|
||||
entire providers (useful in restricted enterprise environments).
|
||||
|
||||
## MCP servers
|
||||
|
||||
Schema:
|
||||
```json
|
||||
{ "mcp": { "<server-name>": {
|
||||
"type": "local" | "remote",
|
||||
"enabled": true,
|
||||
"timeout": 5000,
|
||||
/* local: */ "command": ["..."], "environment": {},
|
||||
/* remote: */ "url": "https://...", "headers": {}, "oauth": {}
|
||||
} } }
|
||||
```
|
||||
|
||||
### Local (stdio)
|
||||
|
||||
```json
|
||||
{ "mcp": {
|
||||
"filesystem": {
|
||||
"type": "local",
|
||||
"command": ["npx", "-y", "@modelcontextprotocol/server-filesystem", "/tmp", "/srv/data"],
|
||||
"environment": {},
|
||||
"enabled": true,
|
||||
"timeout": 5000
|
||||
}
|
||||
} }
|
||||
```
|
||||
|
||||
### Remote (HTTP / SSE)
|
||||
|
||||
```json
|
||||
{ "mcp": {
|
||||
"context7": {
|
||||
"type": "remote",
|
||||
"url": "https://mcp.context7.com/mcp",
|
||||
"headers": { "CONTEXT7_API_KEY": "{env:CONTEXT7_API_KEY}" },
|
||||
"enabled": true
|
||||
},
|
||||
"sentry": {
|
||||
"type": "remote",
|
||||
"url": "https://mcp.sentry.dev/mcp",
|
||||
"oauth": {}
|
||||
},
|
||||
"gh_grep": {
|
||||
"type": "remote",
|
||||
"url": "https://mcp.grep.app"
|
||||
}
|
||||
} }
|
||||
```
|
||||
|
||||
### OAuth flow
|
||||
|
||||
```bash
|
||||
opencode mcp auth <server-name> # complete browser auth
|
||||
opencode mcp list # see auth status
|
||||
opencode mcp logout <server-name>
|
||||
opencode mcp debug <server-name> # diagnose
|
||||
```
|
||||
|
||||
To bypass OAuth on a server that uses raw API keys: `"oauth": false`.
|
||||
With env-injected creds:
|
||||
```json
|
||||
{ "oauth": {
|
||||
"clientId": "{env:CLIENT_ID}",
|
||||
"clientSecret": "{env:CLIENT_SECRET}",
|
||||
"scope": "tools:read tools:execute"
|
||||
} }
|
||||
```
|
||||
|
||||
### Tool gating
|
||||
|
||||
MCP tools register under their server name. Gate them like normal tools:
|
||||
|
||||
Globally disable a server's tools:
|
||||
```json
|
||||
{ "tools": { "filesystem*": false } }
|
||||
```
|
||||
|
||||
Enable only for one agent:
|
||||
```json
|
||||
{ "agent": { "explorer": { "tools": { "filesystem*": true } } } }
|
||||
```
|
||||
|
||||
Glob: `*` (any), `?` (one). MCP tools cost context tokens — only enable per-agent
|
||||
where actually needed.
|
||||
|
||||
## Pitfalls
|
||||
|
||||
- Setting `apiKey` inline in `opencode.json` then committing the file leaks
|
||||
the key. Always use `{env:...}` or `{file:...}`.
|
||||
- `enabled_providers` is an **allowlist**: setting it disables every provider
|
||||
not listed, including ones the user has authed via `/connect`.
|
||||
- OAuth-secured MCP servers fail silently if the cached token expires —
|
||||
re-run `opencode mcp auth` rather than restarting.
|
||||
- Local MCP servers that block on `npx -y` first-run can blow past the 5000ms
|
||||
default `timeout` — bump it to 15000 for first launch.
|
||||
- Mixing `model: "openai/gpt-5/high"` with a `provider.openai.models.gpt-5`
|
||||
override that doesn't define `variants.high` resolves to the bare model
|
||||
(silently drops `high`).
|
||||
@@ -0,0 +1,426 @@
|
||||
# `opencode serve` — HTTP API Reference
|
||||
|
||||
`opencode serve` runs the same backend the TUI uses, headless, with an OpenAPI
|
||||
3.1 surface. Multiple clients (TUI, IDE extension, SDK, curl) can attach to one
|
||||
instance simultaneously.
|
||||
|
||||
> Source: <https://opencode.ai/docs/server/>. The OpenAPI spec is the source of
|
||||
> truth for shapes — fetch it from `/doc` on a running instance to see field
|
||||
> types.
|
||||
|
||||
## 1. Startup
|
||||
|
||||
```
|
||||
opencode serve [--port <n>] [--hostname <addr>] [--cors <origin>] [--mdns] [--mdns-domain <name>]
|
||||
```
|
||||
|
||||
| Flag | Default | Notes |
|
||||
| ---------------- | -------------- | ---------------------------------------- |
|
||||
| `--port` | `4096` | Listen port |
|
||||
| `--hostname` | `127.0.0.1` | Bind address. Set `0.0.0.0` for LAN. |
|
||||
| `--cors` | none | Repeatable; allowlists browser origins |
|
||||
| `--mdns` | off | Advertise on local network |
|
||||
| `--mdns-domain` | `opencode.local` | mDNS service name |
|
||||
|
||||
> When you run plain `opencode`, the TUI launches and a server starts in-process.
|
||||
> The TUI is just one of its clients. `opencode serve` is "TUI-less mode."
|
||||
|
||||
## 2. Authentication
|
||||
|
||||
HTTP Basic Auth. **Always set a password — without one the server is open.**
|
||||
|
||||
```bash
|
||||
export OPENCODE_SERVER_PASSWORD="$(openssl rand -hex 24)"
|
||||
export OPENCODE_SERVER_USERNAME="opencode" # default; optional
|
||||
opencode serve --port 4096
|
||||
```
|
||||
|
||||
Applies to both `serve` and `web` commands. All endpoints require auth except
|
||||
the static OpenAPI viewer at `/doc` (the spec itself is fetchable for SDK
|
||||
generation).
|
||||
|
||||
curl pattern:
|
||||
```bash
|
||||
curl -u "$OPENCODE_SERVER_USERNAME:$OPENCODE_SERVER_PASSWORD" \
|
||||
http://127.0.0.1:4096/global/health
|
||||
```
|
||||
|
||||
## 3. CORS
|
||||
|
||||
Repeat `--cors` for each browser origin. Anything not listed is rejected.
|
||||
|
||||
```bash
|
||||
opencode serve \
|
||||
--cors http://localhost:5173 \
|
||||
--cors https://app.example.com
|
||||
```
|
||||
|
||||
Same-origin clients (other CLIs, the TUI, the SDK) don't need this — CORS only
|
||||
gates browsers.
|
||||
|
||||
## 4. mDNS
|
||||
|
||||
```
|
||||
opencode serve --mdns --mdns-domain my-team-opencode.local
|
||||
```
|
||||
|
||||
Useful for IDE extensions/SDKs that auto-discover a running instance on the
|
||||
LAN without a hardcoded URL. Don't enable in untrusted networks.
|
||||
|
||||
## 5. OpenAPI
|
||||
|
||||
Live spec: `http://<host>:<port>/doc`. Open in Swagger UI or feed to
|
||||
`openapi-typescript-codegen` to regenerate clients. The official TS SDK
|
||||
(`@opencode-ai/sdk`) is auto-generated from this spec.
|
||||
|
||||
## 6. Endpoint catalog
|
||||
|
||||
All paths relative to the server's root URL.
|
||||
|
||||
### 6.1. Global
|
||||
|
||||
| Method | Path | Purpose |
|
||||
| ------ | ---------------- | ----------------------------------------- |
|
||||
| GET | `/global/health` | `{ healthy: true, version: string }` |
|
||||
| GET | `/global/event` | SSE stream; first event `server.connected` |
|
||||
|
||||
### 6.2. Project / environment
|
||||
|
||||
| Method | Path | Purpose |
|
||||
| ------ | ----------------- | ---------------------------------- |
|
||||
| GET | `/project` | List all projects |
|
||||
| GET | `/project/current`| Active project detail |
|
||||
| GET | `/path` | Working directory of the server |
|
||||
| GET | `/vcs` | VCS info for the active project |
|
||||
|
||||
### 6.3. Configuration
|
||||
|
||||
| Method | Path | Purpose |
|
||||
| ------ | ------------------- | -------------------------------------------- |
|
||||
| GET | `/config` | Effective merged config |
|
||||
| PATCH | `/config` | Patch settings live |
|
||||
| GET | `/config/providers` | `{ providers: Provider[], default: {…} }` |
|
||||
|
||||
### 6.4. Providers & auth
|
||||
|
||||
| Method | Path | Purpose |
|
||||
| ------ | ------------------------------------- | -------------------------------------- |
|
||||
| GET | `/provider` | All / default / connected providers |
|
||||
| GET | `/provider/auth` | Auth methods per provider |
|
||||
| POST | `/provider/{id}/oauth/authorize` | Start OAuth — returns authorize URL |
|
||||
| POST | `/provider/{id}/oauth/callback` | Body `{ code, state }` → `boolean` |
|
||||
| PUT | `/auth/:id` | Set raw credentials (provider schema) |
|
||||
|
||||
### 6.5. Sessions (core)
|
||||
|
||||
| Method | Path | Purpose |
|
||||
| ------ | ----------------------------------------------- | ------- |
|
||||
| GET | `/session` | List sessions |
|
||||
| POST | `/session` | Create. Body `{ parentID?, title? }` |
|
||||
| GET | `/session/status` | Status map of all sessions |
|
||||
| GET | `/session/:id` | Fetch session |
|
||||
| PATCH | `/session/:id` | Update title (`{ title? }`) |
|
||||
| DELETE | `/session/:id` | Delete session + data |
|
||||
| GET | `/session/:id/children` | Forks of this session |
|
||||
| GET | `/session/:id/todo` | Session todo list |
|
||||
| POST | `/session/:id/init` | Run `/init`. Body `{ messageID, providerID, modelID }` |
|
||||
| POST | `/session/:id/fork` | Branch at message. Body `{ messageID? }` |
|
||||
| POST | `/session/:id/abort` | Stop a running session |
|
||||
| POST | `/session/:id/share` | Enable share — returns share token |
|
||||
| DELETE | `/session/:id/share` | Disable share |
|
||||
| GET | `/session/:id/diff?messageID=<id>` | File diffs |
|
||||
| POST | `/session/:id/summarize` | `{ providerID, modelID }` |
|
||||
| POST | `/session/:id/revert` | `{ messageID, partID? }` |
|
||||
| POST | `/session/:id/unrevert` | Restore reverts |
|
||||
| POST | `/session/:id/permissions/:permissionID` | `{ response, remember? }` — answer permission prompts |
|
||||
|
||||
### 6.6. Messages / prompts
|
||||
|
||||
| Method | Path | Purpose |
|
||||
| ------ | ------------------------------------------------- | ------- |
|
||||
| GET | `/session/:id/message?limit=<n>` | Paginated messages with parts |
|
||||
| POST | `/session/:id/message` | Send and **wait** for reply |
|
||||
| GET | `/session/:id/message/:messageID` | `{ info, parts }` |
|
||||
| POST | `/session/:id/prompt_async` | Send and return `204` (consume reply via SSE) |
|
||||
| POST | `/session/:id/command` | Run slash command. Body `{ messageID?, agent?, model?, command, arguments }` |
|
||||
| POST | `/session/:id/shell` | Run a raw shell. Body `{ agent, model?, command }` |
|
||||
|
||||
POST `/message` body fields (the canonical prompt envelope):
|
||||
```jsonc
|
||||
{
|
||||
"messageID": "optional-client-side-id",
|
||||
"model": "anthropic/claude-sonnet-4-5", // optional override
|
||||
"agent": "build", // optional
|
||||
"system": "extra system text", // optional
|
||||
"tools": ["read", "edit", "bash"], // optional allowlist
|
||||
"noReply": false, // true ⇒ no model call, just append
|
||||
"parts": [
|
||||
{ "type": "text", "text": "summarize README.md" },
|
||||
{ "type": "file", "path": "README.md" }
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### 6.7. Commands
|
||||
|
||||
| Method | Path | Purpose |
|
||||
| ------ | ----------- | ------- |
|
||||
| GET | `/command` | List slash commands available in this project |
|
||||
|
||||
### 6.8. Files & search
|
||||
|
||||
| Method | Path | Purpose |
|
||||
| ------ | ------------------------------------ | ------- |
|
||||
| GET | `/find?pattern=<re>` | Regex content search; returns paths + lines + offsets + submatches |
|
||||
| GET | `/find/file?query=<q>&type=<file\|directory>&directory=<d>&limit=<1-200>` | Fuzzy file/dir search |
|
||||
| GET | `/find/symbol?query=<q>` | Workspace symbol search (LSP-backed) |
|
||||
| GET | `/file?path=<dir>` | Directory listing as `FileNode[]` |
|
||||
| GET | `/file/content?path=<p>` | Read file content |
|
||||
| GET | `/file/status` | VCS status of tracked files |
|
||||
|
||||
### 6.9. Tools (experimental)
|
||||
|
||||
| Method | Path | Purpose |
|
||||
| ------ | ------------------------------------------- | ------- |
|
||||
| GET | `/experimental/tool/ids` | All tool IDs |
|
||||
| GET | `/experimental/tool?provider=<p>&model=<m>` | Tools + JSON schemas for a model |
|
||||
|
||||
### 6.10. LSP / formatters / MCP
|
||||
|
||||
| Method | Path | Purpose |
|
||||
| ------ | ------------ | ------- |
|
||||
| GET | `/lsp` | Status of every language server |
|
||||
| GET | `/formatter` | Status of every formatter |
|
||||
| GET | `/mcp` | Per-server MCP status |
|
||||
| POST | `/mcp` | Add an MCP server live: `{ name, config }` |
|
||||
|
||||
### 6.11. Agents
|
||||
|
||||
| Method | Path | Purpose |
|
||||
| ------ | -------- | ------------------------ |
|
||||
| GET | `/agent` | List available agents |
|
||||
|
||||
### 6.12. Logging
|
||||
|
||||
| Method | Path | Purpose |
|
||||
| ------ | ------ | ------- |
|
||||
| POST | `/log` | `{ service, level, message, extra? }` — push entry into server log |
|
||||
|
||||
### 6.13. TUI control (used by IDE extensions)
|
||||
|
||||
| Method | Path | Purpose |
|
||||
| ------ | -------------------------- | ------- |
|
||||
| POST | `/tui/append-prompt` | Append text to prompt buffer |
|
||||
| POST | `/tui/clear-prompt` | Clear prompt buffer |
|
||||
| POST | `/tui/submit-prompt` | Send the buffer as a prompt |
|
||||
| POST | `/tui/open-help` | Show help dialog |
|
||||
| POST | `/tui/open-sessions` | Show session selector |
|
||||
| POST | `/tui/open-themes` | Show theme selector |
|
||||
| POST | `/tui/open-models` | Show model selector |
|
||||
| POST | `/tui/execute-command` | `{ command }` |
|
||||
| POST | `/tui/show-toast` | `{ title?, message, variant }` |
|
||||
| GET | `/tui/control/next` | Long-poll for next control request |
|
||||
| POST | `/tui/control/response` | `{ body }` — answer the control request |
|
||||
|
||||
### 6.14. Instance lifecycle
|
||||
|
||||
| Method | Path | Purpose |
|
||||
| ------ | ------------------- | ----------------------- |
|
||||
| POST | `/instance/dispose` | Shut the instance down |
|
||||
|
||||
### 6.15. Events (SSE)
|
||||
|
||||
| Method | Path | Purpose |
|
||||
| ------ | ----------- | ------- |
|
||||
| GET | `/event` | Typed event bus (sessions, messages, tool calls, permissions). First frame: `server.connected` |
|
||||
| GET | `/global/event` | Global event bus (instance-wide signals) |
|
||||
|
||||
Subscribe via standard SSE: `text/event-stream`, one JSON-encoded event per
|
||||
line. Use this with `/session/:id/prompt_async` to drive prompts without
|
||||
blocking on POST `/message`.
|
||||
|
||||
## 7. Permission flow
|
||||
|
||||
When an agent hits a tool guarded by `ask`, the server raises a permission
|
||||
event on `/event`. The client must POST to
|
||||
`/session/:id/permissions/:permissionID`:
|
||||
```json
|
||||
{ "response": "allow", "remember": true }
|
||||
```
|
||||
`response` ∈ `allow | deny | ask`. `remember: true` persists the answer for the
|
||||
session.
|
||||
|
||||
In headless mode without a client answering, the request hangs until aborted.
|
||||
For CI, set the relevant permissions to `allow`/`deny` upfront — never `ask`.
|
||||
|
||||
## 8. Curl recipes
|
||||
|
||||
All examples assume:
|
||||
```bash
|
||||
HOST=127.0.0.1:4096
|
||||
AUTH=opencode:$OPENCODE_SERVER_PASSWORD
|
||||
```
|
||||
|
||||
Health check:
|
||||
```bash
|
||||
curl -u "$AUTH" "http://$HOST/global/health"
|
||||
```
|
||||
|
||||
Create a session and send one message synchronously:
|
||||
```bash
|
||||
SID=$(curl -s -u "$AUTH" -X POST "http://$HOST/session" \
|
||||
-H 'content-type: application/json' \
|
||||
-d '{"title":"audit-readme"}' | jq -r .id)
|
||||
|
||||
curl -u "$AUTH" -X POST "http://$HOST/session/$SID/message" \
|
||||
-H 'content-type: application/json' \
|
||||
-d '{
|
||||
"model": "anthropic/claude-sonnet-4-5",
|
||||
"agent": "build",
|
||||
"parts": [{"type":"text","text":"Audit README.md for broken links."}]
|
||||
}'
|
||||
```
|
||||
|
||||
Async send + tail SSE:
|
||||
```bash
|
||||
# Terminal A — subscribe
|
||||
curl -u "$AUTH" -N "http://$HOST/event"
|
||||
|
||||
# Terminal B — fire and forget
|
||||
curl -u "$AUTH" -X POST "http://$HOST/session/$SID/prompt_async" \
|
||||
-H 'content-type: application/json' \
|
||||
-d '{"agent":"build","parts":[{"type":"text","text":"List repo TODOs."}]}'
|
||||
```
|
||||
|
||||
Run a slash command via API:
|
||||
```bash
|
||||
curl -u "$AUTH" -X POST "http://$HOST/session/$SID/command" \
|
||||
-H 'content-type: application/json' \
|
||||
-d '{"command":"test","arguments":["unit"]}'
|
||||
```
|
||||
|
||||
Add an MCP server live (no restart):
|
||||
```bash
|
||||
curl -u "$AUTH" -X POST "http://$HOST/mcp" \
|
||||
-H 'content-type: application/json' \
|
||||
-d '{
|
||||
"name":"context7",
|
||||
"config":{
|
||||
"type":"remote",
|
||||
"url":"https://mcp.context7.com/mcp",
|
||||
"headers":{"CONTEXT7_API_KEY":"'"$CONTEXT7_API_KEY"'"}
|
||||
}
|
||||
}'
|
||||
```
|
||||
|
||||
Drive a remote TUI (toast + submit a prompt):
|
||||
```bash
|
||||
curl -u "$AUTH" -X POST "http://$HOST/tui/show-toast" \
|
||||
-H 'content-type: application/json' \
|
||||
-d '{"variant":"info","message":"Build kicking off"}'
|
||||
|
||||
curl -u "$AUTH" -X POST "http://$HOST/tui/append-prompt" \
|
||||
-H 'content-type: application/json' \
|
||||
-d '{"text":"explain the failing test in src/foo.test.ts"}'
|
||||
|
||||
curl -u "$AUTH" -X POST "http://$HOST/tui/submit-prompt"
|
||||
```
|
||||
|
||||
Symbol search:
|
||||
```bash
|
||||
curl -u "$AUTH" "http://$HOST/find/symbol?query=parseConfig"
|
||||
```
|
||||
|
||||
File search (paths only):
|
||||
```bash
|
||||
curl -u "$AUTH" "http://$HOST/find/file?query=user&type=file&limit=50"
|
||||
```
|
||||
|
||||
Regex content search:
|
||||
```bash
|
||||
curl -u "$AUTH" "http://$HOST/find?pattern=TODO%5Cs%2A%3A"
|
||||
```
|
||||
|
||||
Read file content:
|
||||
```bash
|
||||
curl -u "$AUTH" "http://$HOST/file/content?path=src/index.ts"
|
||||
```
|
||||
|
||||
Shut the server down cleanly:
|
||||
```bash
|
||||
curl -u "$AUTH" -X POST "http://$HOST/instance/dispose"
|
||||
```
|
||||
|
||||
## 9. SDK shortcut
|
||||
|
||||
```typescript
|
||||
import { createOpencodeClient } from "@opencode-ai/sdk"
|
||||
|
||||
const client = createOpencodeClient({
|
||||
baseURL: "http://127.0.0.1:4096",
|
||||
auth: { user: "opencode", pass: process.env.OPENCODE_SERVER_PASSWORD! },
|
||||
})
|
||||
|
||||
const session = await client.session.create({ title: "ci-run" })
|
||||
const reply = await client.session.message({
|
||||
sessionID: session.id,
|
||||
agent: "build",
|
||||
parts: [{ type: "text", text: "summarize README.md" }],
|
||||
})
|
||||
|
||||
client.events.subscribe(session.id, (e) => console.log(e.type, e.payload))
|
||||
```
|
||||
|
||||
Types are generated from `/doc`, so the client's surface mirrors the endpoint
|
||||
catalog above 1:1.
|
||||
|
||||
## 10. Architecture & integration patterns
|
||||
|
||||
- **TUI-as-client**: `opencode` (no `serve`) starts both the server and the
|
||||
TUI client; the TUI talks to the local server over the same HTTP API.
|
||||
- **IDE extensions**: VS Code/Cursor/Windsurf/Codium attach to a running
|
||||
instance and drive the running TUI via `/tui/*` endpoints (prefill prompt,
|
||||
submit, watch results via `/event`).
|
||||
- **CI / batch**: spawn `opencode serve` once at job start, fire off prompts
|
||||
with `/session` + `/prompt_async`, drain `/event`, dispose at end.
|
||||
- **Multi-user**: don't. Sessions are per-user state with no built-in tenant
|
||||
isolation. For team servers use a per-user gateway / proxy that pins each
|
||||
user to their own server instance.
|
||||
- **Live config edit**: `PATCH /config` lets you flip `model`, `permission`,
|
||||
`mcp`, etc. without restart — handy for ops dashboards.
|
||||
|
||||
## 11. Security checklist
|
||||
|
||||
- [ ] `OPENCODE_SERVER_PASSWORD` is set and not a default
|
||||
- [ ] `--hostname 127.0.0.1` unless intentionally LAN-exposed
|
||||
- [ ] `--cors` lists only specific origins (no `*`)
|
||||
- [ ] `--mdns` off in shared/untrusted networks
|
||||
- [ ] `permission.bash`, `permission.edit`, `permission.external_directory`
|
||||
explicitly set — `ask` doesn't work headless
|
||||
- [ ] `share: "disabled"` for projects with sensitive code
|
||||
- [ ] `OPENCODE_DISABLE_CLAUDE_CODE_SKILLS=1` if you don't want
|
||||
`~/.claude/skills/` auto-loaded into server-mode sessions
|
||||
- [ ] Front the server with TLS (nginx/caddy) if remoting it; the built-in
|
||||
listener does plain HTTP
|
||||
- [ ] `/instance/dispose` is reachable from any authed client — anyone with
|
||||
the password can shut your CI server down
|
||||
|
||||
## 12. Pitfalls
|
||||
|
||||
- Setting `OPENCODE_SERVER_PASSWORD` after start has no effect — set it before
|
||||
`serve`.
|
||||
- Without auth env vars, the server still starts but is unauthenticated.
|
||||
**Bug-shaped, not a feature.** Always set the password.
|
||||
- `POST /session/:id/message` blocks until the model finishes. For long runs
|
||||
use `prompt_async` + `/event`.
|
||||
- `POST /tui/submit-prompt` triggers the **currently running TUI**. If no TUI
|
||||
is attached (pure `serve`), it no-ops silently.
|
||||
- `PATCH /config` partial-merges top-level keys but **replaces** nested objects
|
||||
(`permission.bash`, etc.) — same gotcha as the file-based config.
|
||||
- The `/find` regex is server-side; URL-encode special chars (`%5C` for `\`,
|
||||
`%2A` for `*`, `%2B` for `+`). Forgetting to encode silently drops chars.
|
||||
- `POST /mcp` adds a server but doesn't auto-`opencode mcp auth` it — you
|
||||
still need to complete OAuth out-of-band.
|
||||
- `OPENCODE_API_KEY` and provider-specific keys must be set in the **server's**
|
||||
environment, not the client's. The client just talks to the server; the
|
||||
server makes outbound model calls.
|
||||
225
personas/_shared/community-skills/pentest-reporter/SKILL.md
Normal file
225
personas/_shared/community-skills/pentest-reporter/SKILL.md
Normal file
@@ -0,0 +1,225 @@
|
||||
---
|
||||
name: pentest-reporter
|
||||
description: Generate professional <COMPANY>-format pentest reports following the canonical "Sızma Testi Raporu" template (Turkish defense-client schema). Triggers on pentest report, sızma testi raporu, write report, scan results, findings, executive summary, müşteri raporu, final pentest, rapor hazırla.
|
||||
---
|
||||
|
||||
# Pentest Reporter — <COMPANY> Canonical Schema
|
||||
|
||||
**Canonical template** (must be followed exactly):
|
||||
`<SCANS_ROOT>/<client>/Sizma_Testi_Örnek.docx`
|
||||
(Master archived in any client engagement folder; backup with date suffix before edit.)
|
||||
|
||||
This is the **single source of truth** for all <COMPANY> deliverables. Schema established 2026-04-20 (Aras EDAŞ engagement). Every Turkish-defense-client report MUST mirror this structure 1:1 — sections, table layouts, finding-card format, fonts (Roboto + RobotoMono), colour bands.
|
||||
|
||||
## Report Schema (21 tables, 9 sections)
|
||||
|
||||
```
|
||||
COVER PAGE
|
||||
├── "Sızma Testi Raporu" (title)
|
||||
└── "GİZLİ" + dağıtım uyarısı (red banner)
|
||||
|
||||
SECTION 1 — Gizlilik Beyanı (Confidentiality Declaration)
|
||||
SECTION 2 — Önemli Uyarı (Important Notice)
|
||||
SECTION 3 — Yasal Sorumluluklar (Legal Responsibilities)
|
||||
SECTION 4 — İletişim Bilgileri ve Test Ekibi
|
||||
└── TABLE 0: Kişi Adı | Ünvan | Sertifikalar (2 rows)
|
||||
SECTION 5 — Doküman ve Sürüm Kontrolü
|
||||
├── TABLE 1: Doküman Kontrolü (11 rows × 2 cols)
|
||||
│ [Doküman Başlığı, Doküman No, İlk Yayın Tarihi, Revizyon No,
|
||||
│ Son Revizyon Tarihi, Toplam Sayfa Sayısı, Hazırlayan, Onaylayan,
|
||||
│ Sınıflandırma, Geçerlilik, Dağıtım]
|
||||
└── TABLE 2: Sürüm Kontrolü (Sürüm | Tarih | Hazırlayan | Açıklama)
|
||||
SECTION 6 — İçindekiler (auto TOC)
|
||||
SECTION 7 — Çalışmaların Özeti (3-paragraph intro: scope, 3-phase methodology, value)
|
||||
SECTION 8 — Test Metodolojisi
|
||||
├── 8.1 Genel Süreç (Planlama→Keşif→Tarama→Zafiyet Analizi→İstismar→Raporlama→Doğrulama)
|
||||
├── 8.2 Dış Ağ Testleri
|
||||
├── 8.3 Yerel Ağ Testleri
|
||||
├── 8.4 Kablosuz Ağ Testleri
|
||||
├── 8.5 Sosyal Mühendislik Testleri
|
||||
└── 8.6 Hizmet Reddi (DDoS) Testleri
|
||||
SECTION 9 — Risk Ölçeği
|
||||
├── TABLE 3: Risk Seviyesi → Açıklama (6 rows: Acil/Kritik/Yüksek/Orta/Düşük/Bilgi)
|
||||
├── 9.1 Risk Değerlendirmesi
|
||||
├── 9.2 İstismar Edilme İhtimali (4 faktör)
|
||||
├── 9.3 Etki (Gizlilik/Bütünlük/Erişilebilirlik)
|
||||
├── TABLE 4: Kapsam (Sistem Adı | Erişim Bilgisi | Kullanıcı | Nokta)
|
||||
└── TABLE 5: Sızma Testi Ekibi IP Adresleri (Sistem | Erişim Bilgisi | Erişim Noktası)
|
||||
SECTION 10 — Kuruluş Desteği (teşekkür paragrafı)
|
||||
SECTION 11 — Yönetici Özeti
|
||||
├── Hitap paragrafı ("[Müşteri] Yetkilisinin Dikkatine;")
|
||||
├── Tarih + bulgu sayı özeti ("X kritik, Y yüksek, Z orta, W düşük")
|
||||
├── 11.1 Güvenlik Açıkları Kategorisel Dağılımı
|
||||
│ └── TABLE 6: Risk Dağılımı (3 rows × 6 cols: Risk|Kritik|Yüksek|Orta|Düşük|Toplam)
|
||||
├── 11.2 Tavsiye Özeti
|
||||
├── 11.3 Acil Eylem Planı (5 madde: Önceliklendirme, Web/Sistem İyileştirme, Politika+Eğitim, İzleme, Yedekleme)
|
||||
└── 11.4 Güvenlik Açıkları Listelenmesi
|
||||
└── TABLE 7: Bulgu Listesi (Bulgu Adı | Risk Seviyesi | Bulgu Kategorisi)
|
||||
SECTION 12 — Keşif Çalışmaları
|
||||
├── DNS/IP/Kullanıcı keşfi paragrafı
|
||||
├── Tespit Edilen Aktif Host Listesi
|
||||
│ ├── 12.1 Dahili / AD Altyapısı
|
||||
│ │ └── TABLE 8 (IP | Rol/Hizmet Notları | Kaynak)
|
||||
│ ├── 12.2 İş İstasyonları ve SMB Sunucuları
|
||||
│ │ └── TABLE 9 (IP | Belirlenen Host Adı / Rol | Kaynak)
|
||||
│ ├── 12.3 VoIP / Güvenlik Cihazları
|
||||
│ │ └── TABLE 10 (IP Adresleri | Ortak Hizmetler/Rol | Kaynak)
|
||||
│ └── 12.4 Diğer Alt Ağlar
|
||||
│ └── TABLE 11 (IP | Açıklama | Kaynak)
|
||||
SECTION 13 — İç Ağ Testleri (Findings I1..In)
|
||||
├── 13.0 Test Çalışmalarının Özeti (Black-Box, OWASP+NIST, araç güncelliği, Acil Eylem)
|
||||
└── For each finding I<N>:
|
||||
├── Heading 2: "I<N> – <Bulgu Adı>"
|
||||
├── Heading 3: "Bulgu Kanıtı:"
|
||||
├── Komut/çıktı bloğu (kod biçemi, RobotoMono)
|
||||
└── TABLE 12+: Bulgu Kartı (5 rows × 2 cols)
|
||||
R0: Seviye | KRİTİK / YÜKSEK / ORTA / DÜŞÜK / BİLGİ
|
||||
R1: Açıklama Ve Etki| Tanım: ... | Etki: ...
|
||||
R2: Referans | URL/CVE/CWE listesi
|
||||
R3: Çözüm Önerisi | Birincil + İkincil çözüm
|
||||
R4: Etkilenen Sistemler | IP listesi
|
||||
SECTION 14 — Dış Ağ Testleri (varsa, aynı I-card formatı, prefix "E<N>")
|
||||
SECTION 15 — Web Uygulama Testleri (varsa, "W<N>")
|
||||
SECTION 16 — Raporda Geçen Teknik Terimler
|
||||
└── TABLE 18: Terim | Açıklama (22 rows std)
|
||||
SECTION 17 — Raporda Geçen Kısaltmalar
|
||||
└── TABLE 19: Kısaltma | Açılım | Türkçesi (57 rows std)
|
||||
SECTION 18 — Testler Esnasında Kullanılan Araçlar
|
||||
└── TABLE 20: Aracın İsmi | Kategori | Web Adresi (81 rows std)
|
||||
```
|
||||
|
||||
## Severity Color Bands (cell fill in finding cards)
|
||||
|
||||
| Seviye | Hex | Use |
|
||||
|--------|-----|-----|
|
||||
| ACİL | `#7B1F1F` (dark red) | Reserved for active malware/C2 |
|
||||
| KRİTİK | `#C0392B` (red) | RCE, full domain compromise, DA on EOL DC |
|
||||
| YÜKSEK | `#E67E22` (orange) | Privesc, kerberoast DA, unconstrained delegation |
|
||||
| ORTA | `#F1C40F` (yellow) | Info disclosure, weak crypto, missing headers |
|
||||
| DÜŞÜK | `#3498DB` (blue) | RPC info, SSL pref, expired-cert non-prod |
|
||||
| BİLGİ | `#7F8C8D` (gray) | Version banner, open port, OS guess |
|
||||
|
||||
## CVSS Mapping
|
||||
|
||||
| CVSS 3.1 | Seviye |
|
||||
|----------|--------|
|
||||
| 9.0–10.0 | KRİTİK |
|
||||
| 7.0–8.9 | YÜKSEK |
|
||||
| 4.0–6.9 | ORTA |
|
||||
| 0.1–3.9 | DÜŞÜK |
|
||||
| 0.0 | BİLGİ |
|
||||
|
||||
(ACİL is a <COMPANY> qualitative escalation — used only for **active intrusion evidence** like C2 beacons / live worms detected during the scan.)
|
||||
|
||||
## Document Control Defaults
|
||||
|
||||
| Alan | Varsayılan |
|
||||
|------|-----------|
|
||||
| Doküman Başlığı | "<Müşteri> Sızma Testi Raporu" |
|
||||
| Doküman No | "ST-<DDMMYY>" (engagement start date) |
|
||||
| İlk Yayın Tarihi | engagement closing date (DD.MM.YYYY) |
|
||||
| Revizyon No | "-" first issue, "1.1" / "1.2" sonrası |
|
||||
| Hazırlayan | "<COMPANY>" |
|
||||
| Onaylayan | "<<COMPANY> proje yöneticisi>" |
|
||||
| Sınıflandırma | "GİZLİ" |
|
||||
| Geçerlilik | "12 ay" (yeniden test gerektirir) |
|
||||
| Dağıtım | "Müşteri ve <COMPANY> sınırlı dağıtım" |
|
||||
|
||||
## Sürüm Kontrolü Defaults
|
||||
|
||||
```
|
||||
| Sürüm | Tarih | Hazırlayan | Açıklama |
|
||||
| V1.0 | DD.MM.YYYY | <COMPANY> | İlk yayın |
|
||||
| V1.1 | DD.MM.YYYY | <COMPANY> | <revizyon konusu> |
|
||||
```
|
||||
|
||||
## Workflow
|
||||
|
||||
```dot
|
||||
digraph reporter {
|
||||
start [label="Müşteri raporu hazırla isteği"];
|
||||
read_template [label="1. Sizma_Testi_Örnek.docx oku\n (python-docx ile)"];
|
||||
collect_data [label="2. Tüm scan/log/rapor verileri topla\n (10+ paralel agent dispatch)"];
|
||||
classify [label="3. Bulguları KRİTİK/YÜKSEK/ORTA/DÜŞÜK/BİLGİ\n sınıflandır + CVSS ata"];
|
||||
build [label="4. Python jeneratör çalıştır\n (template klon + tablo doldur)"];
|
||||
manual [label="5. Word'de elle rötuş\n (renk bantları, başlık formatı, sayfa kırma)"];
|
||||
deliver [label="6. PDF export + GİZLİ damga + dağıtım"];
|
||||
|
||||
start -> read_template -> collect_data -> classify -> build -> manual -> deliver;
|
||||
}
|
||||
```
|
||||
|
||||
## Python Generator Pattern
|
||||
|
||||
Use `python-docx` to clone the template and replace text + table cells, **never** rebuild from scratch. This preserves Roboto/RobotoMono fonts, theme colours, header/footer, and page numbering.
|
||||
|
||||
```python
|
||||
from docx import Document
|
||||
from copy import deepcopy
|
||||
|
||||
doc = Document('Sizma_Testi_Örnek.docx')
|
||||
|
||||
# 1. Replace cover page client name
|
||||
for p in doc.paragraphs:
|
||||
if 'Soler Palau' in p.text or '[CLIENT]' in p.text:
|
||||
for run in p.runs:
|
||||
run.text = run.text.replace('Soler Palau', client_name)
|
||||
|
||||
# 2. Update document control table (Table 1)
|
||||
table_doc = doc.tables[1]
|
||||
table_doc.cell(0, 1).text = f"{client_name} Sızma Testi Raporu"
|
||||
table_doc.cell(1, 1).text = f"ST-{engagement_id}"
|
||||
# ... per template default
|
||||
|
||||
# 3. Replace risk distribution table (Table 6)
|
||||
table_risk = doc.tables[6]
|
||||
table_risk.cell(1, 1).text = str(critical_count)
|
||||
# ...
|
||||
|
||||
# 4. For each finding, deepcopy the I1 finding card table and append
|
||||
template_card = deepcopy(doc.tables[12]) # I1 card as template
|
||||
for finding in findings:
|
||||
new_card = deepcopy(template_card)
|
||||
new_card.cell(0, 1).text = finding['severity']
|
||||
new_card.cell(1, 1).text = f"Tanım: {finding['description']} | Etki: {finding['impact']}"
|
||||
new_card.cell(2, 1).text = '\n'.join(finding['references'])
|
||||
new_card.cell(3, 1).text = finding['remediation']
|
||||
new_card.cell(4, 1).text = '\n'.join(finding['affected_hosts'])
|
||||
# Insert after I_N heading paragraph
|
||||
insert_table_after(doc, new_card, anchor_para)
|
||||
|
||||
doc.save(f'{client_name}_Sizma_Testi_Raporu_{date}.docx')
|
||||
```
|
||||
|
||||
## Checklist (must-pass before delivery)
|
||||
|
||||
- [ ] Template original yedeklendi (`<name>_BACKUP_<YYYYMMDD_HHMMSS>.docx`)
|
||||
- [ ] Cover page müşteri ismi değiştirildi (Soler Palau → <Müşteri>)
|
||||
- [ ] "GİZLİ" banner korundu, dağıtım uyarısı korundu
|
||||
- [ ] Sections 1-3 (Gizlilik/Uyarı/Yasal) DEĞİŞMEDEN korundu — <COMPANY> hukuki standart metni
|
||||
- [ ] Doküman Kontrolü tablosu güncel (yeni doküman no, tarih, sayfa sayısı)
|
||||
- [ ] Sürüm Kontrolü tablosu V1.0 satırı eklendi
|
||||
- [ ] Yönetici Özeti hitabı doğru müşteri yetkilisine yazıldı
|
||||
- [ ] Risk Dağılımı tablosu doğru sayılarla dolduruldu
|
||||
- [ ] Tavsiye Özeti + Acil Eylem Planı standart 5-madde + müşteri-özel cümle
|
||||
- [ ] Bulgu Listesi tablosu (TABLE 7) tüm I-card sayısı kadar satır
|
||||
- [ ] Her finding için bulgu kartı (5x2) doldurulmuş
|
||||
- [ ] Bulgu Kanıtı bölümü RAW komut+çıktı (RobotoMono kod bloğu)
|
||||
- [ ] IP adresleri / hostnames / hash'ler verbatim — değiştirilmemiş
|
||||
- [ ] Renk bantları severity'e göre uygulanmış
|
||||
- [ ] İçindekiler güncellenmiş (Word: F9 ile refresh)
|
||||
- [ ] Header/footer <COMPANY> logosu + sayfa no çalışıyor
|
||||
- [ ] PDF export "GİZLİ" damgası + dağıtım kuyruğu hazır
|
||||
|
||||
## Reference Engagements
|
||||
|
||||
- **Aras EDAŞ (2026-04)** — first engagement using this canonical schema. 4 KRİTİK + 10 YÜKSEK + 8 ORTA + 8 DÜŞÜK/BİLGİ. Final report path: `scans/aras/05_reports/ARAS_FINAL_PENTEST_REPORT_<DATE>.docx`. Generator: `scans/aras/06_raw/scripts/generate_aras_report.py`.
|
||||
- **Soler Palau (2025-10)** — original template source. 3 KRİTİK + 0 YÜKSEK + 2 ORTA + 1 DÜŞÜK = 6 bulgu örneği.
|
||||
|
||||
## Integration Pointers
|
||||
|
||||
- **Kill Chain Scanner DB** (MariaDB `killchain-mariadb`) — bulgular `findings` tablosundan çekilir, severity + cvss + cwe + remediation alanları doğrudan map edilir
|
||||
- **Burp Suite Pro v2026.2.1** — XML export `--burp-import` ile parse, her issue bir I-card olur
|
||||
- **Obsidian** — markdown ön-taslak `pentest reports/` vault'una yazılır, sonra DOCX üretilir
|
||||
- **PDF export** — Word "Save As PDF" (PDF/A-3 önerilir; arşiv için)
|
||||
- **Authorization log** — `db_log_authorization()` ile rapor üretim kaydı tutulur (PoC paylaşımı, dağıtım listesi)
|
||||
134
personas/_shared/community-skills/ui-ux-pro-max/SKILL.md
Normal file
134
personas/_shared/community-skills/ui-ux-pro-max/SKILL.md
Normal file
@@ -0,0 +1,134 @@
|
||||
---
|
||||
name: ui-ux-pro-max
|
||||
description: Use when building UI, choosing styles/colors/fonts, creating components, reviewing UX, fixing UI bugs, or making any frontend design decision. Triggers on new project UI, landing page, dashboard, component creation, style selection, dark mode, charts, responsive design, or any "make this look good" request. Searchable database of 67 UI styles, 161 product types, 57 font pairings, 161 color palettes, 99 UX guidelines.
|
||||
---
|
||||
|
||||
# UI/UX Pro Max — AI Design Intelligence
|
||||
|
||||
## Overview
|
||||
|
||||
Searchable design knowledge base with BM25-ranked results across 10 domains. Use the Python search engine to get data-driven design recommendations before writing any frontend code.
|
||||
|
||||
**Script location:** `~/.claude/skills/ui-ux-pro-max/scripts/search.py`
|
||||
**Data location:** `~/.claude/skills/ui-ux-pro-max/data/`
|
||||
|
||||
## When to Use
|
||||
|
||||
| Scenario | Action |
|
||||
|----------|--------|
|
||||
| New project / page | `--design-system` for full recommendations |
|
||||
| New component | `--domain style` or `--domain ux` |
|
||||
| Style / color / font selection | `--design-system` or `--domain style/color/typography` |
|
||||
| Review existing UI | `--domain ux` for best practices checklist |
|
||||
| Fix a UI bug | `--domain ux` or `--domain web` |
|
||||
| Dark mode | `--domain style "dark mode"` |
|
||||
| Charts / data viz | `--domain chart` |
|
||||
| Landing page | `--domain landing` |
|
||||
|
||||
## Core Workflow
|
||||
|
||||
### Step 1: Analyze Requirements
|
||||
|
||||
Extract from user request:
|
||||
- **Product type**: SaaS, fintech, creative tool, e-commerce, portfolio, enterprise, consumer
|
||||
- **Target audience**: developers, consumers, enterprise, mixed
|
||||
- **Style keywords**: minimal, dark, playful, professional, brutalist, glassmorphism
|
||||
- **Stack**: React/Next.js, vanilla, Tailwind, etc.
|
||||
|
||||
### Step 2: Generate Design System (REQUIRED for new projects)
|
||||
|
||||
```bash
|
||||
python3 ~/.claude/skills/ui-ux-pro-max/scripts/search.py "<product_type> <industry> <keywords>" --design-system [-p "Project Name"]
|
||||
```
|
||||
|
||||
This runs 5 parallel domain searches (product, style, color, landing, typography), applies reasoning rules from `ui-reasoning.csv`, and returns a complete design system recommendation with anti-patterns.
|
||||
|
||||
**Persist across sessions:**
|
||||
```bash
|
||||
python3 ~/.claude/skills/ui-ux-pro-max/scripts/search.py "<query>" --design-system --persist -p "Project Name"
|
||||
```
|
||||
|
||||
Creates `design-system/MASTER.md` + optional `design-system/pages/<page>.md` overrides.
|
||||
|
||||
### Step 3: Supplement with Domain Searches
|
||||
|
||||
```bash
|
||||
python3 ~/.claude/skills/ui-ux-pro-max/scripts/search.py "<keyword>" --domain <domain> [-n <max_results>]
|
||||
```
|
||||
|
||||
| Domain | Use For | Example |
|
||||
|--------|---------|---------|
|
||||
| `product` | Product type recommendations | `"SaaS dashboard analytics"` |
|
||||
| `style` | UI styles, effects, aesthetics | `"glassmorphism dark mode"` |
|
||||
| `color` | Color palettes by product type | `"fintech trust professional"` |
|
||||
| `typography` | Font pairings, Google Fonts | `"elegant modern"` |
|
||||
| `landing` | Page structure, CTA strategies | `"hero social-proof pricing"` |
|
||||
| `chart` | Chart types, library recommendations | `"real-time dashboard trend"` |
|
||||
| `ux` | Best practices, anti-patterns | `"animation accessibility loading"` |
|
||||
| `react` | React/Next.js performance | `"suspense memo rerender cache"` |
|
||||
| `web` | Web accessibility, touch targets | `"a11y focus-management"` |
|
||||
| `prompt` | AI prompt / CSS keywords | `"minimalism"` |
|
||||
|
||||
### Step 4: Output Formats
|
||||
|
||||
```bash
|
||||
# ASCII box (default)
|
||||
python3 ~/.claude/skills/ui-ux-pro-max/scripts/search.py "fintech crypto" --design-system
|
||||
|
||||
# Markdown (for documentation)
|
||||
python3 ~/.claude/skills/ui-ux-pro-max/scripts/search.py "fintech crypto" --design-system -f markdown
|
||||
```
|
||||
|
||||
## Data Inventory
|
||||
|
||||
| File | Content |
|
||||
|------|---------|
|
||||
| `styles.csv` | 67 UI styles with colors, effects, best-for, anti-patterns |
|
||||
| `products.csv` | 161 product types with recommended patterns |
|
||||
| `ui-reasoning.csv` | 161 reasoning rules with JSON conditionals |
|
||||
| `colors.csv` | 161 color palettes aligned to product types |
|
||||
| `typography.csv` | 57 font pairings with Google Fonts imports |
|
||||
| `design.csv` | Comprehensive design reference |
|
||||
| `ux-guidelines.csv` | 99 UX best practices and anti-patterns |
|
||||
| `charts.csv` | 25 chart types with library recommendations |
|
||||
| `landing.csv` | 24 landing page patterns and CTA strategies |
|
||||
| `icons.csv` | Icon library recommendations |
|
||||
| `google-fonts.csv` | Full Google Fonts catalog |
|
||||
|
||||
## Quick Reference Priorities
|
||||
|
||||
### CRITICAL (Always Check)
|
||||
- Contrast ratio >= 4.5:1 (text), >= 3:1 (large text/UI)
|
||||
- Touch targets >= 44px, spacing >= 8px between
|
||||
- `prefers-reduced-motion` respected for all animations
|
||||
- Focus indicators visible, keyboard navigation complete
|
||||
|
||||
### HIGH
|
||||
- Max 4 font sizes, 2 weights per page
|
||||
- Spacing from 8-point grid (multiples of 4px)
|
||||
- All states designed: default, hover, active, focus, disabled, loading, error, empty
|
||||
- Dark mode tested independently (not assumed from light mode)
|
||||
|
||||
### MEDIUM
|
||||
- Animation budget: 16ms/frame, spring physics preferred
|
||||
- Z-index scale defined (no arbitrary values)
|
||||
- Form validation inline, not after submit
|
||||
- Navigation hierarchy max 2 levels
|
||||
|
||||
## Integration with DESIGN.md
|
||||
|
||||
This skill pairs with the awesome-design-md brand reference library (58 brands). Workflow:
|
||||
|
||||
1. Use `--design-system` to determine style direction
|
||||
2. Reference a similar brand's DESIGN.md for exact token values
|
||||
3. Create project DESIGN.md with tokens from both sources
|
||||
4. Build components using the token system
|
||||
|
||||
## Pre-Delivery Checklist
|
||||
|
||||
- [ ] `--domain ux "animation accessibility z-index loading"` validation pass
|
||||
- [ ] Critical + High priority rules verified
|
||||
- [ ] Test at 375px width and landscape orientation
|
||||
- [ ] `prefers-reduced-motion` behavior verified
|
||||
- [ ] Dark mode contrast checked independently
|
||||
- [ ] All touch targets >= 44px, no content behind safe areas
|
||||
@@ -0,0 +1,414 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Sync colors.csv and ui-reasoning.csv with the updated products.csv (161 entries).
|
||||
- Remove deleted product types
|
||||
- Rename mismatched entries
|
||||
- Add new entries for missing product types
|
||||
- Keep colors.csv aligned 1:1 with products.csv
|
||||
- Renumber everything
|
||||
"""
|
||||
import csv, os, json
|
||||
|
||||
BASE = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
# ─── Color derivation helpers ────────────────────────────────────────────────
|
||||
def h2r(h):
|
||||
h = h.lstrip("#")
|
||||
return tuple(int(h[i:i+2], 16) for i in (0, 2, 4))
|
||||
|
||||
def r2h(r, g, b):
|
||||
return f"#{max(0,min(255,int(r))):02X}{max(0,min(255,int(g))):02X}{max(0,min(255,int(b))):02X}"
|
||||
|
||||
def lum(h):
|
||||
r, g, b = [x/255.0 for x in h2r(h)]
|
||||
r, g, b = [(x/12.92 if x<=0.03928 else ((x+0.055)/1.055)**2.4) for x in (r, g, b)]
|
||||
return 0.2126*r + 0.7152*g + 0.0722*b
|
||||
|
||||
def is_dark(bg):
|
||||
return lum(bg) < 0.18
|
||||
|
||||
def on_color(bg):
|
||||
return "#FFFFFF" if lum(bg) < 0.4 else "#0F172A"
|
||||
|
||||
def blend(a, b, f=0.15):
|
||||
ra, ga, ba = h2r(a)
|
||||
rb, gb, bb = h2r(b)
|
||||
return r2h(ra+(rb-ra)*f, ga+(gb-ga)*f, ba+(bb-ba)*f)
|
||||
|
||||
def shift(h, n):
|
||||
r, g, b = h2r(h)
|
||||
return r2h(r+n, g+n, b+n)
|
||||
|
||||
def derive_row(pt, pri, sec, acc, bg, notes=""):
|
||||
"""Generate full 16-token color row from 4 base colors."""
|
||||
dark = is_dark(bg)
|
||||
fg = "#FFFFFF" if dark else "#0F172A"
|
||||
on_pri = on_color(pri)
|
||||
on_sec = on_color(sec)
|
||||
on_acc = on_color(acc)
|
||||
card = shift(bg, 10) if dark else "#FFFFFF"
|
||||
card_fg = "#FFFFFF" if dark else "#0F172A"
|
||||
muted = blend(bg, pri, 0.08) if dark else blend("#FFFFFF", pri, 0.06)
|
||||
muted_fg = "#94A3B8" if dark else "#64748B"
|
||||
border = f"rgba(255,255,255,0.08)" if dark else blend("#FFFFFF", pri, 0.12)
|
||||
destr = "#DC2626"
|
||||
on_destr = "#FFFFFF"
|
||||
ring = pri
|
||||
return [pt, pri, on_pri, sec, on_sec, acc, on_acc, bg, fg, card, card_fg, muted, muted_fg, border, destr, on_destr, ring, notes]
|
||||
|
||||
# ─── Rename maps ─────────────────────────────────────────────────────────────
|
||||
COLOR_RENAMES = {
|
||||
"Quantum Computing": "Quantum Computing Interface",
|
||||
"Biohacking / Longevity": "Biohacking / Longevity App",
|
||||
"Autonomous Systems": "Autonomous Drone Fleet Manager",
|
||||
"Generative AI Art": "Generative Art Platform",
|
||||
"Spatial / Vision OS": "Spatial Computing OS / App",
|
||||
"Climate Tech": "Sustainable Energy / Climate Tech",
|
||||
}
|
||||
UI_RENAMES = {
|
||||
"Architecture/Interior": "Architecture / Interior",
|
||||
"Autonomous Drone Fleet": "Autonomous Drone Fleet Manager",
|
||||
"B2B SaaS Enterprise": "B2B Service",
|
||||
"Biohacking/Longevity App": "Biohacking / Longevity App",
|
||||
"Biotech/Life Sciences": "Biotech / Life Sciences",
|
||||
"Developer Tool/IDE": "Developer Tool / IDE",
|
||||
"Education": "Educational App",
|
||||
"Fintech (Banking)": "Fintech/Crypto",
|
||||
"Government/Public": "Government/Public Service",
|
||||
"Home Services": "Home Services (Plumber/Electrician)",
|
||||
"Micro-Credentials/Badges": "Micro-Credentials/Badges Platform",
|
||||
"Music/Entertainment": "Music Streaming",
|
||||
"Quantum Computing": "Quantum Computing Interface",
|
||||
"Real Estate": "Real Estate/Property",
|
||||
"Remote Work/Collaboration": "Remote Work/Collaboration Tool",
|
||||
"Restaurant/Food": "Restaurant/Food Service",
|
||||
"SaaS Dashboard": "Analytics Dashboard",
|
||||
"Space Tech/Aerospace": "Space Tech / Aerospace",
|
||||
"Spatial Computing OS": "Spatial Computing OS / App",
|
||||
"Startup Landing": "Micro SaaS",
|
||||
"Sustainable Energy/Climate": "Sustainable Energy / Climate Tech",
|
||||
"Travel/Tourism": "Travel/Tourism Agency",
|
||||
"Wellness/Mental Health": "Mental Health App",
|
||||
}
|
||||
|
||||
REMOVE_TYPES = {
|
||||
"Service Landing Page", "Sustainability/ESG Platform",
|
||||
"Cleaning Service", "Coffee Shop",
|
||||
"Consulting Firm", "Conference/Webinar Platform",
|
||||
}
|
||||
|
||||
# ─── New color definitions: (primary, secondary, accent, bg, notes) ──────────
|
||||
# Grouped by category for clarity. Each tuple generates a full 16-token row.
|
||||
NEW_COLORS = {
|
||||
# ── Old #97-#116 that never got colors ──
|
||||
"Todo & Task Manager": ("#2563EB","#3B82F6","#059669","#F8FAFC","Functional blue + progress green"),
|
||||
"Personal Finance Tracker": ("#1E40AF","#3B82F6","#059669","#0F172A","Trust blue + profit green on dark"),
|
||||
"Chat & Messaging App": ("#2563EB","#6366F1","#059669","#FFFFFF","Messenger blue + online green"),
|
||||
"Notes & Writing App": ("#78716C","#A8A29E","#D97706","#FFFBEB","Warm ink + amber accent on cream"),
|
||||
"Habit Tracker": ("#D97706","#F59E0B","#059669","#FFFBEB","Streak amber + habit green"),
|
||||
"Food Delivery / On-Demand": ("#EA580C","#F97316","#2563EB","#FFF7ED","Appetizing orange + trust blue"),
|
||||
"Ride Hailing / Transportation":("#1E293B","#334155","#2563EB","#0F172A","Map dark + route blue"),
|
||||
"Recipe & Cooking App": ("#9A3412","#C2410C","#059669","#FFFBEB","Warm terracotta + fresh green"),
|
||||
"Meditation & Mindfulness": ("#7C3AED","#8B5CF6","#059669","#FAF5FF","Calm lavender + mindful green"),
|
||||
"Weather App": ("#0284C7","#0EA5E9","#F59E0B","#F0F9FF","Sky blue + sun amber"),
|
||||
"Diary & Journal App": ("#92400E","#A16207","#6366F1","#FFFBEB","Warm journal brown + ink violet"),
|
||||
"CRM & Client Management": ("#2563EB","#3B82F6","#059669","#F8FAFC","Professional blue + deal green"),
|
||||
"Inventory & Stock Management":("#334155","#475569","#059669","#F8FAFC","Industrial slate + stock green"),
|
||||
"Flashcard & Study Tool": ("#7C3AED","#8B5CF6","#059669","#FAF5FF","Study purple + correct green"),
|
||||
"Booking & Appointment App": ("#0284C7","#0EA5E9","#059669","#F0F9FF","Calendar blue + available green"),
|
||||
"Invoice & Billing Tool": ("#1E3A5F","#2563EB","#059669","#F8FAFC","Navy professional + paid green"),
|
||||
"Grocery & Shopping List": ("#059669","#10B981","#D97706","#ECFDF5","Fresh green + food amber"),
|
||||
"Timer & Pomodoro": ("#DC2626","#EF4444","#059669","#0F172A","Focus red on dark + break green"),
|
||||
"Parenting & Baby Tracker": ("#EC4899","#F472B6","#0284C7","#FDF2F8","Soft pink + trust blue"),
|
||||
"Scanner & Document Manager": ("#1E293B","#334155","#2563EB","#F8FAFC","Document grey + scan blue"),
|
||||
# ── A. Utility / Productivity ──
|
||||
"Calendar & Scheduling App": ("#2563EB","#3B82F6","#059669","#F8FAFC","Calendar blue + event green"),
|
||||
"Password Manager": ("#1E3A5F","#334155","#059669","#0F172A","Vault dark blue + secure green"),
|
||||
"Expense Splitter / Bill Split":("#059669","#10B981","#DC2626","#F8FAFC","Balance green + owe red"),
|
||||
"Voice Recorder & Memo": ("#DC2626","#EF4444","#2563EB","#FFFFFF","Recording red + waveform blue"),
|
||||
"Bookmark & Read-Later": ("#D97706","#F59E0B","#2563EB","#FFFBEB","Warm amber + link blue"),
|
||||
"Translator App": ("#2563EB","#0891B2","#EA580C","#F8FAFC","Global blue + teal + accent orange"),
|
||||
"Calculator & Unit Converter": ("#EA580C","#F97316","#2563EB","#1C1917","Operation orange on dark"),
|
||||
"Alarm & World Clock": ("#D97706","#F59E0B","#6366F1","#0F172A","Time amber + night indigo on dark"),
|
||||
"File Manager & Transfer": ("#2563EB","#3B82F6","#D97706","#F8FAFC","Folder blue + file amber"),
|
||||
"Email Client": ("#2563EB","#3B82F6","#DC2626","#FFFFFF","Inbox blue + priority red"),
|
||||
# ── B. Games ──
|
||||
"Casual Puzzle Game": ("#EC4899","#8B5CF6","#F59E0B","#FDF2F8","Cheerful pink + reward gold"),
|
||||
"Trivia & Quiz Game": ("#2563EB","#7C3AED","#F59E0B","#EFF6FF","Quiz blue + gold leaderboard"),
|
||||
"Card & Board Game": ("#15803D","#166534","#D97706","#0F172A","Felt green + gold on dark"),
|
||||
"Idle & Clicker Game": ("#D97706","#F59E0B","#7C3AED","#FFFBEB","Coin gold + prestige purple"),
|
||||
"Word & Crossword Game": ("#15803D","#059669","#D97706","#FFFFFF","Word green + letter amber"),
|
||||
"Arcade & Retro Game": ("#DC2626","#2563EB","#22C55E","#0F172A","Neon red+blue on dark + score green"),
|
||||
# ── C. Creator Tools ──
|
||||
"Photo Editor & Filters": ("#7C3AED","#6366F1","#0891B2","#0F172A","Editor violet + filter cyan on dark"),
|
||||
"Short Video Editor": ("#EC4899","#DB2777","#2563EB","#0F172A","Video pink on dark + timeline blue"),
|
||||
"Drawing & Sketching Canvas": ("#7C3AED","#8B5CF6","#0891B2","#1C1917","Canvas purple + tool teal on dark"),
|
||||
"Music Creation & Beat Maker": ("#7C3AED","#6366F1","#22C55E","#0F172A","Studio purple + waveform green on dark"),
|
||||
"Meme & Sticker Maker": ("#EC4899","#F59E0B","#2563EB","#FFFFFF","Viral pink + comedy yellow + share blue"),
|
||||
"AI Photo & Avatar Generator": ("#7C3AED","#6366F1","#EC4899","#FAF5FF","AI purple + generation pink"),
|
||||
"Link-in-Bio Page Builder": ("#2563EB","#7C3AED","#EC4899","#FFFFFF","Brand blue + creator purple"),
|
||||
# ── D. Personal Life ──
|
||||
"Wardrobe & Outfit Planner": ("#BE185D","#EC4899","#D97706","#FDF2F8","Fashion rose + gold accent"),
|
||||
"Plant Care Tracker": ("#15803D","#059669","#D97706","#F0FDF4","Nature green + sun yellow"),
|
||||
"Book & Reading Tracker": ("#78716C","#92400E","#D97706","#FFFBEB","Book brown + page amber"),
|
||||
"Couple & Relationship App": ("#BE185D","#EC4899","#DC2626","#FDF2F8","Romance rose + love red"),
|
||||
"Family Calendar & Chores": ("#2563EB","#059669","#D97706","#F8FAFC","Family blue + chore green"),
|
||||
"Mood Tracker": ("#7C3AED","#6366F1","#D97706","#FAF5FF","Mood purple + insight amber"),
|
||||
"Gift & Wishlist": ("#DC2626","#D97706","#EC4899","#FFF1F2","Gift red + gold + surprise pink"),
|
||||
# ── E. Health ──
|
||||
"Running & Cycling GPS": ("#EA580C","#F97316","#059669","#0F172A","Energetic orange + pace green on dark"),
|
||||
"Yoga & Stretching Guide": ("#6B7280","#78716C","#0891B2","#F5F5F0","Sage neutral + calm teal"),
|
||||
"Sleep Tracker": ("#4338CA","#6366F1","#7C3AED","#0F172A","Night indigo + dream violet on dark"),
|
||||
"Calorie & Nutrition Counter": ("#059669","#10B981","#EA580C","#ECFDF5","Healthy green + macro orange"),
|
||||
"Period & Cycle Tracker": ("#BE185D","#EC4899","#7C3AED","#FDF2F8","Blush rose + fertility lavender"),
|
||||
"Medication & Pill Reminder": ("#0284C7","#0891B2","#DC2626","#F0F9FF","Medical blue + alert red"),
|
||||
"Water & Hydration Reminder": ("#0284C7","#06B6D4","#0891B2","#F0F9FF","Refreshing blue + water cyan"),
|
||||
"Fasting & Intermittent Timer":("#6366F1","#4338CA","#059669","#0F172A","Fasting indigo on dark + eating green"),
|
||||
# ── F. Social ──
|
||||
"Anonymous Community / Confession":("#475569","#334155","#0891B2","#0F172A","Protective grey + subtle teal on dark"),
|
||||
"Local Events & Discovery": ("#EA580C","#F97316","#2563EB","#FFF7ED","Event orange + map blue"),
|
||||
"Study Together / Virtual Coworking":("#2563EB","#3B82F6","#059669","#F8FAFC","Focus blue + session green"),
|
||||
# ── G. Education ──
|
||||
"Coding Challenge & Practice": ("#22C55E","#059669","#D97706","#0F172A","Code green + difficulty amber on dark"),
|
||||
"Kids Learning (ABC & Math)": ("#2563EB","#F59E0B","#EC4899","#EFF6FF","Learning blue + play yellow + fun pink"),
|
||||
"Music Instrument Learning": ("#DC2626","#9A3412","#D97706","#FFFBEB","Musical red + warm amber"),
|
||||
# ── H. Transport ──
|
||||
"Parking Finder": ("#2563EB","#059669","#DC2626","#F0F9FF","Available blue/green + occupied red"),
|
||||
"Public Transit Guide": ("#2563EB","#0891B2","#EA580C","#F8FAFC","Transit blue + line colors"),
|
||||
"Road Trip Planner": ("#EA580C","#0891B2","#D97706","#FFF7ED","Adventure orange + map teal"),
|
||||
# ── I. Safety & Lifestyle ──
|
||||
"VPN & Privacy Tool": ("#1E3A5F","#334155","#22C55E","#0F172A","Shield dark + connected green"),
|
||||
"Emergency SOS & Safety": ("#DC2626","#EF4444","#2563EB","#FFF1F2","Alert red + safety blue"),
|
||||
"Wallpaper & Theme App": ("#7C3AED","#EC4899","#2563EB","#FAF5FF","Aesthetic purple + trending pink"),
|
||||
"White Noise & Ambient Sound": ("#475569","#334155","#4338CA","#0F172A","Ambient grey + deep indigo on dark"),
|
||||
"Home Decoration & Interior Design":("#78716C","#A8A29E","#D97706","#FAF5F2","Interior warm grey + gold accent"),
|
||||
}
|
||||
|
||||
# ─── 1. REBUILD colors.csv ───────────────────────────────────────────────────
|
||||
def rebuild_colors():
|
||||
src = os.path.join(BASE, "colors.csv")
|
||||
with open(src, newline="", encoding="utf-8") as f:
|
||||
reader = csv.DictReader(f)
|
||||
headers = reader.fieldnames
|
||||
existing = list(reader)
|
||||
|
||||
# Build lookup: Product Type -> row data
|
||||
color_map = {}
|
||||
for row in existing:
|
||||
pt = row.get("Product Type", "").strip()
|
||||
if not pt:
|
||||
continue
|
||||
# Remove deleted types
|
||||
if pt in REMOVE_TYPES:
|
||||
print(f" [colors] REMOVE: {pt}")
|
||||
continue
|
||||
# Rename mismatched types
|
||||
if pt in COLOR_RENAMES:
|
||||
new_name = COLOR_RENAMES[pt]
|
||||
print(f" [colors] RENAME: {pt} → {new_name}")
|
||||
row["Product Type"] = new_name
|
||||
pt = new_name
|
||||
color_map[pt] = row
|
||||
|
||||
# Read products.csv to get the correct order
|
||||
with open(os.path.join(BASE, "products.csv"), newline="", encoding="utf-8") as f:
|
||||
products = list(csv.DictReader(f))
|
||||
|
||||
# Build final rows in products.csv order
|
||||
final_rows = []
|
||||
added = 0
|
||||
for i, prod in enumerate(products, 1):
|
||||
pt = prod["Product Type"]
|
||||
if pt in color_map:
|
||||
row = color_map[pt]
|
||||
row["No"] = str(i)
|
||||
final_rows.append(row)
|
||||
elif pt in NEW_COLORS:
|
||||
pri, sec, acc, bg, notes = NEW_COLORS[pt]
|
||||
new_row = derive_row(pt, pri, sec, acc, bg, notes)
|
||||
d = dict(zip(headers, [str(i)] + new_row))
|
||||
final_rows.append(d)
|
||||
added += 1
|
||||
else:
|
||||
print(f" [colors] WARNING: No color data for '{pt}' - using defaults")
|
||||
new_row = derive_row(pt, "#2563EB", "#3B82F6", "#059669", "#F8FAFC", "Auto-generated default")
|
||||
d = dict(zip(headers, [str(i)] + new_row))
|
||||
final_rows.append(d)
|
||||
added += 1
|
||||
|
||||
# Write
|
||||
with open(src, "w", newline="", encoding="utf-8") as f:
|
||||
writer = csv.DictWriter(f, fieldnames=headers)
|
||||
writer.writeheader()
|
||||
writer.writerows(final_rows)
|
||||
|
||||
product_count = len(products)
|
||||
print(f"\n ✅ colors.csv: {len(final_rows)} rows ({product_count} products)")
|
||||
print(f" Added: {added} new color rows")
|
||||
|
||||
# ─── 2. REBUILD ui-reasoning.csv ─────────────────────────────────────────────
|
||||
def derive_ui_reasoning(prod):
|
||||
"""Generate ui-reasoning row from products.csv row."""
|
||||
pt = prod["Product Type"]
|
||||
style = prod.get("Primary Style Recommendation", "")
|
||||
landing = prod.get("Landing Page Pattern", "")
|
||||
color_focus = prod.get("Color Palette Focus", "")
|
||||
considerations = prod.get("Key Considerations", "")
|
||||
keywords = prod.get("Keywords", "")
|
||||
|
||||
# Typography mood derived from style
|
||||
typo_map = {
|
||||
"Minimalism": "Professional + Clean hierarchy",
|
||||
"Glassmorphism": "Modern + Clear hierarchy",
|
||||
"Brutalism": "Bold + Oversized + Monospace",
|
||||
"Claymorphism": "Playful + Rounded + Friendly",
|
||||
"Dark Mode": "High contrast + Light on dark",
|
||||
"Neumorphism": "Subtle + Soft + Monochromatic",
|
||||
"Flat Design": "Bold + Clean + Sans-serif",
|
||||
"Vibrant": "Energetic + Bold + Large",
|
||||
"Aurora": "Elegant + Gradient-friendly",
|
||||
"AI-Native": "Conversational + Minimal chrome",
|
||||
"Organic": "Warm + Humanist + Natural",
|
||||
"Motion": "Dynamic + Hierarchy-shifting",
|
||||
"Accessible": "Large + High contrast + Clear",
|
||||
"Soft UI": "Modern + Accessible + Balanced",
|
||||
"Trust": "Professional + Serif accents",
|
||||
"Swiss": "Grid-based + Mathematical + Helvetica",
|
||||
"3D": "Immersive + Spatial + Variable",
|
||||
"Retro": "Nostalgic + Monospace + Neon",
|
||||
"Cyberpunk": "Terminal + Monospace + Neon",
|
||||
"Pixel": "Retro + Blocky + 8-bit",
|
||||
}
|
||||
typo_mood = "Professional + Clear hierarchy"
|
||||
for key, val in typo_map.items():
|
||||
if key.lower() in style.lower():
|
||||
typo_mood = val
|
||||
break
|
||||
|
||||
# Key effects from style
|
||||
eff_map = {
|
||||
"Glassmorphism": "Backdrop blur (10-20px) + Translucent overlays",
|
||||
"Neumorphism": "Dual shadows (light+dark) + Soft press 150ms",
|
||||
"Claymorphism": "Multi-layer shadows + Spring bounce + Soft press 200ms",
|
||||
"Brutalism": "No transitions + Hard borders + Instant feedback",
|
||||
"Dark Mode": "Subtle glow + Neon accents + High contrast",
|
||||
"Flat Design": "Color shift hover + Fast 150ms transitions + No shadows",
|
||||
"Minimalism": "Subtle hover 200ms + Smooth transitions + Clean",
|
||||
"Motion-Driven": "Scroll animations + Parallax + Page transitions",
|
||||
"Micro-interactions": "Haptic feedback + Small 50-100ms animations",
|
||||
"Vibrant": "Large section gaps 48px+ + Color shift hover + Scroll-snap",
|
||||
"Aurora": "Flowing gradients 8-12s + Color morphing",
|
||||
"AI-Native": "Typing indicator + Streaming text + Context reveal",
|
||||
"Organic": "Rounded 16-24px + Natural shadows + Flowing SVG",
|
||||
"Soft UI": "Improved shadows + Modern 200-300ms + Focus visible",
|
||||
"3D": "WebGL/Three.js + Parallax 3-5 layers + Physics 300-400ms",
|
||||
"Trust": "Clear focus rings + Badge hover + Metric pulse",
|
||||
"Accessible": "Focus rings 3-4px + ARIA + Reduced motion",
|
||||
}
|
||||
key_effects = "Subtle hover (200ms) + Smooth transitions"
|
||||
for key, val in eff_map.items():
|
||||
if key.lower() in style.lower():
|
||||
key_effects = val
|
||||
break
|
||||
|
||||
# Decision rules
|
||||
rules = {}
|
||||
if "dark" in style.lower() or "oled" in style.lower():
|
||||
rules["if_light_mode_needed"] = "provide-theme-toggle"
|
||||
if "glass" in style.lower():
|
||||
rules["if_low_performance"] = "fallback-to-flat"
|
||||
if "conversion" in landing.lower():
|
||||
rules["if_conversion_focused"] = "add-urgency-colors"
|
||||
if "social" in landing.lower():
|
||||
rules["if_trust_needed"] = "add-testimonials"
|
||||
if "data" in keywords.lower() or "dashboard" in keywords.lower():
|
||||
rules["if_data_heavy"] = "prioritize-data-density"
|
||||
if not rules:
|
||||
rules["if_ux_focused"] = "prioritize-clarity"
|
||||
rules["if_mobile"] = "optimize-touch-targets"
|
||||
|
||||
# Anti-patterns
|
||||
anti_patterns = []
|
||||
if "minimalism" in style.lower() or "minimal" in style.lower():
|
||||
anti_patterns.append("Excessive decoration")
|
||||
if "dark" in style.lower():
|
||||
anti_patterns.append("Pure white backgrounds")
|
||||
if "flat" in style.lower():
|
||||
anti_patterns.append("Complex shadows + 3D effects")
|
||||
if "vibrant" in style.lower():
|
||||
anti_patterns.append("Muted colors + Low energy")
|
||||
if "accessible" in style.lower():
|
||||
anti_patterns.append("Color-only indicators")
|
||||
if not anti_patterns:
|
||||
anti_patterns = ["Inconsistent styling", "Poor contrast ratios"]
|
||||
anti_str = " + ".join(anti_patterns[:2])
|
||||
|
||||
return {
|
||||
"UI_Category": pt,
|
||||
"Recommended_Pattern": landing,
|
||||
"Style_Priority": style,
|
||||
"Color_Mood": color_focus,
|
||||
"Typography_Mood": typo_mood,
|
||||
"Key_Effects": key_effects,
|
||||
"Decision_Rules": json.dumps(rules),
|
||||
"Anti_Patterns": anti_str,
|
||||
"Severity": "HIGH"
|
||||
}
|
||||
|
||||
|
||||
def rebuild_ui_reasoning():
|
||||
src = os.path.join(BASE, "ui-reasoning.csv")
|
||||
with open(src, newline="", encoding="utf-8") as f:
|
||||
reader = csv.DictReader(f)
|
||||
headers = reader.fieldnames
|
||||
existing = list(reader)
|
||||
|
||||
# Build lookup
|
||||
ui_map = {}
|
||||
for row in existing:
|
||||
cat = row.get("UI_Category", "").strip()
|
||||
if not cat:
|
||||
continue
|
||||
if cat in REMOVE_TYPES:
|
||||
print(f" [ui-reason] REMOVE: {cat}")
|
||||
continue
|
||||
if cat in UI_RENAMES:
|
||||
new_name = UI_RENAMES[cat]
|
||||
print(f" [ui-reason] RENAME: {cat} → {new_name}")
|
||||
row["UI_Category"] = new_name
|
||||
cat = new_name
|
||||
ui_map[cat] = row
|
||||
|
||||
with open(os.path.join(BASE, "products.csv"), newline="", encoding="utf-8") as f:
|
||||
products = list(csv.DictReader(f))
|
||||
|
||||
final_rows = []
|
||||
added = 0
|
||||
for i, prod in enumerate(products, 1):
|
||||
pt = prod["Product Type"]
|
||||
if pt in ui_map:
|
||||
row = ui_map[pt]
|
||||
row["No"] = str(i)
|
||||
final_rows.append(row)
|
||||
else:
|
||||
row = derive_ui_reasoning(prod)
|
||||
row["No"] = str(i)
|
||||
final_rows.append(row)
|
||||
added += 1
|
||||
|
||||
with open(src, "w", newline="", encoding="utf-8") as f:
|
||||
writer = csv.DictWriter(f, fieldnames=headers)
|
||||
writer.writeheader()
|
||||
writer.writerows(final_rows)
|
||||
|
||||
print(f"\n ✅ ui-reasoning.csv: {len(final_rows)} rows")
|
||||
print(f" Added: {added} new reasoning rows")
|
||||
|
||||
|
||||
# ─── MAIN ────────────────────────────────────────────────────────────────────
|
||||
if __name__ == "__main__":
|
||||
print("=== Rebuilding colors.csv ===")
|
||||
rebuild_colors()
|
||||
print("\n=== Rebuilding ui-reasoning.csv ===")
|
||||
rebuild_ui_reasoning()
|
||||
print("\n🎉 Done!")
|
||||
@@ -0,0 +1,31 @@
|
||||
No,Category,Issue,Keywords,Platform,Description,Do,Don't,Code Example Good,Code Example Bad,Severity
|
||||
1,Accessibility,Icon Button Labels,icon button accessibilityLabel,iOS/Android/React Native,Icon-only buttons must expose an accessible label,Set accessibilityLabel or label prop on icon buttons,Icon buttons without accessible names,"<Pressable accessibilityLabel=""Close""><XIcon /></Pressable>","<Pressable><XIcon /></Pressable>",Critical
|
||||
2,Accessibility,Form Control Labels,form input label accessibilityLabel,iOS/Android/React Native,All inputs must have a visible label and an accessibility label,Pair Text label with input and set accessibilityLabel,Inputs with placeholder only,"<View><Text>Email</Text><TextInput accessibilityLabel=""Email address"" /></View>","<TextInput placeholder=""Email"" /></View>",Critical
|
||||
3,Accessibility,Role & Traits,accessibilityRole accessibilityTraits,iOS/Android/React Native,Interactive elements must expose correct roles/traits,Use accessibilityRole/button/link/checkbox etc.,Rely on generic views with no roles,"<Pressable accessibilityRole=""button"">Submit</Pressable>","<View onTouchStart={submit}>Submit</View>",High
|
||||
4,Accessibility,Dynamic Updates,accessibilityLiveRegion announce,iOS/Android/React Native,Async status updates should be announced to screen readers,Use accessibilityLiveRegion or announceForAccessibility,Update text silently with no announcement,"<Text accessibilityLiveRegion=""polite"">{status}</Text>","<Text>{status}</Text>",Medium
|
||||
5,Accessibility,Decorative Icons,accessible={false} importantForAccessibility,iOS/Android/React Native,Decorative icons should be hidden from screen readers,Mark decorative icons as not accessible,Have screen reader read every icon,"<Icon accessible={false} importantForAccessibility=""no"" />","<Icon />",Medium
|
||||
6,Touch,Touch Target Size,touch 44x44 hitSlop,iOS/Android/React Native,Primary touch targets must be at least 44x44pt,Increase hitSlop or padding to meet minimum,Small icons with tiny touch area,"<Pressable hitSlop={10}><Icon /></Pressable>","<Pressable><Icon style={{ width: 16, height: 16 }} /></Pressable>",Critical
|
||||
7,Touch,Touch Spacing,touch spacing gap 8px,iOS/Android/React Native,Adjacent touch targets need enough spacing,Keep at least 8dp spacing between touchables,Cluster many buttons with no gap,"<View style={{ gap: 8 }}><Button ... /><Button ... /></View>","<View><Button ... /><Button ... /></View>",Medium
|
||||
8,Touch,Gesture Conflicts,scroll swipe back gesture,iOS/Android/React Native,Custom gestures must not break system scroll/back,Reserve horizontal swipes for carousels,Full-screen custom swipe conflicting with back,"HorizontalPager inside vertical ScrollView","PanResponder on full screen blocking back",High
|
||||
9,Navigation,Back Behavior,back handler navigation stack,iOS/Android/React Native,Back navigation should be predictable and preserve state,Use navigation.goBack and keep screen state,Reset stack or exit app unexpectedly,onPress={() => navigation.goBack()},"BackHandler.exitApp() on first press",Critical
|
||||
10,Navigation,Bottom Tabs,tab bar max items,iOS/Android/React Native,Bottom tab bar should have at most 5 primary items,Use 3–5 tabs and move extras to More/Settings,Overloaded tab bar with many icons,Home/Explore/Profile/Settings,"Home/Explore/Shop/Cart/Profile/Settings/More",Medium
|
||||
11,Navigation,Modal Escape,modal dismiss close affordance,iOS/Android/React Native,Modals/sheets must have clear close actions,Provide close button and swipe-down where platform expects,Trapping users in modal with no obvious exit,"<Modal><Button title=""Close"" onPress={onClose} /></Modal>","<Modal><View>{children}</View></Modal>",High
|
||||
12,State,Preserve Screen State,navigation preserve state,iOS/Android/React Native,Returning to a screen should restore its scroll and form state,Keep components mounted or persist state,Reset list scroll and form inputs on every visit,"<Tab.Navigator screenOptions={{ unmountOnBlur: false }}>","<Tab.Screen options={{ unmountOnBlur: true }} />",Medium
|
||||
13,Feedback,Loading Indicators,activity indicator skeleton,iOS/Android/React Native,Show visible feedback during network operations,Use ActivityIndicator or skeleton for >300ms operations,Leave button and screen frozen,"{loading ? <ActivityIndicator /> : <Button title=""Save"" />}", "<Button title=""Save"" onPress={submit} /> // no loading",High
|
||||
14,Feedback,Success Feedback,toast checkmark banner,iOS/Android/React Native,Confirm successful actions with brief feedback,Show toast/checkmark or banner,Complete actions silently with no confirmation,"showToast('Saved successfully')","// silently update state only",Medium
|
||||
15,Feedback,Error Feedback,inline error banner,iOS/Android/React Native,Show clear error messages near the problem,input-level error + summary banner,Only change border color with no explanation,"<TextInput ... /><Text style={{color:'red'}}>{error}</Text>","<TextInput style={{borderColor:'red'}} />",High
|
||||
16,Forms,Inline Validation,onBlur validation,iOS/Android/React Native,Validate inputs on blur or submit with clear messaging,Validate onBlur and onSubmit,Validate on every keystroke causing jank,"onBlur={() => validateEmail(value)}","onChangeText={v => validateEmail(v)} // every char",Medium
|
||||
17,Forms,Keyboard Type,keyboardType returnKeyType,iOS/Android/React Native,Use appropriate keyboardType and returnKeyType,Match email/tel/number/search types,Use default keyboard for all inputs,"<TextInput keyboardType=""email-address"" />","<TextInput keyboardType=""default"" />",Medium
|
||||
18,Forms,Auto Focus & Next,autoFocus blurOnSubmit onSubmitEditing,iOS/Android/React Native,Guide users through form fields with Next/Done flows,Use onSubmitEditing to focus next input,Force users to tap each field manually,"onSubmitEditing={() => nextRef.current?.focus()}","// no onSubmitEditing, manual tap only",Low
|
||||
19,Forms,Password Visibility,secureTextEntry toggle,iOS/Android/React Native,Allow toggling password visibility securely,Provide Show/Hide icon toggling secureTextEntry,Force users to type blind with no option,"<TextInput secureTextEntry={secure} /><Icon onPress={toggle} />","<TextInput secureTextEntry /> // no toggle",Medium
|
||||
20,Performance,Virtualize Long Lists,FlatList SectionList virtualization,iOS/Android/React Native,Use FlatList/SectionList for lists over ~50 items,Use keyExtractor and initialNumToRender appropriately,Render hundreds of items with ScrollView,"<FlatList data={items} renderItem={...} />","<ScrollView>{items.map(renderItem)}</ScrollView>",High
|
||||
21,Performance,Image Size & Cache,Image resize cache,iOS/Android/React Native,Use correctly sized and cached images,Use Image component with proper resizeMode and caching,Load full-resolution images everywhere,"<Image source={{uri}} resizeMode=""cover"" />","<Image source={require('4k.png')} /> // small avatar",Medium
|
||||
22,Performance,Debounce High-Freq Events,debounce scroll search,iOS/Android/React Native,Debounce scroll/search callbacks to avoid jank,Wrap handlers with debounce/throttle,Run heavy logic on every event,"onScroll={debouncedHandleScroll}","onScroll={handleScrollHeavy}",Medium
|
||||
23,Animation,Duration & Easing,animation duration easing,iOS/Android/React Native,Micro-interactions should be 150–300ms with native-like easing,Use ease-out for enter/ease-in for exit,Use long or linear animations for core UI,"Animated.timing(..., { duration: 200, easing: Easing.out(Easing.quad) })","Animated.timing(..., { duration: 800, easing: Easing.linear })",Medium
|
||||
24,Animation,Respect Reduced Motion,reduced motion accessibility,iOS/Android/React Native,Respect OS reduced-motion accessibility setting,Check reduceMotionEnabled and simplify animations,Ignore user motion preferences,"if (reduceMotionEnabled) skipAnimation()","Always run complex parallax animations",Critical
|
||||
25,Animation,Limited Continuous Motion,loop animation loader,iOS/Android/React Native,Reserve infinite animations for loaders and live data,Use looping only where necessary,Keep decorative elements looping forever,"Animated.loop(loaderAnim) for ActivityIndicator","Animated.loop(bounceAnim) on background icons",Medium
|
||||
26,Typography,Base Font Size,fontScale dynamic type,iOS/Android/React Native,Body text must be readable and support Dynamic Type,Use platform fontScale and at least 14–16pt base,Render critical text below 12pt,"<Text style={{ fontSize: 16 }}>Body</Text>","<Text style={{ fontSize: 10 }}>Body</Text>",High
|
||||
27,Typography,Dynamic Type Support,allowFontScaling adjustsFontSizeToFit,iOS/Android/React Native,Support system text scaling without breaking layout,Set allowFontScaling and test large text,Disable scaling on all text globally,"<Text allowFontScaling>{label}</Text>","<Text allowFontScaling={false}>{label}</Text>",High
|
||||
28,Safe Areas,Safe Area Insets,safe area insets notch gesture,iOS/Android/React Native,Content must not overlap notches/gesture bars,Wrap screens in SafeAreaView or apply insets,Place tappable content under system bars,"<SafeAreaView style={{ flex: 1 }}><Screen /></SafeAreaView>","<View style={{ flex: 1 }}><Screen /></View>",High
|
||||
29,Theming,Light/Dark Contrast,dark mode contrast tokens,iOS/Android/React Native,Ensure sufficient contrast in both light and dark themes,Use semantic tokens and test both themes,Reuse light-theme grays directly in dark mode,"colors.textPrimaryDark = '#F9FAFB'","colors.textPrimaryDark = '#9CA3AF' on '#111827'",High
|
||||
30,Anti-Pattern,No Gesture-Only Actions,gesture only hidden controls,iOS/Android/React Native,Don't rely solely on hidden gestures for core actions,Provide visible buttons in addition to gestures,Rely on swipe/shake only with no UI affordance,"Swipe to delete + visible Delete button","Only shake device to undo with no UI",Critical
|
||||
|
@@ -0,0 +1,26 @@
|
||||
No,Data Type,Keywords,Best Chart Type,Secondary Options,When to Use,When NOT to Use,Data Volume Threshold,Color Guidance,Accessibility Grade,Accessibility Notes,A11y Fallback,Library Recommendation,Interactive Level
|
||||
1,Trend Over Time,"trend, time-series, line, growth, timeline, progress",Line Chart,"Area Chart, Smooth Area","Data has a time axis; user needs to observe rise/fall trends or rate of change over a continuous period","Fewer than 4 data points (use stat card); more than 6 series (visual noise); no time dimension exists","<1000 pts: SVG; ≥1000 pts: Canvas + downsampling; >10000: aggregate to intervals","Primary: #0080FF. Multiple series: distinct colors + distinct line styles. Fill: 20% opacity",AA,"Differentiate series by line style (solid/dashed/dotted) not color alone. Add pattern overlays for colorblind users.","Dashed/dotted lines per series; togglable data table with timestamps and values","Chart.js, Recharts, ApexCharts",Hover + Zoom
|
||||
2,Compare Categories,"compare, categories, bar, comparison, ranking",Bar Chart (Horizontal or Vertical),"Column Chart, Grouped Bar","Comparing discrete categories by magnitude; ranking or ordering is the core insight; categories ≤ 15","Categories > 15 (use table or search); data has time dimension (use line); showing proportions (use waffle/stacked)","<20 categories: vertical bar; 20–50: horizontal bar; >50: paginated table","Each bar: distinct color. Grouped: same hue family. Always sort descending by value",AAA,"Value labels on each bar by default. Sort control for user reordering.","Value labels always visible; provide CSV export","Chart.js, Recharts, D3.js",Hover + Sort
|
||||
3,Part-to-Whole,"part-to-whole, pie, donut, percentage, proportion, share",Pie Chart or Donut,"Stacked Bar, Waffle Chart","≤5 categories; one dominant segment vs rest; emphasis on visual proportion over exact values","Categories > 5; slice differences < 5% (visually indistinguishable); user needs precise values; accessibility-first context","Max 6 slices; beyond that switch to stacked bar 100%","5–6 max colors. Contrasting palette. Largest slice at 12 o'clock. Always label slices with %",C,"Pie charts fail WCAG for colorblind users. Slices rely on color alone. Avoid as primary chart in a11y contexts.","Must provide stacked bar alternative + percentage data table as mandatory fallback","Chart.js, Recharts, D3.js",Hover + Drill
|
||||
4,Correlation / Distribution,"correlation, distribution, scatter, relationship, pattern, cluster",Scatter Plot or Bubble Chart,"Heat Map, Matrix","Exploring relationship between two continuous variables; identifying clusters or outliers in a dataset","Variables are categorical (use grouped bar); fewer than 20 points (patterns aren't meaningful); mobile-primary context","<500 pts: SVG; 500–5000: Canvas at 0.6–0.8 opacity; >5000: hexbin or aggregate first","Color axis: gradient (blue → red). Bubble size: relative to 3rd variable. Opacity: 0.6–0.8 to show density",B,"Provide data table alternative. Combine color + shape distinction for colorblind users.","Data table with correlation coefficient annotation; shape markers (circle/square/triangle) per group","D3.js, Plotly, Recharts",Hover + Brush
|
||||
5,Heatmap / Intensity,"heatmap, heat-map, intensity, density, matrix, calendar",Heat Map or Choropleth,"Grid Heat Map, Bubble Heat","Showing intensity/density across a 2D grid; time-based patterns (e.g., activity by hour × day)","Fewer than 20 cells (use bar); user needs to read exact values; colorblind users without pattern fallback","Up to 10,000 cells efficiently; beyond that aggregate; calendar heatmap: 365 cells max per SVG","Gradient: Cool (blue) to Hot (red). Divergent scale for ±data. Always include numeric color legend",B,"Pattern overlay for colorblind users. Numerical value on hover. Legend must include scale ticks.","Numerical overlay on hover; downloadable grid table with row/column labels","D3.js, Plotly, ApexCharts",Hover + Zoom
|
||||
6,Geographic Data,"geographic, map, location, region, geo, spatial, choropleth",Choropleth Map or Bubble Map,Geographic Heat Map,"Data has a regional/location dimension; spatial distribution is the core insight for the user","Regions have very different sizes making visual comparison misleading (use bar); mobile-primary context","<1000 regions: SVG; ≥1000: Canvas/WebGL (Deck.gl); global maps: tile-based rendering","Single color gradient per region group. Categorized colors for discrete types. Legend with clear scale breaks",B,"Include text labels for major regions. Provide keyboard navigation between regions.","Region text labels; sortable data table by region name and value; keyboard-navigable regions","D3.js, Mapbox, Leaflet",Pan + Zoom + Drill
|
||||
7,Funnel / Flow,"funnel, flow, conversion, drop-off, pipeline, stages",Funnel Chart or Sankey,Waterfall (for flows),"Sequential multi-stage process; showing conversion or drop-off rates between defined stages","Stages aren't sequential; values don't decrease monotonically (use bar); fewer than 3 stages","3–8 stages optimal; beyond 8 stages group minor steps into 'Other'","Stages: single color gradient (start → end). Show conversion % between each stage. Highlight biggest drop",AA,"Explicit conversion % as text per stage. Stage labels always visible. Linear list view as fallback.","Provide linear list view with stage name + count + drop-off %; keyboard traversal","D3.js, Recharts, Custom SVG",Hover + Drill
|
||||
8,Performance vs Target,"performance, target, kpi, gauge, goal, threshold, progress",Gauge Chart or Bullet Chart,"Dial, Thermometer","Single KPI measured against a defined target or threshold; dashboard summary context","No target or benchmark exists; comparing multiple KPIs at once (use bullet chart grid)","Single metric per gauge; for 3+ KPIs use bullet chart grid layout","Performance: Red → Yellow → Green gradient. Target: marker line. Threshold zones clearly differentiated",AA,"Always show numerical value + % of target as text beside chart. Never rely on color position alone.","Numerical value + % of target shown as visible text; ARIA live region for real-time updates","D3.js, ApexCharts, Custom SVG",Hover
|
||||
9,Time-Series Forecast,"forecast, prediction, confidence, band, projection, estimate",Line with Confidence Band,Ribbon Chart,"Historical data + model predictions; communicating uncertainty range to non-technical stakeholders","No historical baseline; prediction confidence is too low to be useful; audience is not data-literate","Keep historical window to 30–90 days for readability; forecast horizon ≤ 30% of visible x-axis range","Actual: solid line #0080FF. Forecast: dashed #FF9500. Confidence band: 15% opacity fill same hue",AA,"Toggle between actual-only and forecast views. Legend must distinguish lines beyond color (solid vs dashed).","Toggle actual/forecast independently; legend labels must include line-style description","Chart.js, ApexCharts, Plotly",Hover + Toggle
|
||||
10,Anomaly Detection,"anomaly, outlier, spike, alert, detection, monitoring, deviation",Line Chart with Highlights,Scatter with Alert,"Monitoring a time-series for outliers; alerting users to unexpected spikes or dips in operational data","Anomalies are predefined categories (use bar with highlight); real-time context without a pause control","Stream at ≤60fps with Canvas; batch: up to 10,000 pts; mark anomalies as a separate data layer","Normal: #0080FF solid line. Anomaly marker: #FF0000 circle + filled. Alert band: #FFF3CD background zone",AA,"Use shape marker (not color only) for anomaly points. Add text annotation per anomaly event.","Text alert annotation per anomaly; anomaly summary list panel alongside chart","D3.js, Plotly, ApexCharts",Hover + Alert
|
||||
11,Hierarchical / Nested Data,"hierarchy, nested, treemap, parent, children, breakdown, drill",Treemap,"Sunburst, Nested Donut, Icicle","Showing size relationships within a hierarchy; overview of proportional structure (e.g., budget breakdown)","Hierarchy depth > 3 levels (too complex to read); user needs to compare sibling values precisely","<200 nodes: SVG; 200–1000: Canvas; >1000: paginate or pre-filter before rendering","Parent nodes: distinct hues. Children: lighter shades of same hue. White separator borders: 2–3px",C,"Poor baseline accessibility. Always provide table alternative as primary view. Label all large areas.","Collapsible tree table as primary view; treemap as supplementary visual only","D3.js, Recharts, ApexCharts",Hover + Drilldown
|
||||
12,Flow / Process Data,"flow, process, sankey, distribution, source, target, transfer",Sankey Diagram,"Alluvial, Chord Diagram","Showing how quantities flow between nodes; multi-source multi-target distribution","Flow directions form loops (use network graph); fewer than 3 source-target pairs; mobile-primary context","<50 flows: SVG; ≥50: Canvas; >200 flows: aggregate minor flows into 'Other' node","Gradient from source to target color. Flow opacity: 0.4–0.6. Node labels always visible",C,"Structural flow charts cannot be conveyed by color alone. Provide flow table. Avoid on mobile.","Flow table (Source → Target → Value); keyboard-traversable node list with tab stops","D3.js (d3-sankey), Plotly",Hover + Drilldown
|
||||
13,Cumulative Changes,"waterfall, cumulative, variance, incremental, bridge, delta",Waterfall Chart,"Stacked Bar, Cascade","Showing how individual positive/negative components add up to a final total (e.g., P&L, budget variance)","Changes are not additive; more than 12 bars (readability breaks); audience expects a simple total","4–12 bars optimal; beyond 12 aggregate minor items into a single 'Other' bar","Increases: #4CAF50. Decreases: #F44336. Start total: #2196F3. End total: #0D47A1. Running total line: dashed",AA,"Color + directional arrow icon per bar (not color alone). Labels on every bar.","Table with running total column; directional arrow icons per row","ApexCharts, Highcharts, Plotly",Hover
|
||||
14,Multi-Variable Comparison,"radar, spider, multi-variable, attributes, dimensions, comparison",Radar / Spider Chart,"Parallel Coordinates, Grouped Bar","Comparing multiple entities across the same fixed set of attributes (e.g., product feature comparison)","Axes > 8 (unreadable); values need precise comparison (use grouped bar); audience unfamiliar with radar charts","2–3 datasets maximum per chart; 5–8 axes; beyond 8 axes switch to parallel coordinates","Single dataset: #0080FF at 20% fill. Multiple: distinct hues with 30% fill. Border: full opacity",B,"Limit axes to 5–8. Always provide grouped bar chart alternative for precise reading.","Grouped bar chart as mandatory alternative; include raw data table","Chart.js, Recharts, ApexCharts",Hover + Toggle
|
||||
15,Stock / Trading OHLC,"stock, trading, ohlc, candlestick, finance, price, volume",Candlestick Chart,"OHLC Bar, Heikin-Ashi","Financial time-series with Open/High/Low/Close data; trading or investment product context only","Non-financial audience; no OHLC data available (use line chart); accessibility-first context","Real-time: Canvas required. Historical: paginate by time range. Max 500 candles visible at once","Bullish: #26A69A. Bearish: #EF5350. Volume bars: 40% opacity below. Body fill vs hollow for OHLC style",B,"Provide OHLC data table. Colorblind: use fill vs outline pattern (bullish = filled, bearish = hollow).","OHLC data table with sortable columns; numeric summary panel (daily change %)","Lightweight Charts (TradingView), ApexCharts",Real-time + Hover + Zoom
|
||||
16,Relationship / Connection Data,"network, graph, nodes, edges, connections, relationships, force",Network Graph,"Hierarchical Tree, Adjacency Matrix","Mapping connections between entities; network topology or social graph exploration context","Node count > 500 without clustering pre-applied; user needs precise connection counts; mobile context","≤100 nodes: SVG; 101–500: Canvas; >500: must apply clustering/LOD before rendering","Node types: categorical colors. Edges: #90A4AE at 60% opacity. Highlight path: #F59E0B",D,"Fundamentally inaccessible without alternative. Never use as sole representation. Always provide list alternative.","Adjacency list table (Node A → Node B → Weight); hierarchical tree view when structure allows","D3.js (d3-force), Vis.js, Cytoscape.js",Drilldown + Hover + Drag
|
||||
17,Distribution / Statistical,"distribution, statistical, spread, median, outlier, quartile, boxplot",Box Plot,"Violin Plot, Beeswarm","Showing spread, median, and outliers of a dataset; comparing distributions across multiple groups","Fewer than 20 data points per group (distribution is not meaningful); audience unfamiliar with statistical charts","Any sample size; aggregated representation so rendering is ⚡ Excellent at any volume","Box fill: #BBDEFB. Border: #1976D2. Median line: #D32F2F bold. Outlier dots: #F44336",AA,"Include stats summary table. Annotate outlier count in chart subtitle.","Stats summary table (min / Q1 / median / Q3 / max / mean); outlier count annotation","Plotly, D3.js, Chart.js (plugin)",Hover
|
||||
18,Performance vs Target (Compact),"bullet, compact, kpi, dashboard, target, benchmark, range",Bullet Chart,"Gauge, Progress Bar","Dashboard with multiple KPIs side by side; space-constrained contexts where a gauge is too large","Single KPI with emphasis (use gauge); data has no defined target range; fewer than 3 KPIs","Ideal for 3–10 bullet charts in a grid; scales to any count efficiently","Qualitative ranges: #FFCDD2 / #FFF9C4 / #C8E6C9 (bad/ok/good). Performance bar: #1976D2. Target: black 3px marker",AAA,"All values always visible as text. Color ranges are labeled with text thresholds not color alone.","Numerical values always visible (not hover-only); color ranges labeled with threshold text","D3.js, Plotly, Custom SVG",Hover
|
||||
19,Proportional / Percentage,"waffle, percentage, proportion, progress, filled, grid",Waffle Chart,"Pictogram, Stacked Bar 100%","Showing what fraction of a whole is filled; percentage progress in a visually engaging and accessible format","More than 5 categories (use stacked bar); exact values matter over visual proportion; very tight space","10×10 grid standard (100 cells); for > 5 categories switch to stacked 100% bar","3–5 categories max. 2–3px gap between cells. Each category a distinct accessible color pair",AA,"Better than pie for accessibility. Percentage text label always visible. Each cell has aria-label.","Percentage text always visible; grid cells labeled with aria-label value; provide legend","D3.js, React-Waffle, Custom CSS Grid",Hover
|
||||
20,Hierarchical Proportional,"sunburst, hierarchy, nested, proportion, radial, circle",Sunburst Chart,"Treemap, Icicle, Circle Packing","Exploring nested proportions where both hierarchy and relative size matter (e.g., org spend breakdown)","More than 3 hierarchy levels (outer rings become unreadable); precision matters over overview; mobile","<100 nodes: SVG; 100–500: Canvas; >500: filter to top N before rendering","Center to outer: darker to lighter hue. Each level 15–20% lighter. Contrasting border between sectors",C,"Poor accessibility beyond 2 levels. Mandatory table alternative required for any production use.","Collapsible indented list with percentages; breadcrumb trail for current drill-down state","D3.js (d3-hierarchy), Recharts, ApexCharts",Drilldown + Hover
|
||||
21,Root Cause Analysis,"root cause, decomposition, tree, hierarchy, drill-down, ai-split, attribution",Decomposition Tree,"Decision Tree, Flow Chart","Decomposing a metric into contributing factors; AI-assisted analysis or BI drill-down scenarios","No clear parent-child causal relationship; audience expects a summary rather than exploration","Up to 5 levels deep; limit visible nodes to 20 per level for readability; lazy-load deeper levels","Positive impact nodes: #2563EB. Negative impact nodes: #EF4444. Neutral connectors: #94A3B8",AA,"Keyboard-navigable expand/collapse. Screen reader announces node value and % contribution.","Keyboard expand/collapse tree; screen reader announces node label + value + % impact","Power BI (native), React-Flow, Custom D3.js",Drill + Expand
|
||||
22,3D Spatial Data,"3d, spatial, immersive, terrain, molecular, volumetric, point-cloud",3D Scatter / Surface Plot,"Volumetric Rendering, Point Cloud","Scientific/engineering context where Z-axis carries essential info not expressible in 2D","2D projection conveys the same insight; mobile context; accessibility-required environments; standard business dashboards","WebGL required. Deck.gl: up to 1M points. Three.js: LOD required beyond 50,000 pts","Depth cues: lighting and shading. Z-axis: color gradient (cool → warm). Transparent overlapping: opacity 0.4",D,"3D spatial charts are fundamentally inaccessible. Must not be used as primary chart type in any product UI.","Mandatory 2D projection view + data table; do not use as primary chart type in product UI","Three.js, Deck.gl, Plotly 3D",Rotate + Zoom + VR
|
||||
23,Real-Time Streaming,"streaming, real-time, ticker, live, velocity, pulse, monitoring",Streaming Area Chart,"Ticker Tape, Moving Gauge","Live monitoring dashboards; IoT/ops data updating at ≥1 Hz; user needs current value at a glance","Update frequency < 1/min (use periodic-refresh line chart); flashing content without reduced-motion support","Canvas/WebGL required. Buffer last 60–300s of data. Downsample older data on scroll","Current pulse: #00FF00 (dark theme) or #0080FF (light theme). History: fading opacity. Grid: dark background",B,"Pause/resume control required. Current value as large visible text KPI. Respect prefers-reduced-motion.","Pause/resume button required; current value shown as large text KPI; prefers-reduced-motion: freeze animation","Smoothed D3.js, CanvasJS",Real-time + Pause + Zoom
|
||||
24,Sentiment / Emotion,"sentiment, emotion, nlp, opinion, feeling, text-analysis",Word Cloud with Sentiment,"Sentiment Arc, Radar Chart","NLP output visualization; exploratory analysis of text corpus sentiment; frequency-weighted keyword overview","Precise values matter (word size is inherently imprecise); screen-reader context; corpus < 50 items","50–5000 terms optimal. Beyond 5000: apply top-N filtering before render. Avoid on mobile","Positive: #22C55E. Negative: #EF4444. Neutral: #94A3B8. Word size maps to frequency",C,"Word clouds fail screen readers. Never use as sole output of NLP analysis. Always pair with list view.","Sortable list view by frequency with sentiment label column; word cloud as supplementary only","D3-cloud, Highcharts, Nivo",Hover + Filter
|
||||
25,Process Mining,"process, mining, variants, path, bottleneck, log, event",Process Map / Graph,"Directed Acyclic Graph (DAG), Petri Net","Analyzing event logs to visualize actual process flows; identifying bottlenecks and deviations in ops/product funnels","No event log data available; audience expects a static flowchart (use diagram tool); node count > 100 without pre-filtering","<30 nodes: SVG; 30–100: Canvas; >100: apply variant filtering (top 80% of cases) before rendering","Happy path: #10B981 thick line. Deviations: #F59E0B thin line. Bottleneck nodes: #EF4444 fill",B,"Complex graphs are hard to navigate. Provide path summary text. Highlight top 3 bottlenecks as annotations.","Path summary table (variant → frequency → avg duration); top 3 bottlenecks as text annotation panel","React-Flow, Cytoscape.js, Recharts",Drag + Node-Click
|
||||
|
162
personas/_shared/community-skills/ui-ux-pro-max/data/colors.csv
Normal file
162
personas/_shared/community-skills/ui-ux-pro-max/data/colors.csv
Normal file
@@ -0,0 +1,162 @@
|
||||
No,Product Type,Primary,On Primary,Secondary,On Secondary,Accent,On Accent,Background,Foreground,Card,Card Foreground,Muted,Muted Foreground,Border,Destructive,On Destructive,Ring,Notes
|
||||
1,SaaS (General),#2563EB,#FFFFFF,#3B82F6,#FFFFFF,#EA580C,#FFFFFF,#F8FAFC,#1E293B,#FFFFFF,#1E293B,#E9EFF8,#64748B,#E2E8F0,#DC2626,#FFFFFF,#2563EB,Trust blue + orange CTA contrast [Accent adjusted from #F97316 for WCAG 3:1]
|
||||
2,Micro SaaS,#6366F1,#FFFFFF,#818CF8,#0F172A,#059669,#FFFFFF,#F5F3FF,#1E1B4B,#FFFFFF,#1E1B4B,#EBEFF9,#64748B,#E0E7FF,#DC2626,#FFFFFF,#6366F1,Indigo primary + emerald CTA [Accent adjusted from #10B981 for WCAG 3:1]
|
||||
3,E-commerce,#059669,#FFFFFF,#10B981,#0F172A,#EA580C,#FFFFFF,#ECFDF5,#064E3B,#FFFFFF,#064E3B,#E8F1F3,#64748B,#A7F3D0,#DC2626,#FFFFFF,#059669,Success green + urgency orange [Accent adjusted from #F97316 for WCAG 3:1]
|
||||
4,E-commerce Luxury,#1C1917,#FFFFFF,#44403C,#FFFFFF,#A16207,#FFFFFF,#FAFAF9,#0C0A09,#FFFFFF,#0C0A09,#E8ECF0,#64748B,#D6D3D1,#DC2626,#FFFFFF,#1C1917,Premium dark + gold accent [Accent adjusted from #CA8A04 for WCAG 3:1]
|
||||
5,B2B Service,#0F172A,#FFFFFF,#334155,#FFFFFF,#0369A1,#FFFFFF,#F8FAFC,#020617,#FFFFFF,#020617,#E8ECF1,#64748B,#E2E8F0,#DC2626,#FFFFFF,#0F172A,Professional navy + blue CTA
|
||||
6,Financial Dashboard,#0F172A,#FFFFFF,#1E293B,#FFFFFF,#22C55E,#0F172A,#020617,#F8FAFC,#0E1223,#F8FAFC,#1A1E2F,#94A3B8,#334155,#EF4444,#FFFFFF,#0F172A,Dark bg + green positive indicators
|
||||
7,Analytics Dashboard,#1E40AF,#FFFFFF,#3B82F6,#FFFFFF,#D97706,#FFFFFF,#F8FAFC,#1E3A8A,#FFFFFF,#1E3A8A,#E9EEF6,#64748B,#DBEAFE,#DC2626,#FFFFFF,#1E40AF,Blue data + amber highlights [Accent adjusted from #F59E0B for WCAG 3:1]
|
||||
8,Healthcare App,#0891B2,#FFFFFF,#22D3EE,#0F172A,#059669,#FFFFFF,#ECFEFF,#164E63,#FFFFFF,#164E63,#E8F1F6,#64748B,#A5F3FC,#DC2626,#FFFFFF,#0891B2,Calm cyan + health green
|
||||
9,Educational App,#4F46E5,#FFFFFF,#818CF8,#0F172A,#EA580C,#FFFFFF,#EEF2FF,#1E1B4B,#FFFFFF,#1E1B4B,#EBEEF8,#64748B,#C7D2FE,#DC2626,#FFFFFF,#4F46E5,Playful indigo + energetic orange [Accent adjusted from #F97316 for WCAG 3:1]
|
||||
10,Creative Agency,#EC4899,#FFFFFF,#F472B6,#0F172A,#0891B2,#FFFFFF,#FDF2F8,#831843,#FFFFFF,#831843,#F1EEF5,#64748B,#FBCFE8,#DC2626,#FFFFFF,#EC4899,Bold pink + cyan accent [Accent adjusted from #06B6D4 for WCAG 3:1]
|
||||
11,Portfolio/Personal,#18181B,#FFFFFF,#3F3F46,#FFFFFF,#2563EB,#FFFFFF,#FAFAFA,#09090B,#FFFFFF,#09090B,#E8ECF0,#64748B,#E4E4E7,#DC2626,#FFFFFF,#18181B,Monochrome + blue accent
|
||||
12,Gaming,#7C3AED,#FFFFFF,#A78BFA,#0F172A,#F43F5E,#FFFFFF,#0F0F23,#E2E8F0,#1E1C35,#E2E8F0,#27273B,#94A3B8,#4C1D95,#EF4444,#FFFFFF,#7C3AED,Neon purple + rose action
|
||||
13,Government/Public Service,#0F172A,#FFFFFF,#334155,#FFFFFF,#0369A1,#FFFFFF,#F8FAFC,#020617,#FFFFFF,#020617,#E8ECF1,#64748B,#E2E8F0,#DC2626,#FFFFFF,#0F172A,High contrast navy + blue
|
||||
14,Fintech/Crypto,#F59E0B,#0F172A,#FBBF24,#0F172A,#8B5CF6,#FFFFFF,#0F172A,#F8FAFC,#222735,#F8FAFC,#272F42,#94A3B8,#334155,#EF4444,#FFFFFF,#F59E0B,Gold trust + purple tech
|
||||
15,Social Media App,#E11D48,#FFFFFF,#FB7185,#0F172A,#2563EB,#FFFFFF,#FFF1F2,#881337,#FFFFFF,#881337,#F0ECF2,#64748B,#FECDD3,#DC2626,#FFFFFF,#E11D48,Vibrant rose + engagement blue
|
||||
16,Productivity Tool,#0D9488,#FFFFFF,#14B8A6,#0F172A,#EA580C,#FFFFFF,#F0FDFA,#134E4A,#FFFFFF,#134E4A,#E8F1F4,#64748B,#99F6E4,#DC2626,#FFFFFF,#0D9488,Teal focus + action orange [Accent adjusted from #F97316 for WCAG 3:1]
|
||||
17,Design System/Component Library,#4F46E5,#FFFFFF,#6366F1,#FFFFFF,#EA580C,#FFFFFF,#EEF2FF,#312E81,#FFFFFF,#312E81,#EBEEF8,#64748B,#C7D2FE,#DC2626,#FFFFFF,#4F46E5,Indigo brand + doc hierarchy [Accent adjusted from #F97316 for WCAG 3:1]
|
||||
18,AI/Chatbot Platform,#7C3AED,#FFFFFF,#A78BFA,#0F172A,#0891B2,#FFFFFF,#FAF5FF,#1E1B4B,#FFFFFF,#1E1B4B,#ECEEF9,#64748B,#DDD6FE,#DC2626,#FFFFFF,#7C3AED,AI purple + cyan interactions [Accent adjusted from #06B6D4 for WCAG 3:1]
|
||||
19,NFT/Web3 Platform,#8B5CF6,#FFFFFF,#A78BFA,#0F172A,#FBBF24,#0F172A,#0F0F23,#F8FAFC,#1E1D35,#F8FAFC,#27273B,#94A3B8,#4C1D95,#EF4444,#FFFFFF,#8B5CF6,Purple tech + gold value
|
||||
20,Creator Economy Platform,#EC4899,#FFFFFF,#F472B6,#0F172A,#EA580C,#FFFFFF,#FDF2F8,#831843,#FFFFFF,#831843,#F1EEF5,#64748B,#FBCFE8,#DC2626,#FFFFFF,#EC4899,Creator pink + engagement orange [Accent adjusted from #F97316 for WCAG 3:1]
|
||||
21,Remote Work/Collaboration Tool,#6366F1,#FFFFFF,#818CF8,#0F172A,#059669,#FFFFFF,#F5F3FF,#312E81,#FFFFFF,#312E81,#EBEFF9,#64748B,#E0E7FF,#DC2626,#FFFFFF,#6366F1,Calm indigo + success green [Accent adjusted from #10B981 for WCAG 3:1]
|
||||
22,Mental Health App,#8B5CF6,#FFFFFF,#C4B5FD,#0F172A,#059669,#FFFFFF,#FAF5FF,#4C1D95,#FFFFFF,#4C1D95,#EDEFF9,#64748B,#EDE9FE,#DC2626,#FFFFFF,#8B5CF6,Calming lavender + wellness green [Accent adjusted from #10B981 for WCAG 3:1]
|
||||
23,Pet Tech App,#F97316,#0F172A,#FB923C,#0F172A,#2563EB,#FFFFFF,#FFF7ED,#9A3412,#FFFFFF,#9A3412,#F1F0F0,#64748B,#FED7AA,#DC2626,#FFFFFF,#F97316,Playful orange + trust blue
|
||||
24,Smart Home/IoT Dashboard,#1E293B,#FFFFFF,#334155,#FFFFFF,#22C55E,#0F172A,#0F172A,#F8FAFC,#1B2336,#F8FAFC,#272F42,#94A3B8,#475569,#EF4444,#FFFFFF,#1E293B,Dark tech + status green
|
||||
25,EV/Charging Ecosystem,#0891B2,#FFFFFF,#22D3EE,#0F172A,#16A34A,#FFFFFF,#ECFEFF,#164E63,#FFFFFF,#164E63,#E8F1F6,#64748B,#A5F3FC,#DC2626,#FFFFFF,#0891B2,Electric cyan + eco green [Accent adjusted from #22C55E for WCAG 3:1]
|
||||
26,Subscription Box Service,#D946EF,#FFFFFF,#E879F9,#0F172A,#EA580C,#FFFFFF,#FDF4FF,#86198F,#FFFFFF,#86198F,#F0EEF9,#64748B,#F5D0FE,#DC2626,#FFFFFF,#D946EF,Excitement purple + urgency orange [Accent adjusted from #F97316 for WCAG 3:1]
|
||||
27,Podcast Platform,#1E1B4B,#FFFFFF,#312E81,#FFFFFF,#F97316,#0F172A,#0F0F23,#F8FAFC,#1B1B30,#F8FAFC,#27273B,#94A3B8,#4338CA,#EF4444,#FFFFFF,#1E1B4B,Dark audio + warm accent
|
||||
28,Dating App,#E11D48,#FFFFFF,#FB7185,#0F172A,#EA580C,#FFFFFF,#FFF1F2,#881337,#FFFFFF,#881337,#F0ECF2,#64748B,#FECDD3,#DC2626,#FFFFFF,#E11D48,Romantic rose + warm orange [Accent adjusted from #F97316 for WCAG 3:1]
|
||||
29,Micro-Credentials/Badges Platform,#0369A1,#FFFFFF,#0EA5E9,#0F172A,#A16207,#FFFFFF,#F0F9FF,#0C4A6E,#FFFFFF,#0C4A6E,#E7EFF5,#64748B,#BAE6FD,#DC2626,#FFFFFF,#0369A1,Trust blue + achievement gold [Accent adjusted from #CA8A04 for WCAG 3:1]
|
||||
30,Knowledge Base/Documentation,#475569,#FFFFFF,#64748B,#FFFFFF,#2563EB,#FFFFFF,#F8FAFC,#1E293B,#FFFFFF,#1E293B,#EAEFF3,#64748B,#E2E8F0,#DC2626,#FFFFFF,#475569,Neutral grey + link blue
|
||||
31,Hyperlocal Services,#059669,#FFFFFF,#10B981,#0F172A,#EA580C,#FFFFFF,#ECFDF5,#064E3B,#FFFFFF,#064E3B,#E8F1F3,#64748B,#A7F3D0,#DC2626,#FFFFFF,#059669,Location green + action orange [Accent adjusted from #F97316 for WCAG 3:1]
|
||||
32,Beauty/Spa/Wellness Service,#EC4899,#FFFFFF,#F9A8D4,#0F172A,#8B5CF6,#FFFFFF,#FDF2F8,#831843,#FFFFFF,#831843,#F1EEF5,#64748B,#FBCFE8,#DC2626,#FFFFFF,#EC4899,Soft pink + lavender luxury
|
||||
33,Luxury/Premium Brand,#1C1917,#FFFFFF,#44403C,#FFFFFF,#A16207,#FFFFFF,#FAFAF9,#0C0A09,#FFFFFF,#0C0A09,#E8ECF0,#64748B,#D6D3D1,#DC2626,#FFFFFF,#1C1917,Premium black + gold accent [Accent adjusted from #CA8A04 for WCAG 3:1]
|
||||
34,Restaurant/Food Service,#DC2626,#FFFFFF,#F87171,#0F172A,#A16207,#FFFFFF,#FEF2F2,#450A0A,#FFFFFF,#450A0A,#F0EDF1,#64748B,#FECACA,#DC2626,#FFFFFF,#DC2626,Appetizing red + warm gold [Accent adjusted from #CA8A04 for WCAG 3:1]
|
||||
35,Fitness/Gym App,#F97316,#0F172A,#FB923C,#0F172A,#22C55E,#0F172A,#1F2937,#F8FAFC,#313742,#F8FAFC,#37414F,#94A3B8,#374151,#EF4444,#FFFFFF,#F97316,Energy orange + success green
|
||||
36,Real Estate/Property,#0F766E,#FFFFFF,#14B8A6,#0F172A,#0369A1,#FFFFFF,#F0FDFA,#134E4A,#FFFFFF,#134E4A,#E8F0F3,#64748B,#99F6E4,#DC2626,#FFFFFF,#0F766E,Trust teal + professional blue
|
||||
37,Travel/Tourism Agency,#0EA5E9,#0F172A,#38BDF8,#0F172A,#EA580C,#FFFFFF,#F0F9FF,#0C4A6E,#FFFFFF,#0C4A6E,#E8F2F8,#64748B,#BAE6FD,#DC2626,#FFFFFF,#0EA5E9,Sky blue + adventure orange [Accent adjusted from #F97316 for WCAG 3:1]
|
||||
38,Hotel/Hospitality,#1E3A8A,#FFFFFF,#3B82F6,#FFFFFF,#A16207,#FFFFFF,#F8FAFC,#1E40AF,#FFFFFF,#1E40AF,#E9EEF5,#64748B,#BFDBFE,#DC2626,#FFFFFF,#1E3A8A,Luxury navy + gold service [Accent adjusted from #CA8A04 for WCAG 3:1]
|
||||
39,Wedding/Event Planning,#DB2777,#FFFFFF,#F472B6,#0F172A,#A16207,#FFFFFF,#FDF2F8,#831843,#FFFFFF,#831843,#F0EDF4,#64748B,#FBCFE8,#DC2626,#FFFFFF,#DB2777,Romantic pink + elegant gold [Accent adjusted from #CA8A04 for WCAG 3:1]
|
||||
40,Legal Services,#1E3A8A,#FFFFFF,#1E40AF,#FFFFFF,#B45309,#FFFFFF,#F8FAFC,#0F172A,#FFFFFF,#0F172A,#E9EEF5,#64748B,#CBD5E1,#DC2626,#FFFFFF,#1E3A8A,Authority navy + trust gold
|
||||
41,Insurance Platform,#0369A1,#FFFFFF,#0EA5E9,#0F172A,#16A34A,#FFFFFF,#F0F9FF,#0C4A6E,#FFFFFF,#0C4A6E,#E7EFF5,#64748B,#BAE6FD,#DC2626,#FFFFFF,#0369A1,Security blue + protected green [Accent adjusted from #22C55E for WCAG 3:1]
|
||||
42,Banking/Traditional Finance,#0F172A,#FFFFFF,#1E3A8A,#FFFFFF,#A16207,#FFFFFF,#F8FAFC,#020617,#FFFFFF,#020617,#E8ECF1,#64748B,#E2E8F0,#DC2626,#FFFFFF,#0F172A,Trust navy + premium gold [Accent adjusted from #CA8A04 for WCAG 3:1]
|
||||
43,Online Course/E-learning,#0D9488,#FFFFFF,#2DD4BF,#0F172A,#EA580C,#FFFFFF,#F0FDFA,#134E4A,#FFFFFF,#134E4A,#E8F1F4,#64748B,#5EEAD4,#DC2626,#FFFFFF,#0D9488,Progress teal + achievement orange [Accent adjusted from #F97316 for WCAG 3:1]
|
||||
44,Non-profit/Charity,#0891B2,#FFFFFF,#22D3EE,#0F172A,#EA580C,#FFFFFF,#ECFEFF,#164E63,#FFFFFF,#164E63,#E8F1F6,#64748B,#A5F3FC,#DC2626,#FFFFFF,#0891B2,Compassion blue + action orange [Accent adjusted from #F97316 for WCAG 3:1]
|
||||
45,Music Streaming,#1E1B4B,#FFFFFF,#4338CA,#FFFFFF,#22C55E,#0F172A,#0F0F23,#F8FAFC,#1B1B30,#F8FAFC,#27273B,#94A3B8,#312E81,#EF4444,#FFFFFF,#1E1B4B,Dark audio + play green
|
||||
46,Video Streaming/OTT,#0F0F23,#FFFFFF,#1E1B4B,#FFFFFF,#E11D48,#FFFFFF,#000000,#F8FAFC,#0C0C0D,#F8FAFC,#181818,#94A3B8,#312E81,#EF4444,#FFFFFF,#0F0F23,Cinema dark + play red
|
||||
47,Job Board/Recruitment,#0369A1,#FFFFFF,#0EA5E9,#0F172A,#16A34A,#FFFFFF,#F0F9FF,#0C4A6E,#FFFFFF,#0C4A6E,#E7EFF5,#64748B,#BAE6FD,#DC2626,#FFFFFF,#0369A1,Professional blue + success green [Accent adjusted from #22C55E for WCAG 3:1]
|
||||
48,Marketplace (P2P),#7C3AED,#FFFFFF,#A78BFA,#0F172A,#16A34A,#FFFFFF,#FAF5FF,#4C1D95,#FFFFFF,#4C1D95,#ECEEF9,#64748B,#DDD6FE,#DC2626,#FFFFFF,#7C3AED,Trust purple + transaction green [Accent adjusted from #22C55E for WCAG 3:1]
|
||||
49,Logistics/Delivery,#2563EB,#FFFFFF,#3B82F6,#FFFFFF,#EA580C,#FFFFFF,#EFF6FF,#1E40AF,#FFFFFF,#1E40AF,#E9EFF8,#64748B,#BFDBFE,#DC2626,#FFFFFF,#2563EB,Tracking blue + delivery orange [Accent adjusted from #F97316 for WCAG 3:1]
|
||||
50,Agriculture/Farm Tech,#15803D,#FFFFFF,#22C55E,#0F172A,#A16207,#FFFFFF,#F0FDF4,#14532D,#FFFFFF,#14532D,#E8F0F1,#64748B,#BBF7D0,#DC2626,#FFFFFF,#15803D,Earth green + harvest gold [Accent adjusted from #CA8A04 for WCAG 3:1]
|
||||
51,Construction/Architecture,#64748B,#FFFFFF,#94A3B8,#0F172A,#EA580C,#FFFFFF,#F8FAFC,#334155,#FFFFFF,#334155,#EBF0F5,#64748B,#E2E8F0,#DC2626,#FFFFFF,#64748B,Industrial grey + safety orange [Accent adjusted from #F97316 for WCAG 3:1]
|
||||
52,Automotive/Car Dealership,#1E293B,#FFFFFF,#334155,#FFFFFF,#DC2626,#FFFFFF,#F8FAFC,#0F172A,#FFFFFF,#0F172A,#E9EDF1,#64748B,#E2E8F0,#DC2626,#FFFFFF,#1E293B,Premium dark + action red
|
||||
53,Photography Studio,#18181B,#FFFFFF,#27272A,#FFFFFF,#F8FAFC,#0F172A,#000000,#FAFAFA,#0C0C0C,#FAFAFA,#181818,#94A3B8,#3F3F46,#EF4444,#FFFFFF,#18181B,Pure black + white contrast
|
||||
54,Coworking Space,#F59E0B,#0F172A,#FBBF24,#0F172A,#2563EB,#FFFFFF,#FFFBEB,#78350F,#FFFFFF,#78350F,#F1F2EF,#64748B,#FDE68A,#DC2626,#FFFFFF,#F59E0B,Energetic amber + booking blue
|
||||
55,Home Services (Plumber/Electrician),#1E40AF,#FFFFFF,#3B82F6,#FFFFFF,#EA580C,#FFFFFF,#EFF6FF,#1E3A8A,#FFFFFF,#1E3A8A,#E9EEF6,#64748B,#BFDBFE,#DC2626,#FFFFFF,#1E40AF,Professional blue + urgent orange [Accent adjusted from #F97316 for WCAG 3:1]
|
||||
56,Childcare/Daycare,#F472B6,#0F172A,#FBCFE8,#0F172A,#16A34A,#FFFFFF,#FDF2F8,#9D174D,#FFFFFF,#9D174D,#F1F0F6,#64748B,#FCE7F3,#DC2626,#FFFFFF,#F472B6,Soft pink + safe green [Accent adjusted from #22C55E for WCAG 3:1]
|
||||
57,Senior Care/Elderly,#0369A1,#FFFFFF,#38BDF8,#0F172A,#16A34A,#FFFFFF,#F0F9FF,#0C4A6E,#FFFFFF,#0C4A6E,#E7EFF5,#64748B,#E0F2FE,#DC2626,#FFFFFF,#0369A1,Calm blue + reassuring green [Accent adjusted from #22C55E for WCAG 3:1]
|
||||
58,Medical Clinic,#0891B2,#FFFFFF,#22D3EE,#0F172A,#16A34A,#FFFFFF,#F0FDFA,#134E4A,#FFFFFF,#134E4A,#E8F1F6,#64748B,#CCFBF1,#DC2626,#FFFFFF,#0891B2,Medical teal + health green [Accent adjusted from #22C55E for WCAG 3:1]
|
||||
59,Pharmacy/Drug Store,#15803D,#FFFFFF,#22C55E,#0F172A,#0369A1,#FFFFFF,#F0FDF4,#14532D,#FFFFFF,#14532D,#E8F0F1,#64748B,#BBF7D0,#DC2626,#FFFFFF,#15803D,Pharmacy green + trust blue
|
||||
60,Dental Practice,#0EA5E9,#0F172A,#38BDF8,#0F172A,#0EA5E9,#0F172A,#F0F9FF,#0C4A6E,#FFFFFF,#0C4A6E,#E8F2F8,#64748B,#BAE6FD,#DC2626,#FFFFFF,#0EA5E9,Fresh blue + smile yellow [Accent adjusted from #FBBF24 for WCAG 3:1]
|
||||
61,Veterinary Clinic,#0D9488,#FFFFFF,#14B8A6,#0F172A,#EA580C,#FFFFFF,#F0FDFA,#134E4A,#FFFFFF,#134E4A,#E8F1F4,#64748B,#99F6E4,#DC2626,#FFFFFF,#0D9488,Caring teal + warm orange [Accent adjusted from #F97316 for WCAG 3:1]
|
||||
62,Florist/Plant Shop,#15803D,#FFFFFF,#22C55E,#0F172A,#EC4899,#FFFFFF,#F0FDF4,#14532D,#FFFFFF,#14532D,#E8F0F1,#64748B,#BBF7D0,#DC2626,#FFFFFF,#15803D,Natural green + floral pink
|
||||
63,Bakery/Cafe,#92400E,#FFFFFF,#B45309,#FFFFFF,#92400E,#FFFFFF,#FEF3C7,#78350F,#FFFFFF,#78350F,#EDEEF0,#64748B,#FDE68A,#DC2626,#FFFFFF,#92400E,Warm brown + cream white [Accent adjusted from #F8FAFC for WCAG 3:1]
|
||||
64,Brewery/Winery,#7C2D12,#FFFFFF,#B91C1C,#FFFFFF,#A16207,#FFFFFF,#FEF2F2,#450A0A,#FFFFFF,#450A0A,#ECEDF0,#64748B,#FECACA,#DC2626,#FFFFFF,#7C2D12,Deep burgundy + craft gold [Accent adjusted from #CA8A04 for WCAG 3:1]
|
||||
65,Airline,#1E3A8A,#FFFFFF,#3B82F6,#FFFFFF,#EA580C,#FFFFFF,#EFF6FF,#1E40AF,#FFFFFF,#1E40AF,#E9EEF5,#64748B,#BFDBFE,#DC2626,#FFFFFF,#1E3A8A,Sky blue + booking orange [Accent adjusted from #F97316 for WCAG 3:1]
|
||||
66,News/Media Platform,#DC2626,#FFFFFF,#EF4444,#FFFFFF,#1E40AF,#FFFFFF,#FEF2F2,#450A0A,#FFFFFF,#450A0A,#F0EDF1,#64748B,#FECACA,#DC2626,#FFFFFF,#DC2626,Breaking red + link blue
|
||||
67,Magazine/Blog,#18181B,#FFFFFF,#3F3F46,#FFFFFF,#EC4899,#FFFFFF,#FAFAFA,#09090B,#FFFFFF,#09090B,#E8ECF0,#64748B,#E4E4E7,#DC2626,#FFFFFF,#18181B,Editorial black + accent pink
|
||||
68,Freelancer Platform,#6366F1,#FFFFFF,#818CF8,#0F172A,#16A34A,#FFFFFF,#EEF2FF,#312E81,#FFFFFF,#312E81,#EBEFF9,#64748B,#C7D2FE,#DC2626,#FFFFFF,#6366F1,Creative indigo + hire green [Accent adjusted from #22C55E for WCAG 3:1]
|
||||
69,Marketing Agency,#EC4899,#FFFFFF,#F472B6,#0F172A,#0891B2,#FFFFFF,#FDF2F8,#831843,#FFFFFF,#831843,#F1EEF5,#64748B,#FBCFE8,#DC2626,#FFFFFF,#EC4899,Bold pink + creative cyan [Accent adjusted from #06B6D4 for WCAG 3:1]
|
||||
70,Event Management,#7C3AED,#FFFFFF,#A78BFA,#0F172A,#EA580C,#FFFFFF,#FAF5FF,#4C1D95,#FFFFFF,#4C1D95,#ECEEF9,#64748B,#DDD6FE,#DC2626,#FFFFFF,#7C3AED,Excitement purple + action orange [Accent adjusted from #F97316 for WCAG 3:1]
|
||||
71,Membership/Community,#7C3AED,#FFFFFF,#A78BFA,#0F172A,#16A34A,#FFFFFF,#FAF5FF,#4C1D95,#FFFFFF,#4C1D95,#ECEEF9,#64748B,#DDD6FE,#DC2626,#FFFFFF,#7C3AED,Community purple + join green [Accent adjusted from #22C55E for WCAG 3:1]
|
||||
72,Newsletter Platform,#0369A1,#FFFFFF,#0EA5E9,#0F172A,#EA580C,#FFFFFF,#F0F9FF,#0C4A6E,#FFFFFF,#0C4A6E,#E7EFF5,#64748B,#BAE6FD,#DC2626,#FFFFFF,#0369A1,Trust blue + subscribe orange [Accent adjusted from #F97316 for WCAG 3:1]
|
||||
73,Digital Products/Downloads,#6366F1,#FFFFFF,#818CF8,#0F172A,#16A34A,#FFFFFF,#EEF2FF,#312E81,#FFFFFF,#312E81,#EBEFF9,#64748B,#C7D2FE,#DC2626,#FFFFFF,#6366F1,Digital indigo + buy green [Accent adjusted from #22C55E for WCAG 3:1]
|
||||
74,Church/Religious Organization,#7C3AED,#FFFFFF,#A78BFA,#0F172A,#A16207,#FFFFFF,#FAF5FF,#4C1D95,#FFFFFF,#4C1D95,#ECEEF9,#64748B,#DDD6FE,#DC2626,#FFFFFF,#7C3AED,Spiritual purple + warm gold [Accent adjusted from #CA8A04 for WCAG 3:1]
|
||||
75,Sports Team/Club,#DC2626,#FFFFFF,#EF4444,#FFFFFF,#DC2626,#FFFFFF,#FEF2F2,#7F1D1D,#FFFFFF,#7F1D1D,#F0EDF1,#64748B,#FECACA,#DC2626,#FFFFFF,#DC2626,Team red + championship gold [Accent adjusted from #FBBF24 for WCAG 3:1]
|
||||
76,Museum/Gallery,#18181B,#FFFFFF,#27272A,#FFFFFF,#18181B,#FFFFFF,#FAFAFA,#09090B,#FFFFFF,#09090B,#E8ECF0,#64748B,#E4E4E7,#DC2626,#FFFFFF,#18181B,Gallery black + white space [Accent adjusted from #F8FAFC for WCAG 3:1]
|
||||
77,Theater/Cinema,#1E1B4B,#FFFFFF,#312E81,#FFFFFF,#CA8A04,#0F172A,#0F0F23,#F8FAFC,#1B1B30,#F8FAFC,#27273B,#94A3B8,#4338CA,#EF4444,#FFFFFF,#1E1B4B,Dramatic dark + spotlight gold
|
||||
78,Language Learning App,#4F46E5,#FFFFFF,#818CF8,#0F172A,#16A34A,#FFFFFF,#EEF2FF,#312E81,#FFFFFF,#312E81,#EBEEF8,#64748B,#C7D2FE,#DC2626,#FFFFFF,#4F46E5,Learning indigo + progress green [Accent adjusted from #22C55E for WCAG 3:1]
|
||||
79,Coding Bootcamp,#0F172A,#FFFFFF,#1E293B,#FFFFFF,#22C55E,#0F172A,#020617,#F8FAFC,#0E1223,#F8FAFC,#1A1E2F,#94A3B8,#334155,#EF4444,#FFFFFF,#0F172A,Terminal dark + success green
|
||||
80,Cybersecurity Platform,#00FF41,#0F172A,#0D0D0D,#FFFFFF,#FF3333,#FFFFFF,#000000,#E0E0E0,#0C130E,#E0E0E0,#181818,#94A3B8,#1F1F1F,#EF4444,#FFFFFF,#00FF41,Matrix green + alert red
|
||||
81,Developer Tool / IDE,#1E293B,#FFFFFF,#334155,#FFFFFF,#22C55E,#0F172A,#0F172A,#F8FAFC,#1B2336,#F8FAFC,#272F42,#94A3B8,#475569,#EF4444,#FFFFFF,#1E293B,Code dark + run green
|
||||
82,Biotech / Life Sciences,#0EA5E9,#0F172A,#0284C7,#FFFFFF,#059669,#FFFFFF,#F0F9FF,#0C4A6E,#FFFFFF,#0C4A6E,#E8F2F8,#64748B,#BAE6FD,#DC2626,#FFFFFF,#0EA5E9,DNA blue + life green [Accent adjusted from #10B981 for WCAG 3:1]
|
||||
83,Space Tech / Aerospace,#F8FAFC,#0F172A,#94A3B8,#0F172A,#3B82F6,#FFFFFF,#0B0B10,#F8FAFC,#1E1E23,#F8FAFC,#232328,#94A3B8,#1E293B,#EF4444,#FFFFFF,#F8FAFC,Star white + launch blue
|
||||
84,Architecture / Interior,#171717,#FFFFFF,#404040,#FFFFFF,#A16207,#FFFFFF,#FFFFFF,#171717,#FFFFFF,#171717,#E8ECF0,#64748B,#E5E5E5,#DC2626,#FFFFFF,#171717,Minimal black + accent gold [Accent adjusted from #D4AF37 for WCAG 3:1]
|
||||
85,Quantum Computing Interface,#00FFFF,#0F172A,#7B61FF,#FFFFFF,#FF00FF,#FFFFFF,#050510,#E0E0FF,#101823,#E0E0FF,#1D1D28,#94A3B8,#333344,#EF4444,#FFFFFF,#00FFFF,Quantum cyan + interference purple
|
||||
86,Biohacking / Longevity App,#FF4D4D,#FFFFFF,#4D94FF,#FFFFFF,#059669,#FFFFFF,#F5F5F7,#1C1C1E,#FFFFFF,#1C1C1E,#F2EEF2,#64748B,#E5E5EA,#DC2626,#FFFFFF,#FF4D4D,Bio red/blue + vitality green [Accent adjusted from #00E676 for WCAG 3:1]
|
||||
87,Autonomous Drone Fleet Manager,#00FF41,#0F172A,#008F11,#FFFFFF,#FF3333,#FFFFFF,#0D1117,#E6EDF3,#182424,#E6EDF3,#25292F,#94A3B8,#30363D,#EF4444,#FFFFFF,#00FF41,Terminal green + alert red
|
||||
88,Generative Art Platform,#18181B,#FFFFFF,#3F3F46,#FFFFFF,#EC4899,#FFFFFF,#FAFAFA,#09090B,#FFFFFF,#09090B,#E8ECF0,#64748B,#E4E4E7,#DC2626,#FFFFFF,#18181B,Canvas neutral + creative pink
|
||||
89,Spatial Computing OS / App,#FFFFFF,#0F172A,#E5E5E5,#0F172A,#FFFFFF,#0F172A,#888888,#000000,#999999,#000000,#777777,#D4D4D4,#CCCCCC,#FF3B30,#FFFFFF,#007AFF,Glass white + system blue [Accent adjusted from #007AFF for WCAG 3:1]
|
||||
90,Sustainable Energy / Climate Tech,#059669,#FFFFFF,#10B981,#0F172A,#059669,#FFFFFF,#ECFDF5,#064E3B,#FFFFFF,#064E3B,#E8F1F3,#64748B,#A7F3D0,#DC2626,#FFFFFF,#059669,Nature green + solar gold [Accent adjusted from #FBBF24 for WCAG 3:1]
|
||||
91,Personal Finance Tracker,#1E40AF,#FFFFFF,#3B82F6,#FFFFFF,#059669,#FFFFFF,#0F172A,#FFFFFF,#192134,#FFFFFF,#101A34,#94A3B8,"rgba(255,255,255,0.08)",#DC2626,#FFFFFF,#1E40AF,Trust blue + profit green on dark
|
||||
92,Chat & Messaging App,#2563EB,#FFFFFF,#6366F1,#FFFFFF,#059669,#FFFFFF,#FFFFFF,#0F172A,#FFFFFF,#0F172A,#F1F5FD,#64748B,#E4ECFC,#DC2626,#FFFFFF,#2563EB,Messenger blue + online green
|
||||
93,Notes & Writing App,#78716C,#FFFFFF,#A8A29E,#FFFFFF,#D97706,#FFFFFF,#FFFBEB,#0F172A,#FFFFFF,#0F172A,#F6F6F6,#64748B,#EEEDED,#DC2626,#FFFFFF,#78716C,Warm ink + amber accent on cream
|
||||
94,Habit Tracker,#D97706,#FFFFFF,#F59E0B,#0F172A,#059669,#FFFFFF,#FFFBEB,#0F172A,#FFFFFF,#0F172A,#FCF6F0,#64748B,#FAEEE1,#DC2626,#FFFFFF,#D97706,Streak amber + habit green
|
||||
95,Food Delivery / On-Demand,#EA580C,#FFFFFF,#F97316,#FFFFFF,#2563EB,#FFFFFF,#FFF7ED,#0F172A,#FFFFFF,#0F172A,#FDF4F0,#64748B,#FCEAE1,#DC2626,#FFFFFF,#EA580C,Appetizing orange + trust blue
|
||||
96,Ride Hailing / Transportation,#1E293B,#FFFFFF,#334155,#FFFFFF,#2563EB,#FFFFFF,#0F172A,#FFFFFF,#192134,#FFFFFF,#10182B,#94A3B8,"rgba(255,255,255,0.08)",#DC2626,#FFFFFF,#1E293B,Map dark + route blue
|
||||
97,Recipe & Cooking App,#9A3412,#FFFFFF,#C2410C,#FFFFFF,#059669,#FFFFFF,#FFFBEB,#0F172A,#FFFFFF,#0F172A,#F8F2F0,#64748B,#F2E6E2,#DC2626,#FFFFFF,#9A3412,Warm terracotta + fresh green
|
||||
98,Meditation & Mindfulness,#7C3AED,#FFFFFF,#8B5CF6,#FFFFFF,#059669,#FFFFFF,#FAF5FF,#0F172A,#FFFFFF,#0F172A,#F7F3FD,#64748B,#EFE7FC,#DC2626,#FFFFFF,#7C3AED,Calm lavender + mindful green
|
||||
99,Weather App,#0284C7,#FFFFFF,#0EA5E9,#FFFFFF,#F59E0B,#0F172A,#F0F9FF,#0F172A,#FFFFFF,#0F172A,#EFF7FB,#64748B,#E0F0F8,#DC2626,#FFFFFF,#0284C7,Sky blue + sun amber
|
||||
100,Diary & Journal App,#92400E,#FFFFFF,#A16207,#FFFFFF,#6366F1,#FFFFFF,#FFFBEB,#0F172A,#FFFFFF,#0F172A,#F8F3F0,#64748B,#F1E8E2,#DC2626,#FFFFFF,#92400E,Warm journal brown + ink violet
|
||||
101,CRM & Client Management,#2563EB,#FFFFFF,#3B82F6,#FFFFFF,#059669,#FFFFFF,#F8FAFC,#0F172A,#FFFFFF,#0F172A,#F1F5FD,#64748B,#E4ECFC,#DC2626,#FFFFFF,#2563EB,Professional blue + deal green
|
||||
102,Inventory & Stock Management,#334155,#FFFFFF,#475569,#FFFFFF,#059669,#FFFFFF,#F8FAFC,#0F172A,#FFFFFF,#0F172A,#F2F3F4,#64748B,#E6E8EA,#DC2626,#FFFFFF,#334155,Industrial slate + stock green
|
||||
103,Flashcard & Study Tool,#7C3AED,#FFFFFF,#8B5CF6,#FFFFFF,#059669,#FFFFFF,#FAF5FF,#0F172A,#FFFFFF,#0F172A,#F7F3FD,#64748B,#EFE7FC,#DC2626,#FFFFFF,#7C3AED,Study purple + correct green
|
||||
104,Booking & Appointment App,#0284C7,#FFFFFF,#0EA5E9,#FFFFFF,#059669,#FFFFFF,#F0F9FF,#0F172A,#FFFFFF,#0F172A,#EFF7FB,#64748B,#E0F0F8,#DC2626,#FFFFFF,#0284C7,Calendar blue + available green
|
||||
105,Invoice & Billing Tool,#1E3A5F,#FFFFFF,#2563EB,#FFFFFF,#059669,#FFFFFF,#F8FAFC,#0F172A,#FFFFFF,#0F172A,#F1F3F5,#64748B,#E4E7EB,#DC2626,#FFFFFF,#1E3A5F,Navy professional + paid green
|
||||
106,Grocery & Shopping List,#059669,#FFFFFF,#10B981,#FFFFFF,#D97706,#FFFFFF,#ECFDF5,#0F172A,#FFFFFF,#0F172A,#F0F8F6,#64748B,#E1F2ED,#DC2626,#FFFFFF,#059669,Fresh green + food amber
|
||||
107,Timer & Pomodoro,#DC2626,#FFFFFF,#EF4444,#FFFFFF,#059669,#FFFFFF,#0F172A,#FFFFFF,#192134,#FFFFFF,#1F1829,#94A3B8,"rgba(255,255,255,0.08)",#DC2626,#FFFFFF,#DC2626,Focus red on dark + break green
|
||||
108,Parenting & Baby Tracker,#EC4899,#FFFFFF,#F472B6,#FFFFFF,#0284C7,#FFFFFF,#FDF2F8,#0F172A,#FFFFFF,#0F172A,#FDF4F8,#64748B,#FCE9F2,#DC2626,#FFFFFF,#EC4899,Soft pink + trust blue
|
||||
109,Scanner & Document Manager,#1E293B,#FFFFFF,#334155,#FFFFFF,#2563EB,#FFFFFF,#F8FAFC,#0F172A,#FFFFFF,#0F172A,#F1F2F3,#64748B,#E4E5E7,#DC2626,#FFFFFF,#1E293B,Document grey + scan blue
|
||||
110,Calendar & Scheduling App,#2563EB,#FFFFFF,#3B82F6,#FFFFFF,#059669,#FFFFFF,#F8FAFC,#0F172A,#FFFFFF,#0F172A,#F1F5FD,#64748B,#E4ECFC,#DC2626,#FFFFFF,#2563EB,Calendar blue + event green
|
||||
111,Password Manager,#1E3A5F,#FFFFFF,#334155,#FFFFFF,#059669,#FFFFFF,#0F172A,#FFFFFF,#192134,#FFFFFF,#10192E,#94A3B8,"rgba(255,255,255,0.08)",#DC2626,#FFFFFF,#1E3A5F,Vault dark blue + secure green
|
||||
112,Expense Splitter / Bill Split,#059669,#FFFFFF,#10B981,#FFFFFF,#DC2626,#FFFFFF,#F8FAFC,#0F172A,#FFFFFF,#0F172A,#F0F8F6,#64748B,#E1F2ED,#DC2626,#FFFFFF,#059669,Balance green + owe red
|
||||
113,Voice Recorder & Memo,#DC2626,#FFFFFF,#EF4444,#FFFFFF,#2563EB,#FFFFFF,#FFFFFF,#0F172A,#FFFFFF,#0F172A,#FCF1F1,#64748B,#FAE4E4,#DC2626,#FFFFFF,#DC2626,Recording red + waveform blue
|
||||
114,Bookmark & Read-Later,#D97706,#FFFFFF,#F59E0B,#0F172A,#2563EB,#FFFFFF,#FFFBEB,#0F172A,#FFFFFF,#0F172A,#FCF6F0,#64748B,#FAEEE1,#DC2626,#FFFFFF,#D97706,Warm amber + link blue
|
||||
115,Translator App,#2563EB,#FFFFFF,#0891B2,#FFFFFF,#EA580C,#FFFFFF,#F8FAFC,#0F172A,#FFFFFF,#0F172A,#F1F5FD,#64748B,#E4ECFC,#DC2626,#FFFFFF,#2563EB,Global blue + teal + accent orange
|
||||
116,Calculator & Unit Converter,#EA580C,#FFFFFF,#F97316,#FFFFFF,#2563EB,#FFFFFF,#1C1917,#FFFFFF,#262321,#FFFFFF,#2C1E16,#94A3B8,"rgba(255,255,255,0.08)",#DC2626,#FFFFFF,#EA580C,Operation orange on dark
|
||||
117,Alarm & World Clock,#D97706,#FFFFFF,#F59E0B,#0F172A,#6366F1,#FFFFFF,#0F172A,#FFFFFF,#192134,#FFFFFF,#1F1E27,#94A3B8,"rgba(255,255,255,0.08)",#DC2626,#FFFFFF,#D97706,Time amber + night indigo on dark
|
||||
118,File Manager & Transfer,#2563EB,#FFFFFF,#3B82F6,#FFFFFF,#D97706,#FFFFFF,#F8FAFC,#0F172A,#FFFFFF,#0F172A,#F1F5FD,#64748B,#E4ECFC,#DC2626,#FFFFFF,#2563EB,Folder blue + file amber
|
||||
119,Email Client,#2563EB,#FFFFFF,#3B82F6,#FFFFFF,#DC2626,#FFFFFF,#FFFFFF,#0F172A,#FFFFFF,#0F172A,#F1F5FD,#64748B,#E4ECFC,#DC2626,#FFFFFF,#2563EB,Inbox blue + priority red
|
||||
120,Casual Puzzle Game,#EC4899,#FFFFFF,#8B5CF6,#FFFFFF,#F59E0B,#0F172A,#FDF2F8,#0F172A,#FFFFFF,#0F172A,#FDF4F8,#64748B,#FCE9F2,#DC2626,#FFFFFF,#EC4899,Cheerful pink + reward gold
|
||||
121,Trivia & Quiz Game,#2563EB,#FFFFFF,#7C3AED,#FFFFFF,#F59E0B,#0F172A,#EFF6FF,#0F172A,#FFFFFF,#0F172A,#F1F5FD,#64748B,#E4ECFC,#DC2626,#FFFFFF,#2563EB,Quiz blue + gold leaderboard
|
||||
122,Card & Board Game,#15803D,#FFFFFF,#166534,#FFFFFF,#D97706,#FFFFFF,#0F172A,#FFFFFF,#192134,#FFFFFF,#0F1F2B,#94A3B8,"rgba(255,255,255,0.08)",#DC2626,#FFFFFF,#15803D,Felt green + gold on dark
|
||||
123,Idle & Clicker Game,#D97706,#FFFFFF,#F59E0B,#0F172A,#7C3AED,#FFFFFF,#FFFBEB,#0F172A,#FFFFFF,#0F172A,#FCF6F0,#64748B,#FAEEE1,#DC2626,#FFFFFF,#D97706,Coin gold + prestige purple
|
||||
124,Word & Crossword Game,#15803D,#FFFFFF,#059669,#FFFFFF,#D97706,#FFFFFF,#FFFFFF,#0F172A,#FFFFFF,#0F172A,#F0F7F3,#64748B,#E2EFE7,#DC2626,#FFFFFF,#15803D,Word green + letter amber
|
||||
125,Arcade & Retro Game,#DC2626,#FFFFFF,#2563EB,#FFFFFF,#22C55E,#0F172A,#0F172A,#FFFFFF,#192134,#FFFFFF,#1F1829,#94A3B8,"rgba(255,255,255,0.08)",#DC2626,#FFFFFF,#DC2626,Neon red+blue on dark + score green
|
||||
126,Photo Editor & Filters,#7C3AED,#FFFFFF,#6366F1,#FFFFFF,#0891B2,#FFFFFF,#0F172A,#FFFFFF,#192134,#FFFFFF,#171939,#94A3B8,"rgba(255,255,255,0.08)",#DC2626,#FFFFFF,#7C3AED,Editor violet + filter cyan on dark
|
||||
127,Short Video Editor,#EC4899,#FFFFFF,#DB2777,#FFFFFF,#2563EB,#FFFFFF,#0F172A,#FFFFFF,#192134,#FFFFFF,#201A32,#94A3B8,"rgba(255,255,255,0.08)",#DC2626,#FFFFFF,#EC4899,Video pink on dark + timeline blue
|
||||
128,Drawing & Sketching Canvas,#7C3AED,#FFFFFF,#8B5CF6,#FFFFFF,#0891B2,#FFFFFF,#1C1917,#FFFFFF,#262321,#FFFFFF,#231B28,#94A3B8,"rgba(255,255,255,0.08)",#DC2626,#FFFFFF,#7C3AED,Canvas purple + tool teal on dark
|
||||
129,Music Creation & Beat Maker,#7C3AED,#FFFFFF,#6366F1,#FFFFFF,#22C55E,#0F172A,#0F172A,#FFFFFF,#192134,#FFFFFF,#171939,#94A3B8,"rgba(255,255,255,0.08)",#DC2626,#FFFFFF,#7C3AED,Studio purple + waveform green on dark
|
||||
130,Meme & Sticker Maker,#EC4899,#FFFFFF,#F59E0B,#0F172A,#2563EB,#FFFFFF,#FFFFFF,#0F172A,#FFFFFF,#0F172A,#FDF4F8,#64748B,#FCE9F2,#DC2626,#FFFFFF,#EC4899,Viral pink + comedy yellow + share blue
|
||||
131,AI Photo & Avatar Generator,#7C3AED,#FFFFFF,#6366F1,#FFFFFF,#EC4899,#FFFFFF,#FAF5FF,#0F172A,#FFFFFF,#0F172A,#F7F3FD,#64748B,#EFE7FC,#DC2626,#FFFFFF,#7C3AED,AI purple + generation pink
|
||||
132,Link-in-Bio Page Builder,#2563EB,#FFFFFF,#7C3AED,#FFFFFF,#EC4899,#FFFFFF,#FFFFFF,#0F172A,#FFFFFF,#0F172A,#F1F5FD,#64748B,#E4ECFC,#DC2626,#FFFFFF,#2563EB,Brand blue + creator purple
|
||||
133,Wardrobe & Outfit Planner,#BE185D,#FFFFFF,#EC4899,#FFFFFF,#D97706,#FFFFFF,#FDF2F8,#0F172A,#FFFFFF,#0F172A,#FBF1F5,#64748B,#F7E3EB,#DC2626,#FFFFFF,#BE185D,Fashion rose + gold accent
|
||||
134,Plant Care Tracker,#15803D,#FFFFFF,#059669,#FFFFFF,#D97706,#FFFFFF,#F0FDF4,#0F172A,#FFFFFF,#0F172A,#F0F7F3,#64748B,#E2EFE7,#DC2626,#FFFFFF,#15803D,Nature green + sun yellow
|
||||
135,Book & Reading Tracker,#78716C,#FFFFFF,#92400E,#FFFFFF,#D97706,#FFFFFF,#FFFBEB,#0F172A,#FFFFFF,#0F172A,#F6F6F6,#64748B,#EEEDED,#DC2626,#FFFFFF,#78716C,Book brown + page amber
|
||||
136,Couple & Relationship App,#BE185D,#FFFFFF,#EC4899,#FFFFFF,#DC2626,#FFFFFF,#FDF2F8,#0F172A,#FFFFFF,#0F172A,#FBF1F5,#64748B,#F7E3EB,#DC2626,#FFFFFF,#BE185D,Romance rose + love red
|
||||
137,Family Calendar & Chores,#2563EB,#FFFFFF,#059669,#FFFFFF,#D97706,#FFFFFF,#F8FAFC,#0F172A,#FFFFFF,#0F172A,#F1F5FD,#64748B,#E4ECFC,#DC2626,#FFFFFF,#2563EB,Family blue + chore green
|
||||
138,Mood Tracker,#7C3AED,#FFFFFF,#6366F1,#FFFFFF,#D97706,#FFFFFF,#FAF5FF,#0F172A,#FFFFFF,#0F172A,#F7F3FD,#64748B,#EFE7FC,#DC2626,#FFFFFF,#7C3AED,Mood purple + insight amber
|
||||
139,Gift & Wishlist,#DC2626,#FFFFFF,#D97706,#FFFFFF,#EC4899,#FFFFFF,#FFF1F2,#0F172A,#FFFFFF,#0F172A,#FCF1F1,#64748B,#FAE4E4,#DC2626,#FFFFFF,#DC2626,Gift red + gold + surprise pink
|
||||
140,Running & Cycling GPS,#EA580C,#FFFFFF,#F97316,#FFFFFF,#059669,#FFFFFF,#0F172A,#FFFFFF,#192134,#FFFFFF,#201C27,#94A3B8,"rgba(255,255,255,0.08)",#DC2626,#FFFFFF,#EA580C,Energetic orange + pace green on dark
|
||||
141,Yoga & Stretching Guide,#6B7280,#FFFFFF,#78716C,#FFFFFF,#0891B2,#FFFFFF,#F5F5F0,#0F172A,#FFFFFF,#0F172A,#F6F6F7,#64748B,#EDEEEF,#DC2626,#FFFFFF,#6B7280,Sage neutral + calm teal
|
||||
142,Sleep Tracker,#4338CA,#FFFFFF,#6366F1,#FFFFFF,#7C3AED,#FFFFFF,#0F172A,#FFFFFF,#192134,#FFFFFF,#131936,#94A3B8,"rgba(255,255,255,0.08)",#DC2626,#FFFFFF,#4338CA,Night indigo + dream violet on dark
|
||||
143,Calorie & Nutrition Counter,#059669,#FFFFFF,#10B981,#FFFFFF,#EA580C,#FFFFFF,#ECFDF5,#0F172A,#FFFFFF,#0F172A,#F0F8F6,#64748B,#E1F2ED,#DC2626,#FFFFFF,#059669,Healthy green + macro orange
|
||||
144,Period & Cycle Tracker,#BE185D,#FFFFFF,#EC4899,#FFFFFF,#7C3AED,#FFFFFF,#FDF2F8,#0F172A,#FFFFFF,#0F172A,#FBF1F5,#64748B,#F7E3EB,#DC2626,#FFFFFF,#BE185D,Blush rose + fertility lavender
|
||||
145,Medication & Pill Reminder,#0284C7,#FFFFFF,#0891B2,#FFFFFF,#DC2626,#FFFFFF,#F0F9FF,#0F172A,#FFFFFF,#0F172A,#EFF7FB,#64748B,#E0F0F8,#DC2626,#FFFFFF,#0284C7,Medical blue + alert red
|
||||
146,Water & Hydration Reminder,#0284C7,#FFFFFF,#06B6D4,#FFFFFF,#0891B2,#FFFFFF,#F0F9FF,#0F172A,#FFFFFF,#0F172A,#EFF7FB,#64748B,#E0F0F8,#DC2626,#FFFFFF,#0284C7,Refreshing blue + water cyan
|
||||
147,Fasting & Intermittent Timer,#6366F1,#FFFFFF,#4338CA,#FFFFFF,#059669,#FFFFFF,#0F172A,#FFFFFF,#192134,#FFFFFF,#151D39,#94A3B8,"rgba(255,255,255,0.08)",#DC2626,#FFFFFF,#6366F1,Fasting indigo on dark + eating green
|
||||
148,Anonymous Community / Confession,#475569,#FFFFFF,#334155,#FFFFFF,#0891B2,#FFFFFF,#0F172A,#FFFFFF,#192134,#FFFFFF,#131B2F,#94A3B8,"rgba(255,255,255,0.08)",#DC2626,#FFFFFF,#475569,Protective grey + subtle teal on dark
|
||||
149,Local Events & Discovery,#EA580C,#FFFFFF,#F97316,#FFFFFF,#2563EB,#FFFFFF,#FFF7ED,#0F172A,#FFFFFF,#0F172A,#FDF4F0,#64748B,#FCEAE1,#DC2626,#FFFFFF,#EA580C,Event orange + map blue
|
||||
150,Study Together / Virtual Coworking,#2563EB,#FFFFFF,#3B82F6,#FFFFFF,#059669,#FFFFFF,#F8FAFC,#0F172A,#FFFFFF,#0F172A,#F1F5FD,#64748B,#E4ECFC,#DC2626,#FFFFFF,#2563EB,Focus blue + session green
|
||||
151,Coding Challenge & Practice,#22C55E,#0F172A,#059669,#FFFFFF,#D97706,#FFFFFF,#0F172A,#FFFFFF,#192134,#FFFFFF,#10242E,#94A3B8,"rgba(255,255,255,0.08)",#DC2626,#FFFFFF,#22C55E,Code green + difficulty amber on dark
|
||||
152,Kids Learning (ABC & Math),#2563EB,#FFFFFF,#F59E0B,#0F172A,#EC4899,#FFFFFF,#EFF6FF,#0F172A,#FFFFFF,#0F172A,#F1F5FD,#64748B,#E4ECFC,#DC2626,#FFFFFF,#2563EB,Learning blue + play yellow + fun pink
|
||||
153,Music Instrument Learning,#DC2626,#FFFFFF,#9A3412,#FFFFFF,#D97706,#FFFFFF,#FFFBEB,#0F172A,#FFFFFF,#0F172A,#FCF1F1,#64748B,#FAE4E4,#DC2626,#FFFFFF,#DC2626,Musical red + warm amber
|
||||
154,Parking Finder,#2563EB,#FFFFFF,#059669,#FFFFFF,#DC2626,#FFFFFF,#F0F9FF,#0F172A,#FFFFFF,#0F172A,#F1F5FD,#64748B,#E4ECFC,#DC2626,#FFFFFF,#2563EB,Available blue/green + occupied red
|
||||
155,Public Transit Guide,#2563EB,#FFFFFF,#0891B2,#FFFFFF,#EA580C,#FFFFFF,#F8FAFC,#0F172A,#FFFFFF,#0F172A,#F1F5FD,#64748B,#E4ECFC,#DC2626,#FFFFFF,#2563EB,Transit blue + line colors
|
||||
156,Road Trip Planner,#EA580C,#FFFFFF,#0891B2,#FFFFFF,#D97706,#FFFFFF,#FFF7ED,#0F172A,#FFFFFF,#0F172A,#FDF4F0,#64748B,#FCEAE1,#DC2626,#FFFFFF,#EA580C,Adventure orange + map teal
|
||||
157,VPN & Privacy Tool,#1E3A5F,#FFFFFF,#334155,#FFFFFF,#22C55E,#0F172A,#0F172A,#FFFFFF,#192134,#FFFFFF,#10192E,#94A3B8,"rgba(255,255,255,0.08)",#DC2626,#FFFFFF,#1E3A5F,Shield dark + connected green
|
||||
158,Emergency SOS & Safety,#DC2626,#FFFFFF,#EF4444,#FFFFFF,#2563EB,#FFFFFF,#FFF1F2,#0F172A,#FFFFFF,#0F172A,#FCF1F1,#64748B,#FAE4E4,#DC2626,#FFFFFF,#DC2626,Alert red + safety blue
|
||||
159,Wallpaper & Theme App,#7C3AED,#FFFFFF,#EC4899,#FFFFFF,#2563EB,#FFFFFF,#FAF5FF,#0F172A,#FFFFFF,#0F172A,#F7F3FD,#64748B,#EFE7FC,#DC2626,#FFFFFF,#7C3AED,Aesthetic purple + trending pink
|
||||
160,White Noise & Ambient Sound,#475569,#FFFFFF,#334155,#FFFFFF,#4338CA,#FFFFFF,#0F172A,#FFFFFF,#192134,#FFFFFF,#131B2F,#94A3B8,"rgba(255,255,255,0.08)",#DC2626,#FFFFFF,#475569,Ambient grey + deep indigo on dark
|
||||
161,Home Decoration & Interior Design,#78716C,#FFFFFF,#A8A29E,#FFFFFF,#D97706,#FFFFFF,#FAF5F2,#0F172A,#FFFFFF,#0F172A,#F6F6F6,#64748B,#EEEDED,#DC2626,#FFFFFF,#78716C,Interior warm grey + gold accent
|
||||
|
1776
personas/_shared/community-skills/ui-ux-pro-max/data/design.csv
Normal file
1776
personas/_shared/community-skills/ui-ux-pro-max/data/design.csv
Normal file
File diff suppressed because it is too large
Load Diff
1779
personas/_shared/community-skills/ui-ux-pro-max/data/draft.csv
Normal file
1779
personas/_shared/community-skills/ui-ux-pro-max/data/draft.csv
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
106
personas/_shared/community-skills/ui-ux-pro-max/data/icons.csv
Normal file
106
personas/_shared/community-skills/ui-ux-pro-max/data/icons.csv
Normal file
@@ -0,0 +1,106 @@
|
||||
No,Category,Icon Name,Keywords,Library,Import Code,Usage,Best For,Style
|
||||
1,Navigation,list,hamburger menu navigation toggle bars,Phosphor,import { List } from '@phosphor-icons/react',<List size={20} weight="regular" />,Mobile navigation drawer toggle sidebar,Outline
|
||||
2,Navigation,arrow-left,back previous return navigate,Phosphor,import { ArrowLeft } from '@phosphor-icons/react',<ArrowLeft size={20} weight="regular" />,Back button breadcrumb navigation,Outline
|
||||
3,Navigation,arrow-right,next forward continue navigate,Phosphor,import { ArrowRight } from '@phosphor-icons/react',<ArrowRight size={20} weight="regular" />,Forward button next step CTA,Outline
|
||||
4,Navigation,caret-down,dropdown expand accordion select,Phosphor,import { CaretDown } from '@phosphor-icons/react',<CaretDown size={20} weight="regular" />,Dropdown toggle accordion header,Outline
|
||||
5,Navigation,caret-up,collapse close accordion minimize,Phosphor,import { CaretUp } from '@phosphor-icons/react',<CaretUp size={20} weight="regular" />,Accordion collapse minimize,Outline
|
||||
6,Navigation,house,homepage main dashboard start,Phosphor,import { House } from '@phosphor-icons/react',<House size={20} weight="regular" />,Home navigation main page,Outline
|
||||
7,Navigation,x,close cancel dismiss remove exit,Phosphor,import { X } from '@phosphor-icons/react',<X size={20} weight="regular" />,Modal close dismiss button,Outline
|
||||
8,Navigation,arrow-square-out,open new tab external link,Phosphor,import { ArrowSquareOut } from '@phosphor-icons/react',<ArrowSquareOut size={20} weight="regular" />,External link indicator,Outline
|
||||
9,Action,plus,add create new insert,Phosphor,import { Plus } from '@phosphor-icons/react',<Plus size={20} weight="regular" />,Add button create new item,Outline
|
||||
10,Action,minus,remove subtract decrease delete,Phosphor,import { Minus } from '@phosphor-icons/react',<Minus size={20} weight="regular" />,Remove item quantity decrease,Outline
|
||||
11,Action,trash,delete remove discard bin,Phosphor,import { Trash } from '@phosphor-icons/react',<Trash size={20} weight="regular" />,Delete action destructive,Outline
|
||||
12,Action,pencil-simple,pencil modify change update,Phosphor,import { PencilSimple } from '@phosphor-icons/react',<PencilSimple size={20} weight="regular" />,Edit button modify content,Outline
|
||||
13,Action,floppy-disk,disk store persist save,Phosphor,import { FloppyDisk } from '@phosphor-icons/react',<FloppyDisk size={20} weight="regular" />,Save button persist changes,Outline
|
||||
14,Action,download-simple,export save file download,Phosphor,import { DownloadSimple } from '@phosphor-icons/react',<DownloadSimple size={20} weight="regular" />,Download file export,Outline
|
||||
15,Action,upload-simple,import file attach upload,Phosphor,import { UploadSimple } from '@phosphor-icons/react',<UploadSimple size={20} weight="regular" />,Upload file import,Outline
|
||||
16,Action,copy,duplicate clipboard paste,Phosphor,import { Copy } from '@phosphor-icons/react',<Copy size={20} weight="regular" />,Copy to clipboard,Outline
|
||||
17,Action,share,social distribute send,Phosphor,import { Share } from '@phosphor-icons/react',<Share size={20} weight="regular" />,Share button social,Outline
|
||||
18,Action,magnifying-glass,find lookup filter query,Phosphor,import { MagnifyingGlass } from '@phosphor-icons/react',<MagnifyingGlass size={20} weight="regular" />,Search input bar,Outline
|
||||
19,Action,funnel,sort refine narrow options,Phosphor,import { Funnel } from '@phosphor-icons/react',<Funnel size={20} weight="regular" />,Filter dropdown sort,Outline
|
||||
20,Action,gear,gear cog preferences config,Phosphor,import { Gear } from '@phosphor-icons/react',<Gear size={20} weight="regular" />,Settings page configuration,Outline
|
||||
21,Status,check,success done complete verified,Phosphor,import { Check } from '@phosphor-icons/react',<Check size={20} weight="regular" />,Success state checkmark,Outline
|
||||
22,Status,check-circle,success verified approved complete,Phosphor,import { CheckCircle } from '@phosphor-icons/react',<CheckCircle size={20} weight="regular" />,Success badge verified,Outline
|
||||
23,Status,x-circle,error failed cancel rejected,Phosphor,import { XCircle } from '@phosphor-icons/react',<XCircle size={20} weight="regular" />,Error state failed,Outline
|
||||
24,Status,warning,warning caution attention danger,Phosphor,import { Warning } from '@phosphor-icons/react',<Warning size={20} weight="regular" />,Warning message caution,Outline
|
||||
25,Status,warning-circle,info notice information help,Phosphor,import { WarningCircle } from '@phosphor-icons/react',<WarningCircle size={20} weight="regular" />,Info notice alert,Outline
|
||||
26,Status,info,information help tooltip details,Phosphor,import { Info } from '@phosphor-icons/react',<Info size={20} weight="regular" />,Information tooltip help,Outline
|
||||
27,Status,circle-notch,loading spinner processing wait,Phosphor,import { CircleNotch } from '@phosphor-icons/react',<CircleNotch size={20} weight="regular" className="animate-spin" />,Loading state spinner,Outline
|
||||
28,Status,clock,time schedule pending wait,Phosphor,import { Clock } from '@phosphor-icons/react',<Clock size={20} weight="regular" />,Pending time schedule,Outline
|
||||
29,Communication,envelope,email message inbox letter,Phosphor,import { Envelope } from '@phosphor-icons/react',<Envelope size={20} weight="regular" />,Email contact inbox,Outline
|
||||
30,Communication,chat-circle,chat comment bubble conversation,Phosphor,import { ChatCircle } from '@phosphor-icons/react',<ChatCircle size={20} weight="regular" />,Chat comment message,Outline
|
||||
31,Communication,phone,call mobile telephone contact,Phosphor,import { Phone } from '@phosphor-icons/react',<Phone size={20} weight="regular" />,Phone contact call,Outline
|
||||
32,Communication,paper-plane-tilt,submit dispatch message airplane,Phosphor,import { PaperPlaneTilt } from '@phosphor-icons/react',<PaperPlaneTilt size={20} weight="regular" />,Send message submit,Outline
|
||||
33,Communication,bell,notification alert ring reminder,Phosphor,import { Bell } from '@phosphor-icons/react',<Bell size={20} weight="regular" />,Notification bell alert,Outline
|
||||
34,User,user,profile account person avatar,Phosphor,import { User } from '@phosphor-icons/react',<User size={20} weight="regular" />,User profile account,Outline
|
||||
35,User,users,team group people members,Phosphor,import { Users } from '@phosphor-icons/react',<Users size={20} weight="regular" />,Team group members,Outline
|
||||
36,User,user-plus,add invite new member,Phosphor,import { UserPlus } from '@phosphor-icons/react',<UserPlus size={20} weight="regular" />,Add user invite,Outline
|
||||
37,User,sign-in,signin authenticate enter,Phosphor,import { SignIn } from '@phosphor-icons/react',<SignIn size={20} weight="regular" />,Login signin,Outline
|
||||
38,User,sign-out,signout exit leave logout,Phosphor,import { SignOut } from '@phosphor-icons/react',<SignOut size={20} weight="regular" />,Logout signout,Outline
|
||||
39,Media,image,photo picture gallery thumbnail,Phosphor,import { Image } from '@phosphor-icons/react',<Image size={20} weight="regular" />,Image photo gallery,Outline
|
||||
40,Media,video,movie film play record,Phosphor,import { Video } from '@phosphor-icons/react',<Video size={20} weight="regular" />,Video player media,Outline
|
||||
41,Media,play,start video audio media,Phosphor,import { Play } from '@phosphor-icons/react',<Play size={20} weight="regular" />,Play button video audio,Outline
|
||||
42,Media,pause,stop halt video audio,Phosphor,import { Pause } from '@phosphor-icons/react',<Pause size={20} weight="regular" />,Pause button media,Outline
|
||||
43,Media,speaker-high,sound audio speaker music,Phosphor,import { SpeakerHigh } from '@phosphor-icons/react',<SpeakerHigh size={20} weight="regular" />,Volume audio sound,Outline
|
||||
44,Media,microphone,microphone record voice audio,Phosphor,import { Microphone } from '@phosphor-icons/react',<Microphone size={20} weight="regular" />,Microphone voice record,Outline
|
||||
45,Media,camera,photo capture snapshot picture,Phosphor,import { Camera } from '@phosphor-icons/react',<Camera size={20} weight="regular" />,Camera photo capture,Outline
|
||||
46,Commerce,shopping-cart,cart checkout basket buy,Phosphor,import { ShoppingCart } from '@phosphor-icons/react',<ShoppingCart size={20} weight="regular" />,Shopping cart e-commerce,Outline
|
||||
47,Commerce,shopping-bag,purchase buy store bag,Phosphor,import { ShoppingBag } from '@phosphor-icons/react',<ShoppingBag size={20} weight="regular" />,Shopping bag purchase,Outline
|
||||
48,Commerce,credit-card,payment card checkout stripe,Phosphor,import { CreditCard } from '@phosphor-icons/react',<CreditCard size={20} weight="regular" />,Payment credit card,Outline
|
||||
49,Commerce,currency-dollar,money price currency cost,Phosphor,import { CurrencyDollar } from '@phosphor-icons/react',<CurrencyDollar size={20} weight="regular" />,Price money currency,Outline
|
||||
50,Commerce,tag,label price discount sale,Phosphor,import { Tag } from '@phosphor-icons/react',<Tag size={20} weight="regular" />,Price tag label,Outline
|
||||
51,Commerce,gift,present reward bonus offer,Phosphor,import { Gift } from '@phosphor-icons/react',<Gift size={20} weight="regular" />,Gift reward offer,Outline
|
||||
52,Commerce,percent,discount sale offer promo,Phosphor,import { Percent } from '@phosphor-icons/react',<Percent size={20} weight="regular" />,Discount percentage sale,Outline
|
||||
53,Data,chart-bar,analytics statistics graph metrics,Phosphor,import { ChartBar } from '@phosphor-icons/react',<ChartBar size={20} weight="regular" />,Bar chart analytics,Outline
|
||||
54,Data,chart-pie,statistics distribution breakdown,Phosphor,import { ChartPie } from '@phosphor-icons/react',<ChartPie size={20} weight="regular" />,Pie chart distribution,Outline
|
||||
55,Data,trend-up,growth increase positive trend,Phosphor,import { TrendUp } from '@phosphor-icons/react',<TrendUp size={20} weight="regular" />,Growth trend positive,Outline
|
||||
56,Data,trend-down,decline decrease negative trend,Phosphor,import { TrendDown } from '@phosphor-icons/react',<TrendDown size={20} weight="regular" />,Decline trend negative,Outline
|
||||
57,Data,activity,pulse heartbeat monitor live,Phosphor,import { Activity } from '@phosphor-icons/react',<Activity size={20} weight="regular" />,Activity monitor pulse,Outline
|
||||
58,Data,database,storage server data backend,Phosphor,import { Database } from '@phosphor-icons/react',<Database size={20} weight="regular" />,Database storage,Outline
|
||||
59,Files,file,document page paper doc,Phosphor,import { File } from '@phosphor-icons/react',<File size={20} weight="regular" />,File document,Outline
|
||||
60,Files,file-text,document text page article,Phosphor,import { FileText } from '@phosphor-icons/react',<FileText size={20} weight="regular" />,Text document article,Outline
|
||||
61,Files,folder,directory organize group files,Phosphor,import { Folder } from '@phosphor-icons/react',<Folder size={20} weight="regular" />,Folder directory,Outline
|
||||
62,Files,folder-open,expanded browse files view,Phosphor,import { FolderOpen } from '@phosphor-icons/react',<FolderOpen size={20} weight="regular" />,Open folder browse,Outline
|
||||
63,Files,paperclip,attachment attach file link,Phosphor,import { Paperclip } from '@phosphor-icons/react',<Paperclip size={20} weight="regular" />,Attachment paperclip,Outline
|
||||
64,Files,link,url hyperlink chain connect,Phosphor,import { Link } from '@phosphor-icons/react',<Link size={20} weight="regular" />,Link URL hyperlink,Outline
|
||||
65,Files,clipboard,paste copy buffer notes,Phosphor,import { Clipboard } from '@phosphor-icons/react',<Clipboard size={20} weight="regular" />,Clipboard paste,Outline
|
||||
66,Layout,grid-four,tiles gallery layout dashboard,Phosphor,import { GridFour } from '@phosphor-icons/react',<GridFour size={20} weight="regular" />,Grid layout gallery,Outline
|
||||
67,Layout,list-bullets,rows table lines items,Phosphor,import { ListBullets } from '@phosphor-icons/react',<ListBullets size={20} weight="regular" />,List view rows,Outline
|
||||
68,Layout,columns,layout split dual sidebar,Phosphor,import { Columns } from '@phosphor-icons/react',<Columns size={20} weight="regular" />,Column layout split,Outline
|
||||
69,Layout,arrows-out,fullscreen expand enlarge zoom,Phosphor,import { ArrowsOut } from '@phosphor-icons/react',<ArrowsOut size={20} weight="regular" />,Fullscreen maximize,Outline
|
||||
70,Layout,arrows-in,reduce shrink collapse exit,Phosphor,import { ArrowsIn } from '@phosphor-icons/react',<ArrowsIn size={20} weight="regular" />,Minimize reduce,Outline
|
||||
71,Layout,sidebar,panel drawer navigation menu,Phosphor,import { Sidebar } from '@phosphor-icons/react',<Sidebar size={20} weight="regular" />,Sidebar panel,Outline
|
||||
72,Social,heart,like love favorite wishlist,Phosphor,import { Heart } from '@phosphor-icons/react',<Heart size={20} weight="regular" />,Like favorite love,Outline
|
||||
73,Social,star,rating review favorite bookmark,Phosphor,import { Star } from '@phosphor-icons/react',<Star size={20} weight="regular" />,Star rating favorite,Outline
|
||||
74,Social,thumbs-up,like approve agree positive,Phosphor,import { ThumbsUp } from '@phosphor-icons/react',<ThumbsUp size={20} weight="regular" />,Like approve thumb,Outline
|
||||
75,Social,thumbs-down,dislike disapprove disagree negative,Phosphor,import { ThumbsDown } from '@phosphor-icons/react',<ThumbsDown size={20} weight="regular" />,Dislike disapprove,Outline
|
||||
76,Social,bookmark,save later favorite mark,Phosphor,import { Bookmark } from '@phosphor-icons/react',<Bookmark size={20} weight="regular" />,Bookmark save,Outline
|
||||
77,Social,flag,report mark important highlight,Phosphor,import { Flag } from '@phosphor-icons/react',<Flag size={20} weight="regular" />,Flag report,Outline
|
||||
78,Device,device-mobile,mobile phone device touch,Phosphor,import { DeviceMobile } from '@phosphor-icons/react',<DeviceMobile size={20} weight="regular" />,Mobile smartphone,Outline
|
||||
79,Device,device-tablet,ipad device touch screen,Phosphor,import { DeviceTablet } from '@phosphor-icons/react',<DeviceTablet size={20} weight="regular" />,Tablet device,Outline
|
||||
80,Device,monitor,desktop screen computer display,Phosphor,import { Monitor } from '@phosphor-icons/react',<Monitor size={20} weight="regular" />,Desktop monitor,Outline
|
||||
81,Device,laptop,notebook computer portable device,Phosphor,import { Laptop } from '@phosphor-icons/react',<Laptop size={20} weight="regular" />,Laptop computer,Outline
|
||||
82,Device,printer,print document output paper,Phosphor,import { Printer } from '@phosphor-icons/react',<Printer size={20} weight="regular" />,Printer print,Outline
|
||||
83,Security,lock,secure password protected private,Phosphor,import { Lock } from '@phosphor-icons/react',<Lock size={20} weight="regular" />,Lock secure,Outline
|
||||
84,Security,lock-open,open access unsecure public,Phosphor,import { LockOpen } from '@phosphor-icons/react',<LockOpen size={20} weight="regular" />,Unlock open,Outline
|
||||
85,Security,shield,protection security safe guard,Phosphor,import { Shield } from '@phosphor-icons/react',<Shield size={20} weight="regular" />,Shield protection,Outline
|
||||
86,Security,key,password access unlock login,Phosphor,import { Key } from '@phosphor-icons/react',<Key size={20} weight="regular" />,Key password,Outline
|
||||
87,Security,eye,view show visible password,Phosphor,import { Eye } from '@phosphor-icons/react',<Eye size={20} weight="regular" />,Show password view,Outline
|
||||
88,Security,eye-slash,hide invisible password hidden,Phosphor,import { EyeSlash } from '@phosphor-icons/react',<EyeSlash size={20} weight="regular" />,Hide password,Outline
|
||||
89,Location,map-pin,location marker place address,Phosphor,import { MapPin } from '@phosphor-icons/react',<MapPin size={20} weight="regular" />,Location pin marker,Outline
|
||||
90,Location,map,directions navigate geography location,Phosphor,import { Map } from '@phosphor-icons/react',<Map size={20} weight="regular" />,Map directions,Outline
|
||||
91,Location,compass,compass direction pointer arrow,Phosphor,import { Compass } from '@phosphor-icons/react',<Compass size={20} weight="regular" />,Navigation compass,Outline
|
||||
92,Location,globe,world international global web,Phosphor,import { Globe } from '@phosphor-icons/react',<Globe size={20} weight="regular" />,Globe world,Outline
|
||||
93,Time,calendar,date schedule event appointment,Phosphor,import { Calendar } from '@phosphor-icons/react',<Calendar size={20} weight="regular" />,Calendar date,Outline
|
||||
94,Time,arrows-clockwise,reload sync update refresh,Phosphor,import { ArrowsClockwise } from '@phosphor-icons/react',<ArrowsClockwise size={20} weight="regular" />,Refresh reload,Outline
|
||||
95,Time,arrow-counter-clockwise,undo back revert history,Phosphor,import { ArrowCounterClockwise } from '@phosphor-icons/react',<ArrowCounterClockwise size={20} weight="regular" />,Undo revert,Outline
|
||||
96,Time,arrow-clockwise,redo forward repeat history,Phosphor,import { ArrowClockwise } from '@phosphor-icons/react',<ArrowClockwise size={20} weight="regular" />,Redo forward,Outline
|
||||
97,Development,code,develop programming syntax html,Phosphor,import { Code } from '@phosphor-icons/react',<Code size={20} weight="regular" />,Code development,Outline
|
||||
98,Development,terminal,console cli command shell,Phosphor,import { Terminal } from '@phosphor-icons/react',<Terminal size={20} weight="regular" />,Terminal console,Outline
|
||||
99,Development,git-branch,version control branch merge,Phosphor,import { GitBranch } from '@phosphor-icons/react',<GitBranch size={20} weight="regular" />,Git branch,Outline
|
||||
100,Development,github-logo,repository code open source,Phosphor,import { GithubLogo } from '@phosphor-icons/react',<GithubLogo size={20} weight="regular" />,GitHub repository,Outline
|
||||
101,Style Config,bold-typography-icon-system,"bold typography, editorial, mono label, phosphor, weight regular, minimal, icon+label required, size 20–32",Phosphor (react-native),"import { ArrowRight } from 'phosphor-react-native'","<ArrowRight size={20} weight=""regular"" color={colors.accent} />","Bold Typography Mobile style: weight=""regular"". Size 20px for UI controls, 32px for feature anchors. Icons MUST be paired with a Mono-stack text label (JetBrains Mono). Standalone icons only allowed for standard navigation (e.g., Back arrow). Accent color #FF3D00 only.",Outline
|
||||
102,Style Config,cyberpunk-icon-system,"cyberpunk, neon, glow, hud, phosphor, weight regular, accent glow, dark, angular, react native",Phosphor (react-native),"import { Lightning } from 'phosphor-react-native'","<Lightning size={24} weight=""regular"" color={colors.accent} />","Cyberpunk Mobile HUD style: weight=""regular"", color={colors.accent} (#00FF88 Matrix Green). Wrap every icon in a View with shadowColor: colors.accent / shadowOpacity: 0.6 / shadowRadius: 8 to simulate neon glow. Use borderRadius: 0 on wrapper. Avoid rounded icon containers. Always pair icon with data label in JetBrains Mono.",Outline
|
||||
103,Style Config,academia-icon-system,"academia, library, brass, ornate, phosphor, weight thin, muted warm, scholarly, mobile",Phosphor (react-native),"import { BookOpen } from 'phosphor-react-native'","<BookOpen size={22} weight=""thin"" color={colors.brass} />","Academia (Scholarly Mobile) style: weight=""thin"" (thin engraved feel), color={colors.brass} (#C9A962). No sharp geometric or tech-inspired icons. Prefer book, scroll, key, quill-type icon metaphors. Wrap in circular View with 1px brass border. Avoid neon or saturated colored icons. All icon-only navigation must have an accessibilityLabel.",Outline
|
||||
104,Style Config,web3-bitcoin-icon-system,"web3, bitcoin, defi, crypto, neon orange, holographic, blurview, phosphor, glow, fintech mobile",Phosphor (react-native),"import { TrendUp } from 'phosphor-react-native'","<TrendUp size={24} weight=""regular"" color={colors.bitcoinOrange} />","Bitcoin DeFi Mobile style: weight=""regular"", color={colors.bitcoinOrange} (#F7931A). Wrap icons in circular BlurView (intensity: 20) with 1px borderColor: '#F7931A' border (Holographic Node effect). shadowColor: '#F7931A' / shadowOpacity: 0.4 / shadowRadius: 8. Prefer finance/data icons (TrendUp, Wallet, Shield, Layers). All data icons use JetBrains Mono label.",Outline
|
||||
105,Guideline,icon-fallback-rules,"icon fallback, phosphor, heroicons, any icon, extended set","Phosphor (primary) + Heroicons (fallback)","Primary: import { IconName } from '@phosphor-icons/react'. Fallback: import { IconName } from '@heroicons/react/24/outline' or '@heroicons/react/24/solid'.","当默认列表中没有合适图标时:优先继续从 Phosphor 中选择任何语义更贴切的图标(不必局限于本表列出的图标)。若 Phosphor 也无合适图标,可以改用 Heroicons,并在 UI 代码中保持风格统一(线性或填充、圆角程度、笔画粗细等)。","Icon library strategy and fallback rules",Outline
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 134.
|
@@ -0,0 +1,35 @@
|
||||
No,Pattern Name,Keywords,Section Order,Primary CTA Placement,Color Strategy,Recommended Effects,Conversion Optimization
|
||||
1,Hero + Features + CTA,"hero, hero-centric, hero-centric design, features, feature-rich, feature-rich showcase, cta, call-to-action","1. Hero with headline/image, 2. Value prop, 3. Key features (3-5), 4. CTA section, 5. Footer",Hero (sticky) + Bottom,Hero: Brand primary or vibrant. Features: Card bg #FAFAFA. CTA: Contrasting accent color,"Hero parallax, feature card hover lift, CTA glow on hover",Deep CTA placement. Use contrasting color (at least 7:1 contrast ratio). Sticky navbar CTA.
|
||||
2,Hero + Testimonials + CTA,"hero, testimonials, social-proof, social-proof-focused, social proof focused, trust, reviews, cta","1. Hero, 2. Problem statement, 3. Solution overview, 4. Testimonials carousel, 5. CTA",Hero (sticky) + Post-testimonials,"Hero: Brand color. Testimonials: Light bg #F5F5F5. Quotes: Italic, muted color #666. CTA: Vibrant","Testimonial carousel slide animations, quote marks animations, avatar fade-in",Social proof before CTA. Use 3-5 testimonials. Include photo + name + role. CTA after social proof.
|
||||
3,Product Demo + Features,"demo, product-demo, features, showcase, interactive, interactive-product-demo, interactive product demo","1. Hero, 2. Product video/mockup (center), 3. Feature breakdown per section, 4. Comparison (optional), 5. CTA",Video center + CTA right/bottom,Video surround: Brand color overlay. Features: Icon color #0080FF. Text: Dark #222,"Video play button pulse, feature scroll reveals, demo interaction highlights",Embedded product demo increases engagement. Use interactive mockup if possible. Auto-play video muted.
|
||||
4,Minimal Single Column,"minimal, simple, direct, minimal & direct, minimal-direct, single-column, clean","1. Hero headline, 2. Short description, 3. Benefit bullets (3 max), 4. CTA, 5. Footer","Center, large CTA button",Minimalist: Brand + white #FFFFFF + accent. Buttons: High contrast 7:1+. Text: Black/Dark grey,Minimal hover effects. Smooth scroll. CTA scale on hover (subtle),Single CTA focus. Large typography. Lots of whitespace. No nav clutter. Mobile-first.
|
||||
5,Funnel (3-Step Conversion),"funnel, conversion, conversion-optimized, conversion optimized, steps, wizard, onboarding","1. Hero, 2. Step 1 (problem), 3. Step 2 (solution), 4. Step 3 (action), 5. CTA progression",Each step: mini-CTA. Final: main CTA,"Step colors: 1 (Red/Problem), 2 (Orange/Process), 3 (Green/Solution). CTA: Brand color","Step number animations, progress bar fill, step transitions smooth scroll",Progressive disclosure. Show only essential info per step. Use progress indicators. Multiple CTAs.
|
||||
6,Comparison Table + CTA,"comparison, table, compare, versus, cta","1. Hero, 2. Problem intro, 3. Comparison table (product vs competitors), 4. Pricing (optional), 5. CTA",Table: Right column. CTA: Below table,Table: Alternating rows (white/light grey). Your product: Highlight #FFFACD (light yellow) or green. Text: Dark,"Table row hover highlight, price toggle animations, feature checkmark animations",Use comparison to show unique value. Highlight your product row. Include 'free trial' in pricing row.
|
||||
7,Lead Magnet + Form,"lead, form, signup, capture, email, magnet","1. Hero (benefit headline), 2. Lead magnet preview (ebook cover, checklist, etc), 3. Form (minimal fields), 4. CTA submit",Form CTA: Submit button,Lead magnet: Professional design. Form: Clean white bg. Inputs: Light border #CCCCCC. CTA: Brand color,"Form focus state animations, input validation animations, success confirmation animation",Form fields ≤ 3 for best conversion. Offer valuable lead magnet preview. Show form submission progress.
|
||||
8,Pricing Page + CTA,"pricing, plans, tiers, comparison, cta","1. Hero (pricing headline), 2. Price comparison cards, 3. Feature comparison table, 4. FAQ section, 5. Final CTA",Each card: CTA button. Sticky CTA in nav,"Free: Grey, Starter: Blue, Pro: Green/Gold, Enterprise: Dark. Cards: 1px border, shadow","Price toggle animation (monthly/yearly), card comparison highlight, FAQ accordion open/close",Recommend starter plan (pre-select/highlight). Show annual discount (20-30%). Use FAQs to address concerns.
|
||||
9,Video-First Hero,"video, hero, media, visual, engaging","1. Hero with video background, 2. Key features overlay, 3. Benefits section, 4. CTA",Overlay on video (center/bottom) + Bottom section,Dark overlay 60% on video. Brand accent for CTA. White text on dark.,"Video autoplay muted, parallax scroll, text fade-in on scroll",86% higher engagement with video. Add captions for accessibility. Compress video for performance.
|
||||
10,Scroll-Triggered Storytelling,"storytelling, scroll, narrative, story, immersive","1. Intro hook, 2. Chapter 1 (problem), 3. Chapter 2 (journey), 4. Chapter 3 (solution), 5. Climax CTA",End of each chapter (mini) + Final climax CTA,Progressive reveal. Each chapter has distinct color. Building intensity.,"ScrollTrigger animations, parallax layers, progressive disclosure, chapter transitions",Narrative increases time-on-page 3x. Use progress indicator. Mobile: simplify animations.
|
||||
11,AI Personalization Landing,"ai, personalization, smart, recommendation, dynamic","1. Dynamic hero (personalized), 2. Relevant features, 3. Tailored testimonials, 4. Smart CTA",Context-aware placement based on user segment,Adaptive based on user data. A/B test color variations per segment.,"Dynamic content swap, fade transitions, personalized product recommendations",20%+ conversion with personalization. Requires analytics integration. Fallback for new users.
|
||||
12,Waitlist/Coming Soon,"waitlist, coming-soon, launch, early-access, notify","1. Hero with countdown, 2. Product teaser/preview, 3. Email capture form, 4. Social proof (waitlist count)",Email form prominent (above fold) + Sticky form on scroll,Anticipation: Dark + accent highlights. Countdown in brand color. Urgency indicators.,"Countdown timer animation, email validation feedback, success confetti, social share buttons",Scarcity + exclusivity. Show waitlist count. Early access benefits. Referral program.
|
||||
13,Comparison Table Focus,"comparison, table, versus, compare, features","1. Hero (problem statement), 2. Comparison matrix (you vs competitors), 3. Feature deep-dive, 4. Winner CTA",After comparison table (highlighted row) + Bottom,Your product column highlighted (accent bg or green). Competitors neutral. Checkmarks green.,"Table row hover highlight, feature checkmark animations, sticky comparison header",Show value vs competitors. 35% higher conversion. Be factual. Include pricing if favorable.
|
||||
14,Pricing-Focused Landing,"pricing, price, cost, plans, subscription","1. Hero (value proposition), 2. Pricing cards (3 tiers), 3. Feature comparison, 4. FAQ, 5. Final CTA",Each pricing card + Sticky CTA in nav + Bottom,Popular plan highlighted (brand color border/bg). Free: grey. Enterprise: dark/premium.,"Price toggle monthly/annual animation, card hover lift, FAQ accordion smooth open",Annual discount 20-30%. Recommend mid-tier (most popular badge). Address objections in FAQ.
|
||||
15,App Store Style Landing,"app, mobile, download, store, install","1. Hero with device mockup, 2. Screenshots carousel, 3. Features with icons, 4. Reviews/ratings, 5. Download CTAs",Download buttons prominent (App Store + Play Store) throughout,Dark/light matching app store feel. Star ratings in gold. Screenshots with device frames.,"Device mockup rotations, screenshot slider, star rating animations, download button pulse",Show real screenshots. Include ratings (4.5+ stars). QR code for mobile. Platform-specific CTAs.
|
||||
16,FAQ/Documentation Landing,"faq, documentation, help, support, questions, faq/documentation, knowledge base","1. Hero with search bar, 2. Popular categories, 3. FAQ accordion, 4. Contact/support CTA",Search bar prominent + Contact CTA for unresolved questions,"Clean, high readability. Minimal color. Category icons in brand color. Success green for resolved.","Search autocomplete, smooth accordion open/close, category hover, helpful feedback buttons",Reduce support tickets. Track search analytics. Show related articles. Contact escalation path.
|
||||
17,Immersive/Interactive Experience,"immersive, interactive, experience, 3d, animation, immersive/interactive experience","1. Full-screen interactive element, 2. Guided product tour, 3. Key benefits revealed, 4. CTA after completion",After interaction complete + Skip option for impatient users,Immersive experience colors. Dark background for focus. Highlight interactive elements.,"WebGL, 3D interactions, gamification elements, progress indicators, reward animations",40% higher engagement. Performance trade-off. Provide skip option. Mobile fallback essential.
|
||||
18,Event/Conference Landing,"event, conference, meetup, registration, schedule, hero-centric design, hero-centric","1. Hero (date/location/countdown), 2. Speakers grid, 3. Agenda/schedule, 4. Sponsors, 5. Register CTA",Register CTA sticky + After speakers + Bottom,Urgency colors (countdown). Event branding. Speaker cards professional. Sponsor logos neutral.,"Countdown timer, speaker hover cards with bio, agenda tabs, early bird countdown",Early bird pricing with deadline. Social proof (past attendees). Speaker credibility. Multi-ticket discounts.
|
||||
19,Product Review/Ratings Focused,"reviews, ratings, testimonials, social-proof, social-proof-focused, stars","1. Hero (product + aggregate rating), 2. Rating breakdown, 3. Individual reviews, 4. Buy/CTA",After reviews summary + Buy button alongside reviews,Trust colors. Star ratings gold. Verified badge green. Review sentiment colors.,"Star fill animations, review filtering, helpful vote interactions, photo lightbox",User-generated content builds trust. Show verified purchases. Filter by rating. Respond to negative reviews.
|
||||
20,Community/Forum Landing,"community, forum, social, members, discussion","1. Hero (community value prop), 2. Popular topics/categories, 3. Active members showcase, 4. Join CTA",Join button prominent + After member showcase,"Warm, welcoming. Member photos add humanity. Topic badges in brand colors. Activity indicators green.","Member avatars animation, activity feed live updates, topic hover previews, join success celebration","Show active community (member count, posts today). Highlight benefits. Preview content. Easy onboarding."
|
||||
21,Before-After Transformation,"before-after, transformation, results, comparison","1. Hero (problem state), 2. Transformation slider/comparison, 3. How it works, 4. Results CTA",After transformation reveal + Bottom,Contrast: muted/grey (before) vs vibrant/colorful (after). Success green for results.,"Slider comparison interaction, before/after reveal animations, result counters, testimonial videos",Visual proof of value. 45% higher conversion. Real results. Specific metrics. Guarantee offer.
|
||||
22,Marketplace / Directory,"marketplace, directory, search, listing","1. Hero (Search focused), 2. Categories, 3. Featured Listings, 4. Trust/Safety, 5. CTA (Become a host/seller)",Hero Search Bar + Navbar 'List your item',"Search: High contrast. Categories: Visual icons. Trust: Blue/Green.","Search autocomplete animation, map hover pins, card carousel","Search bar is the CTA. Reduce friction to search. Popular searches suggestions."
|
||||
23,Newsletter / Content First,"newsletter, content, writer, blog, subscribe, minimal & direct, minimal-direct","1. Hero (Value Prop + Form), 2. Recent Issues/Archives, 3. Social Proof (Subscriber count), 4. About Author",Hero inline form + Sticky header form,"Minimalist. Paper-like background. Text focus. Accent color for Subscribe.","Text highlight animations, typewriter effect, subtle fade-in","Single field form (Email only). Show 'Join X, 000 readers'. Read sample link."
|
||||
24,Webinar Registration,"webinar, registration, event, training, live","1. Hero (Topic + Timer + Form), 2. What you'll learn, 3. Speaker Bio, 4. Urgency/Bonuses, 5. Form (again)",Hero (Right side form) + Bottom anchor,"Urgency: Red/Orange. Professional: Blue/Navy. Form: High contrast white.","Countdown timer, speaker avatar float, urgent ticker","Limited seats logic. 'Live' indicator. Auto-fill timezone."
|
||||
25,Enterprise Gateway,"enterprise, corporate, gateway, solutions, portal, trust, authority, trust & authority","1. Hero (Video/Mission), 2. Solutions by Industry, 3. Solutions by Role, 4. Client Logos, 5. Contact Sales",Contact Sales (Primary) + Login (Secondary),"Corporate: Navy/Grey. High integrity. Conservative accents.","Slow video background, logo carousel, tab switching for industries","Path selection (I am a...). Mega menu navigation. Trust signals prominent."
|
||||
26,Portfolio Grid,"portfolio, grid, showcase, gallery, masonry, portfolio grid + visuals","1. Hero (Name/Role), 2. Project Grid (Masonry), 3. About/Philosophy, 4. Contact",Project Card Hover + Footer Contact,"Neutral background (let work shine). Text: Black/White. Accent: Minimal.","Image lazy load reveal, hover overlay info, lightbox view","Visuals first. Filter by category. Fast loading essential."
|
||||
27,Horizontal Scroll Journey,"horizontal, scroll, journey, gallery, storytelling, panoramic, storytelling-driven","1. Intro (Vertical), 2. The Journey (Horizontal Track), 3. Detail Reveal, 4. Vertical Footer",Floating Sticky CTA or End of Horizontal Track,Continuous palette transition. Chapter colors. Progress bar #000000.,"Scroll-jacking (careful), parallax layers, horizontal slide, progress indicator","Immersive product discovery. High engagement. Keep navigation visible."
|
||||
28,Bento Grid Showcase,"bento, grid, features, modular, apple-style, showcase, feature-rich showcase","1. Hero, 2. Bento Grid (Key Features), 3. Detail Cards, 4. Tech Specs, 5. CTA",Floating Action Button or Bottom of Grid,"Card backgrounds: #F5F5F7 or Glass. Icons: Vibrant brand colors. Text: Dark.","Hover card scale (1.02), video inside cards, tilt effect, staggered reveal","Scannable value props. High information density without clutter. Mobile stack."
|
||||
29,Interactive 3D Configurator,"3d, configurator, customizer, interactive, product, interactive product demo","1. Hero (Configurator), 2. Feature Highlight (synced), 3. Price/Specs, 4. Purchase",Inside Configurator UI + Sticky Bottom Bar,"Neutral studio background. Product: Realistic materials. UI: Minimal overlay.","Real-time rendering, material swap animation, camera rotate/zoom, light reflection","Increases ownership feeling. 360 view reduces return rates. Direct add-to-cart."
|
||||
30,AI-Driven Dynamic Landing,"ai, dynamic, personalized, adaptive, generative","1. Prompt/Input Hero, 2. Generated Result Preview, 3. How it Works, 4. Value Prop","Input Field (Hero) + 'Try it' Buttons","Adaptive to user input. Dark mode for compute feel. Neon accents.","Typing text effects, shimmering generation loaders, morphing layouts","Immediate value demonstration. 'Show, don't tell'. Low friction start."
|
||||
31,Feature-Rich Showcase,"feature-rich, feature-rich showcase, features, showcase, product showcase","1. Hero (value prop), 2. Feature grid/cards (4-6), 3. Use cases or benefits, 4. Social proof or logos, 5. CTA",Hero (sticky) + After features + Bottom,Brand primary + card bg #FAFAFA. Feature icons accent. CTA contrasting.,"Feature card hover lift, scroll reveal, icon micro-interactions","Clear feature hierarchy. One key message per card. Strong CTA repetition."
|
||||
32,Hero-Centric Design,"hero-centric, hero-centric design, hero-first, hero above fold","1. Full-bleed Hero (headline + visual), 2. Single value prop strip, 3. Key benefit or proof, 4. Primary CTA",Hero dominant (center/bottom) + Sticky nav CTA,Hero: High-impact visual. Minimal text. CTA 7:1 contrast.,"Hero parallax or video, CTA pulse on scroll, minimal chrome","One primary CTA. Hero is 60-80% above fold. Mobile: same hierarchy."
|
||||
33,Trust & Authority + Conversion,"trust & authority, trust, authority, conversion, credibility, enterprise","1. Hero (mission/credibility), 2. Proof (logos, certs, stats), 3. Solution overview, 4. Clear CTA path",Contact Sales / Get Quote (primary) + Nav,"Navy/Grey corporate. Trust blue. Accent for CTA only.","Logo carousel, stat counters, testimonial strip","Security badges. Case studies. Transparent pricing. Low-friction form."
|
||||
34,Real-Time / Operations Landing,"real-time, real-time monitor, operations, dashboard, telemetry, live data","1. Hero (product + live preview or status), 2. Key metrics/indicators, 3. How it works, 4. CTA (Start trial / Contact)","Primary CTA in nav + After metrics",Dark or neutral. Status colors (green/amber/red). Data-dense but scannable.,"Live data ticker, status pulse, minimal decoration","For ops/security/iot products. Demo or sandbox link. Trust signals."
|
||||
|
@@ -0,0 +1,162 @@
|
||||
No,Product Type,Keywords,Primary Style Recommendation,Secondary Styles,Landing Page Pattern,Dashboard Style (if applicable),Color Palette Focus,Key Considerations
|
||||
1,SaaS (General),"app, b2b, cloud, general, saas, software, subscription",Glassmorphism + Flat Design,"Soft UI Evolution, Minimalism",Hero + Features + CTA,Data-Dense + Real-Time Monitoring,Trust blue + accent contrast,Balance modern feel with clarity. Focus on CTAs.
|
||||
2,Micro SaaS,"app, b2b, cloud, indie, micro, micro-saas, niche, saas, small, software, solo, subscription",Flat Design + Vibrant & Block,"Motion-Driven, Micro-interactions",Minimal & Direct + Demo,Executive Dashboard,Vibrant primary + white space,"Keep simple, show product quickly. Speed is key."
|
||||
3,E-commerce,"buy, commerce, e, ecommerce, products, retail, sell, shop, store",Vibrant & Block-based,"Aurora UI, Motion-Driven",Feature-Rich Showcase,Sales Intelligence Dashboard,Brand primary + success green,Engagement & conversions. High visual hierarchy.
|
||||
4,E-commerce Luxury,"buy, commerce, e, ecommerce, elegant, exclusive, high-end, luxury, premium, products, retail, sell, shop, store",Liquid Glass + Glassmorphism,"3D & Hyperrealism, Aurora UI",Feature-Rich Showcase,Sales Intelligence Dashboard,Premium colors + minimal accent,Elegance & sophistication. Premium materials.
|
||||
5,B2B Service,"appointment, b, b2b, booking, business, consultation, corporate, enterprise, service",Trust & Authority + Minimal,"Feature-Rich, Conversion-Optimized",Feature-Rich Showcase,Sales Intelligence Dashboard,Professional blue + neutral grey,Credibility essential. Clear ROI messaging.
|
||||
6,Financial Dashboard,"admin, analytics, dashboard, data, financial, panel",Dark Mode (OLED) + Data-Dense,"Minimalism, Accessible & Ethical",N/A - Dashboard focused,Financial Dashboard,Dark bg + red/green alerts + trust blue,"High contrast, real-time updates, accuracy paramount."
|
||||
7,Analytics Dashboard,"admin, analytics, dashboard, data, panel",Data-Dense + Heat Map & Heatmap,"Minimalism, Dark Mode (OLED)",N/A - Analytics focused,Drill-Down Analytics + Comparative,Cool→Hot gradients + neutral grey,Clarity > aesthetics. Color-coded data priority.
|
||||
8,Healthcare App,"app, clinic, health, healthcare, medical, patient",Neumorphism + Accessible & Ethical,"Soft UI Evolution, Claymorphism (for patients)",Social Proof-Focused,User Behavior Analytics,Calm blue + health green + trust,Accessibility mandatory. Calming aesthetic.
|
||||
9,Educational App,"app, course, education, educational, learning, school, training",Claymorphism + Micro-interactions,"Vibrant & Block-based, Flat Design",Storytelling-Driven,User Behavior Analytics,Playful colors + clear hierarchy,Engagement & ease of use. Age-appropriate design.
|
||||
10,Creative Agency,"agency, creative, design, marketing, studio",Brutalism + Motion-Driven,"Retro-Futurism, Storytelling-Driven",Storytelling-Driven,N/A - Portfolio focused,Bold primaries + artistic freedom,Differentiation key. Wow-factor necessary.
|
||||
11,Portfolio/Personal,"creative, personal, portfolio, projects, showcase, work",Motion-Driven + Minimalism,"Brutalism, Aurora UI",Storytelling-Driven,N/A - Personal branding,Brand primary + artistic interpretation,Showcase work. Personality shine through.
|
||||
12,Gaming,"entertainment, esports, game, gaming, play",3D & Hyperrealism + Retro-Futurism,"Motion-Driven, Vibrant & Block",Feature-Rich Showcase,N/A - Game focused,Vibrant + neon + immersive colors,Immersion priority. Performance critical.
|
||||
13,Government/Public Service,"appointment, booking, consultation, government, public, service",Accessible & Ethical + Minimalism,"Flat Design, Inclusive Design",Minimal & Direct,Executive Dashboard,Professional blue + high contrast,WCAG AAA mandatory. Trust paramount.
|
||||
14,Fintech/Crypto,"banking, blockchain, crypto, defi, finance, fintech, money, nft, payment, web3",Glassmorphism + Dark Mode (OLED),"Retro-Futurism, Motion-Driven",Conversion-Optimized,Real-Time Monitoring + Predictive,Dark tech colors + trust + vibrant accents,Security perception. Real-time data critical.
|
||||
15,Social Media App,"app, community, content, entertainment, media, network, sharing, social, streaming, users, video",Vibrant & Block-based + Motion-Driven,"Aurora UI, Micro-interactions",Feature-Rich Showcase,User Behavior Analytics,Vibrant + engagement colors,Engagement & retention. Addictive design ethics.
|
||||
16,Productivity Tool,"collaboration, productivity, project, task, tool, workflow",Flat Design + Micro-interactions,"Minimalism, Soft UI Evolution",Interactive Product Demo,Drill-Down Analytics,Clear hierarchy + functional colors,Ease of use. Speed & efficiency focus.
|
||||
17,Design System/Component Library,"component, design, library, system",Minimalism + Accessible & Ethical,"Flat Design, Zero Interface",Feature-Rich Showcase,N/A - Dev focused,Clear hierarchy + code-like structure,Consistency. Developer-first approach.
|
||||
18,AI/Chatbot Platform,"ai, artificial-intelligence, automation, chatbot, machine-learning, ml, platform",AI-Native UI + Minimalism,"Zero Interface, Glassmorphism",Interactive Product Demo,AI/ML Analytics Dashboard,Neutral + AI Purple (#6366F1),Conversational UI. Streaming text. Context awareness. Minimal chrome.
|
||||
19,NFT/Web3 Platform,"nft, platform, web",Cyberpunk UI + Glassmorphism,"Aurora UI, 3D & Hyperrealism",Feature-Rich Showcase,Crypto/Blockchain Dashboard,Dark + Neon + Gold (#FFD700),Wallet integration. Transaction feedback. Gas fees display. Dark mode essential.
|
||||
20,Creator Economy Platform,"creator, economy, platform",Vibrant & Block-based + Bento Box Grid,"Motion-Driven, Aurora UI",Social Proof-Focused,User Behavior Analytics,Vibrant + Brand colors,Creator profiles. Monetization display. Engagement metrics. Social proof.
|
||||
21,Remote Work/Collaboration Tool,"collaboration, remote, tool, work",Soft UI Evolution + Minimalism,"Glassmorphism, Micro-interactions",Feature-Rich Showcase,Drill-Down Analytics,Calm Blue + Neutral grey,Real-time collaboration. Status indicators. Video integration. Notification management.
|
||||
22,Mental Health App,"app, health, mental",Neumorphism + Accessible & Ethical,"Claymorphism, Soft UI Evolution",Social Proof-Focused,Healthcare Analytics,Calm Pastels + Trust colors,Calming aesthetics. Privacy-first. Crisis resources. Progress tracking. Accessibility mandatory.
|
||||
23,Pet Tech App,"app, pet, tech",Claymorphism + Vibrant & Block-based,"Micro-interactions, Flat Design",Storytelling-Driven,User Behavior Analytics,Playful + Warm colors,Pet profiles. Health tracking. Playful UI. Photo galleries. Vet integration.
|
||||
24,Smart Home/IoT Dashboard,"admin, analytics, dashboard, data, home, iot, panel, smart",Glassmorphism + Dark Mode (OLED),"Minimalism, AI-Native UI",Interactive Product Demo,Real-Time Monitoring,Dark + Status indicator colors,Device status. Real-time controls. Energy monitoring. Automation rules. Quick actions.
|
||||
25,EV/Charging Ecosystem,"charging, ecosystem, ev",Minimalism + Aurora UI,"Glassmorphism, Organic Biophilic",Hero-Centric Design,Energy/Utilities Dashboard,Electric Blue (#009CD1) + Green,Charging station maps. Range estimation. Cost calculation. Environmental impact.
|
||||
26,Subscription Box Service,"appointment, booking, box, consultation, membership, plan, recurring, service, subscription",Vibrant & Block-based + Motion-Driven,"Claymorphism, Aurora UI",Feature-Rich Showcase,E-commerce Analytics,Brand + Excitement colors,Unboxing experience. Personalization quiz. Subscription management. Product reveals.
|
||||
27,Podcast Platform,"platform, podcast",Dark Mode (OLED) + Minimalism,"Motion-Driven, Vibrant & Block-based",Storytelling-Driven,Media/Entertainment Dashboard,Dark + Audio waveform accents,Audio player UX. Episode discovery. Creator tools. Analytics for podcasters.
|
||||
28,Dating App,"app, dating",Vibrant & Block-based + Motion-Driven,"Aurora UI, Glassmorphism",Social Proof-Focused,User Behavior Analytics,Warm + Romantic (Pink/Red gradients),Profile cards. Swipe interactions. Match animations. Safety features. Video chat.
|
||||
29,Micro-Credentials/Badges Platform,"badges, credentials, micro, platform",Minimalism + Flat Design,"Accessible & Ethical, Swiss Modernism 2.0",Trust & Authority,Education Dashboard,Trust Blue + Gold (#FFD700),Credential verification. Badge display. Progress tracking. Issuer trust. LinkedIn integration.
|
||||
30,Knowledge Base/Documentation,"base, documentation, knowledge",Minimalism + Accessible & Ethical,"Swiss Modernism 2.0, Flat Design",FAQ/Documentation,N/A - Documentation focused,Clean hierarchy + minimal color,Search-first. Clear navigation. Code highlighting. Version switching. Feedback system.
|
||||
31,Hyperlocal Services,"appointment, booking, consultation, hyperlocal, service, services",Minimalism + Vibrant & Block-based,"Micro-interactions, Flat Design",Conversion-Optimized,Drill-Down Analytics + Map,Location markers + Trust colors,Map integration. Service categories. Provider profiles. Booking system. Reviews.
|
||||
32,Beauty/Spa/Wellness Service,"appointment, beauty, booking, consultation, service, spa, wellness",Soft UI Evolution + Neumorphism,"Glassmorphism, Minimalism",Hero-Centric Design + Social Proof,User Behavior Analytics,Soft pastels (Pink #FFB6C1 Sage #90EE90) + Cream + Gold accents,Calming aesthetic. Booking system. Service menu. Before/after gallery. Testimonials. Relaxing imagery.
|
||||
33,Luxury/Premium Brand,"brand, elegant, exclusive, high-end, luxury, premium",Liquid Glass + Glassmorphism,"Minimalism, 3D & Hyperrealism",Storytelling-Driven + Feature-Rich,Sales Intelligence Dashboard,Black + Gold (#FFD700) + White + Minimal accent,Elegance paramount. Premium imagery. Storytelling. High-quality visuals. Exclusive feel.
|
||||
34,Restaurant/Food Service,"appointment, booking, consultation, delivery, food, menu, order, restaurant, service",Vibrant & Block-based + Motion-Driven,"Claymorphism, Flat Design",Hero-Centric Design + Conversion,N/A - Booking focused,Warm colors (Orange Red Brown) + appetizing imagery,Menu display. Online ordering. Reservation system. Food photography. Location/hours prominent.
|
||||
35,Fitness/Gym App,"app, exercise, fitness, gym, health, workout",Vibrant & Block-based + Dark Mode (OLED),"Motion-Driven, Neumorphism",Feature-Rich Showcase,User Behavior Analytics,Energetic (Orange #FF6B35 Electric Blue) + Dark bg,Progress tracking. Workout plans. Community features. Achievements. Motivational design.
|
||||
36,Real Estate/Property,"buy, estate, housing, property, real, real-estate, rent",Glassmorphism + Minimalism,"Motion-Driven, 3D & Hyperrealism",Hero-Centric Design + Feature-Rich,Sales Intelligence Dashboard,Trust Blue (#0077B6) + Gold accents + White,Property listings. Virtual tours. Map integration. Agent profiles. Mortgage calculator. High-quality imagery.
|
||||
37,Travel/Tourism Agency,"agency, booking, creative, design, flight, hotel, marketing, studio, tourism, travel, vacation",Aurora UI + Motion-Driven,"Vibrant & Block-based, Glassmorphism",Storytelling-Driven + Hero-Centric,Booking Analytics,Vibrant destination colors + Sky Blue + Warm accents,Destination showcase. Booking system. Itinerary builder. Reviews. Inspiration galleries. Mobile-first.
|
||||
38,Hotel/Hospitality,"hospitality, hotel",Liquid Glass + Minimalism,"Glassmorphism, Soft UI Evolution",Hero-Centric Design + Social Proof,Revenue Management Dashboard,Warm neutrals + Gold (#D4AF37) + Brand accent,Room booking. Amenities showcase. Location maps. Guest reviews. Seasonal pricing. Luxury imagery.
|
||||
39,Wedding/Event Planning,"conference, event, meetup, planning, registration, ticket, wedding",Soft UI Evolution + Aurora UI,"Glassmorphism, Motion-Driven",Storytelling-Driven + Social Proof,N/A - Planning focused,Soft Pink (#FFD6E0) + Gold + Cream + Sage,Portfolio gallery. Vendor directory. Planning tools. Timeline. Budget tracker. Romantic aesthetic.
|
||||
40,Legal Services,"appointment, attorney, booking, compliance, consultation, contract, law, legal, service, services",Trust & Authority + Minimalism,"Accessible & Ethical, Swiss Modernism 2.0",Trust & Authority + Minimal,Case Management Dashboard,Navy Blue (#1E3A5F) + Gold + White,Credibility paramount. Practice areas. Attorney profiles. Case results. Contact forms. Professional imagery.
|
||||
41,Insurance Platform,"insurance, platform",Trust & Authority + Flat Design,"Accessible & Ethical, Minimalism",Conversion-Optimized + Trust,Claims Analytics Dashboard,Trust Blue (#0066CC) + Green (security) + Neutral,Quote calculator. Policy comparison. Claims process. Trust signals. Clear pricing. Security badges.
|
||||
42,Banking/Traditional Finance,"banking, finance, traditional",Minimalism + Accessible & Ethical,"Trust & Authority, Dark Mode (OLED)",Trust & Authority + Feature-Rich,Financial Dashboard,Navy (#0A1628) + Trust Blue + Gold accents,Security-first. Account overview. Transaction history. Mobile banking. Accessibility critical. Trust paramount.
|
||||
43,Online Course/E-learning,"course, e, learning, online",Claymorphism + Vibrant & Block-based,"Motion-Driven, Flat Design",Feature-Rich Showcase + Social Proof,Education Dashboard,Vibrant learning colors + Progress green,Course catalog. Progress tracking. Video player. Quizzes. Certificates. Community forums. Gamification.
|
||||
44,Non-profit/Charity,"charity, non, profit",Accessible & Ethical + Organic Biophilic,"Minimalism, Storytelling-Driven",Storytelling-Driven + Trust,Donation Analytics Dashboard,Cause-related colors + Trust + Warm,Impact stories. Donation flow. Transparency reports. Volunteer signup. Event calendar. Emotional connection.
|
||||
45,Music Streaming,"music, streaming",Dark Mode (OLED) + Vibrant & Block-based,"Motion-Driven, Aurora UI",Feature-Rich Showcase,Media/Entertainment Dashboard,Dark (#121212) + Vibrant accents + Album art colors,Audio player. Playlist management. Artist pages. Personalization. Social features. Waveform visualizations.
|
||||
46,Video Streaming/OTT,"ott, streaming, video",Dark Mode (OLED) + Motion-Driven,"Glassmorphism, Vibrant & Block-based",Hero-Centric Design + Feature-Rich,Media/Entertainment Dashboard,Dark bg + Content poster colors + Brand accent,Video player. Content discovery. Watchlist. Continue watching. Personalized recommendations. Thumbnail-heavy.
|
||||
47,Job Board/Recruitment,"board, job, recruitment",Flat Design + Minimalism,"Vibrant & Block-based, Accessible & Ethical",Conversion-Optimized + Feature-Rich,HR Analytics Dashboard,Professional Blue + Success Green + Neutral,Job listings. Search/filter. Company profiles. Application tracking. Resume upload. Salary insights.
|
||||
48,Marketplace (P2P),"buyers, listings, marketplace, p, platform, sellers",Vibrant & Block-based + Flat Design,"Micro-interactions, Trust & Authority",Feature-Rich Showcase + Social Proof,E-commerce Analytics,Trust colors + Category colors + Success green,Seller/buyer profiles. Listings. Reviews/ratings. Secure payment. Messaging. Search/filter. Trust badges.
|
||||
49,Logistics/Delivery,"delivery, logistics",Minimalism + Flat Design,"Dark Mode (OLED), Micro-interactions",Feature-Rich Showcase + Conversion,Real-Time Monitoring + Route Analytics,Blue (#2563EB) + Orange (tracking) + Green (delivered),Real-time tracking. Delivery scheduling. Route optimization. Driver management. Status updates. Map integration.
|
||||
50,Agriculture/Farm Tech,"agriculture, farm, tech",Organic Biophilic + Flat Design,"Minimalism, Accessible & Ethical",Feature-Rich Showcase + Trust,IoT Sensor Dashboard,Earth Green (#4A7C23) + Brown + Sky Blue,Crop monitoring. Weather data. IoT sensors. Yield tracking. Market prices. Sustainable imagery.
|
||||
51,Construction/Architecture,"architecture, construction",Minimalism + 3D & Hyperrealism,"Brutalism, Swiss Modernism 2.0",Hero-Centric Design + Feature-Rich,Project Management Dashboard,Grey (#4A4A4A) + Orange (safety) + Blueprint Blue,Project portfolio. 3D renders. Timeline. Material specs. Team collaboration. Blueprint aesthetic.
|
||||
52,Automotive/Car Dealership,"automotive, car, dealership",Motion-Driven + 3D & Hyperrealism,"Dark Mode (OLED), Glassmorphism",Hero-Centric Design + Feature-Rich,Sales Intelligence Dashboard,Brand colors + Metallic accents + Dark/Light,Vehicle showcase. 360° views. Comparison tools. Financing calculator. Test drive booking. High-quality imagery.
|
||||
53,Photography Studio,"photography, studio",Motion-Driven + Minimalism,"Aurora UI, Glassmorphism",Storytelling-Driven + Hero-Centric,N/A - Portfolio focused,Black + White + Minimal accent,Portfolio gallery. Before/after. Service packages. Booking system. Client galleries. Full-bleed imagery.
|
||||
54,Coworking Space,"coworking, space",Vibrant & Block-based + Glassmorphism,"Minimalism, Motion-Driven",Hero-Centric Design + Feature-Rich,Occupancy Dashboard,Energetic colors + Wood tones + Brand accent,Space tour. Membership plans. Booking system. Amenities. Community events. Virtual tour.
|
||||
55,Home Services (Plumber/Electrician),"appointment, booking, consultation, electrician, home, plumber, service, services",Flat Design + Trust & Authority,"Minimalism, Accessible & Ethical",Conversion-Optimized + Trust,Service Analytics,Trust Blue + Safety Orange + Professional grey,Service list. Emergency contact. Booking. Price transparency. Certifications. Local trust signals.
|
||||
56,Childcare/Daycare,"childcare, daycare",Claymorphism + Vibrant & Block-based,"Soft UI Evolution, Accessible & Ethical",Social Proof-Focused + Trust,Parent Dashboard,Playful pastels + Safe colors + Warm accents,Programs. Staff profiles. Safety certifications. Parent portal. Activity updates. Cheerful imagery.
|
||||
57,Senior Care/Elderly,"care, elderly, senior",Accessible & Ethical + Soft UI Evolution,"Minimalism, Neumorphism",Trust & Authority + Social Proof,Healthcare Analytics,Calm Blue + Warm neutrals + Large text,Care services. Staff qualifications. Facility tour. Family portal. Large touch targets. High contrast. Accessibility-first.
|
||||
58,Medical Clinic,"clinic, medical",Accessible & Ethical + Minimalism,"Neumorphism, Trust & Authority",Trust & Authority + Conversion,Healthcare Analytics,Medical Blue (#0077B6) + Trust White + Calm Green,Services. Doctor profiles. Online booking. Patient portal. Insurance info. HIPAA compliant. Trust signals.
|
||||
59,Pharmacy/Drug Store,"drug, pharmacy, store",Flat Design + Accessible & Ethical,"Minimalism, Trust & Authority",Conversion-Optimized + Trust,Inventory Dashboard,Pharmacy Green + Trust Blue + Clean White,Product catalog. Prescription upload. Refill reminders. Health info. Store locator. Safety certifications.
|
||||
60,Dental Practice,"dental, practice",Soft UI Evolution + Minimalism,"Accessible & Ethical, Trust & Authority",Social Proof-Focused + Conversion,Patient Analytics,Fresh Blue + White + Smile Yellow accent,Services. Dentist profiles. Before/after. Online booking. Insurance. Patient testimonials. Friendly imagery.
|
||||
61,Veterinary Clinic,"clinic, veterinary",Claymorphism + Accessible & Ethical,"Soft UI Evolution, Flat Design",Social Proof-Focused + Trust,Pet Health Dashboard,Caring Blue + Pet-friendly colors + Warm accents,Pet services. Vet profiles. Online booking. Pet portal. Emergency info. Friendly animal imagery.
|
||||
62,Florist/Plant Shop,"florist, plant, shop",Organic Biophilic + Vibrant & Block-based,"Aurora UI, Motion-Driven",Hero-Centric Design + Conversion,E-commerce Analytics,Natural Green + Floral pinks/purples + Earth tones,Product catalog. Occasion categories. Delivery scheduling. Care guides. Seasonal collections. Beautiful imagery.
|
||||
63,Bakery/Cafe,"bakery, cafe",Vibrant & Block-based + Soft UI Evolution,"Claymorphism, Motion-Driven",Hero-Centric Design + Conversion,N/A - Order focused,Warm Brown + Cream + Appetizing accents,Menu display. Online ordering. Location/hours. Catering. Seasonal specials. Appetizing photography.
|
||||
64,Brewery/Winery,"brewery, winery",Motion-Driven + Storytelling-Driven,"Dark Mode (OLED), Organic Biophilic",Storytelling-Driven + Hero-Centric,N/A - E-commerce focused,Deep amber/burgundy + Gold + Craft aesthetic,Product showcase. Story/heritage. Tasting notes. Events. Club membership. Artisanal imagery.
|
||||
65,Airline,"airline, aviation, flight, travel, booking, airport, flying",Minimalism + Glassmorphism,"Motion-Driven, Accessible & Ethical",Conversion-Optimized + Feature-Rich,Operations Dashboard,Sky Blue + Brand colors + Trust accents,Flight search. Booking. Check-in. Boarding pass. Loyalty program. Route maps. Mobile-first.
|
||||
66,News/Media Platform,"content, entertainment, media, news, platform, streaming, video",Minimalism + Flat Design,"Dark Mode (OLED), Accessible & Ethical",Hero-Centric Design + Feature-Rich,Media Analytics Dashboard,Brand colors + High contrast + Category colors,Article layout. Breaking news. Categories. Search. Subscription. Mobile reading. Fast loading.
|
||||
67,Magazine/Blog,"articles, blog, content, magazine, posts, writing",Swiss Modernism 2.0 + Motion-Driven,"Minimalism, Aurora UI",Storytelling-Driven + Hero-Centric,Content Analytics,Editorial colors + Brand primary + Clean white,Article showcase. Category navigation. Author profiles. Newsletter signup. Related content. Typography-focused.
|
||||
68,Freelancer Platform,"freelancer, platform",Flat Design + Minimalism,"Vibrant & Block-based, Micro-interactions",Feature-Rich Showcase + Conversion,Marketplace Analytics,Professional Blue + Success Green + Neutral,Profile creation. Portfolio. Skill matching. Messaging. Payment. Reviews. Project management.
|
||||
69,Marketing Agency,"agency, creative, design, marketing, studio",Brutalism + Motion-Driven,"Vibrant & Block-based, Aurora UI",Storytelling-Driven + Feature-Rich,Campaign Analytics,Bold brand colors + Creative freedom,Portfolio. Case studies. Services. Team. Creative showcase. Results-focused. Bold aesthetic.
|
||||
70,Event Management,"conference, event, management, meetup, registration, ticket",Vibrant & Block-based + Motion-Driven,"Glassmorphism, Aurora UI",Hero-Centric Design + Feature-Rich,Event Analytics,Event theme colors + Excitement accents,Event showcase. Registration. Agenda. Speakers. Sponsors. Ticket sales. Countdown timer.
|
||||
71,Membership/Community,"community, membership",Vibrant & Block-based + Soft UI Evolution,"Bento Box Grid, Micro-interactions",Social Proof-Focused + Conversion,Community Analytics,Community brand colors + Engagement accents,Member benefits. Pricing tiers. Community showcase. Events. Member directory. Exclusive content.
|
||||
72,Newsletter Platform,"newsletter, platform",Minimalism + Flat Design,"Swiss Modernism 2.0, Accessible & Ethical",Minimal & Direct + Conversion,Email Analytics,Brand primary + Clean white + CTA accent,Subscribe form. Archive. About. Social proof. Sample content. Simple conversion.
|
||||
73,Digital Products/Downloads,"digital, downloads, products",Vibrant & Block-based + Motion-Driven,"Glassmorphism, Bento Box Grid",Feature-Rich Showcase + Conversion,E-commerce Analytics,Product category colors + Brand + Success green,Product showcase. Preview. Pricing. Instant delivery. License management. Customer reviews.
|
||||
74,Church/Religious Organization,"church, organization, religious",Accessible & Ethical + Soft UI Evolution,"Minimalism, Trust & Authority",Hero-Centric Design + Social Proof,N/A - Community focused,Warm Gold + Deep Purple/Blue + White,Service times. Events. Sermons. Community. Giving. Location. Welcoming imagery.
|
||||
75,Sports Team/Club,"club, sports, team",Vibrant & Block-based + Motion-Driven,"Dark Mode (OLED), 3D & Hyperrealism",Hero-Centric Design + Feature-Rich,Performance Analytics,Team colors + Energetic accents,Schedule. Roster. News. Tickets. Merchandise. Fan engagement. Action imagery.
|
||||
76,Museum/Gallery,"gallery, museum",Minimalism + Motion-Driven,"Swiss Modernism 2.0, 3D & Hyperrealism",Storytelling-Driven + Feature-Rich,Visitor Analytics,Art-appropriate neutrals + Exhibition accents,Exhibitions. Collections. Tickets. Events. Virtual tours. Educational content. Art-focused design.
|
||||
77,Theater/Cinema,"cinema, theater",Dark Mode (OLED) + Motion-Driven,"Vibrant & Block-based, Glassmorphism",Hero-Centric Design + Conversion,Booking Analytics,Dark + Spotlight accents + Gold,Showtimes. Seat selection. Trailers. Coming soon. Membership. Dramatic imagery.
|
||||
78,Language Learning App,"app, language, learning",Claymorphism + Vibrant & Block-based,"Micro-interactions, Flat Design",Feature-Rich Showcase + Social Proof,Learning Analytics,Playful colors + Progress indicators + Country flags,Lesson structure. Progress tracking. Gamification. Speaking practice. Community. Achievement badges.
|
||||
79,Coding Bootcamp,"bootcamp, coding",Dark Mode (OLED) + Minimalism,"Cyberpunk UI, Flat Design",Feature-Rich Showcase + Social Proof,Student Analytics,Code editor colors + Brand + Success green,Curriculum. Projects. Career outcomes. Alumni. Pricing. Application. Terminal aesthetic.
|
||||
80,Cybersecurity Platform,"cyber, security, platform",Cyberpunk UI + Dark Mode (OLED),"Neubrutalism, Minimal & Direct",Trust & Authority + Real-Time,Real-Time Monitoring + Heat Map,Matrix Green + Deep Black + Terminal feel,Data density. Threat visualization. Dark mode default.
|
||||
81,Developer Tool / IDE,"dev, developer, tool, ide",Dark Mode (OLED) + Minimalism,"Flat Design, Bento Box Grid",Minimal & Direct + Documentation,Real-Time Monitor + Terminal,Dark syntax theme colors + Blue focus,Keyboard shortcuts. Syntax highlighting. Fast performance.
|
||||
82,Biotech / Life Sciences,"biotech, biology, science",Glassmorphism + Clean Science,"Minimalism, Organic Biophilic",Storytelling-Driven + Research,Data-Dense + Predictive,Sterile White + DNA Blue + Life Green,Data accuracy. Cleanliness. Complex data viz.
|
||||
83,Space Tech / Aerospace,"aerospace, space, tech",Holographic / HUD + Dark Mode,"Glassmorphism, 3D & Hyperrealism",Immersive Experience + Hero,Real-Time Monitoring + 3D,Deep Space Black + Star White + Metallic,High-tech feel. Precision. Telemetry data.
|
||||
84,Architecture / Interior,"architecture, design, interior",Exaggerated Minimalism + High Imagery,"Swiss Modernism 2.0, Parallax",Portfolio Grid + Visuals,Project Management + Gallery,Monochrome + Gold Accent + High Imagery,High-res images. Typography. Space.
|
||||
85,Quantum Computing Interface,"quantum, computing, physics, qubit, future, science",Holographic / HUD + Dark Mode,"Glassmorphism, Spatial UI",Immersive/Interactive Experience,3D Spatial Data + Real-Time Monitor,Quantum Blue #00FFFF + Deep Black + Interference patterns,Visualize complexity. Qubit states. Probability clouds. High-tech trust.
|
||||
86,Biohacking / Longevity App,"biohacking, health, longevity, tracking, wellness, science",Biomimetic / Organic 2.0,"Minimalism, Dark Mode (OLED)",Data-Dense + Storytelling,Real-Time Monitor + Biological Data,Cellular Pink/Red + DNA Blue + Clean White,Personal data privacy. Scientific credibility. Biological visualizations.
|
||||
87,Autonomous Drone Fleet Manager,"drone, autonomous, fleet, aerial, logistics, robotics",HUD / Sci-Fi FUI,"Real-Time Monitor, Spatial UI",Real-Time Monitor,Geographic + Real-Time,Tactical Green #00FF00 + Alert Red + Map Dark,Real-time telemetry. 3D spatial awareness. Latency indicators. Safety alerts.
|
||||
88,Generative Art Platform,"art, generative, ai, creative, platform, gallery",Minimalism (Frame) + Gen Z Chaos,"Masonry Grid, Dark Mode",Bento Grid Showcase,Gallery / Portfolio,Neutral #F5F5F5 (Canvas) + User Content,Content is king. Fast loading. Creator attribution. Minting flow.
|
||||
89,Spatial Computing OS / App,"spatial, vr, ar, vision, os, immersive, mixed-reality",Spatial UI (VisionOS),"Glassmorphism, 3D & Hyperrealism",Immersive/Interactive Experience,Spatial Dashboard,Frosted Glass + System Colors + Depth,Gaze/Pinch interaction. Depth hierarchy. Environment awareness.
|
||||
90,Sustainable Energy / Climate Tech,"climate, energy, sustainable, green, tech, carbon",Organic Biophilic + E-Ink / Paper,"Data-Dense, Swiss Modernism",Interactive Demo + Data,Energy/Utilities Dashboard,Earth Green + Sky Blue + Solar Yellow,Data transparency. Impact visualization. Low-carbon web design.
|
||||
91,Personal Finance Tracker,"budget, expense, money, finance, spending, savings, tracker, personal, wallet",Glassmorphism + Dark Mode (OLED),"Minimalism, Flat Design",Interactive Product Demo,Financial Dashboard,Calm blue + success green + alert red + chart accents,Category pie/donut charts. Monthly trend lines. Budget progress bars. Transaction list with swipe actions. Receipt camera. Currency formatting. Recurring entries.
|
||||
92,Chat & Messaging App,"chat, message, messenger, im, realtime, conversation, inbox, dm, whatsapp, telegram",Minimalism + Micro-interactions,"Glassmorphism, Flat Design",Feature-Rich Showcase + Demo,User Behavior Analytics,Brand primary + bubble contrast (sender/receiver) + typing grey,Bubble UI (left/right alignment). Typing indicators. Read receipts (✓✓). Image/file preview. Emoji reactions. Group avatars. Online status dots. Swipe-to-reply.
|
||||
93,Notes & Writing App,"notes, memo, writing, editor, notebook, markdown, journal, notion, obsidian",Minimalism + Flat Design,"Swiss Modernism 2.0, Soft UI Evolution",Minimal & Direct,N/A - Editor focused,Clean white/cream + minimal accent + editor syntax colors,WYSIWYG or Markdown toggle. Folder/tag organization. Full-text search. Cloud sync. Typography-first. Distraction-free zen mode. Slash-command palette.
|
||||
94,Habit Tracker,"habit, streak, routine, daily, tracker, goals, consistency, discipline",Claymorphism + Vibrant & Block-based,"Micro-interactions, Flat Design",Social Proof-Focused + Demo,User Behavior Analytics,Streak warm (amber/orange) + progress green + motivational accents,Streak calendar heatmap. Daily check-in interaction. Gamification (badges/levels/fire). Reminder push. Progress ring charts. Weekly/monthly stats. Motivational micro-copy.
|
||||
95,Food Delivery / On-Demand,"delivery, food, order, uber-eats, doordash, takeout, on-demand, courier",Vibrant & Block-based + Motion-Driven,"Glassmorphism, Flat Design",Hero-Centric Design + Feature-Rich,Real-Time Monitoring + Map,Appetizing warm (orange/red) + trust blue + map accent,Restaurant cards with ratings. Menu category horizontal scroll. Cart bottom sheet. Real-time map tracking + driver ETA. Order status stepper. Rating post-delivery.
|
||||
96,Ride Hailing / Transportation,"ride, taxi, uber, lyft, transport, carpool, driver, trip, fare",Minimalism + Glassmorphism,"Dark Mode (OLED), Motion-Driven",Conversion-Optimized + Demo,Real-Time Monitoring + Map,Brand primary + map neutral + status indicator colors,Map-centric full-screen UI. Pickup/dropoff pins + route polyline. Driver card (photo/rating/vehicle). Fare estimate. Trip timer. Safety SOS button. Payment sheet.
|
||||
97,Recipe & Cooking App,"recipe, cooking, food, kitchen, cookbook, meal, ingredient, chef",Claymorphism + Vibrant & Block-based,"Soft UI Evolution, Organic Biophilic",Hero-Centric Design + Feature-Rich,N/A - Content focused,Warm food tones (terracotta/sage/cream) + appetizing imagery,Step-by-step with checkable instructions. Ingredient list with serving adjuster. Built-in timer per step. Cooking mode (screen-awake + large text). Save/bookmark. Share.
|
||||
98,Meditation & Mindfulness,"meditation, mindfulness, calm, breathe, wellness, relaxation, sleep, headspace",Neumorphism + Soft UI Evolution,"Aurora UI, Glassmorphism",Storytelling-Driven + Social Proof,User Behavior Analytics,Ultra-calm pastels (lavender/sage/sky) + breathing animation gradient,Breathing circle animation. Session duration picker. Ambient sound mixer. Streak/consistency tracking. Guided audio player. Sleep timer. Minimal chrome. Slow easing transitions only.
|
||||
99,Weather App,"weather, forecast, temperature, climate, rain, sun, location, humidity",Glassmorphism + Aurora UI,"Motion-Driven, Minimalism",Hero-Centric Design,N/A - Utility focused,Atmospheric gradients (sky blue → sunset → storm grey) + temp scale,Location auto-detect. Hourly horizontal scroll + daily/weekly list. Animated weather icons. Air quality index. UV/wind/humidity chips. Radar map overlay. Widget-friendly layout.
|
||||
100,Diary & Journal App,"diary, journal, personal, daily, reflection, mood, gratitude, writing",Soft UI Evolution + Minimalism,"Neumorphism, Sketch Hand-Drawn",Storytelling-Driven,N/A - Personal focused,Warm paper tones (cream/linen) + muted ink + mood-coded accents,Calendar month-view entry. Mood tag selector (emoji/color). Photo/voice attachment. Writing prompts. Privacy lock (FaceID/PIN). Search across entries. Export to PDF.
|
||||
101,CRM & Client Management,"crm, client, customer, sales, pipeline, contact, lead, deal, hubspot",Flat Design + Minimalism,"Soft UI Evolution, Micro-interactions",Feature-Rich Showcase + Demo,Sales Intelligence Dashboard,Professional blue + pipeline stage colors + closed-won green,Contact card list with avatar. Pipeline kanban board. Activity timeline. Quick-log (call/email/meeting). Deal amount + probability. Tag/segment filter. Mobile quick-actions.
|
||||
102,Inventory & Stock Management,"inventory, stock, warehouse, product, barcode, supply, sku, management",Flat Design + Minimalism,"Dark Mode (OLED), Accessible & Ethical",Feature-Rich Showcase,Real-Time Monitoring + Data-Dense,Functional neutral + status traffic-light (green/amber/red) + scanner accent,Product list/grid with thumbnails. Barcode/QR scanner. Stock level badges. Low-stock alert banner. Category/location filter. Batch edit. Reorder trigger. Audit log.
|
||||
103,Flashcard & Study Tool,"flashcard, quiz, study, spaced-repetition, anki, learn, memory, exam",Claymorphism + Micro-interactions,"Vibrant & Block-based, Flat Design",Feature-Rich Showcase + Demo,Learning Analytics,Playful primary + correct green + incorrect red + progress blue,3D card flip animation. Spaced repetition algorithm. Deck browser. Session progress bar. Streak tracking. Timed quiz mode. Share/import decks. Rich text + image cards.
|
||||
104,Booking & Appointment App,"booking, appointment, schedule, calendar, reservation, slot, service",Soft UI Evolution + Flat Design,"Minimalism, Micro-interactions",Conversion-Optimized,Drill-Down Analytics,Trust blue + available green + booked grey + confirm accent,Calendar strip or month picker. Available time-slot grid. Service + staff selector. Confirmation summary. Reminder push. Reschedule/cancel flow. Two-sided (provider ↔ client).
|
||||
105,Invoice & Billing Tool,"invoice, billing, payment, receipt, freelance, estimate, quote, accounting",Minimalism + Flat Design,"Swiss Modernism 2.0, Accessible & Ethical",Conversion-Optimized + Trust,Financial Dashboard,Professional navy + paid green + overdue red + neutral grey,Invoice template with line items. Tax/discount calculation. Status badges (Draft/Sent/Paid/Overdue). PDF export + share. Payment link generation. Client address book. Recurring invoices.
|
||||
106,Grocery & Shopping List,"grocery, shopping, list, supermarket, checklist, pantry, meal-plan, buy",Flat Design + Vibrant & Block-based,"Claymorphism, Micro-interactions",Minimal & Direct + Demo,N/A - List focused,Fresh green + food-category colors + checkmark accent,Category-grouped list. Tap-to-check interaction (with strikethrough). Quantity stepper. Share list with family. Store aisle sorting. Barcode scan to add. Frequently bought suggestions.
|
||||
107,Timer & Pomodoro,"timer, pomodoro, countdown, stopwatch, focus, clock, productivity, interval",Minimalism + Neumorphism,"Dark Mode (OLED), Micro-interactions",Minimal & Direct,N/A - Utility focused,High-contrast on dark + focus red/amber + break green,Large centered countdown digits. Circular progress ring. Session/break auto-switch. Session history log. Custom interval settings. Sound + haptic alerts. Focus stats chart.
|
||||
108,Parenting & Baby Tracker,"baby, parenting, child, feeding, sleep, diaper, milestone, family, newborn",Claymorphism + Soft UI Evolution,"Vibrant & Block-based, Accessible & Ethical",Social Proof-Focused + Trust,User Behavior Analytics,Soft pastels (baby pink/sky blue/mint/peach) + warm accents,Feed/sleep/diaper quick-log buttons. Growth percentile chart. Milestone timeline with photos. Multiple child profiles. Partner invite + shared access. Pediatric reference. One-handed operation.
|
||||
109,Scanner & Document Manager,"scanner, document, ocr, pdf, scan, camera, file, archive, digitize",Minimalism + Flat Design,"Dark Mode (OLED), Accessible & Ethical",Feature-Rich Showcase + Demo,N/A - Tool focused,Clean white + camera viewfinder accent + file-type color coding,Camera capture with auto-edge detection. Crop/rotate/enhance. OCR text extraction overlay. PDF multi-page creation. Folder tree organization. Cloud sync. Share/export. Batch scan mode.
|
||||
110,Calendar & Scheduling App,"calendar, scheduling, planner, agenda, events, reminder, appointment, organize, date, sync",Flat Design + Micro-interactions,"Minimalism, Soft UI Evolution",Feature-Rich Showcase + Demo,N/A - Calendar focused,Clean blue + event category accent colors + success green,Event color coding. Week/month/day views. Recurring events. Conflict detection. Multi-calendar sync.
|
||||
111,Password Manager,"password, security, vault, credentials, login, secure, encrypt, keychain, 2fa, biometric",Minimalism + Accessible & Ethical,"Dark Mode (OLED), Trust & Authority",Trust & Authority + Feature-Rich,N/A - Vault focused,Trust blue + security green + dark neutral,Security-first. Zero-knowledge architecture. Biometric unlock. Breach alert dashboard. Password generator.
|
||||
112,Expense Splitter / Bill Split,"split, expense, bill, aa, share, friends, group, settle, debt, payment, owe",Flat Design + Vibrant & Block-based,"Minimalism, Micro-interactions",Minimal & Direct + Demo,N/A - Balance focused,Success green + alert red + neutral grey + avatar accent colors,Group expense tracking. Debt simplification algorithm. Payment reminders. Multi-currency. Receipt photo import.
|
||||
113,Voice Recorder & Memo,"voice, recorder, memo, audio, transcription, dictate, recording, microphone, note, otter",Minimalism + AI-Native UI,"Flat Design, Dark Mode (OLED)",Interactive Product Demo + Minimal,N/A - Recording focused,Clean white + recording red + waveform accent,Waveform display. Background recording. Auto-transcription (AI). Tag/organize. Cloud sync.
|
||||
114,Bookmark & Read-Later,"bookmark, read-later, save, article, pocket, link, reading, archive, collection, raindrop",Minimalism + Flat Design,"Editorial Grid, Swiss Modernism 2.0",Minimal & Direct + Demo,N/A - List focused,Paper warm white + ink neutral + minimal accent + tag colors,Fast save via share sheet. Article distraction-free view. Tags and collections. Offline sync. Reading progress.
|
||||
115,Translator App,"translate, language, text, voice, ocr, dictionary, multilingual, real-time, detect, deepl",Flat Design + AI-Native UI,"Minimalism, Micro-interactions",Feature-Rich Showcase + Interactive Demo,N/A - Utility focused,Global blue + neutral grey + language flag accent,Real-time camera translation (OCR). Voice input and output. Offline mode. Conversation mode. Phrasebook.
|
||||
116,Calculator & Unit Converter,"calculator, converter, unit, math, currency, measurement, scientific, formula, percentage",Neumorphism + Minimalism,"Flat Design, Dark Mode (OLED)",Minimal & Direct,N/A - Utility focused,Dark functional + orange operation keys + clear button hierarchy,Scientific mode toggle. Live currency rates. Calculation history. Widget support. Gesture input.
|
||||
117,Alarm & World Clock,"alarm, clock, world, timezone, timer, wake, sleep, schedule, reminder, bedtime",Dark Mode (OLED) + Minimalism,"Neumorphism, Flat Design",Minimal & Direct,N/A - Utility focused,Deep dark + ambient glow accent + timezone gradient,Gentle wake (gradual volume). Timezone visualizer. Sleep tracking integration. Smart alarm skip. Bedtime mode.
|
||||
118,File Manager & Transfer,"file, manager, transfer, folder, document, storage, cloud, share, organize, compress",Flat Design + Minimalism,"Accessible & Ethical, Dark Mode (OLED)",Feature-Rich Showcase + Demo,N/A - File tree focused,"Functional neutral + file type color coding (PDF orange, doc blue, image purple)",Folder tree navigation. File type preview. Wireless P2P transfer. Cloud integration. Compress and extract.
|
||||
119,Email Client,"email, mail, inbox, compose, thread, newsletter, filter, reply, gmail, spark, superhuman",Flat Design + Minimalism,"Micro-interactions, Soft UI Evolution",Feature-Rich Showcase + Demo,N/A - Inbox focused,Clean white + brand primary + priority red + snooze amber,Unified inbox. Swipe actions (archive/delete/snooze). Priority sorting. Smart reply. Unsubscribe tool.
|
||||
120,Casual Puzzle Game,"puzzle, casual, match, brain, game, relaxing, level, tiles, logic, block, three",Claymorphism + Vibrant & Block-based,"Micro-interactions, Motion-Driven",Feature-Rich Showcase + Social Proof,N/A - Game focused,Cheerful pastels + progression gradient + reward gold + bright accent,Satisfying match/clear animations. Progressive difficulty. Daily challenges. No-skip tutorials. Offline play.
|
||||
121,Trivia & Quiz Game,"trivia, quiz, knowledge, question, answer, challenge, leaderboard, fact, brain, compete",Vibrant & Block-based + Micro-interactions,"Claymorphism, Flat Design",Feature-Rich Showcase + Social Proof,Leaderboard Analytics,Energetic blue + correct green + incorrect red + leaderboard gold,Timer pressure UX. Category selection. Streak system. Real-time multiplayer. Daily quiz mode.
|
||||
122,Card & Board Game,"card, board, chess, checkers, poker, strategy, turn-based, multiplayer, classic, tabletop",3D & Hyperrealism + Flat Design,"Motion-Driven, Dark Mode (OLED)",Feature-Rich Showcase,N/A - Game focused,Game-theme felt green + dark wood + card back patterns,Real-time or async multiplayer. Game state sync. Tutorial mode. Match history. ELO rating system.
|
||||
123,Idle & Clicker Game,"idle, clicker, incremental, passive, cookie, adventure, progress, offline, collect, prestige",Vibrant & Block-based + Motion-Driven,"Claymorphism, 3D & Hyperrealism",Feature-Rich Showcase,N/A - Progress focused,Coin gold + upgrade blue + prestige purple + progress green,Offline progress calculation. Satisfying number animations. Upgrade tree clarity. Prestige system. Optional ads.
|
||||
124,Word & Crossword Game,"word, crossword, wordle, spelling, vocabulary, letters, grid, puzzle, dictionary, daily",Minimalism + Flat Design,"Swiss Modernism 2.0, Micro-interactions",Minimal & Direct + Demo,N/A - Game focused,Clean white + warm letter tiles + success green + shake red,Daily challenge with shareable results. Physical keyboard feel. Difficulty levels. Dictionary hints. Streak stats.
|
||||
125,Arcade & Retro Game,"arcade, retro, 8bit, action, shoot, runner, tap, reflex, endless, pixel, classic, score",Pixel Art + Retro-Futurism,"Vibrant & Block-based, Motion-Driven",Feature-Rich Showcase + Hero-Centric,N/A - Score focused,Neon on black + pixel palette + score gold + danger red,Instant play with no login. Game Center leaderboards. Haptic feedback on collision. Offline. Controller support.
|
||||
126,Photo Editor & Filters,"photo, edit, filter, vsco, snapseed, enhance, crop, retouch, adjust, luts, preset, adjust",Minimalism + Dark Mode (OLED),"Motion-Driven, Flat Design",Feature-Rich Showcase + Interactive Demo,N/A - Editor focused,Dark editor background + vibrant filter preview strip + tool icon accent,Non-destructive editing. Filter preview carousel. Histogram. RAW support. Batch export. Social share direct.
|
||||
127,Short Video Editor,"video, edit, capcut, inshot, clip, reel, tiktok, trim, effects, transitions, music, timeline",Dark Mode (OLED) + Motion-Driven,"Vibrant & Block-based, Glassmorphism",Feature-Rich Showcase + Hero-Centric,N/A - Timeline editor focused,Dark background + timeline track accent colors + effect preview vivid,Multi-track timeline. Licensed music library. Text overlays. Auto-captions. Export 9:16 / 16:9 / 1:1.
|
||||
128,Drawing & Sketching Canvas,"drawing, sketch, procreate, canvas, paint, illustration, digital, brush, layers, art, stylus",Minimalism + Dark Mode (OLED),"Anti-Polish Raw, Motion-Driven",Interactive Product Demo + Storytelling,N/A - Canvas focused,Neutral canvas + full-spectrum color picker + tool panel dark,Pressure sensitivity. Infinite canvas (pan/zoom). Layer management. Undo history. Export PNG/PSD/SVG.
|
||||
129,Music Creation & Beat Maker,"music, beat, daw, garageband, create, loop, sample, instrument, track, compose, record, midi",Dark Mode (OLED) + Motion-Driven,"Cyberpunk UI, Glassmorphism",Interactive Product Demo + Storytelling,N/A - DAW focused,Dark studio background + track colors rainbow + waveform accent + BPM pulse,Touch piano and drum pad. Loop browser. MIDI support. Export MP3/WAV. Low-latency audio engine.
|
||||
130,Meme & Sticker Maker,"meme, sticker, maker, funny, caption, template, edit, share, viral, emoji, creator, reaction",Vibrant & Block-based + Flat Design,"Gen Z Chaos, Claymorphism",Feature-Rich Showcase + Social Proof,N/A - Creator focused,Bold primary + comedic yellow + viral red + high saturation accent,Template library. Caption text overlay. Font variety. Reaction sticker packs. Share to all platforms. Fast creation.
|
||||
131,AI Photo & Avatar Generator,"ai, photo, avatar, lensa, portrait, generate, selfie, style, filter, prisma, art",AI-Native UI + Aurora UI,"Glassmorphism, Minimalism",Feature-Rich Showcase + Social Proof,N/A - Generation focused,AI purple + aurora gradients + before/after neutral,Style selection. Multiple output variations. Privacy policy prominent. Fast generation. Credits/subscription system.
|
||||
132,Link-in-Bio Page Builder,"bio, link, linktree, personal, page, creator, social, portfolio, profile, landing, custom",Vibrant & Block-based + Bento Box Grid,"Minimalism, Glassmorphism",Conversion-Optimized + Social Proof,Analytics (click tracking),Brand-customizable + accent link color + clean white canvas,Drag-drop builder. Theme templates. Click analytics. Custom domain. Social icon integration. QR code export.
|
||||
133,Wardrobe & Outfit Planner,"wardrobe, outfit, fashion, clothes, closet, style, wear, plan, capsule, ootd, lookbook",Minimalism + Motion-Driven,"Aurora UI, Soft UI Evolution",Storytelling-Driven + Feature-Rich,N/A - Wardrobe focused,Clean fashion neutral + full clothes color palette + accent,Photo catalog of clothes. AI outfit suggestions. Calendar integration. Capsule wardrobe. Season filtering.
|
||||
134,Plant Care Tracker,"plant, care, water, garden, tracker, reminder, species, photo, grow, health, planta",Organic Biophilic + Soft UI Evolution,"Claymorphism, Flat Design",Storytelling-Driven + Social Proof,N/A - Plant collection focused,Nature greens + earth brown + sunny yellow reminder + water blue,Plant database with care guides. Watering reminders. Growth photo timeline. AI health diagnosis. Collection sharing.
|
||||
135,Book & Reading Tracker,"book, reading, tracker, goodreads, library, shelf, progress, review, notes, goal, literature",Swiss Modernism 2.0 + Minimalism,"E-Ink Paper, Soft UI Evolution",Social Proof-Focused + Feature-Rich,N/A - Library focused,Warm paper white + ink brown + reading progress green + book cover colors,Barcode scan to add. Progress percentage. Annual reading goal. Notes and quotes. Friends activity. Genre stats.
|
||||
136,Couple & Relationship App,"couple, relationship, partner, love, date, anniversary, memory, shared, intimate, between",Aurora UI + Soft UI Evolution,"Claymorphism, Glassmorphism",Storytelling-Driven + Social Proof,N/A - Couple focused,Warm romantic pink/rose + soft gradient + memory photo tones,Shared timeline. Anniversary countdowns. Secret chat. Photo albums. Love language quiz. Date night ideas.
|
||||
137,Family Calendar & Chores,"family, calendar, chores, tasks, household, shared, kids, schedule, cozi, organize, member",Flat Design + Claymorphism,"Accessible & Ethical, Vibrant & Block-based",Feature-Rich Showcase + Social Proof,N/A - Family hub focused,Warm playful + member color coding + chore completion green,Member color coding. Chore assignment rotation. Recurring events. Shared shopping list. Allowance tracking.
|
||||
138,Mood Tracker,"mood, emotion, feeling, mental, daily, journal, wellbeing, check-in, log, track, daylio",Soft UI Evolution + Minimalism,"Aurora UI, Neumorphism",Storytelling-Driven + Social Proof,N/A - Mood chart focused,Emotion gradient (blue sad to yellow happy) + pastel per mood + insight accent,One-tap daily check-in. Emotion wheel selector. Mood calendar heatmap. Pattern insights. Export and share.
|
||||
139,Gift & Wishlist,"gift, wishlist, present, birthday, occasion, registry, idea, shop, list, share, surprise",Vibrant & Block-based + Soft UI Evolution,"Claymorphism, Flat Design",Minimal & Direct + Conversion,N/A - List focused,Celebration warm pink/gold/red + category colors + surprise accent,Add from any URL. Price range filter. Reserved-by-others system. Occasion calendar. Collaborative list. Surprise mode.
|
||||
140,Running & Cycling GPS,"running, cycling, gps, strava, track, route, speed, distance, cadence, pace, workout, sport",Dark Mode (OLED) + Vibrant & Block-based,"Motion-Driven, Glassmorphism",Feature-Rich Showcase + Social Proof,Performance Analytics,Energetic orange + map accent + pace zones (green/yellow/red),Live GPS tracking. Route map. Auto-pause detection. Segment leaderboards. Training zones. Social feed. Garmin sync.
|
||||
141,Yoga & Stretching Guide,"yoga, stretch, flexibility, pose, asana, guided, session, calm, routine, wellness, down-dog",Organic Biophilic + Soft UI Evolution,"Neumorphism, Minimalism",Storytelling-Driven + Social Proof,N/A - Session focused,Earth calming sage/terracotta/cream + breathing gradient + warm accent,Pose library with illustrations. Guided sessions with audio. Breathing exercises. Progress calendar. Beginner to advanced.
|
||||
142,Sleep Tracker,"sleep, tracker, alarm, cycle, quality, snore, analysis, rem, deep, smart, wake, insomnia",Dark Mode (OLED) + Neumorphism,"Glassmorphism, Minimalism",Feature-Rich Showcase + Social Proof,Healthcare Analytics,Deep midnight blue + stars/moon accent + sleep quality gradient (poor red to great green),Sleep cycle detection. Smart alarm wakes at light sleep. Snore detection. Weekly trends. Apple Health integration.
|
||||
143,Calorie & Nutrition Counter,"calorie, nutrition, food, diet, macro, protein, carb, fat, log, fitness, myfitnesspal",Flat Design + Vibrant & Block-based,"Minimalism, Claymorphism",Feature-Rich Showcase + Social Proof,Healthcare Analytics,"Healthy green + macro colors (protein blue, carb orange, fat yellow) + progress circle",Barcode scanner food log. Large database. Macro goals. Restaurant lookup. Recipe builder. AI photo food logging.
|
||||
144,Period & Cycle Tracker,"period, cycle, menstrual, fertility, ovulation, pms, log, women, health, flo, clue, hormone",Soft UI Evolution + Aurora UI,"Accessible & Ethical, Claymorphism",Social Proof-Focused + Trust,Healthcare Analytics,Rose/blush + lavender + fertility green + soft calendar tones,Cycle prediction. Symptom logging. Fertility window. Personalized insights. Privacy-first. Partner sharing option.
|
||||
145,Medication & Pill Reminder,"medication, pill, reminder, dose, schedule, prescription, drug, health, medisafe, refill",Accessible & Ethical + Flat Design,"Minimalism, Trust & Authority",Trust & Authority + Feature-Rich,N/A - Schedule focused,Medical trust blue + missed alert red + taken green + clean white,Multi-medication schedule. Caregiver sharing. Refill reminders. Drug interaction warnings. Large touch targets.
|
||||
146,Water & Hydration Reminder,"water, hydration, drink, reminder, daily, tracker, glasses, intake, health, cup, aqua",Claymorphism + Vibrant & Block-based,"Flat Design, Micro-interactions",Minimal & Direct + Demo,N/A - Daily goal focused,Refreshing blue + water wave animation + goal progress accent,Tap to log quickly. Animated fill visualization. Custom reminders. Goal by weight/weather. Streak system. Widget.
|
||||
147,Fasting & Intermittent Timer,"fasting, intermittent, 16:8, timer, fast, eating, window, keto, diet, zero, weight, protocol",Minimalism + Dark Mode (OLED),"Neumorphism, Flat Design",Feature-Rich Showcase + Social Proof,N/A - Timer focused,Fasting deep blue/purple + eating window green + timeline neutral,"Protocol selector (16:8, 18:6, OMAD). Circular countdown timer. Fasting history log. Tips during fast. Electrolytes."
|
||||
148,Anonymous Community / Confession,"anonymous, community, confess, whisper, secret, vent, share, safe, private, social, yikyak",Dark Mode (OLED) + Minimalism,"Glassmorphism, Soft UI Evolution",Social Proof-Focused + Feature-Rich,User Behavior Analytics,Dark protective + subtle gradient + upvote green + empathy warm accent,Anonymous posting with moderation. Safety reporting. Reaction system. Trending topics. Mental health resources link.
|
||||
149,Local Events & Discovery,"local, events, discovery, meetup, nearby, social, city, activities, calendar, community, explore",Vibrant & Block-based + Motion-Driven,"Glassmorphism, Flat Design",Hero-Centric Design + Feature-Rich,Event Analytics,City vibrant + event category colors + map accent + date highlight,Location-based discovery. Category filters. RSVP flow. Map view. Friend attendance. Organizer tools. Reminders.
|
||||
150,Study Together / Virtual Coworking,"study, focus, cowork, pomodoro, virtual, together, session, accountability, live, stream, room",Minimalism + Soft UI Evolution,"Flat Design, Dark Mode (OLED)",Social Proof-Focused + Feature-Rich,User Behavior Analytics,Calm focus blue + session progress indicator + ambient warm neutrals,Live study rooms with video/avatar presence. Shared focus timer. Ambient music. Goals sharing. Streak accountability.
|
||||
151,Coding Challenge & Practice,"coding, leetcode, challenge, algorithm, practice, programming, competitive, skill, interview, problem",Dark Mode (OLED) + Cyberpunk UI,"Minimalism, Flat Design",Feature-Rich Showcase + Social Proof,Student Analytics,Code editor dark + success green + difficulty gradient (easy green / medium amber / hard red),Code editor with syntax highlight. Multiple languages. Hint system. Solution explanation. Company tags. Contest mode.
|
||||
152,Kids Learning (ABC & Math),"kids, children, learning, abc, math, phonics, numbers, education, games, preschool, early",Claymorphism + Vibrant & Block-based,"Micro-interactions, Flat Design",Social Proof-Focused + Trust,Parent Dashboard,Bright primary + child-safe pastels + reward gold + interactive accent,Age-appropriate UI for 2-8. No ads. No dark patterns. Curriculum aligned. Parent progress reports. Reward system.
|
||||
153,Music Instrument Learning,"music, instrument, piano, guitar, learn, lesson, tutorial, notes, play, chord, practice, simply",Vibrant & Block-based + Motion-Driven,"Dark Mode (OLED), Soft UI Evolution",Interactive Product Demo + Social Proof,Learning Analytics,Musical warm deep red/brown + note color system + skill progress bar,Interactive instrument on-screen. Sheet music display. Song library. Slow-tempo practice. Recording and playback. Teacher mode.
|
||||
154,Parking Finder,"parking, spot, finder, map, pay, meter, garage, location, car, reserve, spothero",Minimalism + Glassmorphism,"Flat Design, Micro-interactions",Conversion-Optimized + Feature-Rich,Real-Time Monitoring + Map,Trust blue + available green + occupied red + map neutral,Real-time availability. In-app navigation. Payment integration. Parking timer alert. Favorite spots. Street vs garage.
|
||||
155,Public Transit Guide,"transit, bus, metro, subway, train, route, schedule, map, city, commute, trip, citymapper",Flat Design + Accessible & Ethical,"Minimalism, Motion-Driven",Feature-Rich Showcase + Interactive Demo,Real-Time Monitoring + Map,Transit brand line colors + real-time indicator green/red + map neutral,Real-time arrivals. Offline maps. Disruption alerts. Multi-modal routing. Fare calculation. Accessibility features.
|
||||
156,Road Trip Planner,"road, trip, drive, route, planner, travel, stop, map, adventure, scenic, car, wanderlog",Aurora UI + Organic Biophilic,"Motion-Driven, Vibrant & Block-based",Storytelling-Driven + Hero-Centric,N/A - Trip focused,Adventure warm sunset orange + map teal + stop markers + road neutral,Route planning with stops. Point-of-interest discovery. Gas/food/hotel along route. Offline maps. Trip sharing.
|
||||
157,VPN & Privacy Tool,"vpn, privacy, secure, anonymous, encrypt, proxy, ip, protect, shield, network, nordvpn",Minimalism + Dark Mode (OLED),"Cyberpunk UI, Trust & Authority",Trust & Authority + Conversion-Optimized,N/A - Connection focused,Dark shield blue + connected green + disconnected red + trust accent,One-tap connect. Server selection by country. No-log policy prominent. Speed indicator. Kill switch. Protocol choice.
|
||||
158,Emergency SOS & Safety,"emergency, sos, safety, alert, location, help, danger, crisis, first-aid, guard, bsafe",Accessible & Ethical + Flat Design,"Dark Mode (OLED), Minimalism",Trust & Authority + Social Proof,N/A - Safety focused,Alert red + safety blue + location green + high contrast critical,One-tap SOS. Emergency contacts auto-notify. Live location sharing. Fake call feature. Safe walk mode. Local emergency numbers.
|
||||
159,Wallpaper & Theme App,"wallpaper, theme, background, customize, aesthetic, home-screen, lock-screen, widget, design, zedge",Vibrant & Block-based + Aurora UI,"Glassmorphism, Motion-Driven",Feature-Rich Showcase + Social Proof,N/A - Gallery focused,Content-driven + trending aesthetic palettes + download accent,Category browsing. Preview on device. Daily wallpaper auto-set. Widget matching. Creator uploads. Resolution auto-fit.
|
||||
160,White Noise & Ambient Sound,"white noise, ambient, sound, sleep, focus, rain, nature, relax, concentration, background, noisli",Minimalism + Dark Mode (OLED),"Neumorphism, Organic Biophilic",Minimal & Direct + Social Proof,N/A - Player focused,Calming dark + ambient texture visual + subtle sound wave + sleep blue,Sound mixer with multiple simultaneous layers. Sleep timer with fade. Custom soundscapes. Offline. Background audio.
|
||||
161,Home Decoration & Interior Design,"home, interior, decor, design, furniture, room, renovation, ar, plan, inspire, 3d, houzz",Minimalism + 3D Product Preview,"Organic Biophilic, Aurora UI",Storytelling-Driven + Feature-Rich,N/A - Project focused,Neutral interior palette + material texture accent + AR blue,AR room visualization. Style quiz. Product catalog with purchase links. 3D room planner. Mood board. Before/after.
|
||||
|
@@ -0,0 +1,45 @@
|
||||
No,Category,Issue,Keywords,Platform,Description,Do,Don't,Code Example Good,Code Example Bad,Severity
|
||||
1,Async Waterfall,Defer Await,async await defer branch,React/Next.js,Move await into branches where actually used to avoid blocking unused code paths,Move await operations into branches where they're needed,Await at top of function blocking all branches,"if (skip) return { skipped: true }; const data = await fetch()","const data = await fetch(); if (skip) return { skipped: true }",Critical
|
||||
2,Async Waterfall,Promise.all Parallel,promise all parallel concurrent,React/Next.js,Execute independent async operations concurrently using Promise.all(),Use Promise.all() for independent operations,Sequential await for independent operations,"const [user, posts] = await Promise.all([fetchUser(), fetchPosts()])","const user = await fetchUser(); const posts = await fetchPosts()",Critical
|
||||
3,Async Waterfall,Dependency Parallelization,better-all dependency parallel,React/Next.js,Use better-all for operations with partial dependencies to maximize parallelism,Use better-all to start each task at earliest possible moment,Wait for unrelated data before starting dependent fetch,"await all({ user() {}, config() {}, profile() { return fetch((await this.$.user).id) } })","const [user, config] = await Promise.all([...]); const profile = await fetchProfile(user.id)",Critical
|
||||
4,Async Waterfall,API Route Optimization,api route waterfall promise,React/Next.js,In API routes start independent operations immediately even if not awaited yet,Start promises early and await late,Sequential awaits in API handlers,"const sessionP = auth(); const configP = fetchConfig(); const session = await sessionP","const session = await auth(); const config = await fetchConfig()",Critical
|
||||
5,Async Waterfall,Suspense Boundaries,suspense streaming boundary,React/Next.js,Use Suspense to show wrapper UI faster while data loads,Wrap async components in Suspense boundaries,Await data blocking entire page render,"<Suspense fallback={<Skeleton />}><DataDisplay /></Suspense>","const data = await fetchData(); return <DataDisplay data={data} />",High
|
||||
6,Bundle Size,Barrel Imports,barrel import direct path,React/Next.js,Import directly from source files instead of barrel files to avoid loading unused modules,Import directly from source path,Import from barrel/index files,"import Check from 'lucide-react/dist/esm/icons/check'","import { Check } from 'lucide-react'",Critical
|
||||
7,Bundle Size,Dynamic Imports,dynamic import lazy next,React/Next.js,Use next/dynamic to lazy-load large components not needed on initial render,Use dynamic() for heavy components,Import heavy components at top level,"const Monaco = dynamic(() => import('./monaco'), { ssr: false })","import { MonacoEditor } from './monaco-editor'",Critical
|
||||
8,Bundle Size,Defer Third Party,analytics defer third-party,React/Next.js,Load analytics and logging after hydration since they don't block interaction,Load non-critical scripts after hydration,Include analytics in main bundle,"const Analytics = dynamic(() => import('@vercel/analytics'), { ssr: false })","import { Analytics } from '@vercel/analytics/react'",Medium
|
||||
9,Bundle Size,Conditional Loading,conditional module lazy,React/Next.js,Load large data or modules only when a feature is activated,Dynamic import when feature enabled,Import large modules unconditionally,"useEffect(() => { if (enabled) import('./heavy.js') }, [enabled])","import { heavyData } from './heavy.js'",High
|
||||
10,Bundle Size,Preload Intent,preload hover focus intent,React/Next.js,Preload heavy bundles on hover/focus before they're needed,Preload on user intent signals,Load only on click,"onMouseEnter={() => import('./editor')}","onClick={() => import('./editor')}",Medium
|
||||
11,Server,React.cache Dedup,react cache deduplicate request,React/Next.js,Use React.cache() for server-side request deduplication within single request,Wrap data fetchers with cache(),Fetch same data multiple times in tree,"export const getUser = cache(async () => await db.user.find())","export async function getUser() { return await db.user.find() }",Medium
|
||||
12,Server,LRU Cache Cross-Request,lru cache cross request,React/Next.js,Use LRU cache for data shared across sequential requests,Use LRU for cross-request caching,Refetch same data on every request,"const cache = new LRUCache({ max: 1000, ttl: 5*60*1000 })","Always fetch from database",High
|
||||
13,Server,Minimize Serialization,serialization rsc boundary,React/Next.js,Only pass fields that client actually uses across RSC boundaries,Pass only needed fields to client components,Pass entire objects to client,"<Profile name={user.name} />","<Profile user={user} /> // 50 fields serialized",High
|
||||
14,Server,Parallel Fetching,parallel fetch component composition,React/Next.js,Restructure components to parallelize data fetching in RSC,Use component composition for parallel fetches,Sequential fetches in parent component,"<Header /><Sidebar /> // both fetch in parallel","const header = await fetchHeader(); return <><div>{header}</div><Sidebar /></>",Critical
|
||||
15,Server,After Non-blocking,after non-blocking logging,React/Next.js,Use Next.js after() to schedule work after response is sent,Use after() for logging/analytics,Block response for non-critical operations,"after(async () => { await logAction() }); return Response.json(data)","await logAction(); return Response.json(data)",Medium
|
||||
16,Client,SWR Deduplication,swr dedup cache revalidate,React/Next.js,Use SWR for automatic request deduplication and caching,Use useSWR for client data fetching,Manual fetch in useEffect,"const { data } = useSWR('/api/users', fetcher)","useEffect(() => { fetch('/api/users').then(setUsers) }, [])",Medium-High
|
||||
17,Client,Event Listener Dedup,event listener deduplicate global,React/Next.js,Share global event listeners across component instances,Use useSWRSubscription for shared listeners,Register listener per component instance,"useSWRSubscription('global-keydown', () => { window.addEventListener... })","useEffect(() => { window.addEventListener('keydown', handler) }, [])",Low
|
||||
18,Rerender,Defer State Reads,state read callback subscription,React/Next.js,Don't subscribe to state only used in callbacks,Read state on-demand in callbacks,Subscribe to state used only in handlers,"const handleClick = () => { const params = new URLSearchParams(location.search) }","const params = useSearchParams(); const handleClick = () => { params.get('ref') }",Medium
|
||||
19,Rerender,Memoized Components,memo extract expensive,React/Next.js,Extract expensive work into memoized components for early returns,Extract to memo() components,Compute expensive values before early return,"const UserAvatar = memo(({ user }) => ...); if (loading) return <Skeleton />","const avatar = useMemo(() => compute(user)); if (loading) return <Skeleton />",Medium
|
||||
20,Rerender,Narrow Dependencies,effect dependency primitive,React/Next.js,Specify primitive dependencies instead of objects in effects,Use primitive values in dependency arrays,Use object references as dependencies,"useEffect(() => { console.log(user.id) }, [user.id])","useEffect(() => { console.log(user.id) }, [user])",Low
|
||||
21,Rerender,Derived State,derived boolean subscription,React/Next.js,Subscribe to derived booleans instead of continuous values,Use derived boolean state,Subscribe to continuous values,"const isMobile = useMediaQuery('(max-width: 767px)')","const width = useWindowWidth(); const isMobile = width < 768",Medium
|
||||
22,Rerender,Functional setState,functional setstate callback,React/Next.js,Use functional setState updates for stable callbacks and no stale closures,Use functional form: setState(curr => ...),Reference state directly in setState,"setItems(curr => [...curr, newItem])","setItems([...items, newItem]) // items in deps",Medium
|
||||
23,Rerender,Lazy State Init,usestate lazy initialization,React/Next.js,Pass function to useState for expensive initial values,Use function form for expensive init,Compute expensive value directly,"useState(() => buildSearchIndex(items))","useState(buildSearchIndex(items)) // runs every render",Medium
|
||||
24,Rerender,Transitions,starttransition non-urgent,React/Next.js,Mark frequent non-urgent state updates as transitions,Use startTransition for non-urgent updates,Block UI on every state change,"startTransition(() => setScrollY(window.scrollY))","setScrollY(window.scrollY) // blocks on every scroll",Medium
|
||||
25,Rendering,SVG Animation Wrapper,svg animation wrapper div,React/Next.js,Wrap SVG in div and animate wrapper for hardware acceleration,Animate div wrapper around SVG,Animate SVG element directly,"<div class='animate-spin'><svg>...</svg></div>","<svg class='animate-spin'>...</svg>",Low
|
||||
26,Rendering,Content Visibility,content-visibility auto,React/Next.js,Apply content-visibility: auto to defer off-screen rendering,Use content-visibility for long lists,Render all list items immediately,".item { content-visibility: auto; contain-intrinsic-size: 0 80px }","Render 1000 items without optimization",High
|
||||
27,Rendering,Hoist Static JSX,hoist static jsx element,React/Next.js,Extract static JSX outside components to avoid re-creation,Hoist static elements to module scope,Create static elements inside components,"const skeleton = <div class='animate-pulse' />; function C() { return skeleton }","function C() { return <div class='animate-pulse' /> }",Low
|
||||
28,Rendering,Hydration No Flicker,hydration mismatch flicker,React/Next.js,Use inline script to set client-only data before hydration,Inject sync script for client-only values,Use useEffect causing flash,"<script dangerouslySetInnerHTML={{ __html: 'el.className = localStorage.theme' }} />","useEffect(() => setTheme(localStorage.theme), []) // flickers",Medium
|
||||
29,Rendering,Conditional Render,conditional render ternary,React/Next.js,Use ternary instead of && when condition can be 0 or NaN,Use explicit ternary for conditionals,Use && with potentially falsy numbers,"{count > 0 ? <Badge>{count}</Badge> : null}","{count && <Badge>{count}</Badge>} // renders '0'",Low
|
||||
30,Rendering,Activity Component,activity show hide preserve,React/Next.js,Use Activity component to preserve state/DOM for toggled components,Use Activity for expensive toggle components,Unmount/remount on visibility toggle,"<Activity mode={isOpen ? 'visible' : 'hidden'}><Menu /></Activity>","{isOpen && <Menu />} // loses state",Medium
|
||||
31,JS Perf,Batch DOM CSS,batch dom css reflow,React/Next.js,Group CSS changes via classes or cssText to minimize reflows,Use class toggle or cssText,Change styles one property at a time,"element.classList.add('highlighted')","el.style.width='100px'; el.style.height='200px'",Medium
|
||||
32,JS Perf,Index Map Lookup,map index lookup find,React/Next.js,Build Map for repeated lookups instead of multiple .find() calls,Build index Map for O(1) lookups,Use .find() in loops,"const byId = new Map(users.map(u => [u.id, u])); byId.get(id)","users.find(u => u.id === order.userId) // O(n) each time",Low-Medium
|
||||
33,JS Perf,Cache Property Access,cache property loop,React/Next.js,Cache object property lookups in hot paths,Cache values before loops,Access nested properties in loops,"const val = obj.config.settings.value; for (...) process(val)","for (...) process(obj.config.settings.value)",Low-Medium
|
||||
34,JS Perf,Cache Function Results,memoize cache function,React/Next.js,Use module-level Map to cache repeated function results,Use Map cache for repeated calls,Recompute same values repeatedly,"const cache = new Map(); if (cache.has(x)) return cache.get(x)","slugify(name) // called 100 times same input",Medium
|
||||
35,JS Perf,Cache Storage API,localstorage cache read,React/Next.js,Cache localStorage/sessionStorage reads in memory,Cache storage reads in Map,Read storage on every call,"if (!cache.has(key)) cache.set(key, localStorage.getItem(key))","localStorage.getItem('theme') // every call",Low-Medium
|
||||
36,JS Perf,Combine Iterations,combine filter map loop,React/Next.js,Combine multiple filter/map into single loop,Single loop for multiple categorizations,Chain multiple filter() calls,"for (u of users) { if (u.isAdmin) admins.push(u); if (u.isTester) testers.push(u) }","users.filter(admin); users.filter(tester); users.filter(inactive)",Low-Medium
|
||||
37,JS Perf,Length Check First,length check array compare,React/Next.js,Check array lengths before expensive comparisons,Early return if lengths differ,Always run expensive comparison,"if (a.length !== b.length) return true; // then compare","a.sort().join() !== b.sort().join() // even when lengths differ",Medium-High
|
||||
38,JS Perf,Early Return,early return exit function,React/Next.js,Return early when result is determined to skip processing,Return immediately on first error,Process all items then check errors,"for (u of users) { if (!u.email) return { error: 'Email required' } }","let hasError; for (...) { if (!email) hasError=true }; if (hasError)...",Low-Medium
|
||||
39,JS Perf,Hoist RegExp,regexp hoist module,React/Next.js,Don't create RegExp inside render - hoist or memoize,Hoist RegExp to module scope,Create RegExp every render,"const EMAIL_RE = /^[^@]+@[^@]+$/; function validate() { EMAIL_RE.test(x) }","function C() { const re = new RegExp(pattern); re.test(x) }",Low-Medium
|
||||
40,JS Perf,Loop Min Max,loop min max sort,React/Next.js,Use loop for min/max instead of sort - O(n) vs O(n log n),Single pass loop for min/max,Sort array to find min/max,"let max = arr[0]; for (x of arr) if (x > max) max = x","arr.sort((a,b) => b-a)[0] // O(n log n)",Low
|
||||
41,JS Perf,Set Map Lookups,set map includes has,React/Next.js,Use Set/Map for O(1) lookups instead of array.includes(),Convert to Set for membership checks,Use .includes() for repeated checks,"const allowed = new Set(['a','b']); allowed.has(id)","const allowed = ['a','b']; allowed.includes(id)",Low-Medium
|
||||
42,JS Perf,toSorted Immutable,tosorted sort immutable,React/Next.js,Use toSorted() instead of sort() to avoid mutating arrays,Use toSorted() for immutability,Mutate arrays with sort(),"users.toSorted((a,b) => a.name.localeCompare(b.name))","users.sort((a,b) => a.name.localeCompare(b.name)) // mutates",Medium-High
|
||||
43,Advanced,Event Handler Refs,useeffectevent ref handler,React/Next.js,Store callbacks in refs for stable effect subscriptions,Use useEffectEvent for stable handlers,Re-subscribe on every callback change,"const onEvent = useEffectEvent(handler); useEffect(() => { listen(onEvent) }, [])","useEffect(() => { listen(handler) }, [handler]) // re-subscribes",Low
|
||||
44,Advanced,useLatest Hook,uselatest ref callback,React/Next.js,Access latest values in callbacks without adding to dependency arrays,Use useLatest for fresh values in stable callbacks,Add callback to effect dependencies,"const cbRef = useLatest(cb); useEffect(() => { setTimeout(() => cbRef.current()) }, [])","useEffect(() => { setTimeout(() => cb()) }, [cb]) // re-runs",Low
|
||||
|
@@ -0,0 +1,51 @@
|
||||
No,Category,Guideline,Description,Do,Don't,Code Good,Code Bad,Severity,Docs URL
|
||||
1,Components,Use standalone components,Angular 17+ default; no NgModule needed,Standalone components for all new code,NgModule-based components for new projects,"@Component({ standalone: true imports: [CommonModule] })","@NgModule({ declarations: [MyComp] })",High,https://angular.dev/guide/components/importing
|
||||
2,Components,Use signals for state,Signals are Angular's reactive primitive for fine-grained reactivity,Signals for component state over class properties,Mutable class properties without signals,"count = signal(0); increment() { this.count.update(v => v + 1) }","count = 0; increment() { this.count++ }",High,https://angular.dev/guide/signals
|
||||
3,Components,Use @if/@for/@switch control flow,Built-in control flow syntax replaces *ngIf/*ngFor directives,@if and @for in templates,*ngIf and *ngFor structural directives,"@if (isLoggedIn) { <Dashboard /> } @else { <Login /> }","<div *ngIf=""isLoggedIn""><Dashboard /></div>",High,https://angular.dev/guide/templates/control-flow
|
||||
4,Components,Use input() and output() signals,Signal-based inputs/outputs replace @Input()/@Output() decorators,input() and output() for component API,@Input() and @Output() decorators,"name = input<string>(); clicked = output<void>()","@Input() name: string; @Output() clicked = new EventEmitter()",High,https://angular.dev/guide/components/inputs
|
||||
5,Components,Use content projection,ng-content for flexible component composition,ng-content with select for named slots,Rigid templates that can't be customized,"<ng-content select=""[header]"" /> <ng-content />","<div class=""header"">{{ title }}</div>",Medium,https://angular.dev/guide/components/content-projection
|
||||
6,Components,Keep components small,Single responsibility; components should do one thing,Extract sub-components when template exceeds 50 lines,Monolithic components handling multiple concerns,"<UserAvatar /> <UserDetails /> <UserActions />",One 300-line component template,Medium,https://angular.dev/guide/components
|
||||
7,Components,Use OnPush change detection,Reduces re-renders by only checking on input changes or signal updates,OnPush for all components,Default change detection strategy,"changeDetection: ChangeDetectionStrategy.OnPush","changeDetection: ChangeDetectionStrategy.Default",High,https://angular.dev/guide/components/lifecycle
|
||||
8,Components,Avoid direct DOM manipulation,Use renderer or ElementRef sparingly; prefer template bindings,Template bindings and Angular directives,Direct document.querySelector or innerHTML,"[class.active]=""isActive""","this.el.nativeElement.classList.add('active')",High,https://angular.dev/guide/components/host-elements
|
||||
9,Routing,Lazy load feature routes,Load route chunks on demand to reduce initial bundle,loadComponent() for all feature routes,Eager-loaded routes in app config,"{ path: 'admin' loadComponent: () => import('./admin/admin.component') }","{ path: 'admin' component: AdminComponent }",High,https://angular.dev/guide/routing/lazy-loading
|
||||
10,Routing,Use route guards with functional API,Protect routes with canActivate/canMatch functional guards,Functional guards returning boolean or UrlTree,Class-based guards with CanActivate interface,"canActivate: [() => inject(AuthService).isLoggedIn()]","canActivate: [AuthGuard]",High,https://angular.dev/guide/routing/common-router-tasks#preventing-unauthorized-access
|
||||
11,Routing,Use route resolvers for data,Pre-fetch data before route activation using resolve,ResolveFn for route data,Fetching data in ngOnInit causing flash of empty state,"resolve: { user: () => inject(UserService).getUser() }",Fetch in ngOnInit with loading state flickering,Medium,https://angular.dev/guide/routing/common-router-tasks#resolve
|
||||
12,Routing,Type route params with inject,Use inject(ActivatedRoute) with signals or toSignal,Typed route params via ActivatedRoute,Untyped route.snapshot.params string access,"const id = toSignal(route.paramMap.pipe(map(p => p.get('id'))))","const id = this.route.snapshot.params['id']",Medium,https://angular.dev/api/router/ActivatedRoute
|
||||
13,Routing,Use nested routes for layouts,Compose shared layouts using router-outlet nesting,Nested routes with shared layout components,Duplicating layout code across routes,"{ path: 'app' component: ShellComponent children: [...] }",Duplicate header/sidebar in each route component,Medium,https://angular.dev/guide/routing/router-tutorial-toh#child-route-configuration
|
||||
14,Routing,Configure preloading strategies,Preload lazy modules in background after initial load,PreloadAllModules or custom strategy,No preloading causing delayed navigation,"provideRouter(routes withPreloading(PreloadAllModules))","provideRouter(routes)",Low,https://angular.dev/api/router/PreloadAllModules
|
||||
15,State,Use signals for local state,Signals provide synchronous reactive state without RxJS overhead,signal() for component-local reactive state,BehaviorSubject for simple local state,"const items = signal<Item[]>([]); addItem(i: Item) { this.items.update(arr => [...arr i]) }","items$ = new BehaviorSubject<Item[]>([])",High,https://angular.dev/guide/signals
|
||||
16,State,Use computed() for derived state,Lazily evaluated derived values that update when dependencies change,computed() for values derived from other signals,Duplicated state or manual sync,"readonly total = computed(() => this.items().reduce((s i) => s + i.price 0))","this.total = this.items.reduce(...) // called manually",High,https://angular.dev/guide/signals#computed-signals
|
||||
17,State,Use effect() carefully,Effects run side effects when signals change; avoid overuse,effect() for side effects like logging or localStorage sync,effect() for deriving state (use computed instead),"effect(() => localStorage.setItem('cart' JSON.stringify(this.cart())))","effect(() => { this.total.set(this.items().length) })",Medium,https://angular.dev/guide/signals#effects
|
||||
18,State,Use NgRx Signal Store for complex state,NgRx Signal Store is the modern lightweight state management for Angular,@ngrx/signals SignalStore for feature state,Full NgRx reducer/action/effect boilerplate for simple state,"const Store = signalStore(withState({ count: 0 }) withMethods(s => ({ increment: () => patchState(s { count: s.count() + 1 }) })))","createReducer(on(increment state => ({ ...state count: state.count + 1 })))",Medium,https://ngrx.io/guide/signals
|
||||
19,State,Inject services for shared state,Services with signals share state across components without a store,Injectable service with signals for cross-component state,Prop drilling or @Input chains for shared state,"@Injectable({ providedIn: 'root' }) class CartService { items = signal<Item[]>([]) }","@Input() cartItems passed through 4 component levels",Medium,https://angular.dev/guide/di/creating-injectable-service
|
||||
20,State,Avoid mixing RxJS and signals unnecessarily,Use toSignal() to bridge RxJS into signal world at the boundary,toSignal() to convert observable to signal at component edge,Subscribing in components and storing in signal manually,"readonly user = toSignal(this.userService.user$)","this.userService.user$.subscribe(u => this.user.set(u))",Medium,https://angular.dev/guide/rxjs-interop
|
||||
21,Forms,Use typed reactive forms,FormGroup/FormControl with explicit generics for compile-time safety,FormBuilder with typed controls,Untyped FormControl or any casts,"fb.group<LoginForm>({ email: fb.control('') password: fb.control('') })","new FormGroup({ email: new FormControl(null) })",High,https://angular.dev/guide/forms/typed-forms
|
||||
22,Forms,Use reactive forms over template-driven,Reactive forms scale better and are fully testable,ReactiveFormsModule for all non-trivial forms,FormsModule with ngModel for complex forms,"<input [formControl]=""emailControl"" />","<input [(ngModel)]=""email"" />",Medium,https://angular.dev/guide/forms/reactive-forms
|
||||
23,Forms,Write custom validators as functions,Functional validators are composable and tree-shakeable,ValidatorFn functions for custom validation,Class-based validators implementing Validator interface,"const noSpaces: ValidatorFn = ctrl => ctrl.value?.includes(' ') ? { noSpaces: true } : null","class NoSpacesValidator implements Validator { validate(c) {} }",Medium,https://angular.dev/guide/forms/form-validation#custom-validators
|
||||
24,Forms,Use updateOn for performance,Control when validation runs to avoid per-keystroke validation overhead,updateOn: 'blur' or 'submit' for expensive validators,Default updateOn: 'change' for async validators,"fb.control('' { updateOn: 'blur' validators: [Validators.email] })","fb.control('' [Validators.email]) // validates on every key",Low,https://angular.dev/api/forms/AbstractControl#updateOn
|
||||
25,Forms,Use FormArray for dynamic fields,FormArray manages variable-length lists of controls,FormArray for add/remove field scenarios,Manually tracking index-based controls,"get items(): FormArray { return this.form.get('items') as FormArray }","items: [FormControl] managed outside form",Medium,https://angular.dev/guide/forms/reactive-forms#using-the-formarray-class
|
||||
26,Forms,Display validation errors clearly,Use form control touched and dirty states to show errors at the right time,Show errors after field is touched,Show all errors on page load,"@if (email.invalid && email.touched) { <span>Invalid email</span> }","@if (email.invalid) { <span>Invalid email</span> }",Medium,https://angular.dev/guide/forms/form-validation
|
||||
27,Performance,Apply OnPush to all components,OnPush + signals eliminates most unnecessary change detection cycles,OnPush change detection everywhere,Default strategy which checks entire tree on every event,changeDetection: ChangeDetectionStrategy.OnPush,changeDetection: ChangeDetectionStrategy.Default,High,https://angular.dev/best-practices/skipping-component-subtrees
|
||||
28,Performance,Use trackBy in @for blocks,Stable identity for list items prevents full DOM re-creation on change,track item.id in @for,"@for (item of items; track item.id) { <li>{{ item.name }}</li> }","@for (item of items; track $index) { <li>{{ item.name }}</li> }",High,https://angular.dev/guide/templates/control-flow#track-and-identity
|
||||
29,Performance,Use @defer for below-the-fold content,Defer blocks lazy-load components when they enter the viewport,@defer with on viewport for non-critical UI,Eagerly loading all components at startup,"@defer (on viewport) { <HeavyChart /> } @placeholder { <Skeleton /> }","<HeavyChart /> loaded at startup",High,https://angular.dev/guide/defer
|
||||
30,Performance,Use NgOptimizedImage,Enforces image best practices: lazy loading LCP hints and proper sizing,NgOptimizedImage for all img tags,Plain img tags for CMS or user content,"<img ngSrc=""/hero.jpg"" width=""800"" height=""400"" priority />","<img src=""/hero.jpg"" />",High,https://angular.dev/guide/image-optimization
|
||||
31,Performance,Tree-shake unused Angular features,Import only what you use from Angular packages,Import specific Angular modules needed,Import BrowserAnimationsModule when not using animations,"import { NgOptimizedImage } from '@angular/common'","import { CommonModule } from '@angular/common' // entire module",Medium,https://angular.dev/tools/cli/build
|
||||
32,Performance,Avoid subscribe in components,Subscriptions leak and cause bugs; prefer async pipe or toSignal,toSignal() or async pipe instead of manual subscribe,Manual subscribe without unsubscribe in ngOnDestroy,"readonly data = toSignal(this.service.data$)","this.service.data$.subscribe(d => this.data = d)",High,https://angular.dev/guide/rxjs-interop
|
||||
33,Performance,Use SSR with Angular Universal,Pre-render pages for faster LCP and better SEO,SSR or SSG for public-facing routes,Pure CSR for SEO-critical pages,"ng add @angular/ssr","// no SSR, client renders empty shell",Medium,https://angular.dev/guide/ssr
|
||||
34,Performance,Minimize bundle with standalone APIs,Standalone components + provideRouter() eliminate dead NgModule code,provideRouter() and provideHttpClient() in app.config,Root AppModule with all imports,provideRouter(routes) in app.config.ts,"@NgModule({ imports: [RouterModule.forRoot(routes)] })",Medium,https://angular.dev/guide/routing/standalone
|
||||
35,Testing,Use TestBed for component tests,TestBed sets up Angular DI for realistic component testing,TestBed.configureTestingModule for component tests,Instantiate components with new keyword,"TestBed.configureTestingModule({ imports: [MyComponent] })","const comp = new MyComponent()",High,https://angular.dev/guide/testing/components-basics
|
||||
36,Testing,Use Angular CDK component harnesses,Harnesses provide a stable testing API that survives template refactors,MatButtonHarness and custom HarnessLoader,Direct native element queries that break on template changes,"const btn = await loader.getHarness(MatButtonHarness)","fixture.debugElement.query(By.css('button'))",Medium,https://material.angular.io/cdk/test-harnesses/overview
|
||||
37,Testing,Use Spectator for less boilerplate,Spectator wraps TestBed with a cleaner API reducing test setup noise,Spectator for unit tests,Raw TestBed for every test,"const spectator = createComponentFactory(MyComponent)","TestBed.configureTestingModule({ declarations: [MyComponent] providers: [...] })",Low,https://github.com/ngneat/spectator
|
||||
38,Testing,Mock services with jasmine.createSpyObj,Isolate unit tests by providing mock implementations of dependencies,SpyObj or jest.fn() mocks for services,Real HTTP calls in unit tests,"const spy = jasmine.createSpyObj('UserService' ['getUser']); spy.getUser.and.returnValue(of(user))","providers: [UserService] // real service in unit test",High,https://angular.dev/guide/testing/services
|
||||
39,Testing,Write integration tests for routes,Test full route navigation including guards and resolvers,RouterTestingHarness for route integration tests,Mock all routing behavior in unit tests,"const harness = await RouterTestingHarness.create(); await harness.navigateByUrl('/home')","// manually calling route guard methods",Medium,https://angular.dev/api/router/testing/RouterTestingHarness
|
||||
40,Testing,Test signal-based components,Signals update synchronously; no async flush needed in most cases,Read signal value directly in test assertions,TestBed.tick() or fakeAsync for signal reads,"component.count.set(5); expect(component.double()).toBe(10)","fakeAsync(() => { component.count.set(5); tick(); expect(component.double()).toBe(10) })",Medium,https://angular.dev/guide/testing
|
||||
41,Styling,Use ViewEncapsulation.Emulated,Default emulation scopes styles to component preventing global leaks,Emulated or None for intentional global styles,ViewEncapsulation.None for component-specific styles,ViewEncapsulation.Emulated (default),ViewEncapsulation.None on feature components,Medium,https://angular.dev/guide/components/styling#style-scoping
|
||||
42,Styling,Use :host selector,Style the component's host element using :host pseudo-class,":host for host element styles",Adding wrapper div just for styling,":host { display: block; padding: 1rem }","<div class=""wrapper"">...</div> + .wrapper { padding: 1rem }",Medium,https://angular.dev/guide/components/styling#host-element
|
||||
43,Styling,Use CSS custom properties for theming,CSS variables work across component boundaries and enable dynamic theming,CSS custom properties for colors and spacing,Hardcoded hex values in component styles,":root { --primary: #6200ee } button { background: var(--primary) }","button { background: #6200ee }",Medium,https://angular.dev/guide/components/styling
|
||||
44,Styling,Integrate Tailwind with Angular,Tailwind utilities work alongside Angular's ViewEncapsulation via global stylesheet,Add Tailwind in styles.css and use utility classes in templates,Custom CSS for layout that Tailwind already handles,"<div class=""flex items-center gap-4 p-6"">","<div class=""my-custom-flex""> /* .my-custom-flex { display: flex } */",Low,https://tailwindcss.com/docs/guides/angular
|
||||
45,Styling,Use Angular Material theming tokens,Material 3 uses design tokens for systematic theming,M3 token-based theming for Angular Material,Overriding Angular Material CSS with deep selectors,"@include mat.button-theme($my-theme)","::ng-deep .mat-button { background: red }",Medium,https://material.angular.io/guide/theming
|
||||
46,Architecture,Use injection tokens for config,Provide configuration via InjectionToken for testability and flexibility,InjectionToken for environment-specific values,Importing environment.ts directly in services,"const API_URL = new InjectionToken<string>('apiUrl'); provide: [{ provide: API_URL useValue: env.apiUrl }]","constructor(private env: Environment) { this.url = env.apiUrl }",Medium,https://angular.dev/guide/di/dependency-injection-providers#using-an-injectiontoken-object
|
||||
47,Architecture,Use HTTP interceptors,Intercept requests for auth headers error handling and logging,Functional interceptors with withInterceptors(),Service-level header management in every request,"withInterceptors([authInterceptor errorInterceptor])","httpClient.get(url { headers: { Authorization: token } }) in every call",High,https://angular.dev/guide/http/interceptors
|
||||
48,Architecture,Organize by feature not type,Feature-based folder structure scales better than type-based,Feature folders with collocated component service and routes,Flat folders: all-components/ all-services/,"src/features/checkout/checkout.component.ts checkout.service.ts checkout.routes.ts","src/components/checkout.component.ts src/services/checkout.service.ts",Medium,https://angular.dev/style-guide#folders-by-feature-structure
|
||||
49,Architecture,Use environment configurations,Separate environment values for dev staging and prod via Angular build configs,angular.json fileReplacements for env configs,Hardcoded API URLs or feature flags in source,"fileReplacements: [{ replace: environment.ts with: environment.prod.ts }]","const API = 'https://api.example.com' // hardcoded in service",High,https://angular.dev/tools/cli/environments
|
||||
50,Architecture,Prefer inject() over constructor DI,inject() function is composable and works in more contexts than constructor injection,inject() for dependency injection,Constructor parameters for new code,"readonly http = inject(HttpClient); readonly router = inject(Router)","constructor(private http: HttpClient private router: Router) {}",Medium,https://angular.dev/api/core/inject
|
||||
|
Can't render this file because it has a wrong number of fields in line 29.
|
@@ -0,0 +1,54 @@
|
||||
No,Category,Guideline,Description,Do,Don't,Code Good,Code Bad,Severity,Docs URL
|
||||
1,Architecture,Use Islands Architecture,Astro's partial hydration only loads JS for interactive components,Interactive components with client directives,Hydrate entire page like traditional SPA,<Counter client:load />,Everything as client component,High,https://docs.astro.build/en/concepts/islands/
|
||||
2,Architecture,Default to zero JS,Astro ships zero JS by default - add only when needed,Static components without client directive,Add client:load to everything,<Header /> (static),<Header client:load /> (unnecessary),High,https://docs.astro.build/en/basics/astro-components/
|
||||
3,Architecture,Choose right client directive,Different directives for different hydration timing,client:visible for below-fold client:idle for non-critical,client:load for everything,<Comments client:visible />,<Comments client:load />,Medium,https://docs.astro.build/en/reference/directives-reference/#client-directives
|
||||
4,Architecture,Use content collections,Type-safe content management for blogs docs,Content collections for structured content,Loose markdown files without schema,const posts = await getCollection('blog'),import.meta.glob('./posts/*.md'),High,https://docs.astro.build/en/guides/content-collections/
|
||||
5,Architecture,Define collection schemas,Zod schemas for content validation,Schema with required fields and types,No schema validation,"defineCollection({ schema: z.object({...}) })",defineCollection({}),High,https://docs.astro.build/en/guides/content-collections/#defining-a-collection-schema
|
||||
6,Routing,Use file-based routing,Create routes by adding .astro files in pages/,pages/ directory for routes,Manual route configuration,src/pages/about.astro,Custom router setup,Medium,https://docs.astro.build/en/basics/astro-pages/
|
||||
7,Routing,Dynamic routes with brackets,Use [param] for dynamic routes,Bracket notation for params,Query strings for dynamic content,pages/blog/[slug].astro,pages/blog.astro?slug=x,Medium,https://docs.astro.build/en/guides/routing/#dynamic-routes
|
||||
8,Routing,Use getStaticPaths for SSG,Generate static pages at build time,getStaticPaths for known dynamic routes,Fetch at runtime for static content,"export async function getStaticPaths() { return [...] }",No getStaticPaths with dynamic route,High,https://docs.astro.build/en/reference/api-reference/#getstaticpaths
|
||||
9,Routing,Enable SSR when needed,Server-side rendering for dynamic content,output: 'server' or 'hybrid' for dynamic,SSR for purely static sites,"export const prerender = false;",SSR for static blog,Medium,https://docs.astro.build/en/guides/server-side-rendering/
|
||||
10,Components,Keep .astro for static,Use .astro components for static content,Astro components for layout structure,React/Vue for static markup,<Layout><slot /></Layout>,<ReactLayout>{children}</ReactLayout>,High,
|
||||
11,Components,Use framework components for interactivity,React Vue Svelte for complex interactivity,Framework component with client directive,Astro component with inline scripts,<ReactCounter client:load />,<script> in .astro for complex state,Medium,https://docs.astro.build/en/guides/framework-components/
|
||||
12,Components,Pass data via props,Astro components receive props in frontmatter,Astro.props for component data,Global state for simple data,"const { title } = Astro.props;",Import global store,Low,https://docs.astro.build/en/basics/astro-components/#component-props
|
||||
13,Components,Use slots for composition,Named and default slots for flexible layouts,<slot /> for child content,Props for HTML content,<slot name="header" />,<Component header={<div>...</div>} />,Medium,https://docs.astro.build/en/basics/astro-components/#slots
|
||||
14,Components,Colocate component styles,Scoped styles in component file,<style> in same .astro file,Separate CSS files for component styles,<style> .card { } </style>,import './Card.css',Low,
|
||||
15,Styling,Use scoped styles by default,Astro scopes styles to component automatically,<style> for component-specific styles,Global styles for everything,<style> h1 { } </style> (scoped),<style is:global> for everything,Medium,https://docs.astro.build/en/guides/styling/#scoped-styles
|
||||
16,Styling,Use is:global sparingly,Global styles only when truly needed,is:global for base styles or overrides,is:global for component styles,<style is:global> body { } </style>,<style is:global> .card { } </style>,Medium,
|
||||
17,Styling,Integrate Tailwind properly,Use @astrojs/tailwind integration,Official Tailwind integration,Manual Tailwind setup,npx astro add tailwind,Manual PostCSS config,Low,https://docs.astro.build/en/guides/integrations-guide/tailwind/
|
||||
18,Styling,Use CSS variables for theming,Define tokens in :root,CSS custom properties for themes,Hardcoded colors everywhere,:root { --primary: #3b82f6; },color: #3b82f6; everywhere,Medium,
|
||||
19,Data,Fetch in frontmatter,Data fetching in component frontmatter,Top-level await in frontmatter,useEffect for initial data,const data = await fetch(url),client-side fetch on mount,High,https://docs.astro.build/en/guides/data-fetching/
|
||||
20,Data,Use Astro.glob for local files,Import multiple local files,Astro.glob for markdown/data files,Manual imports for each file,const posts = await Astro.glob('./posts/*.md'),"import post1; import post2;",Medium,
|
||||
21,Data,Prefer content collections over glob,Type-safe collections for structured content,getCollection() for blog/docs,Astro.glob for structured content,await getCollection('blog'),await Astro.glob('./blog/*.md'),High,
|
||||
22,Data,Use environment variables correctly,Import.meta.env for env vars,PUBLIC_ prefix for client vars,Expose secrets to client,import.meta.env.PUBLIC_API_URL,import.meta.env.SECRET in client,High,https://docs.astro.build/en/guides/environment-variables/
|
||||
23,Performance,Preload critical assets,Use link preload for important resources,Preload fonts above-fold images,No preload hints,"<link rel=""preload"" href=""font.woff2"" as=""font"">",No preload for critical assets,Medium,
|
||||
24,Performance,Optimize images with astro:assets,Built-in image optimization,<Image /> component for optimization,<img> for local images,"import { Image } from 'astro:assets';","<img src=""./image.jpg"">",High,https://docs.astro.build/en/guides/images/
|
||||
25,Performance,Use picture for responsive images,Multiple formats and sizes,<Picture /> for art direction,Single image size for all screens,<Picture /> with multiple sources,<Image /> with single size,Medium,
|
||||
26,Performance,Lazy load below-fold content,Defer loading non-critical content,loading=lazy for images client:visible for components,Load everything immediately,"<img loading=""lazy"">",No lazy loading,Medium,
|
||||
27,Performance,Minimize client directives,Each directive adds JS bundle,Audit client: usage regularly,Sprinkle client:load everywhere,Only interactive components hydrated,Every component with client:load,High,
|
||||
28,ViewTransitions,Enable View Transitions,Smooth page transitions,<ViewTransitions /> in head,Full page reloads,"import { ViewTransitions } from 'astro:transitions';",No transition API,Medium,https://docs.astro.build/en/guides/view-transitions/
|
||||
29,ViewTransitions,Use transition:name,Named elements for morphing,transition:name for persistent elements,Unnamed transitions,"<header transition:name=""header"">",<header> without name,Low,
|
||||
30,ViewTransitions,Handle transition:persist,Keep state across navigations,transition:persist for media players,Re-initialize on every navigation,"<video transition:persist id=""player"">",Video restarts on navigation,Medium,
|
||||
31,ViewTransitions,Add fallback for no-JS,Graceful degradation,Content works without JS,Require JS for basic navigation,Static content accessible,Broken without ViewTransitions JS,High,
|
||||
32,SEO,Use built-in SEO component,Head management for meta tags,Astro SEO integration or manual head,No meta tags,"<title>{title}</title><meta name=""description"">",No SEO tags,High,
|
||||
33,SEO,Generate sitemap,Automatic sitemap generation,@astrojs/sitemap integration,Manual sitemap maintenance,npx astro add sitemap,Hand-written sitemap.xml,Medium,https://docs.astro.build/en/guides/integrations-guide/sitemap/
|
||||
34,SEO,Add RSS feed for content,RSS for blogs and content sites,@astrojs/rss for feed generation,No RSS feed,rss() helper in pages/rss.xml.js,No feed for blog,Low,https://docs.astro.build/en/guides/rss/
|
||||
35,SEO,Use canonical URLs,Prevent duplicate content issues,Astro.url for canonical generation,"<link rel=""canonical"" href={Astro.url}>",No canonical tags,Medium,
|
||||
36,Integrations,Use official integrations,Astro's integration system,npx astro add for integrations,Manual configuration,npx astro add react,Manual React setup,Medium,https://docs.astro.build/en/guides/integrations-guide/
|
||||
37,Integrations,Configure integrations in astro.config,Centralized configuration,integrations array in config,Scattered configuration,"integrations: [react(), tailwind()]",Multiple config files,Low,
|
||||
38,Integrations,Use adapter for deployment,Platform-specific adapters,Correct adapter for host,Wrong or no adapter,@astrojs/vercel for Vercel,No adapter for SSR,High,https://docs.astro.build/en/guides/deploy/
|
||||
39,TypeScript,Enable TypeScript,Type safety for Astro projects,tsconfig.json with astro types,No TypeScript,Astro TypeScript template,JavaScript only,Medium,https://docs.astro.build/en/guides/typescript/
|
||||
40,TypeScript,Type component props,Define prop interfaces,Props interface in frontmatter,Untyped props,"interface Props { title: string }",No props typing,Medium,
|
||||
41,TypeScript,Use strict mode,Catch errors early,strict: true in tsconfig,Loose TypeScript config,strictest template,base template,Low,
|
||||
42,Markdown,Use MDX for components,Components in markdown content,@astrojs/mdx for interactive docs,Plain markdown with workarounds,<Component /> in .mdx,HTML in .md files,Medium,https://docs.astro.build/en/guides/integrations-guide/mdx/
|
||||
43,Markdown,Configure markdown plugins,Extend markdown capabilities,remarkPlugins rehypePlugins in config,Manual HTML for features,remarkPlugins: [remarkToc],Manual TOC in every post,Low,
|
||||
44,Markdown,Use frontmatter for metadata,Structured post metadata,Frontmatter with typed schema,Inline metadata,title date in frontmatter,# Title as first line,Medium,
|
||||
45,API,Use API routes for endpoints,Server endpoints in pages/api,pages/api/[endpoint].ts for APIs,External API for simple endpoints,pages/api/posts.json.ts,Separate Express server,Medium,https://docs.astro.build/en/guides/endpoints/
|
||||
46,API,Return proper responses,Use Response object,new Response() with headers,Plain objects,return new Response(JSON.stringify(data)),return data,Medium,
|
||||
47,API,Handle methods correctly,Export named method handlers,export GET POST handlers,Single default export,export const GET = async () => {},export default async () => {},Low,
|
||||
48,Security,Sanitize user content,Prevent XSS in dynamic content,set:html only for trusted content,set:html with user input,"<Fragment set:html={sanitized} />","<div set:html={userInput} />",High,
|
||||
49,Security,Use HTTPS in production,Secure connections,HTTPS for all production sites,HTTP in production,https://example.com,http://example.com,High,
|
||||
50,Security,Validate API input,Check and sanitize all input,Zod validation for API routes,Trust all input,const body = schema.parse(data),const body = await request.json(),High,
|
||||
51,Build,Use hybrid rendering,Mix static and dynamic pages,output: 'hybrid' for flexibility,All SSR or all static,prerender per-page basis,Single rendering mode,Medium,https://docs.astro.build/en/guides/server-side-rendering/#hybrid-rendering
|
||||
52,Build,Analyze bundle size,Monitor JS bundle impact,Build output shows bundle sizes,Ignore bundle growth,Check astro build output,No size monitoring,Medium,
|
||||
53,Build,Use prefetch,Preload linked pages,prefetch integration,No prefetch for navigation,npx astro add prefetch,Manual prefetch,Low,https://docs.astro.build/en/guides/prefetch/
|
||||
|
Can't render this file because it contains an unexpected character in line 14 and column 147.
|
@@ -0,0 +1,53 @@
|
||||
No,Category,Guideline,Description,Do,Don't,Code Good,Code Bad,Severity,Docs URL
|
||||
1,Widgets,Use StatelessWidget when possible,Immutable widgets are simpler,StatelessWidget for static UI,StatefulWidget for everything,class MyWidget extends StatelessWidget,class MyWidget extends StatefulWidget (static),Medium,https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html
|
||||
2,Widgets,Keep widgets small,Single responsibility principle,Extract widgets into smaller pieces,Large build methods,Column(children: [Header() Content()]),500+ line build method,Medium,
|
||||
3,Widgets,Use const constructors,Compile-time constants for performance,const MyWidget() when possible,Non-const for static widgets,const Text('Hello'),Text('Hello') for literals,High,https://dart.dev/guides/language/language-tour#constant-constructors
|
||||
4,Widgets,Prefer composition over inheritance,Combine widgets using children,Compose widgets,Extend widget classes,Container(child: MyContent()),class MyContainer extends Container,Medium,
|
||||
5,State,Use setState correctly,Minimal state in StatefulWidget,setState for UI state changes,setState for business logic,setState(() { _counter++; }),Complex logic in setState,Medium,https://api.flutter.dev/flutter/widgets/State/setState.html
|
||||
6,State,Avoid setState in build,Never call setState during build,setState in callbacks only,setState in build method,onPressed: () => setState(() {}),build() { setState(); },High,
|
||||
7,State,Use state management for complex apps,Provider Riverpod BLoC,State management for shared state,setState for global state,Provider.of<MyState>(context),Global setState calls,Medium,
|
||||
8,State,Prefer Riverpod or Provider,Recommended state solutions,Riverpod for new projects,InheritedWidget manually,ref.watch(myProvider),Custom InheritedWidget,Medium,https://riverpod.dev/
|
||||
9,State,Dispose resources,Clean up controllers and subscriptions,dispose() for cleanup,Memory leaks from subscriptions,@override void dispose() { controller.dispose(); },No dispose implementation,High,
|
||||
10,Layout,Use Column and Row,Basic layout widgets,Column Row for linear layouts,Stack for simple layouts,"Column(children: [Text(), Button()])",Stack for vertical list,Medium,https://api.flutter.dev/flutter/widgets/Column-class.html
|
||||
11,Layout,Use Expanded and Flexible,Control flex behavior,Expanded to fill space,Fixed sizes in flex containers,Expanded(child: Container()),Container(width: 200) in Row,Medium,
|
||||
12,Layout,Use SizedBox for spacing,Consistent spacing,SizedBox for gaps,Container for spacing only,SizedBox(height: 16),Container(height: 16),Low,
|
||||
13,Layout,Use LayoutBuilder for responsive,Respond to constraints,LayoutBuilder for adaptive layouts,Fixed sizes for responsive,LayoutBuilder(builder: (context constraints) {}),Container(width: 375),Medium,https://api.flutter.dev/flutter/widgets/LayoutBuilder-class.html
|
||||
14,Layout,Avoid deep nesting,Keep widget tree shallow,Extract deeply nested widgets,10+ levels of nesting,Extract widget to method or class,Column(Row(Column(Row(...)))),Medium,
|
||||
15,Lists,Use ListView.builder,Lazy list building,ListView.builder for long lists,ListView with children for large lists,"ListView.builder(itemCount: 100, itemBuilder: ...)",ListView(children: items.map(...).toList()),High,https://api.flutter.dev/flutter/widgets/ListView-class.html
|
||||
16,Lists,Provide itemExtent when known,Skip measurement,itemExtent for fixed height items,No itemExtent for uniform lists,ListView.builder(itemExtent: 50),ListView.builder without itemExtent,Medium,
|
||||
17,Lists,Use keys for stateful items,Preserve widget state,Key for stateful list items,No key for dynamic lists,ListTile(key: ValueKey(item.id)),ListTile without key,High,
|
||||
18,Lists,Use SliverList for custom scroll,Custom scroll effects,CustomScrollView with Slivers,Nested ListViews,CustomScrollView(slivers: [SliverList()]),ListView inside ListView,Medium,https://api.flutter.dev/flutter/widgets/SliverList-class.html
|
||||
19,Navigation,Use Navigator 2.0 or GoRouter,Declarative routing,go_router for navigation,Navigator.push for complex apps,GoRouter(routes: [...]),Navigator.push everywhere,Medium,https://pub.dev/packages/go_router
|
||||
20,Navigation,Use named routes,Organized navigation,Named routes for clarity,Anonymous routes,Navigator.pushNamed(context '/home'),Navigator.push(context MaterialPageRoute()),Low,
|
||||
21,Navigation,Handle back button (PopScope),Android back behavior and predictive back (Android 14+),Use PopScope widget (WillPopScope is deprecated),Use WillPopScope,"PopScope(canPop: false, onPopInvoked: (didPop) => ...)",WillPopScope(onWillPop: ...),High,https://api.flutter.dev/flutter/widgets/PopScope-class.html
|
||||
22,Navigation,Pass typed arguments,Type-safe route arguments,Typed route arguments,Dynamic arguments,MyRoute(id: '123'),arguments: {'id': '123'},Medium,
|
||||
23,Async,Use FutureBuilder,Async UI building,FutureBuilder for async data,setState for async,FutureBuilder(future: fetchData()),fetchData().then((d) => setState()),Medium,https://api.flutter.dev/flutter/widgets/FutureBuilder-class.html
|
||||
24,Async,Use StreamBuilder,Stream UI building,StreamBuilder for streams,Manual stream subscription,StreamBuilder(stream: myStream),stream.listen in initState,Medium,https://api.flutter.dev/flutter/widgets/StreamBuilder-class.html
|
||||
25,Async,Handle loading and error states,Complete async UI states,ConnectionState checks,Only success state,if (snapshot.connectionState == ConnectionState.waiting),No loading indicator,High,
|
||||
26,Async,Cancel subscriptions,Clean up stream subscriptions,Cancel in dispose,Memory leaks,subscription.cancel() in dispose,No subscription cleanup,High,
|
||||
27,Theming,Use ThemeData,Consistent theming,ThemeData for app theme,Hardcoded colors,Theme.of(context).primaryColor,Color(0xFF123456) everywhere,Medium,https://api.flutter.dev/flutter/material/ThemeData-class.html
|
||||
28,Theming,Use ColorScheme,Material 3 color system,ColorScheme for colors,Individual color properties,colorScheme: ColorScheme.fromSeed(),primaryColor: Colors.blue,Medium,
|
||||
29,Theming,Access theme via context,Dynamic theme access,Theme.of(context),Static theme reference,Theme.of(context).textTheme.bodyLarge,TextStyle(fontSize: 16),Medium,
|
||||
30,Theming,Support dark mode,Respect system theme,darkTheme in MaterialApp,Light theme only,"MaterialApp(theme: light, darkTheme: dark)",MaterialApp(theme: light),Medium,
|
||||
31,Animation,Use implicit animations,Simple animations,AnimatedContainer AnimatedOpacity,Explicit for simple transitions,AnimatedContainer(duration: Duration()),AnimationController for fade,Low,https://api.flutter.dev/flutter/widgets/AnimatedContainer-class.html
|
||||
32,Animation,Use AnimationController for complex,Fine-grained control,AnimationController with Ticker,Implicit for complex sequences,AnimationController(vsync: this),AnimatedContainer for staggered,Medium,
|
||||
33,Animation,Dispose AnimationControllers,Clean up animation resources,dispose() for controllers,Memory leaks,controller.dispose() in dispose,No controller disposal,High,
|
||||
34,Animation,Use Hero for transitions,Shared element transitions,Hero for navigation animations,Manual shared element,Hero(tag: 'image' child: Image()),Custom shared element animation,Low,https://api.flutter.dev/flutter/widgets/Hero-class.html
|
||||
35,Forms,Use Form widget,Form validation,Form with GlobalKey,Individual validation,Form(key: _formKey child: ...),TextField without Form,Medium,https://api.flutter.dev/flutter/widgets/Form-class.html
|
||||
36,Forms,Use TextEditingController,Control text input,Controller for text fields,onChanged for all text,final controller = TextEditingController(),onChanged: (v) => setState(),Medium,
|
||||
37,Forms,Validate on submit,Form validation flow,_formKey.currentState!.validate(),Skip validation,if (_formKey.currentState!.validate()),Submit without validation,High,
|
||||
38,Forms,Dispose controllers,Clean up text controllers,dispose() for controllers,Memory leaks,controller.dispose() in dispose,No controller disposal,High,
|
||||
39,Performance,Use const widgets,Reduce rebuilds,const for static widgets,No const for literals,const Icon(Icons.add),Icon(Icons.add),High,
|
||||
40,Performance,Avoid rebuilding entire tree,Minimal rebuild scope,Isolate changing widgets,setState on parent,Consumer only around changing widget,setState on root widget,High,
|
||||
41,Performance,Use RepaintBoundary,Isolate repaints,RepaintBoundary for animations,Full screen repaints,RepaintBoundary(child: AnimatedWidget()),Animation without boundary,Medium,https://api.flutter.dev/flutter/widgets/RepaintBoundary-class.html
|
||||
42,Performance,Profile with DevTools,Measure before optimizing,Flutter DevTools profiling,Guess at performance,DevTools performance tab,Optimize without measuring,Medium,https://docs.flutter.dev/tools/devtools
|
||||
43,Accessibility,Use Semantics widget,Screen reader support,Semantics for accessibility,Missing accessibility info,Semantics(label: 'Submit button'),GestureDetector without semantics,High,https://api.flutter.dev/flutter/widgets/Semantics-class.html
|
||||
44,Accessibility,Support large fonts,MediaQuery text scaling,MediaQuery.textScaleFactor,Fixed font sizes,style: Theme.of(context).textTheme,TextStyle(fontSize: 14),High,
|
||||
45,Accessibility,Test with screen readers,TalkBack and VoiceOver,Test accessibility regularly,Skip accessibility testing,Regular TalkBack testing,No screen reader testing,High,
|
||||
46,Testing,Use widget tests,Test widget behavior,WidgetTester for UI tests,Unit tests only,testWidgets('...' (tester) async {}),Only test() for UI,Medium,https://docs.flutter.dev/testing
|
||||
47,Testing,Use integration tests,Full app testing,integration_test package,Manual testing only,IntegrationTestWidgetsFlutterBinding,Manual E2E testing,Medium,
|
||||
48,Testing,Mock dependencies,Isolate tests,Mockito or mocktail,Real dependencies in tests,when(mock.method()).thenReturn(),Real API calls in tests,Medium,
|
||||
49,Platform,Use Platform checks,Platform-specific code,Platform.isIOS Platform.isAndroid,Same code for all platforms,if (Platform.isIOS) {},Hardcoded iOS behavior,Medium,
|
||||
50,Platform,Use kIsWeb for web,Web platform detection,kIsWeb for web checks,Platform for web,if (kIsWeb) {},Platform.isWeb (doesn't exist),Medium,
|
||||
51,Packages,Use pub.dev packages,Community packages,Popular maintained packages,Custom implementations,cached_network_image,Custom image cache,Medium,https://pub.dev/
|
||||
52,Packages,Check package quality,Quality before adding,Pub points and popularity,Any package without review,100+ pub points,Unmaintained packages,Medium,
|
||||
|
@@ -0,0 +1,56 @@
|
||||
No,Category,Guideline,Description,Do,Don't,Code Good,Code Bad,Severity,Docs URL
|
||||
1,Animation,Use Tailwind animate utilities,Built-in animations are optimized and respect reduced-motion,Use animate-pulse animate-spin animate-ping,Custom @keyframes for simple effects,animate-pulse,@keyframes pulse {...},Medium,https://tailwindcss.com/docs/animation
|
||||
2,Animation,Limit bounce animations,Continuous bounce is distracting and causes motion sickness,Use animate-bounce sparingly on CTAs only,Multiple bounce animations on page,Single CTA with animate-bounce,5+ elements with animate-bounce,High,
|
||||
3,Animation,Transition duration,Use appropriate transition speeds for UI feedback,duration-150 to duration-300 for UI,duration-1000 or longer for UI elements,transition-all duration-200,transition-all duration-1000,Medium,https://tailwindcss.com/docs/transition-duration
|
||||
4,Animation,Hover transitions,Add smooth transitions on hover state changes,Add transition class with hover states,Instant hover changes without transition,hover:bg-gray-100 transition-colors,hover:bg-gray-100 (no transition),Low,
|
||||
5,Z-Index,Use Tailwind z-* scale,Consistent stacking context with predefined scale,z-0 z-10 z-20 z-30 z-40 z-50,Arbitrary z-index values,z-50 for modals,z-[9999],Medium,https://tailwindcss.com/docs/z-index
|
||||
6,Z-Index,Fixed elements z-index,Fixed navigation and modals need explicit z-index,z-50 for nav z-40 for dropdowns,Relying on DOM order for stacking,fixed top-0 z-50,fixed top-0 (no z-index),High,
|
||||
7,Z-Index,Negative z-index for backgrounds,Use negative z-index for decorative backgrounds,z-[-1] for background elements,Positive z-index for backgrounds,-z-10 for decorative,z-10 for background,Low,
|
||||
8,Layout,Container max-width,Limit content width for readability,max-w-7xl mx-auto for main content,Full-width content on large screens,max-w-7xl mx-auto px-4,w-full (no max-width),Medium,https://tailwindcss.com/docs/container
|
||||
9,Layout,Responsive padding,Adjust padding for different screen sizes,px-4 md:px-6 lg:px-8,Same padding all sizes,px-4 sm:px-6 lg:px-8,px-8 (same all sizes),Medium,
|
||||
10,Layout,Grid gaps,Use consistent gap utilities for spacing,gap-4 gap-6 gap-8,Margins on individual items,grid gap-6,grid with mb-4 on each item,Medium,https://tailwindcss.com/docs/gap
|
||||
11,Layout,Flexbox alignment,Use flex utilities for alignment,items-center justify-between,Multiple nested wrappers,flex items-center justify-between,Nested divs for alignment,Low,
|
||||
12,Images,Aspect ratio,Maintain consistent image aspect ratios,aspect-video aspect-square,No aspect ratio on containers,aspect-video rounded-lg,No aspect control,Medium,https://tailwindcss.com/docs/aspect-ratio
|
||||
13,Images,Object fit,Control image scaling within containers,object-cover object-contain,Stretched distorted images,object-cover w-full h-full,No object-fit,Medium,https://tailwindcss.com/docs/object-fit
|
||||
14,Images,Lazy loading,Defer loading of off-screen images,loading='lazy' on images,All images eager load,<img loading='lazy'>,<img> without lazy,High,
|
||||
15,Images,Responsive images,Serve appropriate image sizes,srcset and sizes attributes,Same large image all devices,srcset with multiple sizes,4000px image everywhere,High,
|
||||
16,Typography,Prose plugin,Use @tailwindcss/typography for rich text,prose prose-lg for article content,Custom styles for markdown,prose prose-lg max-w-none,Custom text styling,Medium,https://tailwindcss.com/docs/typography-plugin
|
||||
17,Typography,Line height,Use appropriate line height for readability,leading-relaxed for body text,Default tight line height,leading-relaxed (1.625),leading-none or leading-tight,Medium,https://tailwindcss.com/docs/line-height
|
||||
18,Typography,Font size scale,Use consistent text size scale,text-sm text-base text-lg text-xl,Arbitrary font sizes,text-lg,text-[17px],Low,https://tailwindcss.com/docs/font-size
|
||||
19,Typography,Text truncation,Handle long text gracefully,truncate or line-clamp-*,Overflow breaking layout,line-clamp-2,No overflow handling,Medium,https://tailwindcss.com/docs/text-overflow
|
||||
20,Colors,Opacity utilities,Use color opacity utilities,bg-black/50 text-white/80,Separate opacity class,bg-black/50,bg-black opacity-50,Low,https://tailwindcss.com/docs/background-color
|
||||
21,Colors,Dark mode,Support dark mode with dark: prefix,dark:bg-gray-900 dark:text-white,No dark mode support,dark:bg-gray-900,Only light theme,Medium,https://tailwindcss.com/docs/dark-mode
|
||||
22,Colors,Semantic colors,Use semantic color naming in config,primary secondary danger success,Generic color names in components,bg-primary,bg-blue-500 everywhere,Medium,
|
||||
23,Spacing,Consistent spacing scale,Use Tailwind spacing scale consistently,p-4 m-6 gap-8,Arbitrary pixel values,p-4 (1rem),p-[15px],Low,https://tailwindcss.com/docs/customizing-spacing
|
||||
24,Spacing,Negative margins,Use sparingly for overlapping effects,-mt-4 for overlapping elements,Negative margins for layout fixing,-mt-8 for card overlap,-m-2 to fix spacing issues,Medium,
|
||||
25,Spacing,Space between,Use space-y-* for vertical lists,space-y-4 on flex/grid column,Margin on each child,space-y-4,Each child has mb-4,Low,https://tailwindcss.com/docs/space
|
||||
26,Forms,Focus states,Always show focus indicators,focus:ring-2 focus:ring-blue-500,Remove focus outline,focus:ring-2 focus:ring-offset-2,focus:outline-none (no replacement),High,
|
||||
27,Forms,Input sizing,Consistent input dimensions,h-10 px-3 for inputs,Inconsistent input heights,h-10 w-full px-3,Various heights per input,Medium,
|
||||
28,Forms,Disabled states,Clear disabled styling,disabled:opacity-50 disabled:cursor-not-allowed,No disabled indication,disabled:opacity-50,Same style as enabled,Medium,
|
||||
29,Forms,Placeholder styling,Style placeholder text appropriately,placeholder:text-gray-400,Dark placeholder text,placeholder:text-gray-400,Default dark placeholder,Low,
|
||||
30,Responsive,Mobile-first approach,Start with mobile styles and add breakpoints,Default mobile + md: lg: xl:,Desktop-first approach,text-sm md:text-base,text-base max-md:text-sm,Medium,https://tailwindcss.com/docs/responsive-design
|
||||
31,Responsive,Breakpoint testing,Test at standard breakpoints,320 375 768 1024 1280 1536,Only test on development device,Test all breakpoints,Single device testing,High,
|
||||
32,Responsive,Hidden/shown utilities,Control visibility per breakpoint,hidden md:block,Different content per breakpoint,hidden md:flex,Separate mobile/desktop components,Low,https://tailwindcss.com/docs/display
|
||||
33,Buttons,Button sizing,Consistent button dimensions,px-4 py-2 or px-6 py-3,Inconsistent button sizes,px-4 py-2 text-sm,Various padding per button,Medium,
|
||||
34,Buttons,Touch targets,Minimum 44px touch target on mobile,min-h-[44px] on mobile,Small buttons on mobile,min-h-[44px] min-w-[44px],h-8 w-8 on mobile,High,
|
||||
35,Buttons,Loading states,Show loading feedback,disabled + spinner icon,Clickable during loading,<Button disabled><Spinner/></Button>,Button without loading state,High,
|
||||
36,Buttons,Icon buttons,Accessible icon-only buttons,aria-label on icon buttons,Icon button without label,<button aria-label='Close'><XIcon/></button>,<button><XIcon/></button>,High,
|
||||
37,Cards,Card structure,Consistent card styling,rounded-lg shadow-md p-6,Inconsistent card styles,rounded-2xl shadow-lg p-6,Mixed card styling,Low,
|
||||
38,Cards,Card hover states,Interactive cards should have hover feedback,hover:shadow-lg transition-shadow,No hover on clickable cards,hover:shadow-xl transition-shadow,Static cards that are clickable,Medium,
|
||||
39,Cards,Card spacing,Consistent internal card spacing,space-y-4 for card content,Inconsistent internal spacing,space-y-4 or p-6,Mixed mb-2 mb-4 mb-6,Low,
|
||||
40,Accessibility,Screen reader text,Provide context for screen readers,sr-only for hidden labels,Missing context for icons,<span class='sr-only'>Close menu</span>,No label for icon button,High,https://tailwindcss.com/docs/screen-readers
|
||||
41,Accessibility,Focus visible,Show focus only for keyboard users,focus-visible:ring-2,Focus on all interactions,focus-visible:ring-2,focus:ring-2 (shows on click too),Medium,
|
||||
42,Accessibility,Reduced motion,Respect user motion preferences,motion-reduce:animate-none,Ignore motion preferences,motion-reduce:transition-none,No reduced motion support,High,https://tailwindcss.com/docs/hover-focus-and-other-states#prefers-reduced-motion
|
||||
43,Performance,Configure content paths,Tailwind needs to know where classes are used,Use 'content' array in config,Use deprecated 'purge' option (v2),"content: ['./src/**/*.{js,ts,jsx,tsx}']",purge: [...],High,https://tailwindcss.com/docs/content-configuration
|
||||
44,Performance,JIT mode,Use JIT for faster builds and smaller bundles,JIT enabled (default in v3),Full CSS in development,Tailwind v3 defaults,Tailwind v2 without JIT,Medium,
|
||||
45,Performance,Avoid @apply bloat,Use @apply sparingly,Direct utilities in HTML,Heavy @apply usage,class='px-4 py-2 rounded',@apply px-4 py-2 rounded;,Low,https://tailwindcss.com/docs/reusing-styles
|
||||
46,Plugins,Official plugins,Use official Tailwind plugins,@tailwindcss/forms typography aspect-ratio,Custom implementations,@tailwindcss/forms,Custom form reset CSS,Medium,https://tailwindcss.com/docs/plugins
|
||||
47,Plugins,Custom utilities,Create utilities for repeated patterns,Custom utility in config,Repeated arbitrary values,Custom shadow utility,"shadow-[0_4px_20px_rgba(0,0,0,0.1)] everywhere",Medium,
|
||||
48,Layout,Container Queries,Use @container for component-based responsiveness,Use @container and @lg: etc.,Media queries for component internals,@container @lg:grid-cols-2,@media (min-width: ...) inside component,Medium,https://github.com/tailwindlabs/tailwindcss-container-queries
|
||||
49,Interactivity,Group and Peer,Style based on parent/sibling state,group-hover peer-checked,JS for simple state interactions,group-hover:text-blue-500,onMouseEnter={() => setHover(true)},Low,https://tailwindcss.com/docs/hover-focus-and-other-states#styling-based-on-parent-state
|
||||
50,Customization,Arbitrary Values,Use [] for one-off values,w-[350px] for specific needs,Creating config for single use,top-[117px] (if strictly needed),style={{ top: '117px' }},Low,https://tailwindcss.com/docs/adding-custom-styles#using-arbitrary-values
|
||||
51,Colors,Theme color variables,Define colors in Tailwind theme and use directly,bg-primary text-success border-cta,bg-[var(--color-primary)] text-[var(--color-success)],bg-primary,bg-[var(--color-primary)],Medium,https://tailwindcss.com/docs/customizing-colors
|
||||
52,Colors,Use bg-linear-to-* for gradients,Tailwind v4 uses bg-linear-to-* syntax for gradients,bg-linear-to-r bg-linear-to-b,bg-gradient-to-* (deprecated in v4),bg-linear-to-r from-blue-500 to-purple-500,bg-gradient-to-r from-blue-500 to-purple-500,Medium,https://tailwindcss.com/docs/background-image
|
||||
53,Layout,Use shrink-0 shorthand,Shorter class name for flex-shrink-0,shrink-0 shrink,flex-shrink-0 flex-shrink,shrink-0,flex-shrink-0,Low,https://tailwindcss.com/docs/flex-shrink
|
||||
54,Layout,Use size-* for square dimensions,Single utility for equal width and height,size-4 size-8 size-12,Separate h-* w-* for squares,size-6,h-6 w-6,Low,https://tailwindcss.com/docs/size
|
||||
55,Images,SVG explicit dimensions,Add width/height attributes to SVGs to prevent layout shift before CSS loads,<svg class='size-6' width='24' height='24'>,SVG without explicit dimensions,<svg class='size-6' width='24' height='24'>,<svg class='size-6'>,High,
|
||||
|
@@ -0,0 +1,53 @@
|
||||
No,Category,Guideline,Description,Do,Don't,Code Good,Code Bad,Severity,Docs URL
|
||||
1,Composable,Pure UI composables,Composable functions should only render UI,Accept state and callbacks,Calling usecase/repo,Pure UI composable,Business logic in UI,High,https://developer.android.com/jetpack/compose/mental-model
|
||||
2,Composable,Small composables,Each composable has single responsibility,Split into components,Huge composable,Reusable UI,Monolithic UI,Medium,
|
||||
3,Composable,Stateless by default,Prefer stateless composables,Hoist state,Local mutable state,Stateless UI,Hidden state,High,https://developer.android.com/jetpack/compose/state#state-hoisting
|
||||
4,State,Single source of truth,UI state comes from one source,StateFlow from VM,Multiple states,Unified UiState,Scattered state,High,https://developer.android.com/topic/architecture/ui-layer
|
||||
5,State,Model UI State,Use sealed interface/data class,UiState.Loading,Boolean flags,Explicit state,Flag hell,High,
|
||||
6,State,remember only UI state,remember for UI-only state,"Scroll, animation",Business state,Correct remember,Misuse remember,High,https://developer.android.com/jetpack/compose/state
|
||||
7,State,rememberSaveable,Persist state across config,rememberSaveable,remember,State survives,State lost,High,https://developer.android.com/jetpack/compose/state#restore-ui-state
|
||||
8,State,derivedStateOf,Optimize recomposition,derivedStateOf,Recompute always,Optimized,Jank,Medium,https://developer.android.com/jetpack/compose/performance
|
||||
9,SideEffect,LaunchedEffect keys,Use correct keys,LaunchedEffect(id),LaunchedEffect(Unit),Scoped effect,Infinite loop,High,https://developer.android.com/jetpack/compose/side-effects
|
||||
10,SideEffect,rememberUpdatedState,Avoid stale lambdas,rememberUpdatedState,Capture directly,Safe callback,Stale state,Medium,https://developer.android.com/jetpack/compose/side-effects
|
||||
11,SideEffect,DisposableEffect,Clean up resources,onDispose,No cleanup,No leak,Memory leak,High,
|
||||
12,Architecture,Unidirectional data flow,UI → VM → State,onEvent,Two-way binding,Predictable flow,Hard debug,High,https://developer.android.com/topic/architecture
|
||||
13,Architecture,No business logic in UI,Logic belongs to VM,Collect state,Call repo,Clean UI,Fat UI,High,
|
||||
14,Architecture,Expose immutable state,Expose StateFlow,asStateFlow,Mutable exposed,Safe API,State mutation,High,
|
||||
15,Lifecycle,Lifecycle-aware collect,Use collectAsStateWithLifecycle,Lifecycle aware,collectAsState,No leak,Leak,High,https://developer.android.com/jetpack/compose/lifecycle
|
||||
16,Navigation,Event-based navigation,VM emits navigation event,"VM: Channel + receiveAsFlow(), V: Collect with Dispatchers.Main.immediate",Nav in UI,Decoupled nav,Using State / SharedFlow for navigation -> event is replayed and navigation fires again (StateFlow),High,https://developer.android.com/jetpack/compose/navigation
|
||||
17,Navigation,Typed routes,Use sealed routes,sealed class Route,String routes,Type-safe,Runtime crash,Medium,
|
||||
18,Performance,Stable parameters,Prefer immutable/stable params,@Immutable,Mutable params,Stable recomposition,Extra recomposition,High,https://developer.android.com/jetpack/compose/performance
|
||||
19,Performance,Use key in Lazy,Provide stable keys,key=id,No key,Stable list,Item jump,High,
|
||||
20,Performance,Avoid heavy work,No heavy computation in UI,Precompute in VM,Compute in UI,Smooth UI,Jank,High,
|
||||
21,Performance,Remember expensive objects,remember heavy objects,remember,Recreate each recomposition,Efficient,Wasteful,Medium,
|
||||
22,Theming,Design system,Centralized theme,Material3 tokens,Hardcoded values,Consistent UI,Inconsistent,High,https://developer.android.com/jetpack/compose/themes
|
||||
23,Theming,Dark mode support,Theme-based colors,colorScheme,Fixed color,Adaptive UI,Broken dark,Medium,
|
||||
24,Layout,Prefer Modifier over extra layouts,Use Modifier to adjust layout instead of adding wrapper composables,Use Modifier.padding(),Wrap content with extra Box,Padding via modifier,Box just for padding,High,https://developer.android.com/jetpack/compose/modifiers
|
||||
25,Layout,Avoid deep layout nesting,Deep layout trees increase measure & layout cost,Keep layout flat,Box ? Column ? Box ? Row,Flat hierarchy,Deep nested tree,High,
|
||||
26,Layout,Use Row/Column for linear layout,Linear layouts are simpler and more performant,Use Row / Column,Custom layout for simple cases,Row/Column usage,Over-engineered layout,High,
|
||||
27,Layout,Use Box only for overlapping content,Box should be used only when children overlap,Stack elements,Use Box as Column,Proper overlay,Misused Box,Medium,
|
||||
28,Layout,Prefer LazyColumn over Column scroll,Lazy layouts are virtualized and efficient,LazyColumn,Column.verticalScroll(),Lazy list,Scrollable Column,High,https://developer.android.com/jetpack/compose/lists
|
||||
29,Layout,Avoid nested scroll containers,Nested scrolling causes UX & performance issues,Single scroll container,Scroll inside scroll,One scroll per screen,Nested scroll,High,
|
||||
30,Layout,Avoid fillMaxSize by default,fillMaxSize may break parent constraints,Use exact size,Fill max everywhere,Constraint-aware size,Overfilled layout,Medium,
|
||||
31,Layout,Avoid intrinsic size unless necessary,Intrinsic measurement is expensive,Explicit sizing,IntrinsicSize.Min,Predictable layout,Expensive measure,High,https://developer.android.com/jetpack/compose/layout/intrinsics
|
||||
32,Layout,Use Arrangement and Alignment APIs,Declare layout intent explicitly,Use Arrangement / Alignment,Manual spacing hacks,Declarative spacing,Magic spacing,High,
|
||||
33,Layout,Extract reusable layout patterns,Repeated layouts should be shared,Create layout composable,Copy-paste layouts,Reusable scaffold,Duplicated layout,High,
|
||||
34,Theming,No hardcoded text style,Use typography,MaterialTheme.typography,Hardcode sp,Scalable,Inconsistent,Medium,
|
||||
35,Testing,Stateless UI testing,Composable easy to test,Pass state,Hidden state,Testable,Hard test,High,https://developer.android.com/jetpack/compose/testing
|
||||
36,Testing,Use testTag,Stable UI selectors,Modifier.testTag,Find by text,Stable tests,Flaky tests,Medium,
|
||||
37,Preview,Multiple previews,Preview multiple states,@Preview,Single preview,Better dev UX,Misleading,Low,https://developer.android.com/jetpack/compose/tooling/preview
|
||||
38,DI,Inject VM via Hilt,Use hiltViewModel,@HiltViewModel,Manual VM,Clean DI,Coupling,High,https://developer.android.com/training/dependency-injection/hilt-jetpack
|
||||
39,DI,No DI in UI,Inject in VM,Constructor inject,Inject composable,Proper scope,Wrong scope,High,
|
||||
40,Accessibility,Content description,Accessible UI,contentDescription,Ignore a11y,Inclusive,A11y fail,Medium,https://developer.android.com/jetpack/compose/accessibility
|
||||
41,Accessibility,Semantics,Use semantics API,Modifier.semantics,None,Testable a11y,Invisible,Medium,
|
||||
42,Animation,Compose animation APIs,Use animate*AsState,AnimatedVisibility,Manual anim,Smooth,Jank,Medium,https://developer.android.com/jetpack/compose/animation
|
||||
43,Animation,Avoid animation logic in VM,Animation is UI concern,Animate in UI,Animate in VM,Correct layering,Mixed concern,Low,
|
||||
44,Modularization,Feature-based UI modules,UI per feature,:feature:ui,God module,Scalable,Tight coupling,High,https://developer.android.com/topic/modularization
|
||||
45,Modularization,Public UI contracts,Expose minimal UI API,Interface/Route,Expose impl,Encapsulated,Leaky module,Medium,
|
||||
46,State,Snapshot state only,Use Compose state,mutableStateOf,Custom observable,Compose aware,Buggy UI,Medium,
|
||||
47,State,Avoid mutable collections,Immutable list/map,PersistentList,MutableList,Stable UI,Silent bug,High,
|
||||
48,Lifecycle,RememberCoroutineScope usage,Only for UI jobs,UI coroutine,Long jobs,Scoped job,Leak,Medium,https://developer.android.com/jetpack/compose/side-effects#remembercoroutinescope
|
||||
49,Interop,Interop View carefully,Use AndroidView,Isolated usage,Mix everywhere,Safe interop,Messy UI,Low,https://developer.android.com/jetpack/compose/interop
|
||||
50,Interop,Avoid legacy patterns,No LiveData in UI,StateFlow,LiveData,Modern stack,Legacy debt,Medium,
|
||||
51,Debug,Use layout inspector,Inspect recomposition,Tools,Blind debug,Fast debug,Guessing,Low,https://developer.android.com/studio/debug/layout-inspector
|
||||
52,Debug,Enable recomposition counts,Track recomposition,Debug flags,Ignore,Performance aware,Hidden jank,Low,
|
||||
|
@@ -0,0 +1,51 @@
|
||||
No,Category,Guideline,Description,Do,Don't,Code Good,Code Bad,Severity,Docs URL
|
||||
1,Blade Templates,Use Blade components for reusable UI,Extract repeated markup into named Blade components,Use x-* components with @props for all reusable UI,Duplicate HTML blocks across views,<x-card :title="$title">{{ $slot }}</x-card>,@include('card' ['title' => $title]),High,https://laravel.com/docs/blade#components
|
||||
2,Blade Templates,Use layouts with @extends and @section,Define one master layout and extend it per page,@extends layout with named @section blocks,Duplicate header/footer HTML in every view,@extends('layouts.app') @section('content'),Full HTML in every view file,High,https://laravel.com/docs/blade#layouts-using-template-inheritance
|
||||
3,Blade Templates,Use @props for component type-safety,Declare accepted props inside components with @props,@props with defaults to document component API,Pass arbitrary variables without declaration,@props(['title' => '' 'variant' => 'primary']),No @props declaration in component,Medium,https://laravel.com/docs/blade#component-data-and-attributes
|
||||
4,Blade Templates,Use conditional CSS classes with @class,Build class strings conditionally without ternary noise,@class directive for conditional class binding,String concatenation or nested ternaries,@class(['btn' 'btn-primary' => $primary 'btn-disabled' => $disabled]),class="btn {{ $primary ? 'btn-primary' : '' }}",Medium,https://laravel.com/docs/blade#conditional-classes-and-styles
|
||||
5,Blade Templates,Use named slots for flexible layouts,Named slots let callers inject content into specific regions,@slot('header') and $slot for flexible component APIs,Hard-code all sub-sections inside components,"<x-modal><x-slot:header>Title</x-slot>Body</x-modal>",<x-modal title="Title">Body with no slot control</x-modal>,Medium,https://laravel.com/docs/blade#slots
|
||||
6,Blade Templates,Use Blade directives instead of raw PHP,Blade directives are readable and IDE-supported,@if @foreach @forelse @empty instead of <?php ?>,Raw PHP tags inside Blade templates,@forelse($items as $item) ... @empty <p>None</p> @endforelse,<?php foreach($items as $item): ?>,High,https://laravel.com/docs/blade#blade-directives
|
||||
7,Blade Templates,Escape output with {{ }},Use double curly braces for XSS-safe output,{{ }} for all user-supplied or dynamic text,{!! !!} for untrusted data,{{ $user->name }},{!! $user->name !!},High,https://laravel.com/docs/blade#displaying-data
|
||||
8,Blade Templates,Use @vite for asset loading,Vite integration handles cache busting and HMR automatically,@vite(['resources/css/app.css' 'resources/js/app.js']),Manual script/link tags with hardcoded paths,@vite(['resources/css/app.css' 'resources/js/app.js']),<link href="/css/app.css?v=123">,High,https://laravel.com/docs/vite
|
||||
9,Livewire,Bind inputs with wire:model,Two-way data binding keeps component state in sync,wire:model for all form inputs managed by Livewire,Manual JavaScript listeners syncing to component,<input wire:model="email">,<input @change="$wire.email = $event.target.value">,High,https://livewire.laravel.com/docs/properties
|
||||
10,Livewire,Use wire:model.live for real-time validation,Validate on input rather than only on submit,wire:model.live + #[Validate] for instant feedback,Only validate on form submit,<input wire:model.live="email"> with #[Validate('email')],<input wire:model="email"> with validate() on submit only,Medium,https://livewire.laravel.com/docs/validation
|
||||
11,Livewire,Use wire:click for actions,Bind UI events to component methods cleanly,wire:click for buttons and interactive elements,JavaScript fetch calls replicating Livewire actions,<button wire:click="save">Save</button>,<button onclick="fetch('/save')">Save</button>,High,https://livewire.laravel.com/docs/actions
|
||||
12,Livewire,Use lifecycle hooks appropriately,mount() for init; updated() for reactive side effects,mount() for initialization updatedFoo() for property changes,Heavy logic in render() or __construct(),public function mount(): void { $this->items = Item::all(); },public function render(): View { $this->items = Item::all(); },Medium,https://livewire.laravel.com/docs/lifecycle-hooks
|
||||
13,Livewire,Use lazy loading for heavy components,Defer render of expensive components until visible,wire:init or lazy attribute on components,Load all Livewire components on page load,<livewire:analytics-chart lazy />,<livewire:analytics-chart /> with heavy DB queries on mount,Medium,https://livewire.laravel.com/docs/lazy
|
||||
14,Livewire,Integrate Alpine.js for local UI state,Use Alpine.js for UI-only state that doesn't need server round-trips,x-data / x-show / x-transition for tooltips dropdowns,Livewire server calls for purely visual toggle state,<div x-data="{ open: false }"><button @click="open = !open">,<button wire:click="toggleDropdown"> for a local dropdown,Medium,https://livewire.laravel.com/docs/alpine
|
||||
15,Livewire,Use wire:loading for feedback,Always indicate to users when a server action is in progress,wire:loading.attr="disabled" and wire:loading elements,Provide no feedback while Livewire request is in flight,<button wire:click="save" wire:loading.attr="disabled">Save</button>,<button wire:click="save">Save</button> with no loading state,High,https://livewire.laravel.com/docs/wire-loading
|
||||
16,Livewire,Handle file uploads with WithFileUploads,Livewire's trait manages chunked upload and temp storage,WithFileUploads trait + wire:model for file inputs,Manual multipart form submissions for Livewire pages,use WithFileUploads; public $photo; <input wire:model="photo" type="file">,<form action="/upload" method="POST" enctype="multipart/form-data">,Medium,https://livewire.laravel.com/docs/uploads
|
||||
17,Inertia.js,Use Inertia page components as route endpoints,Each page is a Vue/React component rendered server-side via Inertia::render(),Inertia::render('Dashboard' ['data' => $data]) in controllers,Return JSON and fetch from JavaScript,return Inertia::render('Users/Index' ['users' => $users]);,return response()->json($users); with client-side fetch,High,https://inertiajs.com/responses
|
||||
18,Inertia.js,Share global data via HandleInertiaRequests,Middleware share() provides auth user and flash to every page,Share auth/flash in HandleInertiaRequests middleware,Pass auth to every Inertia::render() call,public function share(Request $r): array { return ['auth' => ['user' => $r->user()]]; },Inertia::render('Page' ['auth' => auth()->user()]) every controller,High,https://inertiajs.com/shared-data
|
||||
19,Inertia.js,Use <Link> for client-side navigation,Inertia Link intercepts clicks for SPA-like transitions,<Link href="/dashboard"> instead of <a href>,Regular <a> tags for internal navigation,<Link href={route('dashboard')}>Dashboard</Link>,<a href="/dashboard">Dashboard</a>,High,https://inertiajs.com/links
|
||||
20,Inertia.js,Use useForm for form state and submission,Inertia's useForm manages progress errors and transforms,"useForm for all page-level forms, form.post() for submit",Axios/fetch for form submissions on Inertia pages,"const form = useForm({ name: '' }); form.post('/users');","axios.post('/users', { name });",High,https://inertiajs.com/forms
|
||||
21,Inertia.js,Use persistent layouts to preserve state,Wrap pages in a persistent layout so header/sidebar don't remount,layout property on page component for persistent UI,Re-render full layout on every page visit,MyPage.layout = (page) => <AppLayout>{page}</AppLayout>,No layout — full page reload feel on navigation,Medium,https://inertiajs.com/pages#persistent-layouts
|
||||
22,Inertia.js,Enable SSR for public pages,Server-side rendering improves SEO and first paint,Enable Inertia SSR for marketing and public pages,Client-only rendering for all pages including public,php artisan inertia:start-ssr with @inertiaHead,No SSR on pages requiring good SEO,Medium,https://inertiajs.com/server-side-rendering
|
||||
23,Styling,Set up Tailwind CSS via Vite,Use Vite + tailwindcss plugin for fast HMR and optimized builds,Install tailwindcss @tailwindcss/vite and configure vite.config.js,Laravel Mix or manual PostCSS pipeline for new projects,plugins: [tailwindcss()] in vite.config.js + @import 'tailwindcss' in app.css,Laravel Mix with require('tailwindcss') in webpack,High,https://tailwindcss.com/docs/installation/framework-guides
|
||||
24,Styling,Purge unused styles via content config,Tailwind scans Blade and JS files to tree-shake unused classes,content: ['./resources/views/**/*.blade.php' './resources/js/**/*.{js,vue}'],No content config — ship all 3MB of CSS,content: ['./resources/**/*.blade.php' './resources/**/*.js'],content: [],High,https://tailwindcss.com/docs/content-configuration
|
||||
25,Styling,Use dark mode class strategy,class-based dark mode integrates with server-rendered preference,darkMode: 'class' with a toggle that sets class on <html>,Media query only — no user override possible,darkMode: 'class'; document.documentElement.classList.toggle('dark'),darkMode: 'media' — no programmatic control,Medium,https://tailwindcss.com/docs/dark-mode
|
||||
26,Styling,Use @apply sparingly in component CSS,Extract only truly repeated multi-class patterns,@apply for BEM base classes shared across many components,@apply for every single element — defeats Tailwind's purpose,@apply flex items-center gap-2 (shared button base),@apply text-sm for a single use,Low,https://tailwindcss.com/docs/functions-and-directives#apply
|
||||
27,Styling,Configure custom design tokens in CSS,Define brand colors spacing fonts as CSS variables consumed by Tailwind,Custom @theme tokens matched to brand guidelines,Magic color hex codes scattered across Blade templates,@theme { --color-brand: oklch(0.6 0.2 250); },bg-[#1a2b3c] inline throughout templates,Medium,https://tailwindcss.com/docs/theme
|
||||
28,Components,Use anonymous Blade components for UI primitives,Blade files in resources/views/components/ auto-register as x-* components,Anonymous components for buttons alerts badges cards,Blade @includes for anything reusable,<x-badge variant="success">Active</x-badge>,@include('partials.badge' ['variant' => 'success']),Medium,https://laravel.com/docs/blade#anonymous-components
|
||||
29,Components,Use class-based components for complex logic,PHP class components can inject services and pre-process data,app/View/Components/ class when component needs PHP logic,Blade @php blocks for business logic inside templates,class AlertComponent { public function __construct(public string $type) {} },@php $color = $type === 'error' ? 'red' : 'green'; @endphp,Medium,https://laravel.com/docs/blade#components
|
||||
30,Components,Forward extra attributes with $attributes,Pass through HTML attributes like class id aria to root element,$attributes->merge() on root element of components,Ignore caller-provided HTML attributes silently,<div {{ $attributes->merge(['class' => 'btn']) }}>,<div class="btn"> — drops extra class/id from caller,High,https://laravel.com/docs/blade#component-attributes
|
||||
31,Components,Separate variant logic from templates,Keep variant/size/color logic in a PHP class or helper not in Blade,Variant class or match() expression in component class,Long @if chains for variants inside Blade templates,"public function classes(): string { return match($this->variant) { 'primary' => 'bg-blue-600', } }","@if($variant === 'primary') bg-blue-600 @elseif($variant === 'secondary')...",Medium,https://laravel.com/docs/blade#components
|
||||
32,Components,Provide default slot content,Use {{ $slot ?? '' }} or named slot defaults so components are usable empty,Default content in slots for optional regions,Require every slot to be filled — throws errors on empty usage,{{ $icon ?? '' }} in component Blade file,{{ $icon }} — fatal if caller omits slot,Low,https://laravel.com/docs/blade#slots
|
||||
33,Components,Use component namespacing for packages,Prefix third-party or module components to avoid collisions,Register custom prefix via Blade::componentNamespace(),Mix first-party and package component names with no prefix,Blade::componentNamespace('Modules\\Shop\\Views' 'shop'); <x-shop::product-card />,<x-product-card /> colliding with first-party card,Low,https://laravel.com/docs/blade#manually-registering-components
|
||||
34,Forms,Validate with Form Request classes,Move validation rules out of controllers into dedicated FormRequest classes,php artisan make:request and define rules() + authorize(),Inline validate() in controller actions,class StorePostRequest extends FormRequest { public function rules() { return ['title' => 'required|max:255']; } },public function store(Request $r) { $r->validate(['title' => 'required']); },High,https://laravel.com/docs/validation#form-request-validation
|
||||
35,Forms,Preserve old input on validation failure,Use old() to repopulate form fields after server-side error redirect,old('field') as default value on all form inputs,Empty form fields when validation fails,<input name="email" value="{{ old('email') }}">,<input name="email">,High,https://laravel.com/docs/validation#repopulating-forms
|
||||
36,Forms,Display validation errors with @error,Use the @error directive for inline field-level error messages,@error('field') to show per-field messages,Dump $errors->all() in one block at top of form,@error('email') <p class="text-red-500">{{ $message }}</p> @enderror,@foreach($errors->all() as $e) {{ $e }} @endforeach,Medium,https://laravel.com/docs/validation#quick-displaying-the-validation-errors
|
||||
37,Forms,Use CSRF token on all forms,CSRF protection is enabled by default — include @csrf in every form,@csrf in every POST/PUT/PATCH/DELETE form,Disable VerifyCsrfToken middleware for convenience,<form method="POST">@csrf ...,<form method="POST"> without @csrf,High,https://laravel.com/docs/csrf
|
||||
38,Forms,Use method spoofing for PUT/PATCH/DELETE,HTML forms only support GET/POST — use @method for REST actions,@method('PUT') inside form for update/delete routes,Route::post for all mutations including updates,"<form method=""POST"">@csrf @method('PUT')",<form method="POST" action="/users/update">,Medium,https://laravel.com/docs/routing#form-method-spoofing
|
||||
39,Forms,Display flash messages consistently,Flash success/error in controller; read in layout with session(),session('status') in layout for global flash display,Re-query DB or pass flash from every controller individually,@if(session('success')) <div class="alert">{{ session('success') }}</div> @endif,if($user) return back()->with(['user' => $user]);,Medium,https://laravel.com/docs/session#flash-data
|
||||
40,Performance,Eager load relationships to prevent N+1,Always eager load related models used in views with with(),with() in queries before passing collections to views,Lazy-load relations inside Blade loops,User::with('posts' 'avatar')->get(),User::all() then @foreach $user->posts in Blade,High,https://laravel.com/docs/eloquent-relationships#eager-loading
|
||||
41,Performance,Cache rendered Blade fragments,Use cache() helper to wrap expensive rendered partials,cache() around slow partials that change infrequently,Re-render identical content on every request,@php echo cache()->remember('sidebar' 3600 fn() => view('sidebar')->render()); @endphp,{{ view('sidebar')->render() }} on every page load,Medium,https://laravel.com/docs/cache
|
||||
42,Performance,Paginate large data sets,Always paginate collections in list views,->paginate() or ->simplePaginate() with {{ $items->links() }},->get() for large tables in views,User::paginate(20) with <x-pagination :links="$users" />,User::all() passed to Blade,High,https://laravel.com/docs/pagination
|
||||
43,Performance,Queue slow background tasks,Offload emails notifications and heavy processing to queues,Dispatch jobs for anything taking >200ms,Block HTTP request with slow operations,ProcessImage::dispatch($file); return back();,Storage::put(); Mail::send(); Image::resize(); in controller,High,https://laravel.com/docs/queues
|
||||
44,Performance,Use route model binding,Laravel resolves models automatically — avoids manual find(),Type-hint model in controller method,Manual User::findOrFail($id) in every method,public function show(User $user): View { return view('users.show' compact('user')); },public function show($id) { $user = User::findOrFail($id); },Medium,https://laravel.com/docs/routing#route-model-binding
|
||||
45,Performance,Enable HTTP response caching for static content,Cache control headers for pages that rarely change,Cache-Control headers via middleware for public pages,No caching — serve every response fresh,response()->view('home')->header('Cache-Control' 'public, max-age=3600'),No cache headers on marketing pages,Medium,https://laravel.com/docs/responses#response-headers
|
||||
46,Security,Escape all output in Blade,{{ }} auto-escapes HTML — never use {!! !!} on user data,{{ }} for all untrusted or dynamic content,{!! !!} for user-controlled strings,{{ $comment->body }},{!! $comment->body !!},High,https://laravel.com/docs/blade#displaying-data
|
||||
47,Security,Protect routes with Gate and Policy,Use policies for authorization — never inline permission checks in views,@can / Gate::allows() for UI visibility; policy()->authorize() for actions,Hardcode role checks inline across templates,@can('update' $post) <a href="{{ route('posts.edit' $post) }}">Edit</a> @endcan,@if(auth()->user()->role === 'admin') <a href="/edit">,High,https://laravel.com/docs/authorization#policies
|
||||
48,Security,Validate and authorize file uploads,Check MIME type size and store outside public root,Store in storage/app/private + validate mimes and max,Store raw upload in public/ without validation,"'avatar' => ['required' 'image' 'mimes:jpg,png' 'max:2048']",'avatar' => 'required' with no MIME or size check,High,https://laravel.com/docs/filesystem#file-uploads
|
||||
49,Security,Use signed URLs for temporary links,Generate expiring URLs for private downloads or email confirmations,URL::signedRoute() or temporarySignedRoute(),Expose sequential IDs in download URLs without auth,URL::temporarySignedRoute('file.download' now()->addMinutes(30) ['file' => $id]),route('file.download' $id) with no expiry or signature,High,https://laravel.com/docs/urls#signed-urls
|
||||
50,Security,Set a strict Content Security Policy,CSP headers prevent XSS injection of external scripts,spatie/laravel-csp or custom middleware to emit CSP header,No CSP — browser runs any injected script,Header: Content-Security-Policy: default-src 'self'; script-src 'self',No Content-Security-Policy header on responses,Medium,https://laravel.com/docs/middleware
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 209.
|
@@ -0,0 +1,53 @@
|
||||
No,Category,Guideline,Description,Do,Don't,Code Good,Code Bad,Severity,Docs URL
|
||||
1,Routing,Use App Router for new projects,App Router is the recommended approach in Next.js 14+,app/ directory with page.tsx,pages/ for new projects,app/dashboard/page.tsx,pages/dashboard.tsx,Medium,https://nextjs.org/docs/app
|
||||
2,Routing,Use file-based routing,Create routes by adding files in app directory,page.tsx for routes layout.tsx for layouts,Manual route configuration,app/blog/[slug]/page.tsx,Custom router setup,Medium,https://nextjs.org/docs/app/building-your-application/routing
|
||||
3,Routing,Colocate related files,Keep components styles tests with their routes,Component files alongside page.tsx,Separate components folder,app/dashboard/_components/,components/dashboard/,Low,
|
||||
4,Routing,Use route groups for organization,Group routes without affecting URL,Parentheses for route groups,Nested folders affecting URL,(marketing)/about/page.tsx,marketing/about/page.tsx,Low,https://nextjs.org/docs/app/building-your-application/routing/route-groups
|
||||
5,Routing,Handle loading states,Use loading.tsx for route loading UI,loading.tsx alongside page.tsx,Manual loading state management,app/dashboard/loading.tsx,useState for loading in page,Medium,https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming
|
||||
6,Routing,Handle errors with error.tsx,Catch errors at route level,error.tsx with reset function,try/catch in every component,app/dashboard/error.tsx,try/catch in page component,High,https://nextjs.org/docs/app/building-your-application/routing/error-handling
|
||||
7,Rendering,Use Server Components by default,Server Components reduce client JS bundle,Keep components server by default,Add 'use client' unnecessarily,export default function Page(),('use client') for static content,High,https://nextjs.org/docs/app/building-your-application/rendering/server-components
|
||||
8,Rendering,Mark Client Components explicitly,'use client' for interactive components,Add 'use client' only when needed,Server Component with hooks/events,('use client') for onClick useState,No directive with useState,High,https://nextjs.org/docs/app/building-your-application/rendering/client-components
|
||||
9,Rendering,Push Client Components down,Keep Client Components as leaf nodes,Client wrapper for interactive parts only,Mark page as Client Component,<InteractiveButton/> in Server Page,('use client') on page.tsx,High,
|
||||
10,Rendering,Use streaming for better UX,Stream content with Suspense boundaries,Suspense for slow data fetches,Wait for all data before render,<Suspense><SlowComponent/></Suspense>,await allData then render,Medium,https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming
|
||||
11,Rendering,Choose correct rendering strategy,SSG for static SSR for dynamic ISR for semi-static,generateStaticParams for known paths,SSR for static content,export const revalidate = 3600,fetch without cache config,Medium,
|
||||
12,DataFetching,Fetch data in Server Components,Fetch directly in async Server Components,async function Page() { const data = await fetch() },useEffect for initial data,const data = await fetch(url),useEffect(() => fetch(url)),High,https://nextjs.org/docs/app/building-your-application/data-fetching
|
||||
13,DataFetching,Configure caching explicitly (Next.js 15+),Next.js 15 changed defaults to uncached for fetch,Explicitly set cache: 'force-cache' for static data,Assume default is cached (it's not in Next.js 15),fetch(url { cache: 'force-cache' }),fetch(url) // Uncached in v15,High,https://nextjs.org/docs/app/building-your-application/upgrading/version-15
|
||||
14,DataFetching,Deduplicate fetch requests,React and Next.js dedupe same requests,Same fetch call in multiple components,Manual request deduplication,Multiple components fetch same URL,Custom cache layer,Low,
|
||||
15,DataFetching,Use Server Actions for mutations,Server Actions for form submissions,action={serverAction} in forms,API route for every mutation,<form action={createPost}>,<form onSubmit={callApiRoute}>,Medium,https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations
|
||||
16,DataFetching,Revalidate data appropriately,Use revalidatePath/revalidateTag after mutations,Revalidate after Server Action,'use client' with manual refetch,revalidatePath('/posts'),router.refresh() everywhere,Medium,https://nextjs.org/docs/app/building-your-application/caching#revalidating
|
||||
17,Images,Use next/image for optimization,Automatic image optimization and lazy loading,<Image> component for all images,<img> tags directly,<Image src={} alt={} width={} height={}>,<img src={}/>,High,https://nextjs.org/docs/app/building-your-application/optimizing/images
|
||||
18,Images,Provide width and height,Prevent layout shift with dimensions,width and height props or fill,Missing dimensions,<Image width={400} height={300}/>,<Image src={url}/>,High,
|
||||
19,Images,Use fill for responsive images,Fill container with object-fit,fill prop with relative parent,Fixed dimensions for responsive,"<Image fill className=""object-cover""/>",<Image width={window.width}/>,Medium,
|
||||
20,Images,Configure remote image domains,Whitelist external image sources,remotePatterns in next.config.js,Allow all domains,remotePatterns: [{ hostname: 'cdn.example.com' }],domains: ['*'],High,https://nextjs.org/docs/app/api-reference/components/image#remotepatterns
|
||||
21,Images,Use priority for LCP images,Mark above-fold images as priority,priority prop on hero images,All images with priority,<Image priority src={hero}/>,<Image priority/> on every image,Medium,
|
||||
22,Fonts,Use next/font for fonts,Self-hosted fonts with zero layout shift,next/font/google or next/font/local,External font links,import { Inter } from 'next/font/google',"<link href=""fonts.googleapis.com""/>",Medium,https://nextjs.org/docs/app/building-your-application/optimizing/fonts
|
||||
23,Fonts,Apply font to layout,Set font in root layout for consistency,className on body in layout.tsx,Font in individual pages,<body className={inter.className}>,Each page imports font,Low,
|
||||
24,Fonts,Use variable fonts,Variable fonts reduce bundle size,Single variable font file,Multiple font weights as files,Inter({ subsets: ['latin'] }),Inter_400 Inter_500 Inter_700,Low,
|
||||
25,Metadata,Use generateMetadata for dynamic,Generate metadata based on params,export async function generateMetadata(),Hardcoded metadata everywhere,generateMetadata({ params }),export const metadata = {},Medium,https://nextjs.org/docs/app/building-your-application/optimizing/metadata
|
||||
26,Metadata,Include OpenGraph images,Add OG images for social sharing,opengraph-image.tsx or og property,Missing social preview images,opengraph: { images: ['/og.png'] },No OG configuration,Medium,
|
||||
27,Metadata,Use metadata API,Export metadata object for static metadata,export const metadata = {},Manual head tags,export const metadata = { title: 'Page' },<head><title>Page</title></head>,Medium,
|
||||
28,API,Use Route Handlers for APIs,app/api routes for API endpoints,app/api/users/route.ts,pages/api for new projects,export async function GET(request),export default function handler,Medium,https://nextjs.org/docs/app/building-your-application/routing/route-handlers
|
||||
29,API,Return proper Response objects,Use NextResponse for API responses,NextResponse.json() for JSON,Plain objects or res.json(),return NextResponse.json({ data }),return { data },Medium,
|
||||
30,API,Handle HTTP methods explicitly,Export named functions for methods,Export GET POST PUT DELETE,Single handler for all methods,export async function POST(),switch(req.method),Low,
|
||||
31,API,Validate request body,Validate input before processing,Zod or similar for validation,Trust client input,const body = schema.parse(await req.json()),const body = await req.json(),High,
|
||||
32,Middleware,Use middleware for auth,Protect routes with middleware.ts,middleware.ts at root,Auth check in every page,export function middleware(request),if (!session) redirect in page,Medium,https://nextjs.org/docs/app/building-your-application/routing/middleware
|
||||
33,Middleware,Match specific paths,Configure middleware matcher,config.matcher for specific routes,Run middleware on all routes,matcher: ['/dashboard/:path*'],No matcher config,Medium,
|
||||
34,Middleware,Keep middleware edge-compatible,Middleware runs on Edge runtime,Edge-compatible code only,Node.js APIs in middleware,Edge-compatible auth check,fs.readFile in middleware,High,
|
||||
35,Environment,Use NEXT_PUBLIC prefix,Client-accessible env vars need prefix,NEXT_PUBLIC_ for client vars,Server vars exposed to client,NEXT_PUBLIC_API_URL,API_SECRET in client code,High,https://nextjs.org/docs/app/building-your-application/configuring/environment-variables
|
||||
36,Environment,Validate env vars,Check required env vars exist,Validate on startup,Undefined env at runtime,if (!process.env.DATABASE_URL) throw,process.env.DATABASE_URL (might be undefined),High,
|
||||
37,Environment,Use .env.local for secrets,Local env file for development secrets,.env.local gitignored,Secrets in .env committed,.env.local with secrets,.env with DATABASE_PASSWORD,High,
|
||||
38,Performance,Analyze bundle size,Use @next/bundle-analyzer,Bundle analyzer in dev,Ship large bundles blindly,ANALYZE=true npm run build,No bundle analysis,Medium,https://nextjs.org/docs/app/building-your-application/optimizing/bundle-analyzer
|
||||
39,Performance,Use dynamic imports,Code split with next/dynamic,dynamic() for heavy components,Import everything statically,const Chart = dynamic(() => import('./Chart')),import Chart from './Chart',Medium,https://nextjs.org/docs/app/building-your-application/optimizing/lazy-loading
|
||||
40,Performance,Avoid layout shifts,Reserve space for dynamic content,Skeleton loaders aspect ratios,Content popping in,"<Skeleton className=""h-48""/>",No placeholder for async content,High,
|
||||
41,Performance,Use Partial Prerendering,Combine static and dynamic in one route,Static shell with Suspense holes,Full dynamic or static pages,Static header + dynamic content,Entire page SSR,Low,https://nextjs.org/docs/app/building-your-application/rendering/partial-prerendering
|
||||
42,Link,Use next/link for navigation,Client-side navigation with prefetching,"<Link href=""""> for internal links",<a> for internal navigation,"<Link href=""/about"">About</Link>","<a href=""/about"">About</a>",High,https://nextjs.org/docs/app/api-reference/components/link
|
||||
43,Link,Prefetch strategically,Control prefetching behavior,prefetch={false} for low-priority,Prefetch all links,<Link prefetch={false}>,Default prefetch on every link,Low,
|
||||
44,Link,Use scroll option appropriately,Control scroll behavior on navigation,scroll={false} for tabs pagination,Always scroll to top,<Link scroll={false}>,Manual scroll management,Low,
|
||||
45,Config,Use next.config.js correctly,Configure Next.js behavior,Proper config options,Deprecated or wrong options,images: { remotePatterns: [] },images: { domains: [] },Medium,https://nextjs.org/docs/app/api-reference/next-config-js
|
||||
46,Config,Enable strict mode,Catch potential issues early,reactStrictMode: true,Strict mode disabled,reactStrictMode: true,reactStrictMode: false,Medium,
|
||||
47,Config,Configure redirects and rewrites,Use config for URL management,redirects() rewrites() in config,Manual redirect handling,redirects: async () => [...],res.redirect in pages,Medium,https://nextjs.org/docs/app/api-reference/next-config-js/redirects
|
||||
48,Deployment,Use Vercel for easiest deploy,Vercel optimized for Next.js,Deploy to Vercel,Self-host without knowledge,vercel deploy,Complex Docker setup for simple app,Low,https://nextjs.org/docs/app/building-your-application/deploying
|
||||
49,Deployment,Configure output for self-hosting,Set output option for deployment target,output: 'standalone' for Docker,Default output for containers,output: 'standalone',No output config for Docker,Medium,https://nextjs.org/docs/app/building-your-application/deploying#self-hosting
|
||||
50,Security,Sanitize user input,Never trust user input,Escape sanitize validate all input,Direct interpolation of user data,DOMPurify.sanitize(userInput),dangerouslySetInnerHTML={{ __html: userInput }},High,
|
||||
51,Security,Use CSP headers,Content Security Policy for XSS protection,Configure CSP in next.config.js,No security headers,headers() with CSP,No CSP configuration,High,https://nextjs.org/docs/app/building-your-application/configuring/content-security-policy
|
||||
52,Security,Validate Server Action input,Server Actions are public endpoints,Validate and authorize in Server Action,Trust Server Action input,Auth check + validation in action,Direct database call without check,High,
|
||||
|
@@ -0,0 +1,51 @@
|
||||
No,Category,Guideline,Description,Do,Don't,Code Good,Code Bad,Severity,Docs URL
|
||||
1,Installation,Add Nuxt UI module,Install and configure Nuxt UI in your Nuxt project,pnpm add @nuxt/ui and add to modules,Manual component imports,"modules: ['@nuxt/ui']","import { UButton } from '@nuxt/ui'",High,https://ui.nuxt.com/docs/getting-started/installation/nuxt
|
||||
2,Installation,Import Tailwind and Nuxt UI CSS,Required CSS imports in main.css file,@import tailwindcss and @import @nuxt/ui,Skip CSS imports,"@import ""tailwindcss""; @import ""@nuxt/ui"";",No CSS imports,High,https://ui.nuxt.com/docs/getting-started/installation/nuxt
|
||||
3,Installation,Wrap app with UApp component,UApp provides global configs for Toast Tooltip and overlays,<UApp> wrapper in app.vue,Skip UApp wrapper,<UApp><NuxtPage/></UApp>,<NuxtPage/> without wrapper,High,https://ui.nuxt.com/docs/components/app
|
||||
4,Components,Use U prefix for components,All Nuxt UI components use U prefix by default,UButton UInput UModal,Button Input Modal,<UButton>Click</UButton>,<Button>Click</Button>,Medium,https://ui.nuxt.com/docs/getting-started/installation/nuxt
|
||||
5,Components,Use semantic color props,Use semantic colors like primary secondary error,color="primary" color="error",Hardcoded colors,"<UButton color=""primary"">","<UButton class=""bg-green-500"">",Medium,https://ui.nuxt.com/docs/getting-started/theme/design-system
|
||||
6,Components,Use variant prop for styling,Nuxt UI provides solid outline soft subtle ghost link variants,variant="soft" variant="outline",Custom button classes,"<UButton variant=""soft"">","<UButton class=""border bg-transparent"">",Medium,https://ui.nuxt.com/docs/components/button
|
||||
7,Components,Use size prop consistently,Components support xs sm md lg xl sizes,size="sm" size="lg",Arbitrary sizing classes,"<UButton size=""lg"">","<UButton class=""text-xl px-6"">",Low,https://ui.nuxt.com/docs/components/button
|
||||
8,Icons,Use icon prop with Iconify format,Nuxt UI supports Iconify icons via icon prop,icon="lucide:home" icon="heroicons:user",i-lucide-home format,"<UButton icon=""lucide:home"">","<UButton icon=""i-lucide-home"">",Medium,https://ui.nuxt.com/docs/getting-started/integrations/icons/nuxt
|
||||
9,Icons,Use leadingIcon and trailingIcon,Position icons with dedicated props for clarity,leadingIcon="lucide:plus" trailingIcon="lucide:arrow-right",Manual icon positioning,"<UButton leadingIcon=""lucide:plus"">","<UButton><Icon name=""lucide:plus""/>Add</UButton>",Low,https://ui.nuxt.com/docs/components/button
|
||||
10,Theming,Configure colors in app.config.ts,Runtime color configuration without restart,ui.colors.primary in app.config.ts,Hardcoded colors in components,"defineAppConfig({ ui: { colors: { primary: 'blue' } } })","<UButton class=""bg-blue-500"">",High,https://ui.nuxt.com/docs/getting-started/theme/design-system
|
||||
11,Theming,Use @theme directive for custom colors,Define design tokens in CSS with Tailwind @theme,@theme { --color-brand-500: #xxx },Inline color definitions,@theme { --color-brand-500: #ef4444; },:style="{ color: '#ef4444' }",Medium,https://ui.nuxt.com/docs/getting-started/theme/design-system
|
||||
12,Theming,Extend semantic colors in nuxt.config,Register new colors like tertiary in theme.colors,theme.colors array in ui config,Use undefined colors,"ui: { theme: { colors: ['primary', 'tertiary'] } }","<UButton color=""tertiary""> without config",Medium,https://ui.nuxt.com/docs/getting-started/theme/design-system
|
||||
13,Forms,Use UForm with schema validation,UForm supports Zod Yup Joi Valibot schemas,:schema prop with validation schema,Manual form validation,"<UForm :schema=""schema"" :state=""state"">",Manual @blur validation,High,https://ui.nuxt.com/docs/components/form
|
||||
14,Forms,Use UFormField for field wrapper,Provides label error message and validation display,UFormField with name prop,Manual error handling,"<UFormField name=""email"" label=""Email"">",<div><label>Email</label><UInput/><span>error</span></div>,Medium,https://ui.nuxt.com/docs/components/form-field
|
||||
15,Forms,Handle form submit with @submit,UForm emits submit event with validated data,@submit handler on UForm,@click on submit button,"<UForm @submit=""onSubmit"">","<UButton @click=""onSubmit"">",Medium,https://ui.nuxt.com/docs/components/form
|
||||
16,Forms,Use validateOn prop for validation timing,Control when validation triggers (blur change input),validateOn="['blur']" for performance,Always validate on input,"<UForm :validateOn=""['blur', 'change']"">","<UForm> (validates on every keystroke)",Low,https://ui.nuxt.com/docs/components/form
|
||||
17,Overlays,Use v-model:open for overlay control,Modal Slideover Drawer use v-model:open,v-model:open for controlled state,Manual show/hide logic,"<UModal v-model:open=""isOpen"">",<UModal v-if="isOpen">,Medium,https://ui.nuxt.com/docs/components/modal
|
||||
18,Overlays,Use useOverlay composable for programmatic overlays,Open overlays programmatically without template refs,useOverlay().open(MyModal),Template ref and manual control,"const overlay = useOverlay(); overlay.open(MyModal, { props })","const modal = ref(); modal.value.open()",Medium,https://ui.nuxt.com/docs/components/modal
|
||||
19,Overlays,Use title and description props,Built-in header support for overlays,title="Confirm" description="Are you sure?",Manual header content,"<UModal title=""Confirm"" description=""Are you sure?"">","<UModal><template #header><h2>Confirm</h2></template>",Low,https://ui.nuxt.com/docs/components/modal
|
||||
20,Dashboard,Use UDashboardSidebar for navigation,Provides collapsible resizable sidebar with mobile support,UDashboardSidebar with header default footer slots,Custom sidebar implementation,<UDashboardSidebar><template #header>...</template></UDashboardSidebar>,<aside class="w-64 border-r">,Medium,https://ui.nuxt.com/docs/components/dashboard-sidebar
|
||||
21,Dashboard,Use UDashboardGroup for layout,Wraps dashboard components with sidebar state management,UDashboardGroup > UDashboardSidebar + UDashboardPanel,Manual layout flex containers,<UDashboardGroup><UDashboardSidebar/><UDashboardPanel/></UDashboardGroup>,"<div class=""flex""><aside/><main/></div>",Medium,https://ui.nuxt.com/docs/components/dashboard-group
|
||||
22,Dashboard,Use UDashboardNavbar for top navigation,Responsive navbar with mobile menu support,UDashboardNavbar in dashboard layout,Custom navbar implementation,<UDashboardNavbar :links="navLinks"/>,<nav class="border-b">,Low,https://ui.nuxt.com/docs/components/dashboard-navbar
|
||||
23,Tables,Use UTable with data and columns props,Powered by TanStack Table with built-in features,:data and :columns props,Manual table markup,"<UTable :data=""users"" :columns=""columns""/>","<table><tr v-for=""user in users"">",High,https://ui.nuxt.com/docs/components/table
|
||||
24,Tables,Define columns with accessorKey,Column definitions use accessorKey for data binding,accessorKey: 'email' in column def,String column names only,"{ accessorKey: 'email', header: 'Email' }","['name', 'email']",Medium,https://ui.nuxt.com/docs/components/table
|
||||
25,Tables,Use cell slot for custom rendering,Customize cell content with scoped slots,#cell-columnName slot,Override entire table,<template #cell-status="{ row }">,Manual column render function,Medium,https://ui.nuxt.com/docs/components/table
|
||||
26,Tables,Enable sorting with sortable column option,Add sortable: true to column definition,sortable: true in column,Manual sort implementation,"{ accessorKey: 'name', sortable: true }",@click="sortBy('name')",Low,https://ui.nuxt.com/docs/components/table
|
||||
27,Navigation,Use UNavigationMenu for nav links,Horizontal or vertical navigation with dropdown support,UNavigationMenu with items array,Manual nav with v-for,"<UNavigationMenu :items=""navItems""/>","<nav><a v-for=""item in items"">",Medium,https://ui.nuxt.com/docs/components/navigation-menu
|
||||
28,Navigation,Use UBreadcrumb for page hierarchy,Automatic breadcrumb with NuxtLink support,:items array with label and to,Manual breadcrumb links,"<UBreadcrumb :items=""breadcrumbs""/>","<nav><span v-for=""crumb in crumbs"">",Low,https://ui.nuxt.com/docs/components/breadcrumb
|
||||
29,Navigation,Use UTabs for tabbed content,Tab navigation with content panels,UTabs with items containing slot content,Manual tab state,"<UTabs :items=""tabs""/>","<div><button @click=""tab=1"">",Medium,https://ui.nuxt.com/docs/components/tabs
|
||||
30,Feedback,Use useToast for notifications,Composable for toast notifications,useToast().add({ title description }),Alert components for toasts,"const toast = useToast(); toast.add({ title: 'Saved' })",<UAlert v-if="showSuccess">,High,https://ui.nuxt.com/docs/components/toast
|
||||
31,Feedback,Use UAlert for inline messages,Static alert messages with icon and actions,UAlert with title description color,Toast for static messages,"<UAlert title=""Warning"" color=""warning""/>",useToast for inline alerts,Medium,https://ui.nuxt.com/docs/components/alert
|
||||
32,Feedback,Use USkeleton for loading states,Placeholder content during data loading,USkeleton with appropriate size,Spinner for content loading,<USkeleton class="h-4 w-32"/>,<UIcon name="lucide:loader" class="animate-spin"/>,Low,https://ui.nuxt.com/docs/components/skeleton
|
||||
33,Color Mode,Use UColorModeButton for theme toggle,Built-in light/dark mode toggle button,UColorModeButton component,Manual color mode logic,<UColorModeButton/>,"<button @click=""toggleColorMode"">",Low,https://ui.nuxt.com/docs/components/color-mode-button
|
||||
34,Color Mode,Use UColorModeSelect for theme picker,Dropdown to select system light or dark mode,UColorModeSelect component,Custom select for theme,<UColorModeSelect/>,"<USelect v-model=""colorMode"" :items=""modes""/>",Low,https://ui.nuxt.com/docs/components/color-mode-select
|
||||
35,Customization,Use ui prop for component styling,Override component styles via ui prop,ui prop with slot class overrides,Global CSS overrides,"<UButton :ui=""{ base: 'rounded-full' }""/>",<UButton class="!rounded-full"/>,Medium,https://ui.nuxt.com/docs/getting-started/theme/components
|
||||
36,Customization,Configure default variants in nuxt.config,Set default color and size for all components,theme.defaultVariants in ui config,Repeat props on every component,"ui: { theme: { defaultVariants: { color: 'neutral' } } }","<UButton color=""neutral""> everywhere",Medium,https://ui.nuxt.com/docs/getting-started/installation/nuxt
|
||||
37,Customization,Use app.config.ts for theme overrides,Runtime theme customization,defineAppConfig with ui key,nuxt.config for runtime values,"defineAppConfig({ ui: { button: { defaultVariants: { size: 'sm' } } } })","nuxt.config ui.button.size: 'sm'",Medium,https://ui.nuxt.com/docs/getting-started/theme/components
|
||||
38,Performance,Enable component detection,Tree-shake unused component CSS,experimental.componentDetection: true,Include all component CSS,"ui: { experimental: { componentDetection: true } }","ui: {} (includes all CSS)",Low,https://ui.nuxt.com/docs/getting-started/installation/nuxt
|
||||
39,Performance,Use UTable virtualize for large data,Enable virtualization for 1000+ rows,:virtualize prop on UTable,Render all rows,"<UTable :data=""largeData"" virtualize/>","<UTable :data=""largeData""/>",Medium,https://ui.nuxt.com/docs/components/table
|
||||
40,Accessibility,Use semantic component props,Components have built-in ARIA support,Use title description label props,Skip accessibility props,"<UModal title=""Settings"">","<UModal><h2>Settings</h2>",Medium,https://ui.nuxt.com/docs/components/modal
|
||||
41,Accessibility,Use UFormField for form accessibility,Automatic label-input association,UFormField wraps inputs,Manual id and for attributes,"<UFormField label=""Email""><UInput/></UFormField>","<label for=""email"">Email</label><UInput id=""email""/>",High,https://ui.nuxt.com/docs/components/form-field
|
||||
42,Content,Use UContentToc for table of contents,Automatic TOC with active heading highlight,UContentToc with :links,Manual TOC implementation,"<UContentToc :links=""toc""/>","<nav><a v-for=""heading in headings"">",Low,https://ui.nuxt.com/docs/components/content-toc
|
||||
43,Content,Use UContentSearch for docs search,Command palette for documentation search,UContentSearch with Nuxt Content,Custom search implementation,<UContentSearch/>,<UCommandPalette :groups="searchResults"/>,Low,https://ui.nuxt.com/docs/components/content-search
|
||||
44,AI/Chat,Use UChatMessages for chat UI,Designed for Vercel AI SDK integration,UChatMessages with messages array,Custom chat message list,"<UChatMessages :messages=""messages""/>","<div v-for=""msg in messages"">",Medium,https://ui.nuxt.com/docs/components/chat-messages
|
||||
45,AI/Chat,Use UChatPrompt for input,Enhanced textarea for AI prompts,UChatPrompt with v-model,Basic textarea,<UChatPrompt v-model="prompt"/>,<UTextarea v-model="prompt"/>,Medium,https://ui.nuxt.com/docs/components/chat-prompt
|
||||
46,Editor,Use UEditor for rich text,TipTap-based editor with toolbar support,UEditor with v-model:content,Custom TipTap setup,"<UEditor v-model:content=""content""/>",Manual TipTap initialization,Medium,https://ui.nuxt.com/docs/components/editor
|
||||
47,Links,Use to prop for navigation,UButton and ULink support NuxtLink to prop,to="/dashboard" for internal links,href for internal navigation,"<UButton to=""/dashboard"">","<UButton href=""/dashboard"">",Medium,https://ui.nuxt.com/docs/components/button
|
||||
48,Links,Use external prop for outside links,Explicitly mark external links,target="_blank" with external URLs,Forget rel="noopener","<UButton to=""https://example.com"" target=""_blank"">","<UButton href=""https://..."">",Low,https://ui.nuxt.com/docs/components/link
|
||||
49,Loading,Use loadingAuto on buttons,Automatic loading state from @click promise,loadingAuto prop on UButton,Manual loading state,"<UButton loadingAuto @click=""async () => await save()"">","<UButton :loading=""isLoading"" @click=""save"">",Low,https://ui.nuxt.com/docs/components/button
|
||||
50,Loading,Use UForm loadingAuto,Auto-disable form during submit,loadingAuto on UForm (default true),Manual form disabled state,"<UForm @submit=""handleSubmit"">","<UForm :disabled=""isSubmitting"">",Low,https://ui.nuxt.com/docs/components/form
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 94.
|
@@ -0,0 +1,59 @@
|
||||
No,Category,Guideline,Description,Do,Don't,Code Good,Code Bad,Severity,Docs URL
|
||||
1,Routing,Use file-based routing,Create routes by adding files in pages directory,pages/ directory with index.vue,Manual route configuration,pages/dashboard/index.vue,Custom router setup,Medium,https://nuxt.com/docs/getting-started/routing
|
||||
2,Routing,Use dynamic route parameters,Create dynamic routes with bracket syntax,[id].vue for dynamic params,Hardcoded routes for dynamic content,pages/posts/[id].vue,pages/posts/post1.vue,Medium,https://nuxt.com/docs/getting-started/routing
|
||||
3,Routing,Use catch-all routes,Handle multiple path segments with [...slug],[...slug].vue for catch-all,Multiple nested dynamic routes,pages/[...slug].vue,pages/[a]/[b]/[c].vue,Low,https://nuxt.com/docs/getting-started/routing
|
||||
4,Routing,Define page metadata with definePageMeta,Set page-level configuration and middleware,definePageMeta for layout middleware title,Manual route meta configuration,"definePageMeta({ layout: 'admin', middleware: 'auth' })",router.beforeEach for page config,High,https://nuxt.com/docs/api/utils/define-page-meta
|
||||
5,Routing,Use validate for route params,Validate dynamic route parameters before rendering,validate function in definePageMeta,Manual validation in setup,"definePageMeta({ validate: (route) => /^\d+$/.test(route.params.id) })",if (!valid) navigateTo('/404'),Medium,https://nuxt.com/docs/api/utils/define-page-meta
|
||||
6,Rendering,Use SSR by default,Server-side rendering is enabled by default,Keep ssr: true (default),Disable SSR unnecessarily,ssr: true (default),ssr: false for all pages,High,https://nuxt.com/docs/guide/concepts/rendering
|
||||
7,Rendering,Use .client suffix for client-only components,Mark components to render only on client,ComponentName.client.vue suffix,v-if with process.client check,Comments.client.vue,<div v-if="process.client"><Comments/></div>,Medium,https://nuxt.com/docs/guide/directory-structure/components
|
||||
8,Rendering,Use .server suffix for server-only components,Mark components to render only on server,ComponentName.server.vue suffix,Manual server check,HeavyMarkdown.server.vue,v-if="process.server",Low,https://nuxt.com/docs/guide/directory-structure/components
|
||||
9,DataFetching,Use useFetch for simple data fetching,Wrapper around useAsyncData for URL fetching,useFetch for API calls,$fetch in onMounted,"const { data } = await useFetch('/api/posts')","onMounted(async () => { data.value = await $fetch('/api/posts') })",High,https://nuxt.com/docs/api/composables/use-fetch
|
||||
10,DataFetching,Use useAsyncData for complex fetching,Fine-grained control over async data,useAsyncData for CMS or custom fetching,useFetch for non-URL data sources,"const { data } = await useAsyncData('posts', () => cms.getPosts())","const { data } = await useFetch(() => cms.getPosts())",Medium,https://nuxt.com/docs/api/composables/use-async-data
|
||||
11,DataFetching,Use $fetch for non-reactive requests,$fetch for event handlers and non-component code,$fetch in event handlers or server routes,useFetch in click handlers,"async function submit() { await $fetch('/api/submit', { method: 'POST' }) }","async function submit() { await useFetch('/api/submit') }",High,https://nuxt.com/docs/api/utils/dollarfetch
|
||||
12,DataFetching,Use lazy option for non-blocking fetch,Defer data fetching for better initial load,lazy: true for below-fold content,Blocking fetch for non-critical data,"useFetch('/api/comments', { lazy: true })",await useFetch('/api/comments') for footer,Medium,https://nuxt.com/docs/api/composables/use-fetch
|
||||
13,DataFetching,Use server option to control fetch location,Choose where data is fetched,server: false for client-only data,Server fetch for user-specific client data,"useFetch('/api/user-preferences', { server: false })",useFetch for localStorage-dependent data,Medium,https://nuxt.com/docs/api/composables/use-fetch
|
||||
14,DataFetching,Use pick to reduce payload size,Select only needed fields from response,pick option for large responses,Fetching entire objects when few fields needed,"useFetch('/api/user', { pick: ['id', 'name'] })",useFetch('/api/user') then destructure,Low,https://nuxt.com/docs/api/composables/use-fetch
|
||||
15,DataFetching,Use transform for data manipulation,Transform data before storing in state,transform option for data shaping,Manual transformation after fetch,"useFetch('/api/posts', { transform: (posts) => posts.map(p => p.title) })",const titles = data.value.map(p => p.title),Low,https://nuxt.com/docs/api/composables/use-fetch
|
||||
16,DataFetching,Handle loading and error states,Always handle pending and error states,Check status pending error refs,Ignoring loading states,"<div v-if=""status === 'pending'"">Loading...</div>",No loading indicator,High,https://nuxt.com/docs/getting-started/data-fetching
|
||||
17,Lifecycle,Avoid side effects in script setup root,Move side effects to lifecycle hooks,Side effects in onMounted,setInterval in root script setup,"onMounted(() => { interval = setInterval(...) })","<script setup>setInterval(...)</script>",High,https://nuxt.com/docs/guide/concepts/nuxt-lifecycle
|
||||
18,Lifecycle,Use onMounted for DOM access,Access DOM only after component is mounted,onMounted for DOM manipulation,Direct DOM access in setup,"onMounted(() => { document.getElementById('el') })","<script setup>document.getElementById('el')</script>",High,https://nuxt.com/docs/api/composables/on-mounted
|
||||
19,Lifecycle,Use nextTick for post-render access,Wait for DOM updates before accessing elements,await nextTick() after state changes,Immediate DOM access after state change,"count.value++; await nextTick(); el.value.focus()","count.value++; el.value.focus()",Medium,https://nuxt.com/docs/api/utils/next-tick
|
||||
20,Lifecycle,Use onPrehydrate for pre-hydration logic,Run code before Nuxt hydrates the page,onPrehydrate for client setup,onMounted for hydration-critical code,"onPrehydrate(() => { console.log(window) })",onMounted for pre-hydration needs,Low,https://nuxt.com/docs/api/composables/on-prehydrate
|
||||
21,Server,Use server/api for API routes,Create API endpoints in server/api directory,server/api/users.ts for /api/users,Manual Express setup,server/api/hello.ts -> /api/hello,app.get('/api/hello'),High,https://nuxt.com/docs/guide/directory-structure/server
|
||||
22,Server,Use defineEventHandler for handlers,Define server route handlers,defineEventHandler for all handlers,export default function,"export default defineEventHandler((event) => { return { hello: 'world' } })","export default function(req, res) {}",High,https://nuxt.com/docs/guide/directory-structure/server
|
||||
23,Server,Use server/routes for non-api routes,Routes without /api prefix,server/routes for custom paths,server/api for non-api routes,server/routes/sitemap.xml.ts,server/api/sitemap.xml.ts,Medium,https://nuxt.com/docs/guide/directory-structure/server
|
||||
24,Server,Use getQuery and readBody for input,Access query params and request body,getQuery(event) readBody(event),Direct event access,"const { id } = getQuery(event)",event.node.req.query,Medium,https://nuxt.com/docs/guide/directory-structure/server
|
||||
25,Server,Validate server input,Always validate input in server handlers,Zod or similar for validation,Trust client input,"const body = await readBody(event); schema.parse(body)",const body = await readBody(event),High,https://nuxt.com/docs/guide/directory-structure/server
|
||||
26,State,Use useState for shared reactive state,SSR-friendly shared state across components,useState for cross-component state,ref for shared state,"const count = useState('count', () => 0)",const count = ref(0) in composable,High,https://nuxt.com/docs/api/composables/use-state
|
||||
27,State,Use unique keys for useState,Prevent state conflicts with unique keys,Descriptive unique keys for each state,Generic or duplicate keys,"useState('user-preferences', () => ({}))",useState('data') in multiple places,Medium,https://nuxt.com/docs/api/composables/use-state
|
||||
28,State,Use Pinia for complex state,Pinia for advanced state management,@pinia/nuxt for complex apps,Custom state management,useMainStore() with Pinia,Custom reactive store implementation,Medium,https://nuxt.com/docs/getting-started/state-management
|
||||
29,State,Use callOnce for one-time async operations,Ensure async operations run only once,callOnce for store initialization,Direct await in component,"await callOnce(store.fetch)",await store.fetch() on every render,Medium,https://nuxt.com/docs/api/utils/call-once
|
||||
30,SEO,Use useSeoMeta for SEO tags,Type-safe SEO meta tag management,useSeoMeta for meta tags,useHead for simple meta,"useSeoMeta({ title: 'Home', ogTitle: 'Home', description: '...' })","useHead({ meta: [{ name: 'description', content: '...' }] })",High,https://nuxt.com/docs/api/composables/use-seo-meta
|
||||
31,SEO,Use reactive values in useSeoMeta,Dynamic SEO tags with refs or getters,Computed getters for dynamic values,Static values for dynamic content,"useSeoMeta({ title: () => post.value.title })","useSeoMeta({ title: post.value.title })",Medium,https://nuxt.com/docs/api/composables/use-seo-meta
|
||||
32,SEO,Use useHead for non-meta head elements,Scripts styles links in head,useHead for scripts and links,useSeoMeta for scripts,"useHead({ script: [{ src: '/analytics.js' }] })","useSeoMeta({ script: '...' })",Medium,https://nuxt.com/docs/api/composables/use-head
|
||||
33,SEO,Include OpenGraph tags,Add OG tags for social sharing,ogTitle ogDescription ogImage,Missing social preview,"useSeoMeta({ ogImage: '/og.png', twitterCard: 'summary_large_image' })",No OG configuration,Medium,https://nuxt.com/docs/api/composables/use-seo-meta
|
||||
34,Middleware,Use defineNuxtRouteMiddleware,Define route middleware properly,defineNuxtRouteMiddleware wrapper,export default function,"export default defineNuxtRouteMiddleware((to, from) => {})","export default function(to, from) {}",High,https://nuxt.com/docs/guide/directory-structure/middleware
|
||||
35,Middleware,Use navigateTo for redirects,Redirect in middleware with navigateTo,return navigateTo('/login'),router.push in middleware,"if (!auth) return navigateTo('/login')","if (!auth) router.push('/login')",High,https://nuxt.com/docs/api/utils/navigate-to
|
||||
36,Middleware,Reference middleware in definePageMeta,Apply middleware to specific pages,middleware array in definePageMeta,Global middleware for page-specific,definePageMeta({ middleware: ['auth'] }),Global auth check for one page,Medium,https://nuxt.com/docs/guide/directory-structure/middleware
|
||||
37,Middleware,Use .global suffix for global middleware,Apply middleware to all routes,auth.global.ts for app-wide auth,Manual middleware on every page,middleware/auth.global.ts,middleware: ['auth'] on every page,Medium,https://nuxt.com/docs/guide/directory-structure/middleware
|
||||
38,ErrorHandling,Use createError for errors,Create errors with proper status codes,createError with statusCode,throw new Error,"throw createError({ statusCode: 404, statusMessage: 'Not Found' })",throw new Error('Not Found'),High,https://nuxt.com/docs/api/utils/create-error
|
||||
39,ErrorHandling,Use NuxtErrorBoundary for local errors,Handle errors within component subtree,NuxtErrorBoundary for component errors,Global error page for local errors,"<NuxtErrorBoundary @error=""log""><template #error=""{ error }"">",error.vue for component errors,Medium,https://nuxt.com/docs/getting-started/error-handling
|
||||
40,ErrorHandling,Use clearError to recover from errors,Clear error state and optionally redirect,clearError({ redirect: '/' }),Manual error state reset,clearError({ redirect: '/home' }),error.value = null,Medium,https://nuxt.com/docs/api/utils/clear-error
|
||||
41,ErrorHandling,Use short statusMessage,Keep statusMessage brief for security,Short generic messages,Detailed error info in statusMessage,"createError({ statusCode: 400, statusMessage: 'Bad Request' })","createError({ statusMessage: 'Invalid user ID: 123' })",High,https://nuxt.com/docs/getting-started/error-handling
|
||||
42,Link,Use NuxtLink for internal navigation,Client-side navigation with prefetching,<NuxtLink to> for internal links,<a href> for internal links,<NuxtLink to="/about">About</NuxtLink>,<a href="/about">About</a>,High,https://nuxt.com/docs/api/components/nuxt-link
|
||||
43,Link,Configure prefetch behavior,Control when prefetching occurs,prefetchOn for interaction-based,Default prefetch for low-priority,"<NuxtLink prefetch-on=""interaction"">",Always default prefetch,Low,https://nuxt.com/docs/api/components/nuxt-link
|
||||
44,Link,Use useRouter for programmatic navigation,Navigate programmatically,useRouter().push() for navigation,Direct window.location,"const router = useRouter(); router.push('/dashboard')",window.location.href = '/dashboard',Medium,https://nuxt.com/docs/api/composables/use-router
|
||||
45,Link,Use navigateTo in composables,Navigate outside components,navigateTo() in middleware or plugins,useRouter in non-component code,return navigateTo('/login'),router.push in middleware,Medium,https://nuxt.com/docs/api/utils/navigate-to
|
||||
46,AutoImports,Leverage auto-imports,Use auto-imported composables directly,Direct use of ref computed useFetch,Manual imports for Nuxt composables,"const count = ref(0)","import { ref } from 'vue'; const count = ref(0)",Medium,https://nuxt.com/docs/guide/concepts/auto-imports
|
||||
47,AutoImports,Use #imports for explicit imports,Explicit imports when needed,#imports for clarity or disabled auto-imports,"import from 'vue' when auto-import enabled","import { ref } from '#imports'","import { ref } from 'vue'",Low,https://nuxt.com/docs/guide/concepts/auto-imports
|
||||
48,AutoImports,Configure third-party auto-imports,Add external package auto-imports,imports.presets in nuxt.config,Manual imports everywhere,"imports: { presets: [{ from: 'vue-i18n', imports: ['useI18n'] }] }",import { useI18n } everywhere,Low,https://nuxt.com/docs/guide/concepts/auto-imports
|
||||
49,Plugins,Use defineNuxtPlugin,Define plugins properly,defineNuxtPlugin wrapper,export default function,"export default defineNuxtPlugin((nuxtApp) => {})","export default function(ctx) {}",High,https://nuxt.com/docs/guide/directory-structure/plugins
|
||||
50,Plugins,Use provide for injection,Provide helpers across app,return { provide: {} } for type safety,nuxtApp.provide without types,"return { provide: { hello: (name) => `Hello ${name}!` } }","nuxtApp.provide('hello', fn)",Medium,https://nuxt.com/docs/guide/directory-structure/plugins
|
||||
51,Plugins,Use .client or .server suffix,Control plugin execution environment,plugin.client.ts for client-only,if (process.client) checks,analytics.client.ts,"if (process.client) { // analytics }",Medium,https://nuxt.com/docs/guide/directory-structure/plugins
|
||||
52,Environment,Use runtimeConfig for env vars,Access environment variables safely,runtimeConfig in nuxt.config,process.env directly,"runtimeConfig: { apiSecret: '', public: { apiBase: '' } }",process.env.API_SECRET in components,High,https://nuxt.com/docs/guide/going-further/runtime-config
|
||||
53,Environment,Use NUXT_ prefix for env override,Override config with environment variables,NUXT_API_SECRET NUXT_PUBLIC_API_BASE,Custom env var names,NUXT_PUBLIC_API_BASE=https://api.example.com,API_BASE=https://api.example.com,High,https://nuxt.com/docs/guide/going-further/runtime-config
|
||||
54,Environment,Access public config with useRuntimeConfig,Get public config in components,useRuntimeConfig().public,Direct process.env access,const config = useRuntimeConfig(); config.public.apiBase,process.env.NUXT_PUBLIC_API_BASE,High,https://nuxt.com/docs/api/composables/use-runtime-config
|
||||
55,Environment,Keep secrets in private config,Server-only secrets in runtimeConfig root,runtimeConfig.apiSecret (server only),Secrets in public config,runtimeConfig: { dbPassword: '' },runtimeConfig: { public: { dbPassword: '' } },High,https://nuxt.com/docs/guide/going-further/runtime-config
|
||||
56,Performance,Use Lazy prefix for code splitting,Lazy load components with Lazy prefix,<LazyComponent> for below-fold,Eager load all components,<LazyMountainsList v-if="show"/>,<MountainsList/> for hidden content,Medium,https://nuxt.com/docs/guide/directory-structure/components
|
||||
57,Performance,Use useLazyFetch for non-blocking data,Alias for useFetch with lazy: true,useLazyFetch for secondary data,useFetch for all requests,"const { data } = useLazyFetch('/api/comments')",await useFetch for comments section,Medium,https://nuxt.com/docs/api/composables/use-lazy-fetch
|
||||
58,Performance,Use lazy hydration for interactivity,Delay component hydration until needed,LazyComponent with hydration strategy,Immediate hydration for all,<LazyModal hydrate-on-visible/>,<Modal/> in footer,Low,https://nuxt.com/docs/guide/going-further/experimental-features
|
||||
|
Can't render this file because it contains an unexpected character in line 8 and column 193.
|
@@ -0,0 +1,52 @@
|
||||
No,Category,Guideline,Description,Do,Don't,Code Good,Code Bad,Severity,Docs URL
|
||||
1,Components,Use functional components,Hooks-based components are standard,Functional components with hooks,Class components,const App = () => { },class App extends Component,Medium,https://reactnative.dev/docs/intro-react
|
||||
2,Components,Keep components small,Single responsibility principle,Split into smaller components,Large monolithic components,<Header /><Content /><Footer />,500+ line component,Medium,
|
||||
3,Components,Use TypeScript,Type safety for props and state,TypeScript for new projects,JavaScript without types,const Button: FC<Props> = () => { },const Button = (props) => { },Medium,
|
||||
4,Components,Colocate component files,Keep related files together,Component folder with styles,Flat structure,components/Button/index.tsx styles.ts,components/Button.tsx styles/button.ts,Low,
|
||||
5,Styling,Use StyleSheet.create,Optimized style objects,StyleSheet for all styles,Inline style objects,StyleSheet.create({ container: {} }),style={{ margin: 10 }},High,https://reactnative.dev/docs/stylesheet
|
||||
6,Styling,Avoid inline styles,Prevent object recreation,Styles in StyleSheet,Inline style objects in render,style={styles.container},"style={{ margin: 10, padding: 5 }}",Medium,
|
||||
7,Styling,Use flexbox for layout,React Native uses flexbox,flexDirection alignItems justifyContent,Absolute positioning everywhere,flexDirection: 'row',position: 'absolute' everywhere,Medium,https://reactnative.dev/docs/flexbox
|
||||
8,Styling,Handle platform differences,Platform-specific styles,Platform.select or .ios/.android files,Same styles for both platforms,"Platform.select({ ios: {}, android: {} })",Hardcoded iOS values,Medium,https://reactnative.dev/docs/platform-specific-code
|
||||
9,Styling,Use responsive dimensions,Scale for different screens,Dimensions or useWindowDimensions,Fixed pixel values,useWindowDimensions(),width: 375,Medium,
|
||||
10,Navigation,Use React Navigation,Standard navigation library,React Navigation for routing,Manual navigation management,createStackNavigator(),Custom navigation state,Medium,https://reactnavigation.org/
|
||||
11,Navigation,Type navigation params,Type-safe navigation,Typed navigation props,Untyped navigation,"navigation.navigate<RootStackParamList>('Home', { id })","navigation.navigate('Home', { id })",Medium,
|
||||
12,Navigation,Use deep linking,Support URL-based navigation,Configure linking prop,No deep link support,linking: { prefixes: [] },No linking configuration,Medium,https://reactnavigation.org/docs/deep-linking/
|
||||
13,Navigation,Handle back button,Android back button handling,useFocusEffect with BackHandler,Ignore back button,BackHandler.addEventListener,No back handler,High,
|
||||
14,State,Use useState for local state,Simple component state,useState for UI state,Class component state,"const [count, setCount] = useState(0)",this.state = { count: 0 },Medium,
|
||||
15,State,Use useReducer for complex state,Complex state logic,useReducer for related state,Multiple useState for related values,useReducer(reducer initialState),5+ useState calls,Medium,
|
||||
16,State,Use context sparingly,Context for global state,Context for theme auth locale,Context for frequently changing data,ThemeContext for app theme,Context for list item data,Medium,
|
||||
17,State,Consider Zustand or Redux,External state management,Zustand for simple Redux for complex,useState for global state,create((set) => ({ })),Prop drilling global state,Medium,
|
||||
18,Lists,Use FlatList for long lists,Virtualized list rendering,FlatList for 50+ items,ScrollView with map,<FlatList data={items} />,<ScrollView>{items.map()}</ScrollView>,High,https://reactnative.dev/docs/flatlist
|
||||
19,Lists,Provide keyExtractor,Unique keys for list items,keyExtractor with stable ID,Index as key,keyExtractor={(item) => item.id},"keyExtractor={(_, index) => index}",High,
|
||||
20,Lists,Optimize renderItem,Memoize list item components,React.memo for list items,Inline render function,renderItem={({ item }) => <MemoizedItem item={item} />},renderItem={({ item }) => <View>...</View>},High,
|
||||
21,Lists,Use getItemLayout for fixed height,Skip measurement for performance,getItemLayout when height known,Dynamic measurement for fixed items,"getItemLayout={(_, index) => ({ length: 50, offset: 50 * index, index })}",No getItemLayout for fixed height,Medium,
|
||||
22,Lists,Implement windowSize,Control render window,Smaller windowSize for memory,Default windowSize for large lists,windowSize={5},windowSize={21} for huge lists,Medium,
|
||||
23,Performance,Use React.memo,Prevent unnecessary re-renders,memo for pure components,No memoization,export default memo(MyComponent),export default MyComponent,Medium,
|
||||
24,Performance,Use useCallback for handlers,Stable function references,useCallback for props,New function on every render,"useCallback(() => {}, [deps])",() => handlePress(),Medium,
|
||||
25,Performance,Use useMemo for expensive ops,Cache expensive calculations,useMemo for heavy computations,Recalculate every render,"useMemo(() => expensive(), [deps])",const result = expensive(),Medium,
|
||||
26,Performance,Avoid anonymous functions in JSX,Prevent re-renders,Named handlers or useCallback,Inline arrow functions,onPress={handlePress},onPress={() => doSomething()},Medium,
|
||||
27,Performance,Use Hermes engine,Improved startup and memory,Enable Hermes in build,JavaScriptCore for new projects,hermes_enabled: true,hermes_enabled: false,Medium,https://reactnative.dev/docs/hermes
|
||||
28,Images,Use expo-image,Modern performant image component for React Native,"Use expo-image for caching, blurring, and performance",Use default Image for heavy lists or unmaintained libraries,<Image source={url} cachePolicy='memory-disk' /> (expo-image),<FastImage source={url} />,Medium,https://docs.expo.dev/versions/latest/sdk/image/
|
||||
29,Images,Specify image dimensions,Prevent layout shifts,width and height for remote images,No dimensions for network images,<Image style={{ width: 100 height: 100 }} />,<Image source={{ uri }} /> no size,High,
|
||||
30,Images,Use resizeMode,Control image scaling,resizeMode cover contain,Stretch images,"resizeMode=""cover""",No resizeMode,Low,
|
||||
31,Forms,Use controlled inputs,State-controlled form fields,value + onChangeText,Uncontrolled inputs,<TextInput value={text} onChangeText={setText} />,<TextInput defaultValue={text} />,Medium,
|
||||
32,Forms,Handle keyboard,Manage keyboard visibility,KeyboardAvoidingView,Content hidden by keyboard,"<KeyboardAvoidingView behavior=""padding"">",No keyboard handling,High,https://reactnative.dev/docs/keyboardavoidingview
|
||||
33,Forms,Use proper keyboard types,Appropriate keyboard for input,keyboardType for input type,Default keyboard for all,"keyboardType=""email-address""","keyboardType=""default"" for email",Low,
|
||||
34,Touch,Use Pressable,Modern touch handling,Pressable for touch interactions,TouchableOpacity for new code,<Pressable onPress={} />,<TouchableOpacity onPress={} />,Low,https://reactnative.dev/docs/pressable
|
||||
35,Touch,Provide touch feedback,Visual feedback on press,Ripple or opacity change,No feedback on press,android_ripple={{ color: 'gray' }},No press feedback,Medium,
|
||||
36,Touch,Set hitSlop for small targets,Increase touch area,hitSlop for icons and small buttons,Tiny touch targets,hitSlop={{ top: 10 bottom: 10 }},44x44 with no hitSlop,Medium,
|
||||
37,Animation,Use Reanimated,High-performance animations,react-native-reanimated,Animated API for complex,useSharedValue useAnimatedStyle,Animated.timing for gesture,Medium,https://docs.swmansion.com/react-native-reanimated/
|
||||
38,Animation,Run on UI thread,worklets for smooth animation,Run animations on UI thread,JS thread animations,runOnUI(() => {}),Animated on JS thread,High,
|
||||
39,Animation,Use gesture handler,Native gesture recognition,react-native-gesture-handler,JS-based gesture handling,<GestureDetector>,<View onTouchMove={} />,Medium,https://docs.swmansion.com/react-native-gesture-handler/
|
||||
40,Async,Handle loading states,Show loading indicators,ActivityIndicator during load,Empty screen during load,{isLoading ? <ActivityIndicator /> : <Content />},No loading state,Medium,
|
||||
41,Async,Handle errors gracefully,Error boundaries and fallbacks,Error UI for failed requests,Crash on error,{error ? <ErrorView /> : <Content />},No error handling,High,
|
||||
42,Async,Cancel async operations,Cleanup on unmount,AbortController or cleanup,Memory leaks from async,useEffect cleanup,No cleanup for subscriptions,High,
|
||||
43,Accessibility,Add accessibility labels,Describe UI elements,accessibilityLabel for all interactive,Missing labels,"accessibilityLabel=""Submit form""",<Pressable> without label,High,https://reactnative.dev/docs/accessibility
|
||||
44,Accessibility,Use accessibility roles,Semantic meaning,accessibilityRole for elements,Wrong roles,"accessibilityRole=""button""",No role for button,Medium,
|
||||
45,Accessibility,Support screen readers,Test with TalkBack/VoiceOver,Test with screen readers,Skip accessibility testing,Regular TalkBack testing,No screen reader testing,High,
|
||||
46,Testing,Use React Native Testing Library,Component testing,render and fireEvent,Enzyme or manual testing,render(<Component />),shallow(<Component />),Medium,https://callstack.github.io/react-native-testing-library/
|
||||
47,Testing,Test on real devices,Real device behavior,Test on iOS and Android devices,Simulator only,Device testing in CI,Simulator only testing,High,
|
||||
48,Testing,Use Detox for E2E,End-to-end testing,Detox for critical flows,Manual E2E testing,detox test,Manual testing only,Medium,https://wix.github.io/Detox/
|
||||
49,Native,Use native modules carefully,Bridge has overhead,Batch native calls,Frequent bridge crossing,Batch updates,Call native on every keystroke,High,
|
||||
50,Native,Use Expo when possible,Simplified development,Expo for standard features,Bare RN for simple apps,expo install package,react-native link package,Low,https://docs.expo.dev/
|
||||
51,Native,Handle permissions,Request permissions properly,Check and request permissions,Assume permissions granted,PermissionsAndroid.request(),Access without permission check,High,https://reactnative.dev/docs/permissionsandroid
|
||||
|
@@ -0,0 +1,54 @@
|
||||
No,Category,Guideline,Description,Do,Don't,Code Good,Code Bad,Severity,Docs URL
|
||||
1,State,Use useState for local state,Simple component state should use useState hook,useState for form inputs toggles counters,Class components this.state,"const [count, setCount] = useState(0)",this.state = { count: 0 },Medium,https://react.dev/reference/react/useState
|
||||
2,State,Lift state up when needed,Share state between siblings by lifting to parent,Lift shared state to common ancestor,Prop drilling through many levels,Parent holds state passes down,Deep prop chains,Medium,https://react.dev/learn/sharing-state-between-components
|
||||
3,State,Use useReducer for complex state,Complex state logic benefits from reducer pattern,useReducer for state with multiple sub-values,Multiple useState for related values,useReducer with action types,5+ useState calls that update together,Medium,https://react.dev/reference/react/useReducer
|
||||
4,State,Avoid unnecessary state,Derive values from existing state when possible,Compute derived values in render,Store derivable values in state,const total = items.reduce(...),"const [total, setTotal] = useState(0)",High,https://react.dev/learn/choosing-the-state-structure
|
||||
5,State,Initialize state lazily,Use function form for expensive initial state,useState(() => computeExpensive()),useState(computeExpensive()),useState(() => JSON.parse(data)),useState(JSON.parse(data)),Medium,https://react.dev/reference/react/useState#avoiding-recreating-the-initial-state
|
||||
6,Effects,Clean up effects,Return cleanup function for subscriptions timers,Return cleanup function in useEffect,No cleanup for subscriptions,useEffect(() => { sub(); return unsub; }),useEffect(() => { subscribe(); }),High,https://react.dev/reference/react/useEffect#connecting-to-an-external-system
|
||||
7,Effects,Specify dependencies correctly,Include all values used inside effect in deps array,All referenced values in dependency array,Empty deps with external references,[value] when using value in effect,[] when using props/state in effect,High,https://react.dev/reference/react/useEffect#specifying-reactive-dependencies
|
||||
8,Effects,Avoid unnecessary effects,Don't use effects for transforming data or events,Transform data during render handle events directly,useEffect for derived state or event handling,const filtered = items.filter(...),useEffect(() => setFiltered(items.filter(...))),High,https://react.dev/learn/you-might-not-need-an-effect
|
||||
9,Effects,Use refs for non-reactive values,Store values that don't trigger re-renders in refs,useRef for interval IDs DOM elements,useState for values that don't need render,const intervalRef = useRef(null),"const [intervalId, setIntervalId] = useState()",Medium,https://react.dev/reference/react/useRef
|
||||
10,Rendering,Use keys properly,Stable unique keys for list items,Use stable IDs as keys,Array index as key for dynamic lists,key={item.id},key={index},High,https://react.dev/learn/rendering-lists#keeping-list-items-in-order-with-key
|
||||
11,Rendering,Memoize expensive calculations,Use useMemo for costly computations,useMemo for expensive filtering/sorting,Recalculate every render,"useMemo(() => expensive(), [deps])",const result = expensiveCalc(),Medium,https://react.dev/reference/react/useMemo
|
||||
12,Rendering,Memoize callbacks passed to children,Use useCallback for functions passed as props,useCallback for handlers passed to memoized children,New function reference every render,"useCallback(() => {}, [deps])",const handler = () => {},Medium,https://react.dev/reference/react/useCallback
|
||||
13,Rendering,Use React.memo wisely,Wrap components that render often with same props,memo for pure components with stable props,memo everything or nothing,memo(ExpensiveList),memo(SimpleButton),Low,https://react.dev/reference/react/memo
|
||||
14,Rendering,Avoid inline object/array creation in JSX,Create objects outside render or memoize,Define style objects outside component,Inline objects in props,<div style={styles.container}>,<div style={{ margin: 10 }}>,Medium,
|
||||
15,Components,Keep components small and focused,Single responsibility for each component,One concern per component,Large multi-purpose components,<UserAvatar /><UserName />,<UserCard /> with 500 lines,Medium,
|
||||
16,Components,Use composition over inheritance,Compose components using children and props,Use children prop for flexibility,Inheritance hierarchies,<Card>{content}</Card>,class SpecialCard extends Card,Medium,https://react.dev/learn/thinking-in-react
|
||||
17,Components,Colocate related code,Keep related components and hooks together,Related files in same directory,Flat structure with many files,components/User/UserCard.tsx,components/UserCard.tsx + hooks/useUser.ts,Low,
|
||||
18,Components,Use fragments to avoid extra DOM,Fragment or <> for multiple elements without wrapper,<> for grouping without DOM node,Extra div wrappers,<>{items.map(...)}</>,<div>{items.map(...)}</div>,Low,https://react.dev/reference/react/Fragment
|
||||
19,Props,Destructure props,Destructure props for cleaner component code,Destructure in function signature,props.name props.value throughout,"function User({ name, age })",function User(props),Low,
|
||||
20,Props,Provide default props values,Use default parameters or defaultProps,Default values in destructuring,Undefined checks throughout,function Button({ size = 'md' }),if (size === undefined) size = 'md',Low,
|
||||
21,Props,Avoid prop drilling,Use context or composition for deeply nested data,Context for global data composition for UI,Passing props through 5+ levels,<UserContext.Provider>,<A user={u}><B user={u}><C user={u}>,Medium,https://react.dev/learn/passing-data-deeply-with-context
|
||||
22,Props,Validate props with TypeScript,Use TypeScript interfaces for prop types,interface Props { name: string },PropTypes or no validation,interface ButtonProps { onClick: () => void },Button.propTypes = {},Medium,
|
||||
23,Events,Use synthetic events correctly,React normalizes events across browsers,e.preventDefault() e.stopPropagation(),Access native event unnecessarily,onClick={(e) => e.preventDefault()},onClick={(e) => e.nativeEvent.preventDefault()},Low,https://react.dev/reference/react-dom/components/common#react-event-object
|
||||
24,Events,Avoid binding in render,Use arrow functions in class or hooks,Arrow functions in functional components,bind in render or constructor,const handleClick = () => {},this.handleClick.bind(this),Medium,
|
||||
25,Events,Pass event handlers not call results,Pass function reference not invocation,onClick={handleClick},onClick={handleClick()} causing immediate call,onClick={handleClick},onClick={handleClick()},High,
|
||||
26,Forms,Controlled components for forms,Use state to control form inputs,value + onChange for inputs,Uncontrolled inputs with refs,<input value={val} onChange={setVal}>,<input ref={inputRef}>,Medium,https://react.dev/reference/react-dom/components/input#controlling-an-input-with-a-state-variable
|
||||
27,Forms,Handle form submission properly,Prevent default and handle in submit handler,onSubmit with preventDefault,onClick on submit button only,<form onSubmit={handleSubmit}>,<button onClick={handleSubmit}>,Medium,
|
||||
28,Forms,Debounce rapid input changes,Debounce search/filter inputs,useDeferredValue or debounce for search,Filter on every keystroke,useDeferredValue(searchTerm),useEffect filtering on every change,Medium,https://react.dev/reference/react/useDeferredValue
|
||||
29,Hooks,Follow rules of hooks,Only call hooks at top level and in React functions,Hooks at component top level,Hooks in conditions loops or callbacks,"const [x, setX] = useState()","if (cond) { const [x, setX] = useState() }",High,https://react.dev/reference/rules/rules-of-hooks
|
||||
30,Hooks,Custom hooks for reusable logic,Extract shared stateful logic to custom hooks,useCustomHook for reusable patterns,Duplicate hook logic across components,const { data } = useFetch(url),Duplicate useEffect/useState in components,Medium,https://react.dev/learn/reusing-logic-with-custom-hooks
|
||||
31,Hooks,Name custom hooks with use prefix,Custom hooks must start with use,useFetch useForm useAuth,fetchData or getData for hook,function useFetch(url),function fetchData(url),High,
|
||||
32,Context,Use context for global data,Context for theme auth locale,Context for app-wide state,Context for frequently changing data,<ThemeContext.Provider>,Context for form field values,Medium,https://react.dev/learn/passing-data-deeply-with-context
|
||||
33,Context,Split contexts by concern,Separate contexts for different domains,ThemeContext + AuthContext,One giant AppContext,<ThemeProvider><AuthProvider>,<AppProvider value={{theme user...}}>,Medium,
|
||||
34,Context,Memoize context values,Prevent unnecessary re-renders with useMemo,useMemo for context value object,New object reference every render,"value={useMemo(() => ({...}), [])}","value={{ user, theme }}",High,
|
||||
35,Performance,Use React DevTools Profiler,Profile to identify performance bottlenecks,Profile before optimizing,Optimize without measuring,React DevTools Profiler,Guessing at bottlenecks,Medium,https://react.dev/learn/react-developer-tools
|
||||
36,Performance,Lazy load components,Use React.lazy for code splitting,lazy() for routes and heavy components,Import everything upfront,const Page = lazy(() => import('./Page')),import Page from './Page',Medium,https://react.dev/reference/react/lazy
|
||||
37,Performance,Virtualize long lists,Use windowing for lists over 100 items,react-window or react-virtual,Render thousands of DOM nodes,<VirtualizedList items={items}/>,{items.map(i => <Item />)},High,
|
||||
38,Performance,Batch state updates,React 18 auto-batches but be aware,Let React batch related updates,Manual batching with flushSync,setA(1); setB(2); // batched,flushSync(() => setA(1)),Low,https://react.dev/learn/queueing-a-series-of-state-updates
|
||||
39,ErrorHandling,Use error boundaries,Catch JavaScript errors in component tree,ErrorBoundary wrapping sections,Let errors crash entire app,<ErrorBoundary><App/></ErrorBoundary>,No error handling,High,https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary
|
||||
40,ErrorHandling,Handle async errors,Catch errors in async operations,try/catch in async handlers,Unhandled promise rejections,try { await fetch() } catch(e) {},await fetch() // no catch,High,
|
||||
41,Testing,Test behavior not implementation,Test what user sees and does,Test renders and interactions,Test internal state or methods,expect(screen.getByText('Hello')),expect(component.state.name),Medium,https://testing-library.com/docs/react-testing-library/intro/
|
||||
42,Testing,Use testing-library queries,Use accessible queries,getByRole getByLabelText,getByTestId for everything,getByRole('button'),getByTestId('submit-btn'),Medium,https://testing-library.com/docs/queries/about#priority
|
||||
43,Accessibility,Use semantic HTML,Proper HTML elements for their purpose,button for clicks nav for navigation,div with onClick for buttons,<button onClick={...}>,<div onClick={...}>,High,https://react.dev/reference/react-dom/components#all-html-components
|
||||
44,Accessibility,Manage focus properly,Handle focus for modals dialogs,Focus trap in modals return focus on close,No focus management,useEffect to focus input,Modal without focus trap,High,
|
||||
45,Accessibility,Announce dynamic content,Use ARIA live regions for updates,aria-live for dynamic updates,Silent updates to screen readers,"<div aria-live=""polite"">{msg}</div>",<div>{msg}</div>,Medium,
|
||||
46,Accessibility,Label form controls,Associate labels with inputs,htmlFor matching input id,Placeholder as only label,"<label htmlFor=""email"">Email</label>","<input placeholder=""Email""/>",High,
|
||||
47,TypeScript,Type component props,Define interfaces for all props,interface Props with all prop types,any or missing types,interface Props { name: string },function Component(props: any),High,
|
||||
48,TypeScript,Type state properly,Provide types for useState,useState<Type>() for complex state,Inferred any types,useState<User | null>(null),useState(null),Medium,
|
||||
49,TypeScript,Type event handlers,Use React event types,React.ChangeEvent<HTMLInputElement>,Generic Event type,onChange: React.ChangeEvent<HTMLInputElement>,onChange: Event,Medium,
|
||||
50,TypeScript,Use generics for reusable components,Generic components for flexible typing,Generic props for list components,Union types for flexibility,<List<T> items={T[]}>,<List items={any[]}>,Medium,
|
||||
51,Patterns,Container/Presentational split,Separate data logic from UI,Container fetches presentational renders,Mixed data and UI in one,<UserContainer><UserView/></UserContainer>,<User /> with fetch and render,Low,
|
||||
52,Patterns,Render props for flexibility,Share code via render prop pattern,Render prop for customizable rendering,Duplicate logic across components,<DataFetcher render={data => ...}/>,Copy paste fetch logic,Low,https://react.dev/reference/react/cloneElement#passing-data-with-a-render-prop
|
||||
53,Patterns,Compound components,Related components sharing state,Tab + TabPanel sharing context,Prop drilling between related,<Tabs><Tab/><TabPanel/></Tabs>,<Tabs tabs={[]} panels={[...]}/>,Low,
|
||||
|
@@ -0,0 +1,61 @@
|
||||
No,Category,Guideline,Description,Do,Don't,Code Good,Code Bad,Severity,Docs URL
|
||||
1,Setup,Use CLI for installation,Install components via shadcn CLI for proper setup,npx shadcn@latest add component-name,Manual copy-paste from docs,npx shadcn@latest add button,Copy component code manually,High,https://ui.shadcn.com/docs/cli
|
||||
2,Setup,Initialize project properly,Run init command to set up components.json and globals.css,npx shadcn@latest init before adding components,Skip init and add components directly,npx shadcn@latest init,npx shadcn@latest add button (without init),High,https://ui.shadcn.com/docs/installation
|
||||
3,Setup,Configure path aliases,Set up proper import aliases in tsconfig and components.json,Use @/components/ui path aliases,Relative imports like ../../components,import { Button } from "@/components/ui/button",import { Button } from "../../components/ui/button",Medium,https://ui.shadcn.com/docs/installation
|
||||
4,Theming,Use CSS variables for colors,Define colors as CSS variables in globals.css for theming,CSS variables in :root and .dark,Hardcoded color values in components,bg-primary text-primary-foreground,bg-blue-500 text-white,High,https://ui.shadcn.com/docs/theming
|
||||
5,Theming,Follow naming convention,Use semantic color names with foreground pattern,primary/primary-foreground secondary/secondary-foreground,Generic color names,--primary --primary-foreground,--blue --light-blue,Medium,https://ui.shadcn.com/docs/theming
|
||||
6,Theming,Support dark mode,Include .dark class styles for all custom CSS,Define both :root and .dark color schemes,Only light mode colors,.dark { --background: 240 10% 3.9%; },No .dark class styles,High,https://ui.shadcn.com/docs/dark-mode
|
||||
7,Components,Use component variants,Leverage cva variants for consistent styling,Use variant prop for different styles,Inline conditional classes,<Button variant="destructive">,<Button className={isError ? "bg-red-500" : "bg-blue-500"}>,Medium,https://ui.shadcn.com/docs/components/button
|
||||
8,Components,Compose with className,Add custom classes via className prop for overrides,Extend with className for one-off customizations,Modify component source directly,<Button className="w-full">,Edit button.tsx to add w-full,Medium,https://ui.shadcn.com/docs/components/button
|
||||
9,Components,Use size variants consistently,Apply size prop for consistent sizing across components,size="sm" size="lg" for sizing,Mix size classes inconsistently,<Button size="lg">,<Button className="text-lg px-8 py-4">,Medium,https://ui.shadcn.com/docs/components/button
|
||||
10,Components,Prefer compound components,Use provided sub-components for complex UI,Card + CardHeader + CardContent pattern,Single component with many props,<Card><CardHeader><CardTitle>,<Card title="x" content="y" footer="z">,Medium,https://ui.shadcn.com/docs/components/card
|
||||
11,Dialog,Use Dialog for modal content,Dialog component for overlay modal windows,Dialog for confirmations forms details,Alert for modal content,<Dialog><DialogContent>,<Alert> styled as modal,High,https://ui.shadcn.com/docs/components/dialog
|
||||
12,Dialog,Handle dialog state properly,Use open and onOpenChange for controlled dialogs,Controlled state with useState,Uncontrolled with default open only,"<Dialog open={open} onOpenChange={setOpen}>","<Dialog defaultOpen={true}>",Medium,https://ui.shadcn.com/docs/components/dialog
|
||||
13,Dialog,Include proper dialog structure,Use DialogHeader DialogTitle DialogDescription,Complete semantic structure,Missing title or description,<DialogHeader><DialogTitle><DialogDescription>,<DialogContent><p>Content</p></DialogContent>,High,https://ui.shadcn.com/docs/components/dialog
|
||||
14,Sheet,Use Sheet for side panels,Sheet component for slide-out panels and drawers,Sheet for navigation filters settings,Dialog for side content,<Sheet side="right">,<Dialog> with slide animation,Medium,https://ui.shadcn.com/docs/components/sheet
|
||||
15,Sheet,Specify sheet side,Set side prop for sheet slide direction,Explicit side="left" or side="right",Default side without consideration,<Sheet><SheetContent side="left">,<Sheet><SheetContent>,Low,https://ui.shadcn.com/docs/components/sheet
|
||||
16,Form,Use Form with react-hook-form,Integrate Form component with react-hook-form for validation,useForm + Form + FormField pattern,Custom form handling without Form,<Form {...form}><FormField control={form.control}>,<form onSubmit={handleSubmit}>,High,https://ui.shadcn.com/docs/components/form
|
||||
17,Form,Use FormField for inputs,Wrap inputs in FormField for proper labeling and errors,FormField + FormItem + FormLabel + FormControl,Input without FormField wrapper,<FormField><FormItem><FormLabel><FormControl><Input>,<Input onChange={...}>,High,https://ui.shadcn.com/docs/components/form
|
||||
18,Form,Display form messages,Use FormMessage for validation error display,FormMessage after FormControl,Custom error text without FormMessage,<FormControl><Input/></FormControl><FormMessage/>,<Input/>{error && <span>{error}</span>},Medium,https://ui.shadcn.com/docs/components/form
|
||||
19,Form,Use Zod for validation,Define form schema with Zod for type-safe validation,zodResolver with form schema,Manual validation logic,zodResolver(formSchema),validate: (values) => { if (!values.email) },Medium,https://ui.shadcn.com/docs/components/form
|
||||
20,Select,Use Select for dropdowns,Select component for option selection,Select for choosing from list,Native select element,<Select><SelectTrigger><SelectContent>,<select><option>,Medium,https://ui.shadcn.com/docs/components/select
|
||||
21,Select,Structure Select properly,Include Trigger Value Content and Items,Complete Select structure,Missing SelectValue or SelectContent,<SelectTrigger><SelectValue/></SelectTrigger><SelectContent><SelectItem>,<Select><option>,High,https://ui.shadcn.com/docs/components/select
|
||||
22,Command,Use Command for search,Command component for searchable lists and palettes,Command for command palette search,Input with custom dropdown,<Command><CommandInput><CommandList>,<Input><div className="dropdown">,Medium,https://ui.shadcn.com/docs/components/command
|
||||
23,Command,Group command items,Use CommandGroup for categorized items,CommandGroup with heading for sections,Flat list without grouping,<CommandGroup heading="Suggestions"><CommandItem>,<CommandItem> without groups,Low,https://ui.shadcn.com/docs/components/command
|
||||
24,Table,Use Table for data display,Table component for structured data,Table for tabular data display,Div grid for table-like layouts,<Table><TableHeader><TableBody><TableRow>,<div className="grid">,Medium,https://ui.shadcn.com/docs/components/table
|
||||
25,Table,Include proper table structure,Use TableHeader TableBody TableRow TableCell,Semantic table structure,Missing thead or tbody,<TableHeader><TableRow><TableHead>,<Table><TableRow> without header,High,https://ui.shadcn.com/docs/components/table
|
||||
26,DataTable,Use DataTable for complex tables,Combine Table with TanStack Table for features,DataTable pattern for sorting filtering pagination,Custom table implementation,useReactTable + Table components,Custom sort filter pagination logic,Medium,https://ui.shadcn.com/docs/components/data-table
|
||||
27,Tabs,Use Tabs for content switching,Tabs component for tabbed interfaces,Tabs for related content sections,Custom tab implementation,<Tabs><TabsList><TabsTrigger><TabsContent>,<div onClick={() => setTab(...)},Medium,https://ui.shadcn.com/docs/components/tabs
|
||||
28,Tabs,Set default tab value,Specify defaultValue for initial tab,defaultValue on Tabs component,No default leaving first tab,<Tabs defaultValue="account">,<Tabs> without defaultValue,Low,https://ui.shadcn.com/docs/components/tabs
|
||||
29,Accordion,Use Accordion for collapsible,Accordion for expandable content sections,Accordion for FAQ settings panels,Custom collapse implementation,<Accordion><AccordionItem><AccordionTrigger>,<div onClick={() => setOpen(!open)}>,Medium,https://ui.shadcn.com/docs/components/accordion
|
||||
30,Accordion,Choose accordion type,Use type="single" or type="multiple" appropriately,type="single" for one open type="multiple" for many,Default type without consideration,<Accordion type="single" collapsible>,<Accordion> without type,Low,https://ui.shadcn.com/docs/components/accordion
|
||||
31,Toast,Use Sonner for toasts,Sonner integration for toast notifications,toast() from sonner for notifications,Custom toast implementation,toast("Event created"),setShowToast(true),Medium,https://ui.shadcn.com/docs/components/sonner
|
||||
32,Toast,Add Toaster to layout,Include Toaster component in root layout,<Toaster /> in app layout,Toaster in individual pages,app/layout.tsx: <Toaster />,page.tsx: <Toaster />,High,https://ui.shadcn.com/docs/components/sonner
|
||||
33,Toast,Use toast variants,Apply toast.success toast.error for context,Semantic toast methods,Generic toast for all messages,toast.success("Saved!") toast.error("Failed"),toast("Saved!") toast("Failed"),Medium,https://ui.shadcn.com/docs/components/sonner
|
||||
34,Popover,Use Popover for floating content,Popover for dropdown menus and floating panels,Popover for contextual actions,Absolute positioned divs,<Popover><PopoverTrigger><PopoverContent>,<div className="relative"><div className="absolute">,Medium,https://ui.shadcn.com/docs/components/popover
|
||||
35,Popover,Handle popover alignment,Use align and side props for positioning,Explicit alignment configuration,Default alignment for all,<PopoverContent align="start" side="bottom">,<PopoverContent>,Low,https://ui.shadcn.com/docs/components/popover
|
||||
36,DropdownMenu,Use DropdownMenu for actions,DropdownMenu for action lists and context menus,DropdownMenu for user menu actions,Popover for action lists,<DropdownMenu><DropdownMenuTrigger><DropdownMenuContent>,<Popover> for menu actions,Medium,https://ui.shadcn.com/docs/components/dropdown-menu
|
||||
37,DropdownMenu,Group menu items,Use DropdownMenuGroup and DropdownMenuSeparator,Organized menu with separators,Flat list of items,<DropdownMenuGroup><DropdownMenuItem><DropdownMenuSeparator>,<DropdownMenuItem> without organization,Low,https://ui.shadcn.com/docs/components/dropdown-menu
|
||||
38,Tooltip,Use Tooltip for hints,Tooltip for icon buttons and truncated text,Tooltip for additional context,Title attribute for tooltips,<Tooltip><TooltipTrigger><TooltipContent>,<button title="Delete">,Medium,https://ui.shadcn.com/docs/components/tooltip
|
||||
39,Tooltip,Add TooltipProvider,Wrap app or section in TooltipProvider,TooltipProvider at app level,TooltipProvider per tooltip,<TooltipProvider><App/></TooltipProvider>,<Tooltip><TooltipProvider>,High,https://ui.shadcn.com/docs/components/tooltip
|
||||
40,Skeleton,Use Skeleton for loading,Skeleton component for loading placeholders,Skeleton matching content layout,Spinner for content loading,<Skeleton className="h-4 w-[200px]"/>,<Spinner/> for card loading,Medium,https://ui.shadcn.com/docs/components/skeleton
|
||||
41,Skeleton,Match skeleton dimensions,Size skeleton to match loaded content,Skeleton same size as expected content,Generic skeleton size,<Skeleton className="h-12 w-12 rounded-full"/>,<Skeleton/> without sizing,Medium,https://ui.shadcn.com/docs/components/skeleton
|
||||
42,AlertDialog,Use AlertDialog for confirms,AlertDialog for destructive action confirmation,AlertDialog for delete confirmations,Dialog for confirmations,<AlertDialog><AlertDialogTrigger><AlertDialogContent>,<Dialog> for delete confirmation,High,https://ui.shadcn.com/docs/components/alert-dialog
|
||||
43,AlertDialog,Include action buttons,Use AlertDialogAction and AlertDialogCancel,Standard confirm/cancel pattern,Custom buttons in AlertDialog,<AlertDialogCancel>Cancel</AlertDialogCancel><AlertDialogAction>,<Button>Cancel</Button><Button>Confirm</Button>,Medium,https://ui.shadcn.com/docs/components/alert-dialog
|
||||
44,Sidebar,Use Sidebar for navigation,Sidebar component for app navigation,Sidebar for main app navigation,Custom sidebar implementation,<SidebarProvider><Sidebar><SidebarContent>,<div className="w-64 fixed">,Medium,https://ui.shadcn.com/docs/components/sidebar
|
||||
45,Sidebar,Wrap in SidebarProvider,Use SidebarProvider for sidebar state management,SidebarProvider at layout level,Sidebar without provider,<SidebarProvider><Sidebar></SidebarProvider>,<Sidebar> without provider,High,https://ui.shadcn.com/docs/components/sidebar
|
||||
46,Sidebar,Use SidebarTrigger,Include SidebarTrigger for mobile toggle,SidebarTrigger for responsive toggle,Custom toggle button,<SidebarTrigger/>,<Button onClick={() => toggleSidebar()}>,Medium,https://ui.shadcn.com/docs/components/sidebar
|
||||
47,Chart,Use Chart for data viz,Chart component with Recharts integration,Chart component for dashboards,Direct Recharts without wrapper,<ChartContainer config={chartConfig}>,<ResponsiveContainer><BarChart>,Medium,https://ui.shadcn.com/docs/components/chart
|
||||
48,Chart,Define chart config,Create chartConfig for consistent theming,chartConfig with color definitions,Inline colors in charts,"{ desktop: { label: ""Desktop"", color: ""#2563eb"" } }",<Bar fill="#2563eb"/>,Medium,https://ui.shadcn.com/docs/components/chart
|
||||
49,Chart,Use ChartTooltip,Apply ChartTooltip for interactive charts,ChartTooltip with ChartTooltipContent,Recharts Tooltip directly,<ChartTooltip content={<ChartTooltipContent/>}/>,<Tooltip/> from recharts,Low,https://ui.shadcn.com/docs/components/chart
|
||||
50,Blocks,Use blocks for scaffolding,Start from shadcn blocks for common layouts,npx shadcn@latest add dashboard-01,Build dashboard from scratch,npx shadcn@latest add login-01,Custom login page from scratch,Medium,https://ui.shadcn.com/blocks
|
||||
51,Blocks,Customize block components,Modify copied block code to fit needs,Edit block files after installation,Use blocks without modification,Customize dashboard-01 layout,Use dashboard-01 as-is,Low,https://ui.shadcn.com/blocks
|
||||
52,A11y,Use semantic components,Shadcn components have built-in ARIA,Rely on component accessibility,Override ARIA attributes,<Button> has button role,<div role="button">,High,https://ui.shadcn.com/docs/components/button
|
||||
53,A11y,Maintain focus management,Dialog Sheet handle focus automatically,Let components manage focus,Custom focus handling,<Dialog> traps focus,document.querySelector().focus(),High,https://ui.shadcn.com/docs/components/dialog
|
||||
54,A11y,Provide labels,Use FormLabel and aria-label appropriately,FormLabel for form inputs,Placeholder as only label,<FormLabel>Email</FormLabel><Input/>,<Input placeholder="Email"/>,High,https://ui.shadcn.com/docs/components/form
|
||||
55,Performance,Import components individually,Import only needed components,Named imports from component files,Import all from index,import { Button } from "@/components/ui/button",import { Button Card Dialog } from "@/components/ui",Medium,
|
||||
56,Performance,Lazy load dialogs,Dynamic import for heavy dialog content,React.lazy for dialog content,Import all dialogs upfront,const HeavyContent = lazy(() => import('./Heavy')),import HeavyContent from './Heavy',Medium,
|
||||
57,Customization,Extend variants with cva,Add new variants using class-variance-authority,Extend buttonVariants for new styles,Inline classes for variants,"variants: { size: { xl: ""h-14 px-8"" } }",className="h-14 px-8",Medium,https://ui.shadcn.com/docs/components/button
|
||||
58,Customization,Create custom components,Build new components following shadcn patterns,Use cn() and cva for custom components,Different patterns for custom,const Custom = ({ className }) => <div className={cn("base" className)}>,const Custom = ({ style }) => <div style={style}>,Medium,
|
||||
59,Patterns,Use asChild for composition,asChild prop for component composition,Slot pattern with asChild,Wrapper divs for composition,<Button asChild><Link href="/">,<Button><Link href="/"></Link></Button>,Medium,https://ui.shadcn.com/docs/components/button
|
||||
60,Patterns,Combine with React Hook Form,Form + useForm for complete forms,RHF Controller with shadcn inputs,Custom form state management,<FormField control={form.control} name="email">,<Input value={email} onChange={(e) => setEmail(e.target.value)},High,https://ui.shadcn.com/docs/components/form
|
||||
|
Can't render this file because it contains an unexpected character in line 4 and column 188.
|
@@ -0,0 +1,54 @@
|
||||
No,Category,Guideline,Description,Do,Don't,Code Good,Code Bad,Severity,Docs URL
|
||||
1,Reactivity,Use $: for reactive statements,Automatic dependency tracking,$: for derived values,Manual recalculation,$: doubled = count * 2,let doubled; count && (doubled = count * 2),Medium,https://svelte.dev/docs/svelte-components#script-3-$-marks-a-statement-as-reactive
|
||||
2,Reactivity,Trigger reactivity with assignment,Svelte tracks assignments not mutations,Reassign arrays/objects to trigger update,Mutate without reassignment,"items = [...items, newItem]",items.push(newItem),High,https://svelte.dev/docs/svelte-components#script-2-assignments-are-reactive
|
||||
3,Reactivity,Use $state in Svelte 5,Runes for explicit reactivity,let count = $state(0),Implicit reactivity in Svelte 5,let count = $state(0),let count = 0 (Svelte 5),Medium,https://svelte.dev/blog/runes
|
||||
4,Reactivity,Use $derived for computed values,$derived replaces $: in Svelte 5,let doubled = $derived(count * 2),$: in Svelte 5,let doubled = $derived(count * 2),$: doubled = count * 2 (Svelte 5),Medium,
|
||||
5,Reactivity,Use $effect for side effects,$effect replaces $: side effects,Use $effect for subscriptions,$: for side effects in Svelte 5,$effect(() => console.log(count)),$: console.log(count) (Svelte 5),Medium,
|
||||
6,Props,Export let for props,Declare props with export let,export let propName,Props without export,export let count = 0,let count = 0,High,https://svelte.dev/docs/svelte-components#script-1-export-creates-a-component-prop
|
||||
7,Props,Use $props in Svelte 5,$props rune for prop access,let { name } = $props(),export let in Svelte 5,"let { name, age = 0 } = $props()",export let name; export let age = 0,Medium,
|
||||
8,Props,Provide default values,Default props with assignment,export let count = 0,Required props without defaults,export let count = 0,export let count,Low,
|
||||
9,Props,Use spread props,Pass through unknown props,{...$$restProps} on elements,Manual prop forwarding,<button {...$$restProps}>,<button class={$$props.class}>,Low,https://svelte.dev/docs/basic-markup#attributes-and-props
|
||||
10,Bindings,Use bind: for two-way binding,Simplified input handling,bind:value for inputs,on:input with manual update,<input bind:value={name}>,<input value={name} on:input={e => name = e.target.value}>,Low,https://svelte.dev/docs/element-directives#bind-property
|
||||
11,Bindings,Bind to DOM elements,Reference DOM nodes,bind:this for element reference,querySelector in onMount,<div bind:this={el}>,onMount(() => el = document.querySelector()),Medium,
|
||||
12,Bindings,Use bind:group for radios/checkboxes,Simplified group handling,bind:group for radio/checkbox groups,Manual checked handling,"<input type=""radio"" bind:group={selected}>","<input type=""radio"" checked={selected === value}>",Low,
|
||||
13,Events,Use on: for event handlers,Event directive syntax,on:click={handler},addEventListener in onMount,<button on:click={handleClick}>,onMount(() => btn.addEventListener()),Medium,https://svelte.dev/docs/element-directives#on-eventname
|
||||
14,Events,Forward events with on:event,Pass events to parent,on:click without handler,createEventDispatcher for DOM events,<button on:click>,"dispatch('click', event)",Low,
|
||||
15,Events,Use createEventDispatcher,Custom component events,dispatch for custom events,on:event for custom events,"dispatch('save', { data })",on:save without dispatch,Medium,https://svelte.dev/docs/svelte#createeventdispatcher
|
||||
16,Lifecycle,Use onMount for initialization,Run code after component mounts,onMount for setup and data fetching,Code in script body for side effects,onMount(() => fetchData()),fetchData() in script body,High,https://svelte.dev/docs/svelte#onmount
|
||||
17,Lifecycle,Return cleanup from onMount,Automatic cleanup on destroy,Return function from onMount,Separate onDestroy for paired cleanup,onMount(() => { sub(); return unsub }),onMount(sub); onDestroy(unsub),Medium,
|
||||
18,Lifecycle,Use onDestroy sparingly,Only when onMount cleanup not possible,onDestroy for non-mount cleanup,onDestroy for mount-related cleanup,onDestroy for store unsubscribe,onDestroy(() => clearInterval(id)),Low,
|
||||
19,Lifecycle,Avoid beforeUpdate/afterUpdate,Usually not needed,Reactive statements instead,beforeUpdate for derived state,$: if (x) doSomething(),beforeUpdate(() => doSomething()),Low,
|
||||
20,Stores,Use writable for mutable state,Basic reactive store,writable for shared mutable state,Local variables for shared state,const count = writable(0),let count = 0 in module,Medium,https://svelte.dev/docs/svelte-store#writable
|
||||
21,Stores,Use readable for read-only state,External data sources,readable for derived/external data,writable for read-only data,"readable(0, set => interval(set))",writable(0) for timer,Low,https://svelte.dev/docs/svelte-store#readable
|
||||
22,Stores,Use derived for computed stores,Combine or transform stores,derived for computed values,Manual subscription for derived,"derived(count, $c => $c * 2)",count.subscribe(c => doubled = c * 2),Medium,https://svelte.dev/docs/svelte-store#derived
|
||||
23,Stores,Use $ prefix for auto-subscription,Automatic subscribe/unsubscribe,$storeName in components,Manual subscription,{$count},count.subscribe(c => value = c),High,
|
||||
24,Stores,Clean up custom subscriptions,Unsubscribe when component destroys,Return unsubscribe from onMount,Leave subscriptions open,onMount(() => store.subscribe(fn)),store.subscribe(fn) in script,High,
|
||||
25,Slots,Use slots for composition,Content projection,<slot> for flexible content,Props for all content,<slot>Default</slot>,"<Component content=""text""/>",Medium,https://svelte.dev/docs/special-elements#slot
|
||||
26,Slots,Name slots for multiple areas,Multiple content areas,"<slot name=""header"">",Single slot for complex layouts,"<slot name=""header""><slot name=""footer"">",<slot> with complex conditionals,Low,
|
||||
27,Slots,Check slot content with $$slots,Conditional slot rendering,$$slots.name for conditional rendering,Always render slot wrapper,"{#if $$slots.footer}<slot name=""footer""/>{/if}","<div><slot name=""footer""/></div>",Low,
|
||||
28,Styling,Use scoped styles by default,Styles scoped to component,<style> for component styles,Global styles for component,:global() only when needed,<style> all global,Medium,https://svelte.dev/docs/svelte-components#style
|
||||
29,Styling,Use :global() sparingly,Escape scoping when needed,:global for third-party styling,Global for all styles,:global(.external-lib),<style> without scoping,Medium,
|
||||
30,Styling,Use CSS variables for theming,Dynamic styling,CSS custom properties,Inline styles for themes,"style=""--color: {color}""","style=""color: {color}""",Low,
|
||||
31,Transitions,Use built-in transitions,Svelte transition directives,transition:fade for simple effects,Manual CSS transitions,<div transition:fade>,<div class:fade={visible}>,Low,https://svelte.dev/docs/element-directives#transition-fn
|
||||
32,Transitions,Use in: and out: separately,Different enter/exit animations,in:fly out:fade for asymmetric,Same transition for both,<div in:fly out:fade>,<div transition:fly>,Low,
|
||||
33,Transitions,Add local modifier,Prevent ancestor trigger,transition:fade|local,Global transitions for lists,<div transition:slide|local>,<div transition:slide>,Medium,
|
||||
34,Actions,Use actions for DOM behavior,Reusable DOM logic,use:action for DOM enhancements,onMount for each usage,<div use:clickOutside>,onMount(() => setupClickOutside(el)),Medium,https://svelte.dev/docs/element-directives#use-action
|
||||
35,Actions,Return update and destroy,Lifecycle methods for actions,"Return { update, destroy }",Only initial setup,"return { update(params) {}, destroy() {} }",return destroy only,Medium,
|
||||
36,Actions,Pass parameters to actions,Configure action behavior,use:action={params},Hardcoded action behavior,<div use:tooltip={options}>,<div use:tooltip>,Low,
|
||||
37,Logic,Use {#if} for conditionals,Template conditionals,{#if} {:else if} {:else},Ternary in expressions,{#if cond}...{:else}...{/if},{cond ? a : b} for complex,Low,https://svelte.dev/docs/logic-blocks#if
|
||||
38,Logic,Use {#each} for lists,List rendering,{#each} with key,Map in expression,{#each items as item (item.id)},{items.map(i => `<div>${i}</div>`)},Medium,
|
||||
39,Logic,Always use keys in {#each},Proper list reconciliation,(item.id) for unique key,Index as key or no key,{#each items as item (item.id)},"{#each items as item, i (i)}",High,
|
||||
40,Logic,Use {#await} for promises,Handle async states,{#await} for loading/error states,Manual promise handling,{#await promise}...{:then}...{:catch},{#if loading}...{#if error},Medium,https://svelte.dev/docs/logic-blocks#await
|
||||
41,SvelteKit,Use +page.svelte for routes,File-based routing,+page.svelte for route components,Custom routing setup,routes/about/+page.svelte,routes/About.svelte,Medium,https://kit.svelte.dev/docs/routing
|
||||
42,SvelteKit,Use +page.js for data loading,Load data before render,load function in +page.js,onMount for data fetching,export function load() {},onMount(() => fetchData()),High,https://kit.svelte.dev/docs/load
|
||||
43,SvelteKit,Use +page.server.js for server-only,Server-side data loading,+page.server.js for sensitive data,+page.js for API keys,+page.server.js with DB access,+page.js with DB access,High,
|
||||
44,SvelteKit,Use form actions,Server-side form handling,+page.server.js actions,API routes for forms,export const actions = { default },fetch('/api/submit'),Medium,https://kit.svelte.dev/docs/form-actions
|
||||
45,SvelteKit,Use $app/stores for app state,$page $navigating $updated,$page for current page data,Manual URL parsing,import { page } from '$app/stores',window.location.pathname,Medium,https://kit.svelte.dev/docs/modules#$app-stores
|
||||
46,Performance,Use {#key} for forced re-render,Reset component state,{#key id} for fresh instance,Manual destroy/create,{#key item.id}<Component/>{/key},on:change={() => component = null},Low,https://svelte.dev/docs/logic-blocks#key
|
||||
47,Performance,Avoid unnecessary reactivity,Not everything needs $:,$: only for side effects,$: for simple assignments,$: if (x) console.log(x),$: y = x (when y = x works),Low,
|
||||
48,Performance,Use immutable compiler option,Skip equality checks,immutable: true for large lists,Default for all components,<svelte:options immutable/>,Default without immutable,Low,
|
||||
49,TypeScript,"Use lang=""ts"" in script",TypeScript support,"<script lang=""ts"">",JavaScript for typed projects,"<script lang=""ts"">",<script> with JSDoc,Medium,https://svelte.dev/docs/typescript
|
||||
50,TypeScript,Type props with interface,Explicit prop types,interface $$Props for types,Untyped props,interface $$Props { name: string },export let name,Medium,
|
||||
51,TypeScript,Type events with createEventDispatcher,Type-safe events,createEventDispatcher<Events>(),Untyped dispatch,createEventDispatcher<{ save: Data }>(),createEventDispatcher(),Medium,
|
||||
52,Accessibility,Use semantic elements,Proper HTML in templates,button nav main appropriately,div for everything,<button on:click>,<div on:click>,High,
|
||||
53,Accessibility,Add aria to dynamic content,Accessible state changes,aria-live for updates,Silent dynamic updates,"<div aria-live=""polite"">{message}</div>",<div>{message}</div>,Medium,
|
||||
|
@@ -0,0 +1,51 @@
|
||||
No,Category,Guideline,Description,Do,Don't,Code Good,Code Bad,Severity,Docs URL
|
||||
1,Views,Use struct for views,SwiftUI views are value types,struct MyView: View,class MyView: View,struct ContentView: View { var body: some View },class ContentView: View,High,https://developer.apple.com/documentation/swiftui/view
|
||||
2,Views,Keep views small and focused,Single responsibility for each view,Extract subviews for complex layouts,Large monolithic views,Extract HeaderView FooterView,500+ line View struct,Medium,
|
||||
3,Views,Use body computed property,body returns the view hierarchy,var body: some View { },func body() -> some View,"var body: some View { Text(""Hello"") }",func body() -> Text,High,
|
||||
4,Views,Prefer composition over inheritance,Compose views using ViewBuilder,Combine smaller views,Inheritance hierarchies,VStack { Header() Content() },class SpecialView extends BaseView,Medium,
|
||||
5,State,Use @State for local state,Simple value types owned by view,@State for view-local primitives,@State for shared data,@State private var count = 0,@State var sharedData: Model,High,https://developer.apple.com/documentation/swiftui/state
|
||||
6,State,Use @Binding for two-way data,Pass mutable state to child views,@Binding for child input,@State in child for parent data,@Binding var isOn: Bool,$isOn to pass binding,Medium,https://developer.apple.com/documentation/swiftui/binding
|
||||
7,State,Use @StateObject for reference types,ObservableObject owned by view,@StateObject for view-created objects,@ObservedObject for owned objects,@StateObject private var vm = ViewModel(),@ObservedObject var vm = ViewModel(),High,https://developer.apple.com/documentation/swiftui/stateobject
|
||||
8,State,Use @ObservedObject for injected objects,Reference types passed from parent,@ObservedObject for injected dependencies,@StateObject for injected objects,@ObservedObject var vm: ViewModel,@StateObject var vm: ViewModel (injected),High,https://developer.apple.com/documentation/swiftui/observedobject
|
||||
9,State,Use @EnvironmentObject for shared state,App-wide state injection,@EnvironmentObject for global state,Prop drilling through views,@EnvironmentObject var settings: Settings,Pass settings through 5 views,Medium,https://developer.apple.com/documentation/swiftui/environmentobject
|
||||
10,State,Use @Published in ObservableObject,Automatically publish property changes,@Published for observed properties,Manual objectWillChange calls,@Published var items: [Item] = [],var items: [Item] { didSet { objectWillChange.send() } },Medium,
|
||||
11,Observable,Use @Observable macro (iOS 17+),Modern observation without Combine,@Observable class for view models,ObservableObject for new projects,@Observable class ViewModel { },class ViewModel: ObservableObject,Medium,https://developer.apple.com/documentation/observation
|
||||
12,Observable,Use @Bindable for @Observable,Create bindings from @Observable,@Bindable var vm for bindings,@Binding with @Observable,@Bindable var viewModel,$viewModel.name with @Observable,Medium,
|
||||
13,Layout,Use VStack HStack ZStack,Standard stack-based layouts,Stacks for linear arrangements,GeometryReader for simple layouts,VStack { Text() Image() },GeometryReader for vertical list,Medium,https://developer.apple.com/documentation/swiftui/vstack
|
||||
14,Layout,Use LazyVStack LazyHStack for lists,Lazy loading for performance,Lazy stacks for long lists,Regular stacks for 100+ items,LazyVStack { ForEach(items) },VStack { ForEach(largeArray) },High,https://developer.apple.com/documentation/swiftui/lazyvstack
|
||||
15,Layout,Use GeometryReader sparingly,Only when needed for sizing,GeometryReader for responsive layouts,GeometryReader everywhere,GeometryReader for aspect ratio,GeometryReader wrapping everything,Medium,
|
||||
16,Layout,Use spacing and padding consistently,Consistent spacing throughout app,Design system spacing values,Magic numbers for spacing,.padding(16) or .padding(),".padding(13), .padding(17)",Low,
|
||||
17,Layout,Use frame modifiers correctly,Set explicit sizes when needed,.frame(maxWidth: .infinity),Fixed sizes for responsive content,.frame(maxWidth: .infinity),.frame(width: 375),Medium,
|
||||
18,Modifiers,Order modifiers correctly,Modifier order affects rendering,Background before padding for full coverage,Wrong modifier order,.padding().background(Color.red),.background(Color.red).padding(),High,
|
||||
19,Modifiers,Create custom ViewModifiers,Reusable modifier combinations,ViewModifier for repeated styling,Duplicate modifier chains,struct CardStyle: ViewModifier,.shadow().cornerRadius() everywhere,Medium,https://developer.apple.com/documentation/swiftui/viewmodifier
|
||||
20,Modifiers,Use conditional modifiers carefully,Avoid changing view identity,if-else with same view type,Conditional that changes view identity,Text(title).foregroundColor(isActive ? .blue : .gray),if isActive { Text().bold() } else { Text() },Medium,
|
||||
21,Navigation,Use NavigationStack (iOS 16+),Modern navigation with type-safe paths,NavigationStack with navigationDestination,NavigationView for new projects,NavigationStack { },NavigationView { } (deprecated),Medium,https://developer.apple.com/documentation/swiftui/navigationstack
|
||||
22,Navigation,Use navigationDestination,Type-safe navigation destinations,.navigationDestination(for:),NavigationLink(destination:),.navigationDestination(for: Item.self),NavigationLink(destination: DetailView()),Medium,
|
||||
23,Navigation,Use @Environment for dismiss,Programmatic navigation dismissal,@Environment(\.dismiss) var dismiss,presentationMode (deprecated),@Environment(\.dismiss) var dismiss,@Environment(\.presentationMode),Low,
|
||||
24,Lists,Use List for scrollable content,Built-in scrolling and styling,List for standard scrollable content,ScrollView + VStack for simple lists,List { ForEach(items) { } },ScrollView { VStack { ForEach } },Low,https://developer.apple.com/documentation/swiftui/list
|
||||
25,Lists,Provide stable identifiers,Use Identifiable or explicit id,Identifiable protocol or id parameter,Index as identifier,ForEach(items) where Item: Identifiable,"ForEach(items.indices, id: \.self)",High,
|
||||
26,Lists,Use onDelete and onMove,Standard list editing,onDelete for swipe to delete,Custom delete implementation,.onDelete(perform: delete),.onTapGesture for delete,Low,
|
||||
27,Forms,Use Form for settings,Grouped input controls,Form for settings screens,Manual grouping for forms,Form { Section { Toggle() } },VStack { Toggle() },Low,https://developer.apple.com/documentation/swiftui/form
|
||||
28,Forms,Use @FocusState for keyboard,Manage keyboard focus,@FocusState for text field focus,Manual first responder handling,@FocusState private var isFocused: Bool,UIKit first responder,Medium,https://developer.apple.com/documentation/swiftui/focusstate
|
||||
29,Forms,Validate input properly,Show validation feedback,Real-time validation feedback,Submit without validation,TextField with validation state,TextField without error handling,Medium,
|
||||
30,Async,Use .task for async work,Automatic cancellation on view disappear,.task for view lifecycle async,onAppear with Task,.task { await loadData() },onAppear { Task { await loadData() } },Medium,https://developer.apple.com/documentation/swiftui/view/task(priority:_:)
|
||||
31,Async,Handle loading states,Show progress during async operations,ProgressView during loading,Empty view during load,if isLoading { ProgressView() },No loading indicator,Medium,
|
||||
32,Async,Use @MainActor for UI updates,Ensure UI updates on main thread,@MainActor on view models,Manual DispatchQueue.main,@MainActor class ViewModel,DispatchQueue.main.async,Medium,
|
||||
33,Animation,Use withAnimation,Animate state changes,withAnimation for state transitions,No animation for state changes,withAnimation { isExpanded.toggle() },isExpanded.toggle(),Low,https://developer.apple.com/documentation/swiftui/withanimation(_:_:)
|
||||
34,Animation,Use .animation modifier,Apply animations to views,.animation(.spring()) on view,Manual animation timing,.animation(.easeInOut),CABasicAnimation equivalent,Low,
|
||||
35,Animation,Respect reduced motion,Check accessibility settings,Check accessibilityReduceMotion,Ignore motion preferences,@Environment(\.accessibilityReduceMotion),Always animate regardless,High,
|
||||
36,Preview,Use #Preview macro (Xcode 15+),Modern preview syntax,#Preview for view previews,PreviewProvider protocol,#Preview { ContentView() },struct ContentView_Previews: PreviewProvider,Low,
|
||||
37,Preview,Create multiple previews,Test different states and devices,Multiple previews for states,Single preview only,"#Preview(""Light"") { } #Preview(""Dark"") { }",Single preview configuration,Low,
|
||||
38,Preview,Use preview data,Dedicated preview mock data,Static preview data,Production data in previews,Item.preview for preview,Fetch real data in preview,Low,
|
||||
39,Performance,Avoid expensive body computations,Body should be fast to compute,Precompute in view model,Heavy computation in body,vm.computedValue in body,Complex calculation in body,High,
|
||||
40,Performance,Use Equatable views,Skip unnecessary view updates,Equatable for complex views,Default equality for all views,struct MyView: View Equatable,No Equatable conformance,Medium,
|
||||
41,Performance,Profile with Instruments,Measure before optimizing,Use SwiftUI Instruments,Guess at performance issues,Profile with Instruments,Optimize without measuring,Medium,
|
||||
42,Accessibility,Add accessibility labels,Describe UI elements,.accessibilityLabel for context,Missing labels,".accessibilityLabel(""Close button"")",Button without label,High,https://developer.apple.com/documentation/swiftui/view/accessibilitylabel(_:)-1d7jv
|
||||
43,Accessibility,Support Dynamic Type,Respect text size preferences,Scalable fonts and layouts,Fixed font sizes,.font(.body) with Dynamic Type,.font(.system(size: 16)),High,
|
||||
44,Accessibility,Use semantic views,Proper accessibility traits,Correct accessibilityTraits,Wrong semantic meaning,Button for actions Image for display,Image that acts like button,Medium,
|
||||
45,Testing,Use ViewInspector for testing,Third-party view testing,ViewInspector for unit tests,UI tests only,ViewInspector assertions,Only XCUITest,Medium,
|
||||
46,Testing,Test view models,Unit test business logic,XCTest for view model,Skip view model testing,Test ViewModel methods,No unit tests,Medium,
|
||||
47,Testing,Use preview as visual test,Previews catch visual regressions,Multiple preview configurations,No visual verification,Preview different states,Single preview only,Low,
|
||||
48,Architecture,Use MVVM pattern,Separate view and logic,ViewModel for business logic,Logic in View,ObservableObject ViewModel,@State for complex logic,Medium,
|
||||
49,Architecture,Keep views dumb,Views display view model state,View reads from ViewModel,Business logic in View,view.items from vm.items,Complex filtering in View,Medium,
|
||||
50,Architecture,Use dependency injection,Inject dependencies for testing,Initialize with dependencies,Hard-coded dependencies,init(service: ServiceProtocol),let service = RealService(),Medium,
|
||||
|
@@ -0,0 +1,54 @@
|
||||
Category,Guideline,Description,Do,Don't,Code Good,Code Bad,Severity,Docs URL
|
||||
Setup,CDN Version Lock,Always use Three.js r128 from cdnjs. It is the stable CDN baseline. Never use a floating 'latest' URL — it silently breaks when the CDN updates without warning.,Pin to the exact r128 cdnjs URL in every HTML file,Use unpkg@latest or any unversioned CDN URL that can silently update,"<script src=""https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js""></script>","<script src=""https://unpkg.com/three@latest""></script>",Critical,https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js
|
||||
Setup,CapsuleGeometry Does Not Exist in r128,THREE.CapsuleGeometry was introduced in r142. Using it on the r128 CDN throws 'CapsuleGeometry is not a constructor' and crashes the entire scene. Build a capsule from primitives instead.,Build a capsule from CylinderGeometry plus two SphereGeometry end caps,Call THREE.CapsuleGeometry on r128 — it is undefined and throws immediately,"const body = new THREE.Mesh(new THREE.CylinderGeometry(0.5, 0.5, 1, 16), mat); const topCap = new THREE.Mesh(new THREE.SphereGeometry(0.5, 16, 8), mat); const botCap = new THREE.Mesh(new THREE.SphereGeometry(0.5, 16, 8), mat); topCap.position.y = 0.5; botCap.position.y = -0.5; const group = new THREE.Group(); group.add(body, topCap, botCap);","const cap = new THREE.CapsuleGeometry(0.5, 1, 4, 8); // TypeError: CapsuleGeometry is not a constructor on r128",Critical,https://threejs.org/docs/#api/en/geometries/CapsuleGeometry
|
||||
Setup,OrbitControls Must Be Loaded Separately,OrbitControls is NOT bundled in the core Three.js r128 CDN file. It lives in examples/js and must be loaded from a separate cdnjs script tag. THREE.OrbitControls is undefined without it.,Load the OrbitControls script from cdnjs examples path before your scene script,Expect THREE.OrbitControls to exist after loading only the core Three.js CDN script,"<!-- Load AFTER core Three.js script --> <script src=""https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/examples/js/controls/OrbitControls.min.js""></script>","<!-- Core only loaded — OrbitControls undefined --> <script src=""https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js""></script>",Critical,https://cdnjs.com/libraries/three.js/r128
|
||||
Setup,Custom Drag Orbit Fallback,When OrbitControls cannot be loaded implement spherical orbit using mousedown/mousemove/mouseup. The key is rotating in spherical coordinates so both horizontal AND vertical drag work correctly.,Rotate camera in spherical coordinates so both axes respond correctly to drag,Move camera.position.x directly — vertical drag is silently ignored and the orbit is incorrect,"let dragging = false; let prev = { x: 0, y: 0 }; const radius = camera.position.length(); let theta = 0; let phi = Math.PI / 2; canvas.addEventListener('mousedown', () => dragging = true); canvas.addEventListener('mouseup', () => dragging = false); canvas.addEventListener('mousemove', e => { if (!dragging) return; theta -= (e.clientX - prev.x) * 0.005; phi = Math.max(0.1, Math.min(Math.PI - 0.1, phi - (e.clientY - prev.y) * 0.005)); camera.position.set(radius * Math.sin(phi) * Math.sin(theta), radius * Math.cos(phi), radius * Math.sin(phi) * Math.cos(theta)); camera.lookAt(scene.position); prev = { x: e.clientX, y: e.clientY }; });","let dragging = false; let prev = { x: 0, y: 0 }; canvas.addEventListener('mousemove', e => { if (!dragging) return; camera.position.x += (e.clientX - prev.x) * 0.005; camera.lookAt(scene.position); prev = { x: e.clientX, y: e.clientY }; }); // BUG: Y-drag ignored; orbit is a horizontal slide not a sphere",High,https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent
|
||||
Setup,ESM vs CDN Import,When using a bundler import Three.js as an ES module. When using CDN the THREE global is already available — do not import it again. Mixing both loads Three.js twice and causes subtle runtime errors.,Match import style to build environment: ESM import for bundlers; rely on the window.THREE global for CDN pages,Mix a CDN script tag with an ES module import in the same file,"// Bundler project (Vite / webpack): import * as THREE from 'three'; // CDN project — no import needed; THREE is already global after the script tag","<!-- CDN script --> <script src=""r128.cdn""></script> <script type=""module""> import * as THREE from 'three'; // loads Three.js twice — version mismatch risk </script>",Critical,https://threejs.org/docs/#manual/en/introduction/Installation
|
||||
Setup,Single Renderer Per Page,Create one WebGLRenderer instance for the lifetime of the page. Multiple renderers compete for the browser GPU context limit (8–16 contexts) and cause context-lost errors especially on mobile.,Reuse a single renderer and swap scene content instead of recreating the renderer,Create a new renderer on each component mount or scene transition,"const renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true }); renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2)); renderer.setSize(canvas.clientWidth, canvas.clientHeight); // renderer lives for the page lifetime","function showScene() { const renderer = new THREE.WebGLRenderer(); document.body.appendChild(renderer.domElement); } showScene(); showScene(); // two GPU contexts — crashes on mobile",Critical,https://threejs.org/docs/#api/en/renderers/WebGLRenderer
|
||||
Setup,Pixel Ratio Cap at 2,Cap devicePixelRatio at 2. Retina displays report 3x or higher. Going from 2x to 3x multiplies pixel count by 2.25x with no visible quality improvement at normal viewing distance.,"Apply Math.min(window.devicePixelRatio, 2) — cap is at 2 not at 3",Pass window.devicePixelRatio directly without any cap,"renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));",renderer.setPixelRatio(window.devicePixelRatio); // 3x display = 9 pixels per CSS pixel = 2.25x GPU cost for zero quality gain,High,https://threejs.org/docs/#api/en/renderers/WebGLRenderer.setPixelRatio
|
||||
Setup,Alpha Canvas Plus CSS Background,Set alpha:true on the renderer and control the background color through CSS rather than a renderer clear color. This composites the canvas correctly over any HTML content behind it.,Set alpha:true on renderer and let body or a parent div provide the background color,Set a solid renderer clear color when the canvas must composite over HTML behind it,"const renderer = new THREE.WebGLRenderer({ alpha: true }); renderer.setClearColor(0x000000, 0); // fully transparent canvas // body { background: #0d0d0d; } handles the visible color","renderer.setClearColor(0x111827); // fully opaque — HTML behind the canvas is blocked",Medium,https://threejs.org/docs/#api/en/renderers/WebGLRenderer.setClearColor
|
||||
Camera,Aspect Ratio on Resize,Always update camera.aspect and call camera.updateProjectionMatrix() inside every resize handler. A stale aspect ratio causes the entire scene to appear stretched or squashed horizontally.,Update camera.aspect then call updateProjectionMatrix() on every resize,Let aspect ratio become stale after the browser window changes size,"window.addEventListener('resize', () => { camera.aspect = canvas.clientWidth / canvas.clientHeight; camera.updateProjectionMatrix(); renderer.setSize(canvas.clientWidth, canvas.clientHeight); });","// No resize handler — scene stretches to fill a wider window without correcting the projection",High,https://threejs.org/docs/#api/en/cameras/PerspectiveCamera
|
||||
Camera,FOV Range 45 to 75,Use a field of view between 45 and 75 degrees. Below 45 creates compressed telephoto distortion. Above 90 creates visible fisheye distortion at frame edges.,Start at 75 for general interactive scenes; use 45–55 for product close-ups,Use FOV above 90 or below 30 without a deliberate artistic reason,"const camera = new THREE.PerspectiveCamera(75, aspect, 0.1, 1000); // general const camera = new THREE.PerspectiveCamera(50, aspect, 0.1, 1000); // product shot","const camera = new THREE.PerspectiveCamera(120, aspect, 0.1, 1000); // fisheye distortion at all edges",Medium,https://threejs.org/docs/#api/en/cameras/PerspectiveCamera
|
||||
Camera,Explicit Position and lookAt,Always set an explicit camera position and call camera.lookAt() before the first render. The default camera at the origin pointing down -Z makes subjects at arbitrary coordinates invisible or tiny.,Set camera.position.set() and camera.lookAt() to frame the subject before the first render,Leave the camera at default position (0 0 0) with no lookAt — subject may be behind the camera or microscopic,"camera.position.set(0, 1.5, 5); camera.lookAt(new THREE.Vector3(0, 0, 0));","// No position or lookAt set — subject at y:2 is behind or above the default camera view",Medium,https://threejs.org/docs/#api/en/cameras/Camera.lookAt
|
||||
Camera,OrbitControls vs GSAP Camera Rig,Use OrbitControls for model viewers and exploratory scenes where the user needs free-look. Use a GSAP scroll-driven camera rig for product reveals or storytelling where the camera path must stay fixed.,Match camera control approach to the UX intent of the scene,Use OrbitControls for a scripted reveal — users can orbit away from the reveal before it completes,"// Scroll storytelling — GSAP controls the path: gsap.to(camera.position, { z: 2, scrollTrigger: { trigger: '.scene', scrub: 1 } }); // Free-look model viewer — OrbitControls: const controls = new THREE.OrbitControls(camera, renderer.domElement); controls.enableDamping = true; // call controls.update() in animate()","// Scripted product reveal: const controls = new THREE.OrbitControls(camera, renderer.domElement); // user can rotate away before the animation completes",High,https://threejs.org/docs/#examples/en/controls/OrbitControls
|
||||
Geometry,Never Create Geometry Per Frame,Creating a new geometry inside animate() allocates a fresh GPU buffer every frame and exhausts VRAM within seconds. Create all geometry exactly once before the loop starts. Use attribute mutation if positions must change per frame.,Create all geometry before the animation loop; mutate BufferAttribute arrays in-place if needed,Call any new XxxGeometry() constructor inside the animation loop,"const geo = new THREE.SphereGeometry(1, 32, 32); // created once const mesh = new THREE.Mesh(geo, mat); scene.add(mesh); const clock = new THREE.Clock(); function animate() { requestAnimationFrame(animate); mesh.rotation.y += clock.getDelta() * 0.8; // delta time renderer.render(scene, camera); }","function animate() { requestAnimationFrame(animate); const geo = new THREE.BoxGeometry(1, 1, 1); // NEW GPU buffer every frame — VRAM exhaustion }",Critical,https://threejs.org/docs/#api/en/core/BufferGeometry
|
||||
Geometry,Share Geometry Across Meshes,When multiple objects share the same shape create one geometry instance and pass it to every Mesh. Each Mesh gets its own transform and material while all share a single GPU buffer.,Create one geometry and pass the same reference to every Mesh constructor,Create a separate identical geometry inside a loop for each object,"const geo = new THREE.BoxGeometry(1, 1, 1); // one GPU buffer for (let i = 0; i < 200; i++) { const m = new THREE.Mesh(geo, mat); m.position.set(Math.random() * 10, 0, Math.random() * 10); scene.add(m); }","for (let i = 0; i < 200; i++) { const geo = new THREE.BoxGeometry(1, 1, 1); // 200 separate GPU buffers scene.add(new THREE.Mesh(geo, mat)); }",Critical,https://threejs.org/docs/#api/en/core/BufferGeometry
|
||||
Geometry,dispose on Scene Removal,Call geometry.dispose() and material.dispose() and texture.dispose() for every texture map when removing objects from the scene. Three.js never releases GPU resources automatically — they stay in VRAM until explicitly freed.,Dispose of geometry + material + every texture map before calling scene.remove(),Call scene.remove() alone without any dispose calls,"function removeMesh(mesh) { scene.remove(mesh); mesh.geometry.dispose(); if (mesh.material.map) mesh.material.map.dispose(); if (mesh.material.normalMap) mesh.material.normalMap.dispose(); mesh.material.dispose(); }","scene.remove(mesh); // geometry and all texture maps stay in GPU VRAM forever",Critical,https://threejs.org/docs/#api/en/core/BufferGeometry.dispose
|
||||
Geometry,Segment Count Budget,Use the minimum segment count that achieves the desired silhouette quality. Hero objects: 32–64 segments. Background objects: 8–16. Particle stand-ins: 6–8. High counts on background geometry waste GPU draw calls with zero visible benefit.,Apply a tiered segment budget based on the visual priority of each object in the scene,Default every sphere and cylinder to 64+ segments regardless of its role,"const bgSphere = new THREE.SphereGeometry(0.5, 8, 8); // background const heroSphere = new THREE.SphereGeometry(1, 64, 64); // foreground product","const particleSphere = new THREE.SphereGeometry(0.1, 64, 64); // 64 segments × 1000 particles = massive overdraw",Medium,https://threejs.org/docs/#api/en/geometries/SphereGeometry
|
||||
Geometry,BufferGeometry for Custom Vertex Data,For any custom shape use BufferGeometry with setAttribute('position' ...) and a Float32Array. The legacy THREE.Geometry class was removed in r125 and throws ReferenceError in r128.,Use THREE.BufferGeometry with a Float32Array position attribute for custom vertex data,Reference or instantiate the removed THREE.Geometry class,"const geo = new THREE.BufferGeometry(); geo.setAttribute('position', new THREE.BufferAttribute(new Float32Array(vertices), 3)); geo.setAttribute('normal', new THREE.BufferAttribute(new Float32Array(normals), 3));","const geo = new THREE.Geometry(); geo.vertices.push(new THREE.Vector3(0, 0, 0)); // ReferenceError: Geometry is not defined in r128",High,https://threejs.org/docs/#api/en/core/BufferGeometry
|
||||
Materials,MeshBasicMaterial vs MeshStandardMaterial,MeshBasicMaterial ignores all lights and is significantly cheaper — use it for UI overlays HUDs and flat-colored decorative elements. MeshStandardMaterial is PBR-accurate and requires lights. Never use StandardMaterial where BasicMaterial suffices.,Use MeshBasicMaterial for any object that does not need lighting; use MeshStandardMaterial for physical objects,Apply MeshStandardMaterial to flat UI elements that never receive light — lights still run for them,"const uiMat = new THREE.MeshBasicMaterial({ color: 0xffffff }); // no lighting cost const physMat = new THREE.MeshStandardMaterial({ color: 0x4f46e5, roughness: 0.4, metalness: 0.6 });","const mat = new THREE.MeshStandardMaterial({ color: 0xffffff }); // on a 2D HUD card — lighting calculation runs with no visual benefit",Medium,https://threejs.org/docs/#api/en/materials/MeshStandardMaterial
|
||||
Materials,Share Material Instances,Share one material instance across all meshes that have identical properties. Call mat.clone() only when individual meshes genuinely need different property values. Duplicate materials waste GPU VRAM.,Assign the same material reference to all meshes with identical visual properties,Create a new material inside a loop for objects that look identical,"const mat = new THREE.MeshStandardMaterial({ color: 0x4f46e5, roughness: 0.5 }); meshA.material = mat; meshB.material = mat; meshC.material = mat; // one GPU material","for (const m of meshes) { m.material = new THREE.MeshStandardMaterial({ color: 0x4f46e5 }); } // N redundant GPU materials",High,https://threejs.org/docs/#api/en/materials/Material
|
||||
Materials,Dispose Textures Explicitly,Textures are the single largest consumer of GPU VRAM in most Three.js scenes. Call texture.dispose() when switching scenes or removing objects — Three.js does not garbage-collect GPU resources automatically.,Track all loaded textures and call dispose() on each one during scene teardown or on object removal,Load textures without any cleanup path — they persist in VRAM for the entire page lifetime,"const tex = new THREE.TextureLoader().load('img.jpg'); mesh.material.map = tex; // on teardown: tex.dispose(); mesh.material.dispose();","const tex = new THREE.TextureLoader().load('img.jpg'); scene.remove(mesh); // tex occupies GPU VRAM until page reload",High,https://threejs.org/docs/#api/en/textures/Texture.dispose
|
||||
Lighting,Ambient Plus Directional Minimum,Any scene using MeshStandardMaterial or MeshPhongMaterial requires at minimum one AmbientLight (fill) and one DirectionalLight (shading direction). Without both the objects render as solid black — the material is there but no light reaches it.,Add AmbientLight for fill and DirectionalLight for shading whenever PBR or Phong materials are used,Use MeshStandardMaterial without adding any lights to the scene,"scene.add(new THREE.AmbientLight(0xffffff, 0.4)); const dirLight = new THREE.DirectionalLight(0xffffff, 1.0); dirLight.position.set(5, 10, 7.5); scene.add(dirLight);","const mesh = new THREE.Mesh(geo, new THREE.MeshStandardMaterial({ color: 0x4f46e5 })); scene.add(mesh); // renders completely black — no lights in scene",Critical,https://threejs.org/docs/#api/en/lights/DirectionalLight
|
||||
Lighting,Enable shadowMap Before castShadow,renderer.shadowMap.enabled = true must be set before any castShadow or receiveShadow flags. Without it the shadow map is never allocated and all shadow flags are silently ignored.,Set renderer.shadowMap.enabled = true first then set castShadow and receiveShadow on lights and meshes,Set castShadow on a light or mesh without enabling renderer.shadowMap.enabled — shadows never render,"renderer.shadowMap.enabled = true; renderer.shadowMap.type = THREE.PCFSoftShadowMap; dirLight.castShadow = true; dirLight.shadow.mapSize.width = 2048; dirLight.shadow.mapSize.height = 2048; heroMesh.castShadow = true; ground.receiveShadow = true;","dirLight.castShadow = true; heroMesh.castShadow = true; // renderer.shadowMap.enabled never set — shadows silently do not render",High,https://threejs.org/docs/#api/en/renderers/WebGLRenderer.shadowMap
|
||||
Lighting,Selective Shadow Casting,Shadow map rendering redraws the entire scene from the light's perspective every frame. Enable castShadow only on the primary directional light and receiveShadow only on hero meshes and the ground plane.,Enable shadows only on the key light and the most important meshes,Enable castShadow and receiveShadow on every object in the scene including particles,"renderer.shadowMap.enabled = true; renderer.shadowMap.type = THREE.PCFSoftShadowMap; dirLight.castShadow = true; heroMesh.castShadow = true; ground.receiveShadow = true; // particles and background meshes: no shadow flags","for (const m of allMeshes) { m.castShadow = true; m.receiveShadow = true; } // shadow map pass over particle system — expensive with no visible gain",High,https://threejs.org/docs/#api/en/renderers/WebGLRenderer.shadowMap
|
||||
Lighting,Skip Lights for MeshBasicMaterial,MeshBasicMaterial completely ignores all scene lights. Adding lights solely to illuminate BasicMaterial objects wastes a light pass on every frame with zero visible effect.,Omit lights entirely when every material in the scene is MeshBasicMaterial,Add AmbientLight and DirectionalLight to a scene that uses only MeshBasicMaterial,"// Scene uses only MeshBasicMaterial — no lights needed const mat = new THREE.MeshBasicMaterial({ color: 0x00ffff }); const mesh = new THREE.Mesh(geo, mat); scene.add(mesh); // MeshBasicMaterial is always fully lit by definition","scene.add(new THREE.AmbientLight(0xffffff, 1.0)); // wasted per-frame light pass — BasicMaterial ignores it entirely",Low,https://threejs.org/docs/#api/en/materials/MeshBasicMaterial
|
||||
Raycasting,Single Shared Raycaster,Create exactly one Raycaster instance outside all event handlers. Store mouse coordinates in pointermove (cheap). Call setFromCamera and intersectObjects together inside the animate() loop — once per frame instead of once per mouse event.,Create one Raycaster; store mouse in pointermove; call setFromCamera + intersectObjects inside animate(),Create a new THREE.Raycaster() inside a mousemove handler or call setFromCamera inside the event listener,"const raycaster = new THREE.Raycaster(); const mouse = new THREE.Vector2(); canvas.addEventListener('pointermove', e => { // only store coords — no raycasting here mouse.x = (e.clientX / canvas.clientWidth) * 2 - 1; mouse.y = -(e.clientY / canvas.clientHeight) * 2 + 1; }); // setFromCamera and intersectObjects run once per frame in animate()","window.addEventListener('mousemove', e => { const rc = new THREE.Raycaster(); // new allocation per event rc.setFromCamera(mouse, camera); rc.intersectObjects(targets, true); // fires 200+ times/sec });",Critical,https://threejs.org/docs/#api/en/core/Raycaster
|
||||
Raycasting,NDC Mouse Coordinates,Raycasting requires mouse in Normalized Device Coordinates: X from -1 (left) to +1 (right) and Y from +1 (top) to -1 (bottom). The Y axis is inverted relative to screen space. A missing negation on Y causes all raycasts to miss or hit the wrong objects.,Apply the full NDC formula — including the negation on the Y axis,Forget to negate Y — raycasting appears to work but hits objects mirrored vertically,"mouse.x = (e.clientX / canvas.clientWidth) * 2 - 1; mouse.y = -(e.clientY / canvas.clientHeight) * 2 + 1; // Y is INVERTED","mouse.x = (e.clientX / canvas.clientWidth) * 2 - 1; mouse.y = (e.clientY / canvas.clientHeight) * 2 - 1; // BUG: Y not negated — raycasting is mirrored",Critical,https://threejs.org/docs/#api/en/core/Raycaster.setFromCamera
|
||||
Raycasting,setFromCamera and intersectObjects in animate,Call raycaster.setFromCamera(mouse camera) and then raycaster.intersectObjects(targets true) inside the animate() loop. setFromCamera must come before intersectObjects every frame — without it the raycaster uses a stale ray direction.,Call setFromCamera then intersectObjects in order inside every animate() frame,Call intersectObjects without calling setFromCamera first — the raycaster uses a stale or zero ray,"function animate() { requestAnimationFrame(animate); raycaster.setFromCamera(mouse, camera); // update ray direction first const hits = raycaster.intersectObjects(targets, true); // then test intersections if (hits.length > 0) { document.body.style.cursor = 'pointer'; } else { document.body.style.cursor = 'auto'; } renderer.render(scene, camera); }","function animate() { requestAnimationFrame(animate); const hits = raycaster.intersectObjects(targets, true); // BUG: setFromCamera never called — stale ray — hits is always empty renderer.render(scene, camera); }",Critical,https://threejs.org/docs/#api/en/core/Raycaster
|
||||
Raycasting,Recursive Flag for Groups and GLTF,Pass true as the second argument to intersectObjects when testing Groups or GLTF loaded models. Geometry lives on child Mesh objects — without recursive:true the parent group is tested but has no geometry and hits is always empty.,Use intersectObjects(targets true) for Groups or any loaded model,Raycast against a parent Group without the recursive flag,"const hits = raycaster.intersectObjects(scene.children, true); // catches all descendant meshes","const hits = raycaster.intersectObjects([modelGroup]); // recursive defaults to false — misses all children",High,https://threejs.org/docs/#api/en/core/Raycaster.intersectObjects
|
||||
Raycasting,Cursor Feedback on Hover,Set document.body.style.cursor = 'pointer' when intersections are found and reset to 'auto' when none are found. Without cursor feedback users cannot discover that 3D objects are interactive.,Update cursor to pointer on hit; reset to auto on miss in the same animate loop block,Run raycasting and read hits without ever updating the cursor style,"if (hits.length > 0) { document.body.style.cursor = 'pointer'; } else { document.body.style.cursor = 'auto'; }","raycaster.setFromCamera(mouse, camera); raycaster.intersectObjects(targets, true); // hits ignored — cursor never changes — objects feel non-interactive",Medium,https://developer.mozilla.org/en-US/docs/Web/CSS/cursor
|
||||
Animation,requestAnimationFrame Loop Only,Drive the render loop exclusively with requestAnimationFrame or renderer.setAnimationLoop(). Never use setInterval or setTimeout — they are not synchronized to the display refresh rate and keep running when the tab is hidden draining battery.,Use requestAnimationFrame or renderer.setAnimationLoop() as the sole render loop driver,Use setInterval or setTimeout for render timing,"function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); } animate();","setInterval(() => renderer.render(scene, camera), 16); // not display-synced; runs at full speed even when tab is hidden",Critical,https://threejs.org/docs/#api/en/renderers/WebGLRenderer.setAnimationLoop
|
||||
Animation,THREE.Clock for Delta Time,"Use THREE.Clock and clock.getDelta() for all time-based motion. A hardcoded increment like += 0.01 runs at 2x speed on 120Hz displays and at unpredictable speed when frames drop under load. CRITICAL: call getDelta() exactly ONCE per animate() frame and store the result in a local dt variable. getDelta() resets the internal clock on every call — a second call in the same frame always returns ~0, silently breaking any animation block that uses it.","Call clock.getDelta() once at the top of animate(); store result in dt; reuse dt everywhere in that frame","Call clock.getDelta() more than once per frame or inside a helper called from animate()","const clock = new THREE.Clock(); function animate() { requestAnimationFrame(animate); const dt = clock.getDelta(); // called ONCE — reuse dt below mesh.rotation.y += dt * 0.8; particles.rotation.y += dt * 0.1; // reuse dt, not a second getDelta() renderer.render(scene, camera); }","function animate() { requestAnimationFrame(animate); mesh.rotation.y += 0.01; // 0.01 rad/frame — runs 2x faster on 120Hz than on 60Hz }",High,https://threejs.org/docs/#api/en/core/Clock
|
||||
Animation,Lerp for Smooth Pointer Follow,Use value += (target - value) * alpha each frame to smoothly interpolate toward a moving target. An alpha of 0.03–0.1 produces organic easing for camera follow pointer-tracking and hover scale effects without requiring GSAP.,Apply the lerp formula each frame with a small alpha for smooth organic motion,Snap a value directly to the target producing an instant jarring jump,"// In animate(): cameraTargetX = mouse.x * 3; camera.position.x += (cameraTargetX - camera.position.x) * 0.05; camera.position.y += (cameraTargetY - camera.position.y) * 0.05; camera.lookAt(scene.position);","// In animate(): camera.position.x = mouse.x * 3; // instant snap — jarring with no easing",Medium,https://threejs.org/docs/#api/en/math/MathUtils.lerp
|
||||
Animation,GSAP for Multi-Step Sequences,Use GSAP timelines for any animation with more than two sequential steps or for scroll-linked camera paths. GSAP timelines can be paused reversed and scrubbed — far more maintainable than boolean state machines.,Use GSAP timelines for sequences with more than two steps and for scroll-driven animations,Implement multi-step sequences with boolean flags and manual frame counters,"const tl = gsap.timeline({ defaults: { ease: 'power2.out' } }); tl.from(mesh.position, { y: -3, duration: 1 }) .to(mesh.rotation, { y: Math.PI, duration: 1 }, '-=0.3') .to(camera.position, { z: 2, duration: 1.5 });","let step = 0; let t = 0; function animate() { if (step === 0 && (t += 0.01) >= 1) step = 1; } // grows unmanageable with 3+ steps",High,https://gsap.com/docs/v3/GSAP/Timeline/
|
||||
Animation,Pause Render Loop on Tab Hidden,Use renderer.setAnimationLoop() as the loop driver so you can pass null to pause and a function to resume. Continuous rendering in a hidden tab wastes CPU GPU and battery with no user benefit.,Use renderer.setAnimationLoop(animate) to drive the loop; pass null to pause on visibilitychange,Drive with internal requestAnimationFrame and never stop the loop when the tab is hidden,"renderer.setAnimationLoop(animate); // use setAnimationLoop as the driver — not requestAnimationFrame inside animate function animate() { const dt = clock.getDelta(); renderer.render(scene, camera); } document.addEventListener('visibilitychange', () => { if (document.hidden) renderer.setAnimationLoop(null); else renderer.setAnimationLoop(animate); });","function animate() { requestAnimationFrame(animate); // self-referencing RAF cannot be stopped externally renderer.render(scene, camera); } animate(); // runs forever in background tab — drains battery",High,https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API
|
||||
GSAP,Load GSAP Before Scene Script,Load GSAP from its own CDN script tag before your scene script. In bundler projects install via npm and import. GSAP is a completely separate library from Three.js — never try to import it from the Three.js package.,Load GSAP CDN before the scene script; or npm install gsap and import separately,Import gsap from three or expect it to be defined without a separate load,"<!-- CDN: load GSAP before your scene script --> <script src=""https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/gsap.min.js""></script> <!-- Bundler: --> // import gsap from 'gsap'; import { ScrollTrigger } from 'gsap/ScrollTrigger';","import gsap from 'three'; // undefined — GSAP has nothing to do with Three.js",Critical,https://gsap.com/docs/v3/Installation
|
||||
GSAP,Register ScrollTrigger Before Use,Call gsap.registerPlugin(ScrollTrigger) once at the top of your script before any scrollTrigger config object. Without registration the ScrollTrigger name is undefined and the tween throws immediately.,Call gsap.registerPlugin(ScrollTrigger) as the first line before any gsap.to/from/timeline with scrollTrigger,Include scrollTrigger config in gsap.to() calls without first registering the plugin,"gsap.registerPlugin(ScrollTrigger); gsap.to(camera.position, { z: 2, scrollTrigger: { trigger: '.hero-section', scrub: 1 } });","gsap.to(mesh.position, { scrollTrigger: { trigger: '.section', scrub: true } }); // TypeError: ScrollTrigger is not a constructor — not registered",Critical,https://gsap.com/docs/v3/Plugins/ScrollTrigger/
|
||||
GSAP,Tween Three.js Properties Directly,GSAP can tween any numeric JavaScript property including mesh.position.x mesh.rotation.y and material.opacity. No wrapper or adaptor is needed. Note: to tween material.opacity the material must have transparent:true set before the tween starts.,Pass Three.js object properties directly to gsap.to(); set transparent:true before tweening opacity,Use a plain proxy object then manually copy values to Three.js properties every frame,"gsap.to(mesh.rotation, { y: Math.PI * 2, duration: 2, ease: 'power1.inOut' }); mesh.material.transparent = true; // required before tweening opacity gsap.to(mesh.material, { opacity: 0, duration: 1 });","const tw = { v: 0 }; gsap.to(tw, { v: Math.PI * 2, onUpdate: () => mesh.rotation.y = tw.v }); // unnecessary proxy wrapper",Medium,https://gsap.com/docs/v3/GSAP/gsap.to()
|
||||
GSAP,scrub for Scroll-Driven Camera Path,Use scrub:true or scrub:1 to link camera movement continuously to scroll position as a 0–1 ratio. scrub:1 adds a 1-second lag for cinematic smoothness. onEnter/onLeave fire only once and create jarring snaps — not the right tool for a camera path.,Use scrub:1 for any scroll-controlled camera movement,Use onEnter or onLeave callbacks for camera motion — they snap instead of scrubbing,"gsap.registerPlugin(ScrollTrigger); gsap.to(camera.position, { x: 5, y: 2, z: 0, ease: 'none', scrollTrigger: { trigger: '.canvas-wrapper', start: 'top top', end: 'bottom bottom', scrub: 1 } });","gsap.to(camera.position, { z: 0, scrollTrigger: { trigger: '.section', onEnter: () => {} } }); // fires once at scroll threshold — not a continuous scrub",High,https://gsap.com/docs/v3/Plugins/ScrollTrigger/
|
||||
Performance,InstancedMesh for Repeated Objects,Use THREE.InstancedMesh when rendering 50 or more identical objects. It submits all N transforms in one draw call instead of N draw calls and reduces CPU-GPU communication overhead dramatically.,Use InstancedMesh for any group of 50+ meshes sharing the same geometry and material,Create 50+ separate Mesh objects with the same geometry and material,"const COUNT = 500; const iMesh = new THREE.InstancedMesh(geo, mat, COUNT); const matrix = new THREE.Matrix4(); for (let i = 0; i < COUNT; i++) { matrix.setPosition(Math.random()*10, Math.random()*10, Math.random()*10); iMesh.setMatrixAt(i, matrix); } iMesh.instanceMatrix.needsUpdate = true; scene.add(iMesh);","for (let i = 0; i < 500; i++) { scene.add(new THREE.Mesh(geo, mat)); } // 500 separate draw calls per frame",High,https://threejs.org/docs/#api/en/objects/InstancedMesh
|
||||
Performance,Tone Mapping and sRGB Encoding,Enable ACESFilmicToneMapping and sRGBEncoding on the renderer for accurate perceptual color. Without tone mapping colors appear washed out or over-saturated. These are renderer properties set after construction and take effect immediately.,Set renderer.toneMapping and renderer.outputEncoding after construction for all production scenes,Leave tone mapping and output encoding at defaults when the scene targets realistic visuals,"renderer.toneMapping = THREE.ACESFilmicToneMapping; renderer.toneMappingExposure = 1.0; renderer.outputEncoding = THREE.sRGBEncoding; // correct for r128","const renderer = new THREE.WebGLRenderer(); // defaults: NoToneMapping + LinearEncoding — colors appear flat and incorrect",Medium,https://threejs.org/docs/#api/en/renderers/WebGLRenderer.toneMapping
|
||||
Performance,antialias Set at Construction Only,The antialias option can only be set at WebGLRenderer construction time. Setting renderer.antialias after construction has absolutely no effect — the WebGL context is already created without it. Decide before instantiating.,Set antialias:true inside the WebGLRenderer constructor options object,Construct the renderer without antialias then try to enable it by assigning the property,"const renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true }); // antialias baked into the WebGL context","const renderer = new THREE.WebGLRenderer(); renderer.antialias = true; // no effect — context created without AA — edges remain aliased",High,https://threejs.org/docs/#api/en/renderers/WebGLRenderer
|
||||
Performance,FogExp2 for Depth and Far Culling,Use scene.fog to create atmospheric depth. As a secondary benefit objects that disappear into fog before the far plane stop contributing to draw calls — useful in scenes with large view distances.,Add FogExp2 to scenes with view distances above 100 units for both visual atmosphere and implicit far culling,Ignore fog in scenes with far:1000+ and many distant objects that contribute tiny pixels per draw call,"scene.fog = new THREE.FogExp2(0x0a0a0a, 0.02); // exponential — density feels more natural than linear","// far: 2000 with no fog — hundreds of distant objects too small to see still cost draw calls per frame",Low,https://threejs.org/docs/#api/en/scenes/FogExp2
|
||||
Particles,BufferGeometry Plus Points for Particle Systems,Build all particle systems with BufferGeometry plus a Float32Array position attribute rendered as Points. Never use individual Mesh objects as particles — they cannot scale past a few hundred with good performance.,Use Points plus BufferGeometry for all particle effects,Create hundreds of individual Mesh objects to simulate a particle system,"const COUNT = 3000; const geo = new THREE.BufferGeometry(); const pos = new Float32Array(COUNT * 3); for (let i = 0; i < COUNT * 3; i++) pos[i] = (Math.random() - 0.5) * 20; geo.setAttribute('position', new THREE.BufferAttribute(pos, 3)); const particles = new THREE.Points(geo, new THREE.PointsMaterial({ size: 0.05, color: 0xffffff })); scene.add(particles);","for (let i = 0; i < 500; i++) { scene.add(new THREE.Mesh(new THREE.SphereGeometry(0.05, 8, 8), mat)); } // 500 separate draw calls per frame",High,https://threejs.org/docs/#api/en/objects/Points
|
||||
Particles,Particle Count Ceiling,Start particle systems at 1000–3000 particles. Beyond 50000 causes sustained frame drops on mid-range mobile. Always test on a real device before increasing the count — desktop and mobile GPU performance ratios can be 10:1.,Start at 3000 particles and profile on actual mobile hardware before raising the limit,Set particle count at 100000 or higher without any mobile profiling,"const COUNT = 3000; // safe mobile baseline — profile before going higher const pos = new Float32Array(COUNT * 3);","const COUNT = 150000; // 60fps on desktop — 8fps on a mid-range Android phone",High,https://threejs.org/docs/#api/en/objects/Points
|
||||
Particles,needsUpdate After Buffer Mutation,After mutating any BufferAttribute array values per frame you must set geometry.attributes.position.needsUpdate = true so Three.js re-uploads the changed buffer to the GPU. Without it the GPU still uses the old data and particles appear completely frozen.,Set needsUpdate = true on the position attribute after every per-frame mutation of the array,Mutate the Float32Array values without flagging needsUpdate — positions update in JS but not on the GPU,"// In animate(): const pos = geo.attributes.position.array; for (let i = 0; i < pos.length; i += 3) { pos[i + 1] += Math.sin(clock.getElapsedTime() + i) * 0.001; // Y component } geo.attributes.position.needsUpdate = true; // GPU re-upload","// In animate(): pos[1] += 0.001; // JS array updated — GPU buffer is stale — particles do not move",Critical,https://threejs.org/docs/#api/en/core/BufferAttribute.needsUpdate
|
||||
Responsive,Canvas Dimensions Not Window,Size the renderer and camera to the canvas element's clientWidth and clientHeight — not window.innerWidth and innerHeight. This is correct when the canvas is inside a flex or grid container that does not fill the full viewport.,Use canvas.clientWidth and canvas.clientHeight for all renderer and camera sizing,Hardcode renderer size to window.innerWidth/innerHeight when the canvas may be inside a container,"renderer.setSize(canvas.clientWidth, canvas.clientHeight); camera.aspect = canvas.clientWidth / canvas.clientHeight; camera.updateProjectionMatrix();","renderer.setSize(window.innerWidth, window.innerHeight); // wrong when canvas lives inside a sidebar or grid column",High,https://threejs.org/docs/#api/en/renderers/WebGLRenderer.setSize
|
||||
Responsive,ResizeObserver Over window resize Event,Use ResizeObserver on the canvas container instead of the window resize event. ResizeObserver fires when the container element changes size independently of the browser window — common in split-pane layouts and sidebar collapsing.,Attach ResizeObserver to the canvas parent element for accurate container-aware resize detection,Use only window.addEventListener('resize') for canvas sizing when the canvas is not fullscreen,"const ro = new ResizeObserver(entries => { const { width, height } = entries[0].contentRect; renderer.setSize(width, height); camera.aspect = width / height; camera.updateProjectionMatrix(); }); ro.observe(canvas.parentElement);","window.addEventListener('resize', () => { renderer.setSize(window.innerWidth, window.innerHeight); }); // misses container-only resize events in split-pane UIs",Medium,https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver
|
||||
Responsive,Touch Events for Mobile Interaction,Add touchstart and touchmove listeners alongside mouse events so the scene remains interactive on mobile. Normalize touch coordinates to the same NDC range as mouse events and pass passive:false on touchmove if you call preventDefault.,Handle both mouse and touch input for any interactive 3D scene,Add only mouse event listeners and leave touch users with no interaction,"canvas.addEventListener('touchmove', e => { e.preventDefault(); const t = e.touches[0]; mouse.x = (t.clientX / canvas.clientWidth) * 2 - 1; mouse.y = -(t.clientY / canvas.clientHeight) * 2 + 1; }, { passive: false }); canvas.addEventListener('touchstart', e => { e.preventDefault(); }, { passive: false });","canvas.addEventListener('mousemove', handleMouse); // touch events unhandled — mobile users get no interaction",Medium,https://developer.mozilla.org/en-US/docs/Web/API/Touch_events
|
||||
Accessibility,prefers-reduced-motion,"Check window.matchMedia('(prefers-reduced-motion: reduce)') before starting any auto-rotation, particle animation, or camera movement. Users who enable this OS preference have motion sickness or vestibular disorders. IMPORTANT: reading .matches once at page load is a one-time snapshot — if the user changes their OS accessibility setting mid-session the scene will not react. Attach a 'change' listener to the MediaQueryList so noMotion stays in sync at runtime.","Use matchMedia.addEventListener('change') to keep noMotion reactive; gate all auto-animation on the live value","Read .matches once at startup and never update it — the scene ignores mid-session OS setting changes","const mq = window.matchMedia('(prefers-reduced-motion: reduce)'); let noMotion = mq.matches; mq.addEventListener('change', e => { noMotion = e.matches; }); // In animate(): if (!noMotion) { mesh.rotation.y += dt * 0.8; particles.rotation.y += dt * 0.1; }","const noMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches; // one-time snapshot — mid-session OS change is ignored entirely",High,https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion
|
||||
Accessibility,Canvas aria-label,Add role='img' and a descriptive aria-label to renderer.domElement after appending it to the DOM. Screen readers receive no information from a WebGL canvas — the aria-label is the only description they can announce to users.,Set role='img' and a meaningful aria-label on renderer.domElement before or after appending it,Append the canvas to the DOM with no accessibility attributes — invisible to screen readers,"renderer.domElement.setAttribute('role', 'img'); renderer.domElement.setAttribute('aria-label', 'Interactive 3D product viewer. Drag to rotate. Scroll to zoom.'); document.body.appendChild(renderer.domElement);","document.body.appendChild(renderer.domElement); // bare canvas — screen readers announce nothing",Medium,https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas#accessibility_concerns
|
||||
Production,Bundler Stack for Production,For production use Three.js via npm plus Vite. You get full tree-shaking reduced bundle size access to the complete examples/jsm library including OrbitControls GLTFLoader and EffectComposer and TypeScript support.,Use npm install three plus Vite or Webpack for any production client-facing project,Serve raw CDN script tags in a production application that needs tree-shaking or TypeScript,"npm install three gsap // then in your JS: import * as THREE from 'three'; import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'; import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';","<!-- In a Vite/React production build: --> <script src=""https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js""></script> // no tree-shaking — entire Three.js ships",Medium,https://threejs.org/docs/#manual/en/introduction/Installation
|
||||
Production,GLTFLoader with scene traverse,Load 3D models using GLTFLoader and traverse gltf.scene to configure castShadow receiveShadow and material overrides on all child Mesh nodes. Calling scene.add(gltf.scene) alone silently skips all shadow and material configuration.,Use GLTFLoader and traverse the entire gltf.scene graph to set up shadows and materials on every Mesh child,Load a GLTF model and pass gltf.scene directly to scene.add without traversing child meshes,"import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js'; const loader = new GLTFLoader(); loader.load('model.glb', gltf => { gltf.scene.traverse(child => { if (child.isMesh) { child.castShadow = true; child.receiveShadow = true; } }); scene.add(gltf.scene); });","loader.load('model.glb', gltf => { scene.add(gltf.scene); // shadows and material setup silently skipped on all children });",Medium,https://threejs.org/docs/#examples/en/loaders/GLTFLoader
|
||||
Production,LOD for Distance-Based Detail,Use THREE.LOD to automatically swap high-detail and low-detail geometry as objects move closer or farther from the camera. This maintains frame rate in scenes with many objects spread across a large depth range.,Use THREE.LOD to reduce triangle count on distant objects automatically,Render the same high-polygon geometry for every object regardless of its distance from the camera,"const lod = new THREE.LOD(); lod.addLevel(highDetailMesh, 0); // used when < 15 units away lod.addLevel(medDetailMesh, 15); // 15–50 units lod.addLevel(lowDetailMesh, 50); // 50+ units scene.add(lod);","scene.add(highDetailMesh); // 64k-triangle mesh rendered at full cost whether 1 unit or 100 units from camera",Medium,https://threejs.org/docs/#api/en/objects/LOD
|
||||
|
@@ -0,0 +1,50 @@
|
||||
No,Category,Guideline,Description,Do,Don't,Code Good,Code Bad,Severity,Docs URL
|
||||
1,Composition,Use Composition API for new projects,Composition API offers better TypeScript support and logic reuse,<script setup> for components,Options API for new projects,<script setup>,export default { data() },Medium,https://vuejs.org/guide/extras/composition-api-faq.html
|
||||
2,Composition,Use script setup syntax,Cleaner syntax with automatic exports,<script setup> with defineProps,setup() function manually,<script setup>,<script> setup() { return {} },Low,https://vuejs.org/api/sfc-script-setup.html
|
||||
3,Reactivity,Use ref for primitives,ref() for primitive values that need reactivity,ref() for strings numbers booleans,reactive() for primitives,const count = ref(0),const count = reactive(0),Medium,https://vuejs.org/guide/essentials/reactivity-fundamentals.html
|
||||
4,Reactivity,Use reactive for objects,reactive() for complex objects and arrays,reactive() for objects with multiple properties,ref() for complex objects,const state = reactive({ user: null }),const state = ref({ user: null }),Medium,
|
||||
5,Reactivity,Access ref values with .value,Remember .value in script unwrap in template,Use .value in script,Forget .value in script,count.value++,count++ (in script),High,
|
||||
6,Reactivity,Use computed for derived state,Computed properties cache and update automatically,computed() for derived values,Methods for derived values,const doubled = computed(() => count.value * 2),const doubled = () => count.value * 2,Medium,https://vuejs.org/guide/essentials/computed.html
|
||||
7,Reactivity,Use shallowRef for large objects,Avoid deep reactivity for performance,shallowRef for large data structures,ref for large nested objects,const bigData = shallowRef(largeObject),const bigData = ref(largeObject),Medium,https://vuejs.org/api/reactivity-advanced.html#shallowref
|
||||
8,Watchers,Use watchEffect for simple cases,Auto-tracks dependencies,watchEffect for simple reactive effects,watch with explicit deps when not needed,watchEffect(() => console.log(count.value)),"watch(count, (val) => console.log(val))",Low,https://vuejs.org/guide/essentials/watchers.html
|
||||
9,Watchers,Use watch for specific sources,Explicit control over what to watch,watch with specific refs,watchEffect for complex conditional logic,"watch(userId, fetchUser)",watchEffect with conditionals,Medium,
|
||||
10,Watchers,Clean up side effects,Return cleanup function in watchers,Return cleanup in watchEffect,Leave subscriptions open,watchEffect((onCleanup) => { onCleanup(unsub) }),watchEffect without cleanup,High,
|
||||
11,Props,Define props with defineProps,Type-safe prop definitions,defineProps with TypeScript,Props without types,defineProps<{ msg: string }>(),defineProps(['msg']),Medium,https://vuejs.org/guide/typescript/composition-api.html#typing-component-props
|
||||
12,Props,Use withDefaults for default values,Provide defaults for optional props,withDefaults with defineProps,Defaults in destructuring,"withDefaults(defineProps<Props>(), { count: 0 })",const { count = 0 } = defineProps(),Medium,
|
||||
13,Props,Avoid mutating props,Props should be read-only,Emit events to parent for changes,Direct prop mutation,"emit('update:modelValue', newVal)",props.modelValue = newVal,High,
|
||||
14,Emits,Define emits with defineEmits,Type-safe event emissions,defineEmits with types,Emit without definition,defineEmits<{ change: [id: number] }>(),"emit('change', id) without define",Medium,https://vuejs.org/guide/typescript/composition-api.html#typing-component-emits
|
||||
15,Emits,Use v-model for two-way binding,Simplified parent-child data flow,v-model with modelValue prop,:value + @input manually,"<Child v-model=""value""/>","<Child :value=""value"" @input=""value = $event""/>",Low,https://vuejs.org/guide/components/v-model.html
|
||||
16,Lifecycle,Use onMounted for DOM access,DOM is ready in onMounted,onMounted for DOM operations,Access DOM in setup directly,onMounted(() => el.value.focus()),el.value.focus() in setup,High,https://vuejs.org/api/composition-api-lifecycle.html
|
||||
17,Lifecycle,Clean up in onUnmounted,Remove listeners and subscriptions,onUnmounted for cleanup,Leave listeners attached,onUnmounted(() => window.removeEventListener()),No cleanup on unmount,High,
|
||||
18,Lifecycle,Avoid onBeforeMount for data,Use onMounted or setup for data fetching,Fetch in onMounted or setup,Fetch in onBeforeMount,onMounted(async () => await fetchData()),onBeforeMount(async () => await fetchData()),Low,
|
||||
19,Components,Use single-file components,Keep template script style together,.vue files for components,Separate template/script files,Component.vue with all parts,Component.js + Component.html,Low,
|
||||
20,Components,Use PascalCase for components,Consistent component naming,PascalCase in imports and templates,kebab-case in script,<MyComponent/>,<my-component/>,Low,https://vuejs.org/style-guide/rules-strongly-recommended.html
|
||||
21,Components,Prefer composition over mixins,Composables replace mixins,Composables for shared logic,Mixins for code reuse,const { data } = useApi(),mixins: [apiMixin],Medium,
|
||||
22,Composables,Name composables with use prefix,Convention for composable functions,useFetch useAuth useForm,getData or fetchApi,export function useFetch(),export function fetchData(),Medium,https://vuejs.org/guide/reusability/composables.html
|
||||
23,Composables,Return refs from composables,Maintain reactivity when destructuring,Return ref values,Return reactive objects that lose reactivity,return { data: ref(null) },return reactive({ data: null }),Medium,
|
||||
24,Composables,Accept ref or value params,Use toValue for flexible inputs,toValue() or unref() for params,Only accept ref or only value,const val = toValue(maybeRef),const val = maybeRef.value,Low,https://vuejs.org/api/reactivity-utilities.html#tovalue
|
||||
25,Templates,Use v-bind shorthand,Cleaner template syntax,:prop instead of v-bind:prop,Full v-bind syntax,"<div :class=""cls"">","<div v-bind:class=""cls"">",Low,
|
||||
26,Templates,Use v-on shorthand,Cleaner event binding,@event instead of v-on:event,Full v-on syntax,"<button @click=""handler"">","<button v-on:click=""handler"">",Low,
|
||||
27,Templates,Avoid v-if with v-for,v-if has higher priority causes issues,Wrap in template or computed filter,v-if on same element as v-for,<template v-for><div v-if>,<div v-for v-if>,High,https://vuejs.org/style-guide/rules-essential.html#avoid-v-if-with-v-for
|
||||
28,Templates,Use key with v-for,Proper list rendering and updates,Unique key for each item,Index as key for dynamic lists,"v-for=""item in items"" :key=""item.id""","v-for=""(item, i) in items"" :key=""i""",High,
|
||||
29,State,Use Pinia for global state,Official state management for Vue 3,Pinia stores for shared state,Vuex for new projects,const store = useCounterStore(),Vuex with mutations,Medium,https://pinia.vuejs.org/
|
||||
30,State,Define stores with defineStore,Composition API style stores,Setup stores with defineStore,Options stores for complex state,"defineStore('counter', () => {})","defineStore('counter', { state })",Low,
|
||||
31,State,Use storeToRefs for destructuring,Maintain reactivity when destructuring,storeToRefs(store),Direct destructuring,const { count } = storeToRefs(store),const { count } = store,High,https://pinia.vuejs.org/core-concepts/#destructuring-from-a-store
|
||||
32,Routing,Use useRouter and useRoute,Composition API router access,useRouter() useRoute() in setup,this.$router this.$route,const router = useRouter(),this.$router.push(),Medium,https://router.vuejs.org/guide/advanced/composition-api.html
|
||||
33,Routing,Lazy load route components,Code splitting for routes,() => import() for components,Static imports for all routes,component: () => import('./Page.vue'),component: Page,Medium,https://router.vuejs.org/guide/advanced/lazy-loading.html
|
||||
34,Routing,Use navigation guards,Protect routes and handle redirects,beforeEach for auth checks,Check auth in each component,router.beforeEach((to) => {}),Check auth in onMounted,Medium,
|
||||
35,Performance,Use v-once for static content,Skip re-renders for static elements,v-once on never-changing content,v-once on dynamic content,<div v-once>{{ staticText }}</div>,<div v-once>{{ dynamicText }}</div>,Low,https://vuejs.org/api/built-in-directives.html#v-once
|
||||
36,Performance,Use v-memo for expensive lists,Memoize list items,v-memo with dependency array,Re-render entire list always,"<div v-for v-memo=""[item.id]"">",<div v-for> without memo,Medium,https://vuejs.org/api/built-in-directives.html#v-memo
|
||||
37,Performance,Use shallowReactive for flat objects,Avoid deep reactivity overhead,shallowReactive for flat state,reactive for simple objects,shallowReactive({ count: 0 }),reactive({ count: 0 }),Low,
|
||||
38,Performance,Use defineAsyncComponent,Lazy load heavy components,defineAsyncComponent for modals dialogs,Import all components eagerly,defineAsyncComponent(() => import()),import HeavyComponent from,Medium,https://vuejs.org/guide/components/async.html
|
||||
39,TypeScript,Use generic components,Type-safe reusable components,Generic with defineComponent,Any types in components,"<script setup lang=""ts"" generic=""T"">",<script setup> without types,Medium,https://vuejs.org/guide/typescript/composition-api.html
|
||||
40,TypeScript,Type template refs,Proper typing for DOM refs,ref<HTMLInputElement>(null),ref(null) without type,const input = ref<HTMLInputElement>(null),const input = ref(null),Medium,
|
||||
41,TypeScript,Use PropType for complex props,Type complex prop types,PropType<User> for object props,Object without type,type: Object as PropType<User>,type: Object,Medium,
|
||||
42,Testing,Use Vue Test Utils,Official testing library,mount shallowMount for components,Manual DOM testing,import { mount } from '@vue/test-utils',document.createElement,Medium,https://test-utils.vuejs.org/
|
||||
43,Testing,Test component behavior,Focus on inputs and outputs,Test props emit and rendered output,Test internal implementation,expect(wrapper.text()).toContain(),expect(wrapper.vm.internalState),Medium,
|
||||
44,Forms,Use v-model modifiers,Built-in input handling,.lazy .number .trim modifiers,Manual input parsing,"<input v-model.number=""age"">","<input v-model=""age""> then parse",Low,https://vuejs.org/guide/essentials/forms.html#modifiers
|
||||
45,Forms,Use VeeValidate or FormKit,Form validation libraries,VeeValidate for complex forms,Manual validation logic,useField useForm from vee-validate,Custom validation in each input,Medium,
|
||||
46,Accessibility,Use semantic elements,Proper HTML elements in templates,button nav main for purpose,div for everything,<button @click>,<div @click>,High,
|
||||
47,Accessibility,Bind aria attributes dynamically,Keep ARIA in sync with state,":aria-expanded=""isOpen""",Static ARIA values,":aria-expanded=""menuOpen""","aria-expanded=""true""",Medium,
|
||||
48,SSR,Use Nuxt for SSR,Full-featured SSR framework,Nuxt 3 for SSR apps,Manual SSR setup,npx nuxi init my-app,Custom SSR configuration,Medium,https://nuxt.com/
|
||||
49,SSR,Handle hydration mismatches,Client/server content must match,ClientOnly for browser-only content,Different content server/client,<ClientOnly><BrowserWidget/></ClientOnly>,<div>{{ Date.now() }}</div>,High,
|
||||
|
@@ -0,0 +1,85 @@
|
||||
No,Style Category,Type,Keywords,Primary Colors,Secondary Colors,Effects & Animation,Best For,Do Not Use For,Light Mode ✓,Dark Mode ✓,Performance,Accessibility,Mobile-Friendly,Conversion-Focused,Framework Compatibility,Era/Origin,Complexity,AI Prompt Keywords,CSS/Technical Keywords,Implementation Checklist,Design System Variables
|
||||
1,Minimalism & Swiss Style,General,"Clean, simple, spacious, functional, white space, high contrast, geometric, sans-serif, grid-based, essential","Monochromatic, Black #000000, White #FFFFFF","Neutral (Beige #F5F1E8, Grey #808080, Taupe #B38B6D), Primary accent","Subtle hover (200-250ms), smooth transitions, sharp shadows if any, clear type hierarchy, fast loading","Enterprise apps, dashboards, documentation sites, SaaS platforms, professional tools","Creative portfolios, entertainment, playful brands, artistic experiments",✓ Full,✓ Full,⚡ Excellent,✓ WCAG AAA,✓ High,◐ Medium,"Tailwind 10/10, Bootstrap 9/10, MUI 9/10",1950s Swiss,Low,"Design a minimalist landing page. Use: white space, geometric layouts, sans-serif fonts, high contrast, grid-based structure, essential elements only. Avoid shadows and gradients. Focus on clarity and functionality.","display: grid, gap: 2rem, font-family: sans-serif, color: #000 or #FFF, max-width: 1200px, clean borders, no box-shadow unless necessary","☐ Grid-based layout 12-16 columns, ☐ Typography hierarchy clear, ☐ No unnecessary decorations, ☐ WCAG AAA contrast verified, ☐ Mobile responsive grid","--spacing: 2rem, --border-radius: 0px, --font-weight: 400-700, --shadow: none, --accent-color: single primary only"
|
||||
2,Neumorphism,General,"Soft UI, embossed, debossed, convex, concave, light source, subtle depth, rounded (12-16px), monochromatic","Light pastels: Soft Blue #C8E0F4, Soft Pink #F5E0E8, Soft Grey #E8E8E8","Tints/shades (±30%), gradient subtlety, color harmony","Soft box-shadow (multiple: -5px -5px 15px, 5px 5px 15px), smooth press (150ms), inner subtle shadow","Health/wellness apps, meditation platforms, fitness trackers, minimal interaction UIs","Complex apps, critical accessibility, data-heavy dashboards, high-contrast required",✓ Full,◐ Partial,⚡ Good,⚠ Low contrast,✓ Good,◐ Medium,"Tailwind 8/10, CSS-in-JS 9/10",2020s Modern,Medium,"Create a neumorphic UI with soft 3D effects. Use light pastels, rounded corners (12-16px), subtle soft shadows (multiple layers), no hard lines, monochromatic color scheme with light/dark variations. Embossed/debossed effect on interactive elements.","border-radius: 12-16px, box-shadow: -5px -5px 15px rgba(0,0,0,0.1), 5px 5px 15px rgba(255,255,255,0.8), background: linear-gradient(145deg, color1, color2), transform: scale on press","☐ Rounded corners 12-16px consistent, ☐ Multiple shadow layers (2-3), ☐ Pastel color verified, ☐ Monochromatic palette checked, ☐ Press animation smooth 150ms","--border-radius: 14px, --shadow-soft-1: -5px -5px 15px, --shadow-soft-2: 5px 5px 15px, --color-light: #F5F5F5, --color-primary: single pastel"
|
||||
3,Glassmorphism,General,"Frosted glass, transparent, blurred background, layered, vibrant background, light source, depth, multi-layer","Translucent white: rgba(255,255,255,0.1-0.3)","Vibrant: Electric Blue #0080FF, Neon Purple #8B00FF, Vivid Pink #FF1493, Teal #20B2AA","Backdrop blur (10-20px), subtle border (1px solid rgba white 0.2), light reflection, Z-depth","Modern SaaS, financial dashboards, high-end corporate, lifestyle apps, modal overlays, navigation","Low-contrast backgrounds, critical accessibility, performance-limited, dark text on dark",✓ Full,✓ Full,⚠ Good,⚠ Ensure 4.5:1,✓ Good,✓ High,"Tailwind 9/10, MUI 8/10, Chakra 8/10",2020s Modern,Medium,"Design a glassmorphic interface with frosted glass effect. Use backdrop blur (10-20px), translucent overlays (rgba 10-30% opacity), vibrant background colors, subtle borders, light source reflection, layered depth. Perfect for modern overlays and cards.","backdrop-filter: blur(15px), background: rgba(255, 255, 255, 0.15), border: 1px solid rgba(255,255,255,0.2), -webkit-backdrop-filter: blur(15px), z-index layering for depth","☐ Backdrop-filter blur 10-20px, ☐ Translucent white 15-30% opacity, ☐ Subtle border 1px light, ☐ Vibrant background verified, ☐ Text contrast 4.5:1 checked","--blur-amount: 15px, --glass-opacity: 0.15, --border-color: rgba(255,255,255,0.2), --background: vibrant color, --text-color: light/dark based on BG"
|
||||
4,Brutalism,General,"Raw, unpolished, stark, high contrast, plain text, default fonts, visible borders, asymmetric, anti-design","Primary: Red #FF0000, Blue #0000FF, Yellow #FFFF00, Black #000000, White #FFFFFF","Limited: Neon Green #00FF00, Hot Pink #FF00FF, minimal secondary","No smooth transitions (instant), sharp corners (0px), bold typography (700+), visible grid, large blocks","Design portfolios, artistic projects, counter-culture brands, editorial/media sites, tech blogs","Corporate environments, conservative industries, critical accessibility, customer-facing professional",✓ Full,✓ Full,⚡ Excellent,✓ WCAG AAA,◐ Medium,✗ Low,"Tailwind 10/10, Bootstrap 7/10",1950s Brutalist,Low,"Create a brutalist design with raw, unpolished, stark aesthetic. Use pure primary colors (red, blue, yellow), black & white, no smooth transitions (instant), sharp corners, bold large typography, visible grid lines, default system fonts, intentional 'broken' design elements.","border-radius: 0px, transition: none or 0s, font-family: system-ui or monospace, font-weight: 700+, border: visible 2-4px, colors: #FF0000, #0000FF, #FFFF00, #000000, #FFFFFF","☐ No border-radius (0px), ☐ No transitions (instant), ☐ Bold typography (700+), ☐ Pure primary colors used, ☐ Visible grid/borders, ☐ Asymmetric layout intentional","--border-radius: 0px, --transition-duration: 0s, --font-weight: 700-900, --colors: primary only, --border-style: visible, --grid-visible: true"
|
||||
5,3D & Hyperrealism,General,"Depth, realistic textures, 3D models, spatial navigation, tactile, skeuomorphic elements, rich detail, immersive","Deep Navy #001F3F, Forest Green #228B22, Burgundy #800020, Gold #FFD700, Silver #C0C0C0","Complex gradients (5-10 stops), realistic lighting, shadow variations (20-40% darker)","WebGL/Three.js 3D, realistic shadows (layers), physics lighting, parallax (3-5 layers), smooth 3D (300-400ms)","Gaming, product showcase, immersive experiences, high-end e-commerce, architectural viz, VR/AR","Low-end mobile, performance-limited, critical accessibility, data tables/forms",◐ Partial,◐ Partial,❌ Poor,⚠ Not accessible,✗ Low,◐ Medium,"Three.js 10/10, R3F 10/10, Babylon.js 10/10",2020s Modern,High,"Build an immersive 3D interface using realistic textures, 3D models (Three.js/Babylon.js), complex shadows, realistic lighting, parallax scrolling (3-5 layers), physics-based motion. Include skeuomorphic elements with tactile detail.","transform: translate3d, perspective: 1000px, WebGL canvas, Three.js/Babylon.js library, box-shadow: complex multi-layer, background: complex gradients, filter: drop-shadow()","☐ WebGL/Three.js integrated, ☐ 3D models loaded, ☐ Parallax 3-5 layers, ☐ Realistic lighting verified, ☐ Complex shadows rendered, ☐ Physics animation smooth 300-400ms","--perspective: 1000px, --parallax-layers: 5, --lighting-intensity: realistic, --shadow-depth: 20-40%, --animation-duration: 300-400ms"
|
||||
6,Vibrant & Block-based,General,"Bold, energetic, playful, block layout, geometric shapes, high color contrast, duotone, modern, energetic","Neon Green #39FF14, Electric Purple #BF00FF, Vivid Pink #FF1493, Bright Cyan #00FFFF, Sunburst #FFAA00","Complementary: Orange #FF7F00, Shocking Pink #FF006E, Lime #CCFF00, triadic schemes","Large sections (48px+ gaps), animated patterns, bold hover (color shift), scroll-snap, large type (32px+), 200-300ms","Startups, creative agencies, gaming, social media, youth-focused, entertainment, consumer","Financial institutions, healthcare, formal business, government, conservative, elderly",✓ Full,✓ Full,⚡ Good,◐ Ensure WCAG,✓ High,✓ High,"Tailwind 10/10, Chakra 9/10, Styled 9/10",2020s Modern,Medium,"Design an energetic, vibrant interface with bold block layouts, geometric shapes, high color contrast, large typography (32px+), animated background patterns, duotone effects. Perfect for startups and youth-focused apps. Use 4-6 contrasting colors from complementary/triadic schemes.","display: flex/grid with large gaps (48px+), font-size: 32px+, background: animated patterns (CSS), color: neon/vibrant colors, animation: continuous pattern movement","☐ Block layout with 48px+ gaps, ☐ Large typography 32px+, ☐ 4-6 vibrant colors max, ☐ Animated patterns active, ☐ Scroll-snap enabled, ☐ High contrast verified (7:1+)","--block-gap: 48px, --typography-size: 32px+, --color-palette: 4-6 vibrant colors, --animation: continuous pattern, --contrast-ratio: 7:1+"
|
||||
7,Dark Mode (OLED),General,"Dark theme, low light, high contrast, deep black, midnight blue, eye-friendly, OLED, night mode, power efficient","Deep Black #000000, Dark Grey #121212, Midnight Blue #0A0E27","Vibrant accents: Neon Green #39FF14, Electric Blue #0080FF, Gold #FFD700, Plasma Purple #BF00FF","Minimal glow (text-shadow: 0 0 10px), dark-to-light transitions, low white emission, high readability, visible focus","Night-mode apps, coding platforms, entertainment, eye-strain prevention, OLED devices, low-light","Print-first content, high-brightness outdoor, color-accuracy-critical",✗ No,✓ Only,⚡ Excellent,✓ WCAG AAA,✓ High,◐ Low,"Tailwind 10/10, MUI 10/10, Chakra 10/10",2020s Modern,Low,"Create an OLED-optimized dark interface with deep black (#000000), dark grey (#121212), midnight blue accents. Use minimal glow effects, vibrant neon accents (green, blue, gold, purple), high contrast text. Optimize for eye comfort and OLED power saving.","background: #000000 or #121212, color: #FFFFFF or #E0E0E0, text-shadow: 0 0 10px neon-color (sparingly), filter: brightness(0.8) if needed, color-scheme: dark","☐ Deep black #000000 or #121212, ☐ Vibrant neon accents used, ☐ Text contrast 7:1+, ☐ Minimal glow effects, ☐ OLED power optimization, ☐ No white (#FFFFFF) background","--bg-black: #000000, --bg-dark-grey: #121212, --text-primary: #FFFFFF, --accent-neon: neon colors, --glow-effect: minimal, --oled-optimized: true"
|
||||
8,Accessible & Ethical,General,"High contrast, large text (16px+), keyboard navigation, screen reader friendly, WCAG compliant, focus state, semantic","WCAG AA/AAA (4.5:1 min), simple primary, clear secondary, high luminosity (7:1+)","Symbol-based colors (not color-only), supporting patterns, inclusive combinations","Clear focus rings (3-4px), ARIA labels, skip links, responsive design, reduced motion, 44x44px touch targets","Government, healthcare, education, inclusive products, large audience, legal compliance, public",None - accessibility universal,✓ Full,✓ Full,⚡ Excellent,✓ WCAG AAA,✓ High,✓ High,All frameworks 10/10,Universal,Low,"Design with WCAG AAA compliance. Include: high contrast (7:1+), large text (16px+), keyboard navigation, screen reader compatibility, focus states visible (3-4px ring), semantic HTML, ARIA labels, skip links, reduced motion support (prefers-reduced-motion), 44x44px touch targets.","color-contrast: 7:1+, font-size: 16px+, outline: 3-4px on :focus-visible, aria-label, role attributes, @media (prefers-reduced-motion), touch-target: 44x44px, cursor: pointer","☐ WCAG AAA verified, ☐ 7:1+ contrast checked, ☐ Keyboard navigation tested, ☐ Screen reader tested, ☐ Focus visible 3-4px, ☐ Semantic HTML used, ☐ Touch targets 44x44px","--contrast-ratio: 7:1, --font-size-min: 16px, --focus-ring: 3-4px, --touch-target: 44x44px, --wcag-level: AAA, --keyboard-accessible: true, --sr-tested: true"
|
||||
9,Claymorphism,General,"Soft 3D, chunky, playful, toy-like, bubbly, thick borders (3-4px), double shadows, rounded (16-24px)","Pastel: Soft Peach #FDBCB4, Baby Blue #ADD8E6, Mint #98FF98, Lilac #E6E6FA, light BG","Soft gradients (pastel-to-pastel), light/dark variations (20-30%), gradient subtle","Inner+outer shadows (subtle, no hard lines), soft press (200ms ease-out), fluffy elements, smooth transitions","Educational apps, children's apps, SaaS platforms, creative tools, fun-focused, onboarding, casual games","Formal corporate, professional services, data-critical, serious/medical, legal apps, finance",✓ Full,◐ Partial,⚡ Good,⚠ Ensure 4.5:1,✓ High,✓ High,"Tailwind 9/10, CSS-in-JS 9/10",2020s Modern,Medium,"Design a playful, toy-like interface with soft 3D, chunky elements, bubbly aesthetic, rounded edges (16-24px), thick borders (3-4px), double shadows (inner + outer), pastel colors, smooth animations. Perfect for children's apps and creative tools.","border-radius: 16-24px, border: 3-4px solid, box-shadow: inset -2px -2px 8px, 4px 4px 8px, background: pastel-gradient, animation: soft bounce (cubic-bezier 0.34, 1.56)","☐ Border-radius 16-24px, ☐ Thick borders 3-4px, ☐ Double shadows (inner+outer), ☐ Pastel colors used, ☐ Soft bounce animations, ☐ Playful interactions","--border-radius: 20px, --border-width: 3-4px, --shadow-inner: inset -2px -2px 8px, --shadow-outer: 4px 4px 8px, --color-palette: pastels, --animation: bounce"
|
||||
10,Aurora UI,General,"Vibrant gradients, smooth blend, Northern Lights effect, mesh gradient, luminous, atmospheric, abstract","Complementary: Blue-Orange, Purple-Yellow, Electric Blue #0080FF, Magenta #FF1493, Cyan #00FFFF","Smooth transitions (Blue→Purple→Pink→Teal), iridescent effects, blend modes (screen, multiply)","Large flowing CSS/SVG gradients, subtle 8-12s animations, depth via color layering, smooth morph","Modern SaaS, creative agencies, branding, music platforms, lifestyle, premium products, hero sections","Data-heavy dashboards, critical accessibility, content-heavy where distraction issues",✓ Full,✓ Full,⚠ Good,⚠ Text contrast,✓ Good,✓ High,"Tailwind 9/10, CSS-in-JS 10/10",2020s Modern,Medium,"Create a vibrant gradient interface inspired by Northern Lights with mesh gradients, smooth color blends, flowing animations. Use complementary color pairs (blue-orange, purple-yellow), flowing background gradients, subtle continuous animations (8-12s loops), iridescent effects.","background: conic-gradient or radial-gradient with multiple stops, animation: @keyframes gradient (8-12s), background-size: 200% 200%, filter: saturate(1.2), blend-mode: screen or multiply","☐ Mesh/flowing gradients applied, ☐ 8-12s animation loop, ☐ Complementary colors used, ☐ Smooth color transitions, ☐ Iridescent effect subtle, ☐ Text contrast verified","--gradient-colors: complementary pairs, --animation-duration: 8-12s, --blend-mode: screen, --color-saturation: 1.2, --effect: iridescent, --loop-smooth: true"
|
||||
11,Retro-Futurism,General,"Vintage sci-fi, 80s aesthetic, neon glow, geometric patterns, CRT scanlines, pixel art, cyberpunk, synthwave","Neon Blue #0080FF, Hot Pink #FF006E, Cyan #00FFFF, Deep Black #1A1A2E, Purple #5D34D0","Metallic Silver #C0C0C0, Gold #FFD700, duotone, 80s Pink #FF10F0, neon accents","CRT scanlines (::before overlay), neon glow (text-shadow+box-shadow), glitch effects (skew/offset keyframes)","Gaming, entertainment, music platforms, tech brands, artistic projects, nostalgic, cyberpunk","Conservative industries, critical accessibility, professional/corporate, elderly, legal/finance",✓ Full,✓ Dark focused,⚠ Moderate,⚠ High contrast/strain,◐ Medium,◐ Medium,"Tailwind 8/10, CSS-in-JS 9/10",1980s Retro,Medium,"Build a retro-futuristic (cyberpunk/vaporwave) interface with neon colors (blue, pink, cyan), deep black background, 80s aesthetic, CRT scanlines, glitch effects, neon glow text/borders, monospace fonts, geometric patterns. Use neon text-shadow and animated glitch effects.","color: neon colors (#0080FF, #FF006E, #00FFFF), text-shadow: 0 0 10px neon, background: #000 or #1A1A2E, font-family: monospace, animation: glitch (skew+offset), filter: hue-rotate","☐ Neon colors used, ☐ CRT scanlines effect, ☐ Glitch animations active, ☐ Monospace font, ☐ Deep black background, ☐ Glow effects applied, ☐ 80s patterns present","--neon-colors: #0080FF #FF006E #00FFFF, --background: #000000, --font-family: monospace, --effect: glitch+glow, --scanline-opacity: 0.3, --crt-effect: true"
|
||||
12,Flat Design,General,"2D, minimalist, bold colors, no shadows, clean lines, simple shapes, typography-focused, modern, icon-heavy","Solid bright: Red, Orange, Blue, Green, limited palette (4-6 max)","Complementary colors, muted secondaries, high saturation, clean accents","No gradients/shadows, simple hover (color/opacity shift), fast loading, clean transitions (150-200ms ease), minimal icons","Web apps, mobile apps, cross-platform, startup MVPs, user-friendly, SaaS, dashboards, corporate","Complex 3D, premium/luxury, artistic portfolios, immersive experiences, high-detail",✓ Full,✓ Full,⚡ Excellent,✓ WCAG AAA,✓ High,✓ High,"Tailwind 10/10, Bootstrap 10/10, MUI 9/10",2010s Modern,Low,"Create a flat, 2D interface with bold colors, no shadows/gradients, clean lines, simple geometric shapes, icon-heavy, typography-focused, minimal ornamentation. Use 4-6 solid, bright colors in a limited palette with high saturation.","box-shadow: none, background: solid color, border-radius: 0-4px, color: solid (no gradients), fill: solid, stroke: 1-2px, font: bold sans-serif, icons: simplified SVG","☐ No shadows/gradients, ☐ 4-6 solid colors max, ☐ Clean lines consistent, ☐ Simple shapes used, ☐ Icon-heavy layout, ☐ High saturation colors, ☐ Fast loading verified","--shadow: none, --color-palette: 4-6 solid, --border-radius: 2px, --gradient: none, --icons: simplified SVG, --animation: minimal 150-200ms"
|
||||
13,Skeuomorphism,General,"Realistic, texture, depth, 3D appearance, real-world metaphors, shadows, gradients, tactile, detailed, material","Rich realistic: wood, leather, metal colors, detailed gradients (8-12 stops), metallic effects","Realistic lighting gradients, shadow variations (30-50% darker), texture overlays, material colors","Realistic shadows (layers), depth (perspective), texture details (noise, grain), realistic animations (300-500ms)","Legacy apps, gaming, immersive storytelling, premium products, luxury, realistic simulations, education","Modern enterprise, critical accessibility, low-performance, web (use Flat/Modern)",◐ Partial,◐ Partial,❌ Poor,⚠ Textures reduce readability,✗ Low,◐ Medium,"CSS-in-JS 7/10, Custom 8/10",2007-2012 iOS,High,"Design a realistic, textured interface with 3D depth, real-world metaphors (leather, wood, metal), complex gradients (8-12 stops), realistic shadows, grain/texture overlays, tactile press animations. Perfect for premium/luxury products.","background: complex gradient (8-12 stops), box-shadow: realistic multi-layer, background-image: texture overlay (noise, grain), filter: drop-shadow, transform: scale on press (300-500ms)","☐ Realistic textures applied, ☐ Complex gradients 8-12 stops, ☐ Multi-layer shadows, ☐ Texture overlays present, ☐ Tactile animations smooth, ☐ Depth effect pronounced","--gradient-stops: 8-12, --texture-overlay: noise+grain, --shadow-layers: 3+, --animation-duration: 300-500ms, --depth-effect: pronounced, --tactile: true"
|
||||
14,Liquid Glass,General,"Flowing glass, morphing, smooth transitions, fluid effects, translucent, animated blur, iridescent, chromatic aberration","Vibrant iridescent (rainbow spectrum), translucent base with opacity shifts, gradient fluidity","Chromatic aberration (Red-Cyan), iridescent oil-spill, fluid gradient blends, holographic effects","Morphing elements (SVG/CSS), fluid animations (400-600ms curves), dynamic blur (backdrop-filter), color transitions","Premium SaaS, high-end e-commerce, creative platforms, branding experiences, luxury portfolios","Performance-limited, critical accessibility, complex data, budget projects",✓ Full,✓ Full,⚠ Moderate-Poor,⚠ Text contrast,◐ Medium,✓ High,"Framer Motion 10/10, GSAP 10/10",2020s Modern,High,"Create a premium liquid glass effect with morphing shapes, flowing animations, chromatic aberration, iridescent gradients, smooth 400-600ms transitions. Use SVG morphing for shape changes, dynamic blur, smooth color transitions creating a fluid, premium feel.","animation: morphing SVG paths (400-600ms), backdrop-filter: blur + saturate, filter: hue-rotate + brightness, blend-mode: screen, background: iridescent gradient","☐ Morphing animations 400-600ms, ☐ Chromatic aberration applied, ☐ Dynamic blur active, ☐ Iridescent gradients, ☐ Smooth color transitions, ☐ Premium feel achieved","--morph-duration: 400-600ms, --blur-amount: 15px, --chromatic-aberration: true, --iridescent: true, --blend-mode: screen, --smooth-transitions: true"
|
||||
15,Motion-Driven,General,"Animation-heavy, microinteractions, smooth transitions, scroll effects, parallax, entrance anim, page transitions","Bold colors emphasize movement, high contrast animated, dynamic gradients, accent action colors","Transitional states, success (Green #22C55E), error (Red #EF4444), neutral feedback","Scroll anim (Intersection Observer), hover (300-400ms), entrance, parallax (3-5 layers), page transitions","Portfolio sites, storytelling platforms, interactive experiences, entertainment apps, creative, SaaS","Data dashboards, critical accessibility, low-power devices, content-heavy, motion-sensitive",✓ Full,✓ Full,⚠ Good,⚠ Prefers-reduced-motion,✓ Good,✓ High,"GSAP 10/10, Framer Motion 10/10",2020s Modern,High,"Build an animation-heavy interface with scroll-triggered animations, microinteractions, parallax scrolling (3-5 layers), smooth transitions (300-400ms), entrance animations, page transitions. Use Intersection Observer for scroll effects, transform for performance, GPU acceleration.","animation: @keyframes scroll-reveal, transform: translateY/X, Intersection Observer API, will-change: transform, scroll-behavior: smooth, animation-duration: 300-400ms","☐ Scroll animations active, ☐ Parallax 3-5 layers, ☐ Entrance animations smooth, ☐ Page transitions fluid, ☐ GPU accelerated, ☐ Prefers-reduced-motion respected","--animation-duration: 300-400ms, --parallax-layers: 5, --scroll-behavior: smooth, --gpu-accelerated: true, --entrance-animation: true, --page-transition: smooth"
|
||||
16,Micro-interactions,General,"Small animations, gesture-based, tactile feedback, subtle animations, contextual interactions, responsive","Subtle color shifts (10-20%), feedback: Green #22C55E, Red #EF4444, Amber #F59E0B","Accent feedback, neutral supporting, clear action indicators","Small hover (50-100ms), loading spinners, success/error state anim, gesture-triggered (swipe/pinch), haptic","Mobile apps, touchscreen UIs, productivity tools, user-friendly, consumer apps, interactive components","Desktop-only, critical performance, accessibility-first (alternatives needed)",✓ Full,✓ Full,⚡ Excellent,✓ Good,✓ High,✓ High,"Framer Motion 10/10, React Spring 9/10",2020s Modern,Medium,"Design with delightful micro-interactions: small 50-100ms animations, gesture-based responses, tactile feedback, loading spinners, success/error states, subtle hover effects, haptic feedback triggers for mobile. Focus on responsive, contextual interactions.","animation: short 50-100ms, transition: hover states, @media (hover: hover) for desktop, :active for press, haptic-feedback CSS/API, loading animation smooth loop","☐ Micro-animations 50-100ms, ☐ Gesture-responsive, ☐ Tactile feedback visual/haptic, ☐ Loading spinners smooth, ☐ Success/error states clear, ☐ Hover effects subtle","--micro-animation-duration: 50-100ms, --gesture-responsive: true, --haptic-feedback: true, --loading-animation: smooth, --state-feedback: success+error"
|
||||
17,Inclusive Design,General,"Accessible, color-blind friendly, high contrast, haptic feedback, voice interaction, screen reader, WCAG AAA, universal","WCAG AAA (7:1+ contrast), avoid red-green only, symbol-based indicators, high contrast primary","Supporting patterns (stripes, dots, hatch), symbols, combinations, clear non-color indicators","Haptic feedback (vibration), voice guidance, focus indicators (4px+ ring), motion options, alt content, semantic","Public services, education, healthcare, finance, government, accessible consumer, inclusive",None - accessibility universal,✓ Full,✓ Full,⚡ Excellent,✓ WCAG AAA,✓ High,✓ High,All frameworks 10/10,Universal,Low,"Design for universal accessibility: high contrast (7:1+), large text (16px+), keyboard-only navigation, screen reader optimization, WCAG AAA compliance, symbol-based color indicators (not color-only), haptic feedback, voice interaction support, reduced motion options.","aria-* attributes complete, role attributes semantic, focus-visible: 3-4px ring, color-contrast: 7:1+, @media (prefers-reduced-motion), alt text on all images, form labels properly associated","☐ WCAG AAA verified, ☐ 7:1+ contrast all text, ☐ Keyboard accessible (Tab/Enter), ☐ Screen reader tested, ☐ Focus visible 3-4px, ☐ No color-only indicators, ☐ Haptic fallback","--contrast-ratio: 7:1, --font-size: 16px+, --keyboard-accessible: true, --sr-compatible: true, --wcag-level: AAA, --color-symbols: true, --haptic: enabled"
|
||||
18,Zero Interface,General,"Minimal visible UI, voice-first, gesture-based, AI-driven, invisible controls, predictive, context-aware, ambient","Neutral backgrounds: Soft white #FAFAFA, light grey #F0F0F0, warm off-white #F5F1E8","Subtle feedback: light green, light red, minimal UI elements, soft accents","Voice recognition UI, gesture detection, AI predictions (smooth reveal), progressive disclosure, smart suggestions","Voice assistants, AI platforms, future-forward UX, smart home, contextual computing, ambient experiences","Complex workflows, data-entry heavy, traditional systems, legacy support, explicit control",✓ Full,✓ Full,⚡ Excellent,✓ Excellent,✓ High,✓ High,"Tailwind 10/10, Custom 10/10",2020s AI-Era,Low,"Create a voice-first, gesture-based, AI-driven interface with minimal visible UI, progressive disclosure, voice recognition UI, gesture detection, AI predictions, smart suggestions, context-aware actions. Hide controls until needed.","voice-commands: Web Speech API, gesture-detection: touch events, AI-predictions: hidden by default (reveal on hover), progressive-disclosure: show on demand, minimal UI visible","☐ Voice commands responsive, ☐ Gesture detection active, ☐ AI predictions hidden/revealed, ☐ Progressive disclosure working, ☐ Minimal visible UI, ☐ Smart suggestions contextual","--voice-ui: enabled, --gesture-detection: active, --ai-predictions: smart, --progressive-disclosure: true, --visible-ui: minimal, --context-aware: true"
|
||||
19,Soft UI Evolution,General,"Evolved soft UI, better contrast, modern aesthetics, subtle depth, accessibility-focused, improved shadows, hybrid","Improved contrast pastels: Soft Blue #87CEEB, Soft Pink #FFB6C1, Soft Green #90EE90, better hierarchy","Better combinations, accessible secondary, supporting with improved contrast, modern accents","Improved shadows (softer than flat, clearer than neumorphism), modern (200-300ms), focus visible, WCAG AA/AAA","Modern enterprise apps, SaaS platforms, health/wellness, modern business tools, professional, hybrid","Extreme minimalism, critical performance, systems without modern OS",✓ Full,✓ Full,⚡ Excellent,✓ WCAG AA+,✓ High,✓ High,"Tailwind 9/10, MUI 9/10, Chakra 9/10",2020s Modern,Medium,"Design evolved neumorphism with improved contrast (WCAG AA+), modern aesthetics, subtle depth, accessibility focus. Use soft shadows (softer than flat but clearer than pure neumorphism), better color hierarchy, improved focus states, modern 200-300ms animations.","box-shadow: softer multi-layer (0 2px 4px), background: improved contrast pastels, border-radius: 8-12px, animation: 200-300ms smooth, outline: 2-3px on focus, contrast: 4.5:1+","☐ Improved contrast AA/AAA, ☐ Soft shadows modern, ☐ Border-radius 8-12px, ☐ Animations 200-300ms, ☐ Focus states visible, ☐ Color hierarchy clear","--shadow-soft: modern blend, --border-radius: 10px, --animation-duration: 200-300ms, --contrast-ratio: 4.5:1+, --color-hierarchy: improved, --wcag-level: AA+"
|
||||
20,Hero-Centric Design,Landing Page,"Large hero section, compelling headline, high-contrast CTA, product showcase, value proposition, hero image/video, dramatic visual","Brand primary color, white/light backgrounds for contrast, accent color for CTA","Supporting colors for secondary CTAs, accent highlights, trust elements (testimonials, logos)","Smooth scroll reveal, fade-in animations on hero, subtle background parallax, CTA glow/pulse effect","SaaS landing pages, product launches, service landing pages, B2B platforms, tech companies","Complex navigation, multi-page experiences, data-heavy applications",✓ Full,✓ Full,⚡ Good,✓ WCAG AA,✓ Full,✓ Very High,"Tailwind 10/10, Bootstrap 9/10",2020s Modern,Medium,"Design a hero-centric landing page. Use: full-width hero section, compelling headline (60-80 chars), high-contrast CTA button, product screenshot or video, value proposition above fold, gradient or image background, clear visual hierarchy.","min-height: 100vh, display: flex, align-items: center, background: linear-gradient or image, text-shadow for readability, max-width: 800px for text, button with hover scale (1.05)","☐ Hero section full viewport height, ☐ Headline visible above fold, ☐ CTA button high contrast, ☐ Background image optimized (WebP), ☐ Text readable on background, ☐ Mobile responsive layout","--hero-min-height: 100vh, --headline-size: clamp(2rem, 5vw, 4rem), --cta-padding: 1rem 2rem, --overlay-opacity: 0.5, --text-shadow: 0 2px 4px rgba(0,0,0,0.3)"
|
||||
21,Conversion-Optimized,Landing Page,"Form-focused, minimalist design, single CTA focus, high contrast, urgency elements, trust signals, social proof, clear value","Primary brand color, high-contrast white/light backgrounds, warning/urgency colors for time-limited offers","Secondary CTA color (muted), trust element colors (testimonial highlights), accent for key benefits","Hover states on CTA (color shift, slight scale), form field focus animations, loading spinner, success feedback","E-commerce product pages, free trial signups, lead generation, SaaS pricing pages, limited-time offers","Complex feature explanations, multi-product showcases, technical documentation",✓ Full,✓ Full,⚡ Excellent,✓ WCAG AA,✓ Full (mobile-optimized),✓ Very High,"Tailwind 10/10, Bootstrap 9/10",2020s Modern,Medium,"Design a conversion-optimized landing page. Use: single primary CTA, minimal distractions, trust badges, urgency elements (limited time), social proof (testimonials), clear value proposition, form above fold, progress indicators.","form with focus states, input:focus ring, button: primary color high contrast, position: sticky for CTA, max-width: 600px for form, loading spinner, success/error states","☐ Single primary CTA visible, ☐ Form fields minimal (3-5), ☐ Trust badges present, ☐ Social proof above fold, ☐ Mobile form optimized, ☐ Loading states implemented, ☐ A/B test ready","--cta-color: high contrast primary, --form-max-width: 600px, --input-height: 48px, --focus-ring: 3px solid accent, --success-color: #22C55E, --error-color: #EF4444"
|
||||
22,Feature-Rich Showcase,Landing Page,"Multiple feature sections, grid layout, benefit cards, visual feature demonstrations, interactive elements, problem-solution pairs","Primary brand, bright secondary colors for feature cards, contrasting accent for CTAs","Supporting colors for: benefits (green), problems (red/orange), features (blue/purple), social proof (neutral)","Card hover effects (lift/scale), icon animations on scroll, feature toggle animations, smooth section transitions","Enterprise SaaS, software tools landing pages, platform services, complex product explanations, B2B products","Simple product pages, early-stage startups with few features, entertainment landing pages",✓ Full,✓ Full,⚡ Good,✓ WCAG AA,✓ Good,✓ High,"Tailwind 10/10, Bootstrap 9/10",2020s Modern,Medium,"Design a feature showcase landing page. Use: grid layout for features (3-4 columns), feature cards with icons, benefit-focused copy, alternating sections, comparison tables, interactive demos, problem-solution pairs.","display: grid, grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)), gap: 2rem, card hover effects (translateY -4px), icon containers, alternating background colors","☐ Feature grid responsive, ☐ Icons consistent style, ☐ Card hover effects smooth, ☐ Alternating sections contrast, ☐ Benefits clearly stated, ☐ Mobile stacks properly","--card-padding: 2rem, --card-radius: 12px, --icon-size: 48px, --grid-gap: 2rem, --section-padding: 4rem 0, --hover-transform: translateY(-4px)"
|
||||
23,Minimal & Direct,Landing Page,"Minimal text, white space heavy, single column layout, direct messaging, clean typography, visual-centric, fast-loading","Monochromatic primary, white background, single accent color for CTA, black/dark grey text","Minimal secondary colors, reserved for critical CTAs only, neutral supporting elements","Very subtle hover effects, minimal animations, fast page load (no heavy animations), smooth scroll","Simple service landing pages, indie products, consulting services, micro SaaS, freelancer portfolios","Feature-heavy products, complex explanations, multi-product showcases",✓ Full,✓ Full,⚡ Excellent,✓ WCAG AAA,✓ Full,✓ High,"Tailwind 10/10, Bootstrap 9/10",2020s Modern,Medium,"Design a minimal direct landing page. Use: single column layout, maximum white space, essential content only, one CTA, clean typography, no decorative elements, fast loading, direct messaging.","max-width: 680px, margin: 0 auto, padding: 4rem 2rem, font-size: 18-20px, line-height: 1.6, minimal animations, no box-shadow, clean borders only","☐ Single column centered, ☐ White space generous, ☐ One primary CTA only, ☐ No decorative images, ☐ Page weight < 500KB, ☐ Load time < 2s","--content-max-width: 680px, --spacing-large: 4rem, --font-size-body: 18px, --line-height: 1.6, --color-text: #1a1a1a, --color-bg: #ffffff"
|
||||
24,Social Proof-Focused,Landing Page,"Testimonials prominent, client logos displayed, case studies sections, reviews/ratings, user avatars, success metrics, credibility markers","Primary brand, trust colors (blue), success/growth colors (green), neutral backgrounds","Testimonial highlight colors, logo grid backgrounds (light grey), badge/achievement colors","Testimonial carousel animations, logo grid fade-in, stat counter animations (number count-up), review star ratings","B2B SaaS, professional services, premium products, e-commerce conversion pages, established brands","Startup MVPs, products without users, niche/experimental products",✓ Full,✓ Full,⚡ Good,✓ WCAG AA,✓ Full,✓ High,"Tailwind 10/10, Bootstrap 9/10",2020s Modern,Medium,"Design a social proof landing page. Use: testimonials with photos, client logos grid, case study cards, review ratings (stars), user count metrics, success stories, trust indicators, before/after comparisons.","testimonial cards with avatar, logo grid (grayscale filter), star rating SVGs, counter animations (count-up), blockquote styling, carousel for testimonials, metric cards","☐ Testimonials with real photos, ☐ Logo grid 6-12 logos, ☐ Star ratings accessible, ☐ Metrics animated on scroll, ☐ Case studies linked, ☐ Mobile carousel works","--avatar-size: 64px, --logo-height: 40px, --star-color: #FBBF24, --metric-font-size: 3rem, --testimonial-bg: #F9FAFB, --blockquote-border: 4px solid accent"
|
||||
25,Interactive Product Demo,Landing Page,"Embedded product mockup/video, interactive elements, product walkthrough, step-by-step guides, hover-to-reveal features, embedded demos","Primary brand, interface colors matching product, demo highlight colors for interactive elements","Product UI colors, tutorial step colors (numbered progression), hover state indicators","Product animation playback, step progression animations, hover reveal effects, smooth zoom on interaction","SaaS platforms, tool/software products, productivity apps landing pages, developer tools, productivity software","Simple services, consulting, non-digital products, complexity-averse audiences",✓ Full,✓ Full,⚠ Good (video/interactive),✓ WCAG AA,✓ Good,✓ Very High,"Tailwind 10/10, Bootstrap 9/10",2020s Modern,Medium,"Design an interactive demo landing page. Use: embedded product mockup, video walkthrough, step-by-step guide, hover-to-reveal features, live demo button, screenshot carousel, feature highlights on interaction.","video element with controls, position: relative for overlays, hover reveal (opacity transition), step indicators, modal for full demo, screenshot lightbox, play button overlay","☐ Demo video loads fast, ☐ Fallback for no-JS, ☐ Step indicators clear, ☐ Hover states obvious, ☐ Mobile touch friendly, ☐ Demo CTA prominent","--video-aspect-ratio: 16/9, --overlay-bg: rgba(0,0,0,0.7), --step-indicator-size: 32px, --play-button-size: 80px, --transition-duration: 300ms"
|
||||
26,Trust & Authority,Landing Page,"Certificates/badges displayed, expert credentials, case studies with metrics, before/after comparisons, industry recognition, security badges","Professional colors (blue/grey), trust colors, certification badge colors (gold/silver accents)","Certificate highlight colors, metric showcase colors, comparison highlight (success green)","Badge hover effects, metric pulse animations, certificate carousel, smooth stat reveal","Healthcare/medical landing pages, financial services, enterprise software, premium/luxury products, legal services","Casual products, entertainment, viral/social-first products",✓ Full,✓ Full,⚡ Excellent,✓ WCAG AAA,✓ Full,✓ High,"Tailwind 10/10, Bootstrap 9/10",2020s Modern,Medium,"Design a trust-focused landing page. Use: certification badges, security indicators, expert credentials, industry awards, case study metrics, compliance logos (GDPR, SOC2), guarantee badges, professional photography.","badge grid layout, shield icons, lock icons for security, certificate styling, metric cards with icons, professional color scheme (blue/grey), subtle shadows for depth","☐ Security badges visible, ☐ Certifications verified, ☐ Metrics with sources, ☐ Professional imagery, ☐ Guarantee clearly stated, ☐ Contact info accessible","--badge-height: 48px, --trust-color: #1E40AF, --security-green: #059669, --card-shadow: 0 4px 6px rgba(0,0,0,0.1), --metric-highlight: #F59E0B"
|
||||
27,Storytelling-Driven,Landing Page,"Narrative flow, visual story progression, section transitions, consistent character/brand voice, emotional messaging, journey visualization","Brand primary, warm/emotional colors, varied accent colors per story section, high visual variety","Story section color coding, emotional state colors (calm, excitement, success), transitional gradients","Section-to-section animations, scroll-triggered reveals, character/icon animations, morphing transitions, parallax narrative","Brand/startup stories, mission-driven products, premium/lifestyle brands, documentary-style products, educational","Technical/complex products (unless narrative-driven), traditional enterprise software",✓ Full,✓ Full,⚠ Moderate (animations),✓ WCAG AA,✓ Good,✓ High,"Tailwind 10/10, Bootstrap 9/10",2020s Modern,Medium,"Design a storytelling landing page. Use: narrative flow sections, scroll-triggered reveals, chapter-like structure, emotional imagery, brand journey visualization, founder story, mission statement, timeline progression.","scroll-snap sections, Intersection Observer for reveals, parallax backgrounds, section transitions, timeline CSS, narrative typography (varied sizes), image-text alternating","☐ Story flows naturally, ☐ Scroll reveals smooth, ☐ Sections timed well, ☐ Emotional hooks present, ☐ Mobile story readable, ☐ Skip option available","--section-min-height: 100vh, --reveal-duration: 600ms, --narrative-font: serif, --chapter-spacing: 8rem, --timeline-color: accent, --parallax-speed: 0.5"
|
||||
28,Data-Dense Dashboard,BI/Analytics,"Multiple charts/widgets, data tables, KPI cards, minimal padding, grid layout, space-efficient, maximum data visibility","Neutral primary (light grey/white #F5F5F5), data colors (blue/green/red), dark text #333333","Chart colors: success (green #22C55E), warning (amber #F59E0B), alert (red #EF4444), neutral (grey)","Hover tooltips, chart zoom on click, row highlighting on hover, smooth filter animations, data loading spinners","Business intelligence dashboards, financial analytics, enterprise reporting, operational dashboards, data warehousing","Marketing dashboards, consumer-facing analytics, simple reporting",✓ Full,✓ Full,⚡ Excellent,✓ WCAG AA,◐ Medium,✗ Not applicable,"Recharts 9/10, Chart.js 9/10, D3.js 10/10",2020s Modern,Medium,"Design a data-dense dashboard. Use: multiple chart widgets, KPI cards row, data tables with sorting, minimal padding (8-12px), efficient grid layout, filter sidebar, dense but readable typography, maximum information density.","display: grid, grid-template-columns: repeat(12, 1fr), gap: 8px, padding: 12px, font-size: 12-14px, overflow: auto for tables, compact card design, sticky headers","☐ Grid layout 12 columns, ☐ KPI cards responsive, ☐ Tables sortable, ☐ Filters functional, ☐ Loading states for data, ☐ Export functionality","--grid-gap: 8px, --card-padding: 12px, --font-size-small: 12px, --table-row-height: 36px, --sidebar-width: 240px, --header-height: 56px"
|
||||
29,Heat Map & Heatmap Style,BI/Analytics,"Color-coded grid/matrix, data intensity visualization, geographical heat maps, correlation matrices, cell-based representation, gradient coloring","Gradient scale: Cool (blue #0080FF) to hot (red #FF0000), neutral middle (white/yellow)","Support gradients: Light (cool blue) to dark (warm red), divergent for positive/negative data, monochromatic options","Color gradient transitions on data change, cell highlighting on hover, tooltip reveal on click, smooth color animation","Geographical analysis, performance matrices, correlation analysis, user behavior heatmaps, temperature/intensity data","Linear data representation, categorical comparisons (use bar charts), small datasets",✓ Full,✓ Full (with adjustments),⚡ Excellent,⚠ Colorblind considerations,◐ Medium,✗ Not applicable,"Recharts 9/10, Chart.js 9/10, D3.js 10/10",2020s Modern,Medium,"Design a heatmap visualization. Use: color gradient scale (cool to hot), cell-based grid, intensity legend, hover tooltips, geographic or matrix layout, divergent color scheme for +/- values, accessible color alternatives.","display: grid, background: linear-gradient for legend, cell hover states, tooltip positioning, color scale (blue→white→red), SVG for geographic, canvas for large datasets","☐ Color scale clear, ☐ Legend visible, ☐ Tooltips informative, ☐ Colorblind alternatives, ☐ Zoom/pan for geo, ☐ Performance for large data","--heatmap-cool: #0080FF, --heatmap-neutral: #FFFFFF, --heatmap-hot: #FF0000, --cell-size: 24px, --legend-width: 200px, --tooltip-bg: rgba(0,0,0,0.9)"
|
||||
30,Executive Dashboard,BI/Analytics,"High-level KPIs, large key metrics, minimal detail, summary view, trend indicators, at-a-glance insights, executive summary","Brand colors, professional palette (blue/grey/white), accent for KPIs, red for alerts/concerns","KPI highlight colors: positive (green), negative (red), neutral (grey), trend arrow colors","KPI value animations (count-up), trend arrow direction animations, metric card hover lift, alert pulse effect","C-suite dashboards, business summary reports, decision-maker dashboards, strategic planning views","Detailed analyst dashboards, technical deep-dives, operational monitoring",✓ Full,✓ Full,⚡ Excellent,✓ WCAG AA,✗ Low (not mobile-optimized),✗ Not applicable,"Recharts 9/10, Chart.js 9/10, D3.js 10/10",2020s Modern,Medium,"Design an executive dashboard. Use: large KPI cards (4-6 max), trend sparklines, high-level summary only, clean layout with white space, traffic light indicators (red/yellow/green), at-a-glance insights, minimal detail.","display: flex for KPI row, large font-size (24-48px) for metrics, sparkline SVG inline, status indicators (border-left color), card shadows for hierarchy, responsive breakpoints","☐ KPIs 4-6 maximum, ☐ Trends visible, ☐ Status colors clear, ☐ One-page view, ☐ Mobile simplified, ☐ Print-friendly layout","--kpi-font-size: 48px, --sparkline-height: 32px, --status-green: #22C55E, --status-yellow: #F59E0B, --status-red: #EF4444, --card-min-width: 280px"
|
||||
31,Real-Time Monitoring,BI/Analytics,"Live data updates, status indicators, alert notifications, streaming data visualization, active monitoring, streaming charts","Alert colors: critical (red #FF0000), warning (orange #FFA500), normal (green #22C55E), updating (blue animation)","Status indicator colors, chart line colors varying by metric, streaming data highlight colors","Real-time chart animations, alert pulse/glow, status indicator blink animation, smooth data stream updates, loading effect","System monitoring dashboards, DevOps dashboards, real-time analytics, stock market dashboards, live event tracking","Historical analysis, long-term trend reports, archived data dashboards",✓ Full,✓ Full,⚡ Good (real-time load),✓ WCAG AA,◐ Medium,✗ Not applicable,"Recharts 9/10, Chart.js 9/10, D3.js 10/10",2020s Modern,Medium,"Design a real-time monitoring dashboard. Use: live status indicators (pulsing), streaming charts, alert notifications, connection status, auto-refresh indicators, critical alerts prominent, system health overview.","animation: pulse for live, WebSocket for streaming, position: fixed for alerts, status-dot with animation, chart real-time updates, notification toast, connection indicator","☐ Live updates working, ☐ Alert sounds optional, ☐ Connection status shown, ☐ Auto-refresh indicated, ☐ Critical alerts prominent, ☐ Offline fallback","--pulse-animation: pulse 2s infinite, --alert-z-index: 1000, --live-indicator: #22C55E, --critical-color: #DC2626, --update-interval: 5s, --toast-duration: 5s"
|
||||
32,Drill-Down Analytics,BI/Analytics,"Hierarchical data exploration, expandable sections, interactive drill-down paths, summary-to-detail flow, context preservation","Primary brand, breadcrumb colors, drill-level indicator colors, hierarchy depth colors","Drill-down path indicator colors, level-specific colors, highlight colors for selected level, transition colors","Drill-down expand animations, breadcrumb click transitions, smooth detail reveal, level change smooth, data reload animation","Sales analytics, product analytics, funnel analysis, multi-dimensional data exploration, business intelligence","Simple linear data, single-metric dashboards, streaming real-time dashboards",✓ Full,✓ Full,⚡ Good,✓ WCAG AA,◐ Medium,✗ Not applicable,"Recharts 9/10, Chart.js 9/10, D3.js 10/10",2020s Modern,Medium,"Design a drill-down analytics dashboard. Use: breadcrumb navigation, expandable sections, summary-to-detail flow, back button prominent, level indicators, context preservation, hierarchical data display.","breadcrumb nav with separators, details/summary for expand, transition for drill animation, position: sticky breadcrumb, nested grid layouts, smooth scroll to detail","☐ Breadcrumbs clear, ☐ Back navigation easy, ☐ Expand animation smooth, ☐ Context preserved, ☐ Mobile drill works, ☐ Deep links supported","--breadcrumb-separator: /, --expand-duration: 300ms, --level-indent: 24px, --back-button-size: 40px, --context-bar-height: 48px, --drill-transition: 300ms ease"
|
||||
33,Comparative Analysis Dashboard,BI/Analytics,"Side-by-side comparisons, period-over-period metrics, A/B test results, regional comparisons, performance benchmarks","Comparison colors: primary (blue), comparison (orange/purple), delta indicator (green/red)","Winning metric color (green), losing metric color (red), neutral comparison (grey), benchmark colors","Comparison bar animations (grow to value), delta indicator animations (direction arrows), highlight on compare","Period-over-period reporting, A/B test dashboards, market comparison, competitive analysis, regional performance","Single metric dashboards, future projections (use forecasting), real-time only (no historical)",✓ Full,✓ Full,⚡ Excellent,✓ WCAG AA,◐ Medium,✗ Not applicable,"Recharts 9/10, Chart.js 9/10, D3.js 10/10",2020s Modern,Medium,"Design a comparison dashboard. Use: side-by-side metrics, period selectors (vs last month), delta indicators (+/-), benchmark lines, A/B comparison tables, winning/losing highlights, percentage change badges.","display: flex for side-by-side, gap for comparison spacing, color coding (green up, red down), arrow indicators, diff highlighting, comparison table zebra striping","☐ Period selector works, ☐ Deltas calculated, ☐ Colors meaningful, ☐ Benchmarks shown, ☐ Mobile stacks properly, ☐ Export comparison","--positive-color: #22C55E, --negative-color: #EF4444, --neutral-color: #6B7280, --comparison-gap: 2rem, --arrow-size: 16px, --badge-padding: 4px 8px"
|
||||
34,Predictive Analytics,BI/Analytics,"Forecast lines, confidence intervals, trend projections, scenario modeling, AI-driven insights, anomaly detection visualization","Forecast line color (distinct from actual), confidence interval shading, anomaly highlight (red alert), trend colors","High confidence (dark color), low confidence (light color), anomaly colors (red/orange), normal trend (green/blue)","Forecast line animation on draw, confidence band fade-in, anomaly pulse alert, smoothing function animations","Forecasting dashboards, anomaly detection systems, trend prediction dashboards, AI-powered analytics, budget planning","Historical-only dashboards, simple reporting, real-time operational dashboards",✓ Full,✓ Full,⚠ Good (computation),✓ WCAG AA,◐ Medium,✗ Not applicable,"Recharts 9/10, Chart.js 9/10, D3.js 10/10",2020s Modern,Medium,"Design a predictive analytics dashboard. Use: forecast lines (dashed), confidence intervals (shaded bands), trend projections, anomaly highlights, scenario toggles, AI insight cards, probability indicators.","stroke-dasharray for forecast lines, fill-opacity for confidence bands, anomaly markers (circles), tooltip for predictions, toggle switches for scenarios, gradient for probability","☐ Forecast line distinct, ☐ Confidence bands visible, ☐ Anomalies highlighted, ☐ Scenarios switchable, ☐ Predictions dated, ☐ Accuracy shown","--forecast-dash: 5 5, --confidence-opacity: 0.2, --anomaly-color: #F59E0B, --prediction-color: #8B5CF6, --scenario-toggle-width: 48px, --ai-accent: #6366F1"
|
||||
35,User Behavior Analytics,BI/Analytics,"Funnel visualization, user flow diagrams, conversion tracking, engagement metrics, user journey mapping, cohort analysis","Funnel stage colors: high engagement (green), drop-off (red), conversion (blue), user flow arrows (grey)","Stage completion colors (success), abandonment colors (warning), engagement levels (gradient), cohort colors","Funnel animation (fill-down), flow diagram animations (connection draw), conversion pulse, engagement bar fill","Conversion funnel analysis, user journey tracking, engagement analytics, cohort analysis, retention tracking","Real-time operational metrics, technical system monitoring, financial transactions",✓ Full,✓ Full,⚡ Good,✓ WCAG AA,✓ Good,✗ Not applicable,"Recharts 9/10, Chart.js 9/10, D3.js 10/10",2020s Modern,Medium,"Design a user behavior analytics dashboard. Use: funnel visualization, user flow diagrams (Sankey), conversion metrics, engagement heatmaps, cohort tables, retention curves, session replay indicators.","SVG funnel with gradients, Sankey diagram library, percentage labels, cohort grid cells, retention chart (line/area), click heatmap overlay, session timeline","☐ Funnel stages clear, ☐ Flow diagram readable, ☐ Conversions calculated, ☐ Cohorts comparable, ☐ Retention trends visible, ☐ Privacy compliant","--funnel-width: 100%, --stage-colors: gradient, --flow-opacity: 0.6, --cohort-cell-size: 40px, --retention-line-color: #3B82F6, --engagement-scale: 5 levels"
|
||||
36,Financial Dashboard,BI/Analytics,"Revenue metrics, profit/loss visualization, budget tracking, financial ratios, portfolio performance, cash flow, audit trail","Financial colors: profit (green #22C55E), loss (red #EF4444), neutral (grey), trust (dark blue #003366)","Revenue highlight (green), expenses (red), budget variance (orange/red), balance (grey), accuracy (blue)","Number animations (count-up), trend direction indicators, percentage change animations, profit/loss color transitions","Financial reporting, accounting dashboards, portfolio tracking, budget monitoring, banking analytics","Simple business dashboards, entertainment/social metrics, non-financial data",✓ Full,✓ Full,⚡ Excellent,✓ WCAG AAA,✗ Low,✗ Not applicable,"Recharts 9/10, Chart.js 9/10, D3.js 10/10",2020s Modern,Medium,"Design a financial dashboard. Use: revenue/expense charts, profit margins, budget vs actual, cash flow waterfall, financial ratios, audit trail table, currency formatting, period comparisons.","number formatting (Intl.NumberFormat), waterfall chart (positive/negative bars), variance coloring, table with totals row, sparkline for trends, sticky column headers","☐ Currency formatted, ☐ Decimals consistent, ☐ P&L clear, ☐ Budget variance shown, ☐ Audit trail complete, ☐ Export to Excel","--currency-symbol: $, --decimal-places: 2, --profit-color: #22C55E, --loss-color: #EF4444, --variance-threshold: 10%, --table-header-bg: #F3F4F6"
|
||||
37,Sales Intelligence Dashboard,BI/Analytics,"Deal pipeline, sales metrics, territory performance, sales rep leaderboard, win-loss analysis, quota tracking, forecast accuracy","Sales colors: won (green), lost (red), in-progress (blue), blocked (orange), quota met (gold), quota missed (grey)","Pipeline stage colors, rep performance colors, quota achievement colors, forecast accuracy colors","Deal movement animations, metric updates, leaderboard ranking changes, gauge needle movements, status change highlights","CRM dashboards, sales management, opportunity tracking, performance management, quota planning","Marketing analytics, customer support metrics, HR dashboards",✓ Full,✓ Full,⚡ Good,✓ WCAG AA,◐ Medium,✗ Not applicable,"Recharts 9/10, Chart.js 9/10",2020s Modern,Medium,"Design a sales intelligence dashboard. Use: pipeline funnel, deal cards (kanban), quota gauges, leaderboard table, territory map, win/loss ratios, forecast accuracy, activity timeline.","kanban columns (flex), gauge chart (SVG arc), leaderboard ranking styles, map integration (Mapbox/Google), timeline vertical, deal card with status border","☐ Pipeline stages shown, ☐ Deals draggable, ☐ Quotas visualized, ☐ Rankings updated, ☐ Territory clickable, ☐ CRM integration","--pipeline-colors: stage gradient, --gauge-track: #E5E7EB, --gauge-fill: primary, --rank-1-color: #FFD700, --rank-2-color: #C0C0C0, --rank-3-color: #CD7F32"
|
||||
38,Neubrutalism,General,"Bold borders, black outlines, primary colors, thick shadows, no gradients, flat colors, 45° shadows, playful, Gen Z","#FFEB3B (Yellow), #FF5252 (Red), #2196F3 (Blue), #000000 (Black borders)","Limited accent colors, high contrast combinations, no gradients allowed","box-shadow: 4px 4px 0 #000, border: 3px solid #000, no gradients, sharp corners (0px), bold typography","Gen Z brands, startups, creative agencies, Figma-style apps, Notion-style interfaces, tech blogs","Luxury brands, finance, healthcare, conservative industries (too playful)",✓ Full,✓ Full,⚡ Excellent,✓ WCAG AAA,✓ High,✓ High,"Tailwind 10/10, Bootstrap 8/10",2020s Modern,Low,"Design a neubrutalist interface. Use: high contrast, hard black borders (3px+), bright pop colors, no blur, sharp or slightly rounded corners, bold typography, hard shadows (offset 4px 4px), raw aesthetic but functional.","border: 3px solid black, box-shadow: 5px 5px 0px black, colors: #FFDB58 #FF6B6B #4ECDC4, font-weight: 700, no gradients","☐ Hard borders (2-4px), ☐ Hard offset shadows, ☐ High saturation colors, ☐ Bold typography, ☐ No blurs/gradients, ☐ Distinctive 'ugly-cute' look","--border-width: 3px, --shadow-offset: 4px, --shadow-color: #000, --colors: high saturation, --font: bold sans"
|
||||
39,Bento Box Grid,General,"Modular cards, asymmetric grid, varied sizes, Apple-style, dashboard tiles, negative space, clean hierarchy, cards","Neutral base + brand accent, #FFFFFF, #F5F5F5, brand primary","Subtle gradients, shadow variations, accent highlights for interactive cards","grid-template with varied spans, rounded-xl (16px), subtle shadows, hover scale (1.02), smooth transitions","Dashboards, product pages, portfolios, Apple-style marketing, feature showcases, SaaS","Dense data tables, text-heavy content, real-time monitoring",✓ Full,✓ Full,⚡ Excellent,✓ WCAG AA,✓ High,✓ High,"Tailwind 10/10, CSS Grid 10/10",2020s Apple,Low,"Design a Bento Box grid layout. Use: modular cards with varied sizes (1x1, 2x1, 2x2), Apple-style aesthetic, rounded corners (16-24px), soft shadows, clean hierarchy, asymmetric grid, neutral backgrounds (#F5F5F7), hover effects.","display: grid, grid-template-columns: repeat(4, 1fr), grid-auto-rows: 200px, gap: 16px, border-radius: 24px, background: #FFFFFF, box-shadow: 0 4px 6px rgba(0,0,0,0.05)","☐ Grid responsive (4→2→1 cols), ☐ Card spans varied, ☐ Rounded corners consistent, ☐ Shadows subtle, ☐ Content fits cards, ☐ Hover scale (1.02)","--grid-gap: 16px, --card-radius: 24px, --card-bg: #FFFFFF, --page-bg: #F5F5F7, --shadow: 0 4px 6px rgba(0,0,0,0.05), --hover-scale: 1.02"
|
||||
40,Y2K Aesthetic,General,"Neon pink, chrome, metallic, bubblegum, iridescent, glossy, retro-futurism, 2000s, futuristic nostalgia","#FF69B4 (Hot Pink), #00FFFF (Cyan), #C0C0C0 (Silver), #9400D3 (Purple)","Metallic gradients, glossy overlays, iridescent effects, chrome textures","linear-gradient metallic, glossy buttons, 3D chrome effects, glow animations, bubble shapes","Fashion brands, music platforms, Gen Z brands, nostalgia marketing, entertainment, youth-focused","B2B enterprise, healthcare, finance, conservative industries, elderly users",✓ Full,◐ Partial,⚠ Good,⚠ Check contrast,✓ Good,✓ High,"Tailwind 8/10, CSS-in-JS 9/10",Y2K 2000s,Medium,"Design a Y2K aesthetic interface. Use: neon pink/cyan colors, chrome/metallic textures, bubblegum gradients, glossy buttons, iridescent effects, 2000s futurism, star/sparkle decorations, bubble shapes, tech-optimistic vibe.","background: linear-gradient(135deg, #FF69B4, #00FFFF), filter: drop-shadow for glow, border-radius: 50% for bubbles, metallic gradients (silver/chrome), text-shadow: neon glow, ::before for sparkles","☐ Neon colors balanced, ☐ Chrome effects visible, ☐ Glossy buttons styled, ☐ Bubble shapes decorative, ☐ Sparkle animations, ☐ Retro fonts loaded","--neon-pink: #FF69B4, --neon-cyan: #00FFFF, --chrome-silver: #C0C0C0, --glossy-gradient: linear-gradient(180deg, white 0%, transparent 50%), --glow-blur: 10px"
|
||||
41,Cyberpunk UI,General,"Neon, dark mode, terminal, HUD, sci-fi, glitch, dystopian, futuristic, matrix, tech noir","#00FF00 (Matrix Green), #FF00FF (Magenta), #00FFFF (Cyan), #0D0D0D (Dark)","Neon gradients, scanline overlays, glitch colors, terminal green accents","Neon glow (text-shadow), glitch animations (skew/offset), scanlines (::before overlay), terminal fonts","Gaming platforms, tech products, crypto apps, sci-fi applications, developer tools, entertainment","Corporate enterprise, healthcare, family apps, conservative brands, elderly users",✗ No,✓ Only,⚠ Moderate,⚠ Limited (dark+neon),◐ Medium,◐ Medium,"Tailwind 8/10, Custom CSS 10/10",2020s Cyberpunk,Medium,"Design a cyberpunk interface. Use: neon colors on dark (#0D0D0D), terminal/HUD aesthetic, glitch effects, scanlines overlay, matrix green accents, monospace fonts, angular shapes, dystopian tech feel.","background: #0D0D0D, color: #00FF00 or #FF00FF, font-family: monospace, text-shadow: 0 0 10px neon, animation: glitch (transform skew), ::before scanlines (repeating-linear-gradient)","☐ Dark background only, ☐ Neon accents visible, ☐ Glitch effect subtle, ☐ Scanlines optional, ☐ Monospace font, ☐ Terminal aesthetic","--bg-dark: #0D0D0D, --neon-green: #00FF00, --neon-magenta: #FF00FF, --neon-cyan: #00FFFF, --scanline-opacity: 0.1, --glitch-duration: 0.3s"
|
||||
42,Organic Biophilic,General,"Nature, organic shapes, green, sustainable, rounded, flowing, wellness, earthy, natural textures","#228B22 (Forest Green), #8B4513 (Earth Brown), #87CEEB (Sky Blue), #F5F5DC (Beige)","Natural gradients, earth tones, sky blues, organic textures, wood/stone colors","Rounded corners (16-24px), organic curves (border-radius variations), natural shadows, flowing SVG shapes","Wellness apps, sustainability brands, eco products, health apps, meditation, organic food brands","Tech-focused products, gaming, industrial, urban brands",✓ Full,✓ Full,⚡ Excellent,✓ WCAG AA,✓ High,✓ High,"Tailwind 10/10, CSS 10/10",2020s Sustainable,Low,"Design a biophilic organic interface. Use: nature-inspired colors (greens, browns), organic curved shapes, rounded corners (16-24px), natural textures (wood, stone), flowing SVG elements, wellness aesthetic, earthy palette.","border-radius: 16-24px (varied), background: earth tones, SVG organic shapes (blob), box-shadow: natural soft, color: #228B22 #8B4513 #87CEEB, texture overlays (subtle)","☐ Earth tones dominant, ☐ Organic curves present, ☐ Natural textures subtle, ☐ Green accents, ☐ Rounded everywhere, ☐ Calming feel","--forest-green: #228B22, --earth-brown: #8B4513, --sky-blue: #87CEEB, --cream-bg: #F5F5DC, --organic-radius: 24px, --shadow-soft: 0 8px 32px rgba(0,0,0,0.08)"
|
||||
43,AI-Native UI,General,"Chatbot, conversational, voice, assistant, agentic, ambient, minimal chrome, streaming text, AI interactions","Neutral + single accent, #6366F1 (AI Purple), #10B981 (Success), #F5F5F5 (Background)","Status indicators, streaming highlights, context card colors, subtle accent variations","Typing indicators (3-dot pulse), streaming text animations, pulse animations, context cards, smooth reveals","AI products, chatbots, voice assistants, copilots, AI-powered tools, conversational interfaces","Traditional forms, data-heavy dashboards, print-first content",✓ Full,✓ Full,⚡ Excellent,✓ WCAG AA,✓ High,✓ High,"Tailwind 10/10, React 10/10",2020s AI-Era,Low,"Design an AI-native interface. Use: minimal chrome, conversational layout, streaming text area, typing indicators (3-dot pulse), context cards, subtle AI accent color (#6366F1), clean input field, response bubbles.","chat bubble layout (flex-direction: column), typing animation (3 dots pulse), streaming text (overflow: hidden + animation), input: sticky bottom, context cards (border-left accent), minimal borders","☐ Chat layout responsive, ☐ Typing indicator smooth, ☐ Input always visible, ☐ Context cards styled, ☐ AI responses distinct, ☐ User messages aligned right","--ai-accent: #6366F1, --user-bubble-bg: #E0E7FF, --ai-bubble-bg: #F9FAFB, --input-height: 48px, --typing-dot-size: 8px, --message-gap: 16px"
|
||||
44,Memphis Design,General,"80s, geometric, playful, postmodern, shapes, patterns, squiggles, triangles, neon, abstract, bold","#FF71CE (Hot Pink), #FFCE5C (Yellow), #86CCCA (Teal), #6A7BB4 (Blue Purple)","Complementary geometric colors, pattern fills, contrasting accent shapes","transform: rotate(), clip-path: polygon(), mix-blend-mode, repeating patterns, bold shapes","Creative agencies, music sites, youth brands, event promotion, artistic portfolios, entertainment","Corporate finance, healthcare, legal, elderly users, conservative brands",✓ Full,✓ Full,⚡ Excellent,⚠ Check contrast,✓ Good,◐ Medium,"Tailwind 9/10, CSS 10/10",1980s Postmodern,Medium,"Design a Memphis style interface. Use: bold geometric shapes (triangles, squiggles, circles), bright clashing colors, 80s postmodern aesthetic, playful patterns, dotted textures, asymmetric layouts, decorative elements.","clip-path: polygon() for shapes, background: repeating patterns, transform: rotate() for tilted elements, mix-blend-mode for overlays, border: dashed/dotted patterns, bold sans-serif","☐ Geometric shapes visible, ☐ Colors bold/clashing, ☐ Patterns present, ☐ Layout asymmetric, ☐ Playful decorations, ☐ 80s vibe achieved","--memphis-pink: #FF71CE, --memphis-yellow: #FFCE5C, --memphis-teal: #86CCCA, --memphis-purple: #6A7BB4, --pattern-size: 20px, --shape-rotation: 15deg"
|
||||
45,Vaporwave,General,"Synthwave, retro-futuristic, 80s-90s, neon, glitch, nostalgic, sunset gradient, dreamy, aesthetic","#FF71CE (Pink), #01CDFE (Cyan), #05FFA1 (Mint), #B967FF (Purple)","Sunset gradients, glitch overlays, VHS effects, neon accents, pastel variations","text-shadow glow, linear-gradient, filter: hue-rotate(), glitch animations, retro scan lines","Music platforms, gaming, creative portfolios, tech startups, entertainment, artistic projects","Business apps, e-commerce, education, healthcare, enterprise software",✓ Full,✓ Dark focused,⚠ Moderate,⚠ Poor (motion),◐ Medium,◐ Medium,"Tailwind 8/10, CSS-in-JS 9/10",1980s-90s Retro,Medium,"Design a vaporwave aesthetic interface. Use: sunset gradients (pink/cyan/purple), 80s-90s nostalgia, glitch effects, Greek statue imagery, palm trees, grid patterns, neon glow, retro-futuristic feel, dreamy atmosphere.","background: linear-gradient(180deg, #FF71CE, #01CDFE, #B967FF), filter: hue-rotate(), text-shadow: neon glow, retro grid (perspective + linear-gradient), VHS scanlines","☐ Sunset gradient present, ☐ Neon glow applied, ☐ Retro grid visible, ☐ Glitch effects subtle, ☐ Dreamy atmosphere, ☐ 80s-90s aesthetic","--vapor-pink: #FF71CE, --vapor-cyan: #01CDFE, --vapor-mint: #05FFA1, --vapor-purple: #B967FF, --grid-color: rgba(255,255,255,0.1), --glow-intensity: 15px"
|
||||
46,Dimensional Layering,General,"Depth, overlapping, z-index, layers, 3D, shadows, elevation, floating, cards, spatial hierarchy","Neutral base (#FFFFFF, #F5F5F5, #E0E0E0) + brand accent for elevated elements","Shadow variations (sm/md/lg/xl), elevation colors, highlight colors for top layers","z-index stacking, box-shadow elevation (4 levels), transform: translateZ(), backdrop-filter, parallax","Dashboards, card layouts, modals, navigation, product showcases, SaaS interfaces","Print-style layouts, simple blogs, low-end devices, flat design requirements",✓ Full,✓ Full,⚠ Good,⚠ Moderate (SR issues),✓ Good,✓ High,"Tailwind 10/10, MUI 10/10, Chakra 10/10",2020s Modern,Medium,"Design with dimensional layering. Use: z-index depth (multiple layers), overlapping cards, elevation shadows (4 levels), floating elements, parallax depth, backdrop blur for hierarchy, spatial UI feel.","z-index: 1-4 levels, box-shadow: elevation scale (sm/md/lg/xl), transform: translateZ(), backdrop-filter: blur(), position: relative for stacking, parallax on scroll","☐ Layers clearly defined, ☐ Shadows show depth, ☐ Overlaps intentional, ☐ Hierarchy clear, ☐ Performance optimized, ☐ Mobile depth maintained","--elevation-1: 0 1px 3px rgba(0,0,0,0.1), --elevation-2: 0 4px 6px rgba(0,0,0,0.1), --elevation-3: 0 10px 20px rgba(0,0,0,0.1), --elevation-4: 0 20px 40px rgba(0,0,0,0.15), --blur-amount: 8px"
|
||||
47,Exaggerated Minimalism,General,"Bold minimalism, oversized typography, high contrast, negative space, loud minimal, statement design","#000000 (Black), #FFFFFF (White), single vibrant accent only","Minimal - single accent color, no secondary colors, extreme restraint","font-size: clamp(3rem 10vw 12rem), font-weight: 900, letter-spacing: -0.05em, massive whitespace","Fashion, architecture, portfolios, agency landing pages, luxury brands, editorial","E-commerce catalogs, dashboards, forms, data-heavy, elderly users, complex apps",✓ Full,✓ Full,⚡ Excellent,✓ WCAG AA,✓ High,✓ High,"Tailwind 10/10, Typography.js 10/10",2020s Modern,Low,"Design with exaggerated minimalism. Use: oversized typography (clamp 3rem-12rem), extreme negative space, black/white primary, single accent color only, bold statements, minimal elements, dramatic contrast.","font-size: clamp(3rem, 10vw, 12rem), font-weight: 900, letter-spacing: -0.05em, color: #000 or #FFF, padding: 8rem+, single accent, no decorations","☐ Typography oversized, ☐ White space extreme, ☐ Black/white dominant, ☐ Single accent only, ☐ Elements minimal, ☐ Statement clear","--type-giant: clamp(3rem, 10vw, 12rem), --type-weight: 900, --spacing-huge: 8rem, --color-primary: #000000, --color-bg: #FFFFFF, --accent: single color only"
|
||||
48,Kinetic Typography,General,"Motion text, animated type, moving letters, dynamic, typing effect, morphing, scroll-triggered text","Flexible - high contrast recommended, bold colors for emphasis, animation-friendly palette","Accent colors for emphasis, transition colors, gradient text fills","@keyframes text animation, typing effect, background-clip: text, GSAP ScrollTrigger, split text","Hero sections, marketing sites, video platforms, storytelling, creative portfolios, landing pages","Long-form content, accessibility-critical, data interfaces, forms, elderly users",✓ Full,✓ Full,⚠ Moderate,❌ Poor (motion),✓ Good,✓ Very High,"GSAP 10/10, Framer Motion 10/10",2020s Modern,High,"Design with kinetic typography. Use: animated text, scroll-triggered reveals, typing effects, letter-by-letter animations, morphing text, gradient text fills, oversized hero text, text as the main visual element.","@keyframes for text animation, background-clip: text, GSAP SplitText, typing effect (steps()), transform on letters, scroll-triggered (Intersection Observer), variable fonts for morphing","☐ Text animations smooth, ☐ Prefers-reduced-motion respected, ☐ Fallback for no-JS, ☐ Mobile performance ok, ☐ Typing effect timed, ☐ Scroll triggers work","--text-animation-duration: 1s, --letter-delay: 0.05s, --typing-speed: 100ms, --gradient-text: linear-gradient(90deg, #color1, #color2), --morph-duration: 0.5s"
|
||||
49,Parallax Storytelling,General,"Scroll-driven, narrative, layered scrolling, immersive, progressive disclosure, cinematic, scroll-triggered","Story-dependent, often gradients and natural colors, section-specific palettes","Section transition colors, depth layer colors, narrative mood colors","transform: translateY(scroll), position: fixed/sticky, perspective: 1px, scroll-triggered animations","Brand storytelling, product launches, case studies, portfolios, annual reports, marketing campaigns","E-commerce, dashboards, mobile-first, SEO-critical, accessibility-required",✓ Full,✓ Full,❌ Poor,❌ Poor (motion),✗ Low,✓ High,"GSAP ScrollTrigger 10/10, Locomotive Scroll 10/10",2020s Modern,High,"Design a parallax storytelling page. Use: scroll-driven narrative, layered backgrounds (3-5 layers), fixed/sticky sections, cinematic transitions, progressive disclosure, full-screen chapters, depth perception.","position: fixed/sticky, transform: translateY(calc()), perspective: 1px, z-index layering, scroll-snap-type, Intersection Observer for triggers, will-change: transform","☐ Layers parallax smoothly, ☐ Story flows naturally, ☐ Mobile alternative provided, ☐ Performance optimized, ☐ Skip option available, ☐ Reduced motion fallback","--parallax-speed-bg: 0.3, --parallax-speed-mid: 0.6, --parallax-speed-fg: 1, --section-height: 100vh, --transition-duration: 600ms, --perspective: 1px"
|
||||
50,Swiss Modernism 2.0,General,"Grid system, Helvetica, modular, asymmetric, international style, rational, clean, mathematical spacing","#000000, #FFFFFF, #F5F5F5, single vibrant accent only","Minimal secondary, accent for emphasis only, no gradients","display: grid, grid-template-columns: repeat(12 1fr), gap: 1rem, mathematical ratios, clear hierarchy","Corporate sites, architecture, editorial, SaaS, museums, professional services, documentation","Playful brands, children's sites, entertainment, gaming, emotional storytelling",✓ Full,✓ Full,⚡ Excellent,✓ WCAG AAA,✓ High,✓ High,"Tailwind 10/10, Bootstrap 9/10, Foundation 10/10",1950s Swiss + 2020s,Low,"Design with Swiss Modernism 2.0. Use: strict grid system (12 columns), Helvetica/Inter fonts, mathematical spacing, asymmetric balance, high contrast, minimal decoration, clean hierarchy, single accent color.","display: grid, grid-template-columns: repeat(12, 1fr), gap: 1rem (8px base unit), font-family: Inter/Helvetica, font-weight: 400-700, color: #000/#FFF, single accent","☐ 12-column grid strict, ☐ Spacing mathematical, ☐ Typography hierarchy clear, ☐ Single accent only, ☐ No decorations, ☐ High contrast verified","--grid-columns: 12, --grid-gap: 1rem, --base-unit: 8px, --font-primary: Inter, --color-text: #000000, --color-bg: #FFFFFF, --accent: single vibrant"
|
||||
51,HUD / Sci-Fi FUI,General,"Futuristic, technical, wireframe, neon, data, transparency, iron man, sci-fi, interface","Neon Cyan #00FFFF, Holographic Blue #0080FF, Alert Red #FF0000","Transparent Black, Grid Lines #333333","Glow effects, scanning animations, ticker text, blinking markers, fine line drawing","Sci-fi games, space tech, cybersecurity, movie props, immersive dashboards","Standard corporate, reading heavy content, accessible public services",✓ Low,✓ Full,⚠ Moderate (renders),⚠ Poor (thin lines),◐ Medium,✗ Low,"React 9/10, Canvas 10/10",2010s Sci-Fi,High,"Design a futuristic HUD (Heads Up Display) or FUI. Use: thin lines (1px), neon cyan/blue on black, technical markers, decorative brackets, data visualization, monospaced tech fonts, glowing elements, transparency.","border: 1px solid rgba(0,255,255,0.5), color: #00FFFF, background: transparent or rgba(0,0,0,0.8), font-family: monospace, text-shadow: 0 0 5px cyan","☐ Fine lines 1px, ☐ Neon glow text/borders, ☐ Monospaced font, ☐ Dark/Transparent BG, ☐ Decorative tech markers, ☐ Holographic feel","--hud-color: #00FFFF, --bg-color: rgba(0,10,20,0.9), --line-width: 1px, --glow: 0 0 5px, --font: monospace"
|
||||
52,Pixel Art,General,"Retro, 8-bit, 16-bit, gaming, blocky, nostalgic, pixelated, arcade","Primary colors (NES Palette), brights, limited palette","Black outlines, shading via dithering or block colors","Frame-by-frame sprite animation, blinking cursor, instant transitions, marquee text","Indie games, retro tools, creative portfolios, nostalgia marketing, Web3/NFT","Professional corporate, modern SaaS, high-res photography sites",✓ Full,✓ Full,⚡ Excellent,✓ Good (if contrast ok),✓ High,◐ Medium,"CSS (box-shadow) 8/10, Canvas 10/10",1980s Arcade,Medium,"Design a pixel art inspired interface. Use: pixelated fonts, 8-bit or 16-bit aesthetic, sharp edges (image-rendering: pixelated), limited color palette, blocky UI elements, retro gaming feel.","font-family: 'Press Start 2P', image-rendering: pixelated, box-shadow: 4px 0 0 #000 (pixel border), no anti-aliasing","☐ Pixelated fonts loaded, ☐ Images sharp (no blur), ☐ CSS box-shadow for pixel borders, ☐ Retro palette, ☐ Blocky layout","--pixel-size: 4px, --font: pixel font, --border-style: pixel-shadow, --anti-alias: none"
|
||||
53,Bento Grids,General,"Apple-style, modular, cards, organized, clean, hierarchy, grid, rounded, soft","Off-white #F5F5F7, Clean White #FFFFFF, Text #1D1D1F","Subtle accents, soft shadows, blurred backdrops","Hover scale (1.02), soft shadow expansion, smooth layout shifts, content reveal","Product features, dashboards, personal sites, marketing summaries, galleries","Long-form reading, data tables, complex forms",✓ Full,✓ Full,⚡ Excellent,✓ WCAG AA,✓ High,✓ High,"CSS Grid 10/10, Tailwind 10/10",2020s Apple/Linear,Low,"Design a Bento Grid layout. Use: modular grid system, rounded corners (16-24px), different card sizes (1x1, 2x1, 2x2), card-based hierarchy, soft backgrounds (#F5F5F7), subtle borders, content-first, Apple-style aesthetic.","display: grid, grid-template-columns: repeat(auto-fit, minmax(...)), gap: 1rem, border-radius: 20px, background: #FFF, box-shadow: subtle","☐ Grid layout (CSS Grid), ☐ Rounded corners 16-24px, ☐ Varied card spans, ☐ Content fits card size, ☐ Responsive re-flow, ☐ Apple-like aesthetic","--grid-gap: 20px, --card-radius: 24px, --card-bg: #FFFFFF, --page-bg: #F5F5F7, --shadow: soft"
|
||||
55,Spatial UI (VisionOS),General,"Glass, depth, immersion, spatial, translucent, gaze, gesture, apple, vision-pro","Frosted Glass #FFFFFF (15-30% opacity), System White","Vibrant system colors for active states, deep shadows for depth","Parallax depth, dynamic lighting response, gaze-hover effects, smooth scale on focus","Spatial computing apps, VR/AR interfaces, immersive media, futuristic dashboards","Text-heavy documents, high-contrast requirements, non-3D capable devices",✓ Full,✓ Full,⚠ Moderate (blur cost),⚠ Contrast risks,✓ High (if adapted),✓ High,"SwiftUI, React (Three.js/Fiber)",2024 Spatial Era,High,"Design a VisionOS-style spatial interface. Use: frosted glass panels, depth layers, translucent backgrounds (15-30% opacity), vibrant colors for active states, gaze-hover effects, floating windows, immersive feel.","backdrop-filter: blur(40px) saturate(180%), background: rgba(255,255,255,0.2), border-radius: 24px, box-shadow: 0 8px 32px rgba(0,0,0,0.1), transform: scale on focus, depth via shadows","☐ Glass effect visible, ☐ Depth layers clear, ☐ Hover states defined, ☐ Colors vibrant on active, ☐ Floating feel achieved, ☐ Contrast maintained","--glass-bg: rgba(255,255,255,0.2), --glass-blur: 40px, --glass-saturate: 180%, --window-radius: 24px, --depth-shadow: 0 8px 32px rgba(0,0,0,0.1), --focus-scale: 1.02"
|
||||
56,E-Ink / Paper,General,"Paper-like, matte, high contrast, texture, reading, calm, slow tech, monochrome","Off-White #FDFBF7, Paper White #F5F5F5, Ink Black #1A1A1A","Pencil Grey #4A4A4A, Highlighter Yellow #FFFF00 (accent)","No motion blur, distinct page turns, grain/noise texture, sharp transitions (no fade)","Reading apps, digital newspapers, minimal journals, distraction-free writing, slow-living brands","Gaming, video platforms, high-energy marketing, dark mode dependent apps",✓ Full,✗ Low (inverted only),⚡ Excellent,✓ WCAG AAA,✓ High,✓ Medium,"Tailwind 10/10, CSS 10/10",2020s Digital Well-being,Low,"Design an e-ink/paper style interface. Use: high contrast black on off-white, paper texture, no animations (instant transitions), reading-focused, minimal UI chrome, distraction-free, calm aesthetic, monochrome.","background: #FDFBF7 (paper white), color: #1A1A1A, transition: none, font-family: serif for reading, no gradients, border: 1px solid #E0E0E0, texture overlay (noise)","☐ Paper background color, ☐ High contrast text, ☐ No animations, ☐ Reading optimized, ☐ Distraction-free, ☐ Print-friendly","--paper-bg: #FDFBF7, --ink-color: #1A1A1A, --pencil-grey: #4A4A4A, --border-color: #E0E0E0, --font-reading: Georgia, --transition: none"
|
||||
57,Gen Z Chaos / Maximalism,General,"Chaos, clutter, stickers, raw, collage, mixed media, loud, internet culture, ironic","Clashing Brights: #FF00FF, #00FF00, #FFFF00, #0000FF","Gradients, rainbow, glitch, noise, heavily saturated mix","Marquee scrolls, jitter, sticker layering, GIF overload, random placement, drag-and-drop","Gen Z lifestyle brands, music artists, creative portfolios, viral marketing, fashion","Corporate, government, healthcare, banking, serious tools",✓ Full,✓ Full,⚠ Poor (heavy assets),❌ Poor,◐ Medium,✓ High (Viral),CSS-in-JS 8/10,2023+ Internet Core,High,"Design a Gen Z chaos maximalist interface. Use: clashing bright colors, sticker overlays, collage aesthetic, raw/unpolished feel, mixed media, ironic elements, loud typography, GIF-heavy, internet culture references.","mix-blend-mode: multiply/screen, transform: rotate(random), animation: jitter, marquee text, position: absolute for scattered elements, filter: saturate(150%), z-index chaos","☐ Colors clash intentionally, ☐ Stickers/overlays present, ☐ Layout chaotic but usable, ☐ GIFs optimized, ☐ Mobile scrollable, ☐ Performance acceptable","--chaos-pink: #FF00FF, --chaos-green: #00FF00, --chaos-yellow: #FFFF00, --chaos-blue: #0000FF, --jitter-amount: 5deg, --saturate: 150%"
|
||||
58,Biomimetic / Organic 2.0,General,"Nature-inspired, cellular, fluid, breathing, generative, algorithms, life-like","Cellular Pink #FF9999, Chlorophyll Green #00FF41, Bioluminescent Blue","Deep Ocean #001E3C, Coral #FF7F50, Organic gradients","Breathing animations, fluid morphing, generative growth, physics-based movement","Sustainability tech, biotech, advanced health, meditation, generative art platforms","Standard SaaS, data grids, strict corporate, accounting",✓ Full,✓ Full,⚠ Moderate,✓ Good,✓ Good,✓ High,"Canvas 10/10, WebGL 10/10",2024+ Generative,High,"Design a biomimetic organic interface. Use: cellular/fluid shapes, breathing animations, generative patterns, bioluminescent colors, physics-based movement, nature algorithms, life-like elements, flowing gradients.","SVG morphing (SMIL or GSAP), canvas for generative, animation: breathing (scale pulse), filter: blur for organic, clip-path for cellular, WebGL for advanced, physics libraries","☐ Organic shapes present, ☐ Animations feel alive, ☐ Generative elements, ☐ Performance monitored, ☐ Mobile fallback, ☐ Accessibility alt content","--cellular-pink: #FF9999, --chlorophyll: #00FF41, --bioluminescent: #00FFFF, --breathing-duration: 4s, --morph-ease: cubic-bezier(0.4, 0, 0.2, 1), --organic-blur: 20px"
|
||||
59,Anti-Polish / Raw Aesthetic,General,"Hand-drawn, collage, scanned textures, unfinished, imperfect, authentic, human, sketch, raw marks, creative process","Paper White #FAFAF8, Pencil Grey #4A4A4A, Marker Black #1A1A1A, Kraft Brown #C4A77D","Watercolor washes, pencil shading, ink splatters, tape textures, aged paper tones","No smooth transitions, hand-drawn animations, paper texture overlays, jitter effects, sketch reveal","Creative portfolios, artist sites, indie brands, handmade products, authentic storytelling, editorial","Corporate enterprise, fintech, healthcare, government, polished SaaS",✓ Full,✓ Full,⚡ Excellent,✓ WCAG AA,✓ High,✓ High,"CSS 10/10, SVG 10/10",2025+ Anti-Digital,Low,"Design with anti-polish raw aesthetic. Use: hand-drawn elements, scanned textures, unfinished look, paper/pencil textures, collage style, authentic imperfection, sketch marks, tape/sticker overlays, human touch.","background: url(paper-texture.png), filter: grayscale() contrast(), border: hand-drawn SVG, transform: rotate(small random), no smooth transitions, sketch-style fonts, opacity variations","☐ Textures loaded, ☐ Hand-drawn elements present, ☐ Imperfections intentional, ☐ Authentic feel achieved, ☐ Performance ok with textures, ☐ Accessibility maintained","--paper-bg: #FAFAF8, --pencil-color: #4A4A4A, --marker-black: #1A1A1A, --kraft-brown: #C4A77D, --sketch-rotation: random(-3deg, 3deg), --texture-opacity: 0.3"
|
||||
60,Tactile Digital / Deformable UI,General,"Jelly buttons, chrome, clay, squishy, deformable, bouncy, physical, tactile feedback, press response","Gradient metallics, Chrome Silver #C0C0C0, Jelly Pink #FF9ECD, Soft Blue #87CEEB","Glossy highlights, shadow depth, reflection effects, material-specific colors","Press deformation (scale + squish), bounce-back (cubic-bezier), material response, haptic-like feedback, spring physics","Modern mobile apps, playful brands, entertainment, gaming UI, consumer products, interactive demos","Enterprise software, data dashboards, accessibility-critical, professional tools",✓ Full,✓ Full,⚠ Good,⚠ Motion sensitive,✓ High,✓ Very High,"Framer Motion 10/10, React Spring 10/10, GSAP 10/10",2025+ Tactile Era,Medium,"Design a tactile deformable interface. Use: jelly/squishy buttons, press deformation effect, bounce-back animations, chrome/clay materials, spring physics, haptic-like feedback, material response, 3D depth on interaction.","transform: scale(0.95) on active, animation: bounce (cubic-bezier(0.34, 1.56, 0.64, 1)), box-shadow: inset for press, filter: brightness on press, spring physics (react-spring/framer-motion)","☐ Press effect visible, ☐ Bounce-back smooth, ☐ Material feels tactile, ☐ Spring physics tuned, ☐ Mobile touch responsive, ☐ Reduced motion option","--press-scale: 0.95, --bounce-duration: 400ms, --spring-stiffness: 300, --spring-damping: 20, --material-glossy: linear-gradient(135deg, white 0%, transparent 60%), --depth-shadow: 0 10px 30px rgba(0,0,0,0.2)"
|
||||
61,Nature Distilled,General,"Muted earthy, skin tones, wood, soil, sand, terracotta, warmth, organic materials, handmade warmth","Terracotta #C67B5C, Sand Beige #D4C4A8, Warm Clay #B5651D, Soft Cream #F5F0E1","Earth Brown #8B4513, Olive Green #6B7B3C, Warm Stone #9C8B7A, muted gradients","Subtle parallax, natural easing (ease-out), texture overlays, grain effects, soft shadows","Wellness brands, sustainable products, artisan goods, organic food, spa/beauty, home decor","Tech startups, gaming, nightlife, corporate finance, high-energy brands",✓ Full,◐ Partial,⚡ Excellent,✓ WCAG AA,✓ High,✓ High,"Tailwind 10/10, CSS 10/10",2025+ Handmade Warmth,Low,"Design with nature distilled aesthetic. Use: muted earthy colors (terracotta, sand, olive), organic materials feel, warm tones, handmade warmth, natural textures, artisan quality, sustainable vibe, soft gradients.","background: warm earth tones, color: #C67B5C #D4C4A8 #6B7B3C, border-radius: organic (varied), box-shadow: soft natural, texture overlays (grain), font: humanist sans-serif","☐ Earth tones dominant, ☐ Warm feel achieved, ☐ Textures subtle, ☐ Handmade quality, ☐ Sustainable messaging, ☐ Calming aesthetic","--terracotta: #C67B5C, --sand-beige: #D4C4A8, --warm-clay: #B5651D, --soft-cream: #F5F0E1, --olive-green: #6B7B3C, --grain-opacity: 0.1"
|
||||
62,Interactive Cursor Design,General,"Custom cursor, cursor as tool, hover effects, cursor feedback, pointer transformation, cursor trail, magnetic cursor","Brand-dependent, cursor accent color, high contrast for visibility","Trail colors, hover state colors, magnetic zone indicators, feedback colors","Cursor scale on hover, magnetic pull to elements, cursor morphing, trail effects, blend mode cursors, click feedback","Creative portfolios, interactive experiences, agency sites, product showcases, gaming, entertainment","Mobile-first (no cursor), accessibility-critical, data-heavy dashboards, forms",✓ Full,✓ Full,⚡ Good,⚠ Not for touch/SR,✗ No cursor,✓ High,"GSAP 10/10, Framer Motion 10/10, Custom JS 10/10",2025+ Interactive,Medium,"Design with interactive cursor effects. Use: custom cursor, cursor morphing on hover, magnetic cursor pull, cursor trails, blend mode cursors, click feedback animations, cursor as interaction tool, pointer transformation.","cursor: none (custom), position: fixed for cursor element, mix-blend-mode: difference, transform on hover targets, magnetic effect (JS position lerp), trail with opacity fade, scale on click","☐ Custom cursor works, ☐ Hover morph smooth, ☐ Magnetic pull subtle, ☐ Trail performance ok, ☐ Click feedback visible, ☐ Touch fallback provided","--cursor-size: 20px, --cursor-hover-scale: 1.5, --magnetic-distance: 100px, --trail-length: 10, --trail-fade: 0.1, --blend-mode: difference"
|
||||
63,Voice-First Multimodal,General,"Voice UI, multimodal, audio feedback, conversational, hands-free, ambient, contextual, speech recognition","Calm neutrals: Soft White #FAFAFA, Muted Blue #6B8FAF, Gentle Purple #9B8FBB","Audio waveform colors, status indicators (listening/processing/speaking), success/error tones","Voice waveform visualization, listening pulse, processing spinner, speak animation, smooth transitions","Voice assistants, accessibility apps, hands-free tools, smart home, automotive UI, cooking apps","Visual-heavy content, data entry, complex forms, noisy environments",✓ Full,✓ Full,⚡ Excellent,✓ Excellent,✓ High,✓ High,"Web Speech API 10/10, React 10/10",2025+ Voice Era,Medium,"Design a voice-first multimodal interface. Use: voice waveform visualization, listening state indicator, speaking animation, minimal visible UI, audio feedback cues, hands-free optimized, conversational flow, ambient design.","Web Speech API integration, canvas for waveform, animation: pulse for listening, status indicators (color change), audio visualization (Web Audio API), minimal chrome, large touch targets","☐ Voice recognition works, ☐ Visual feedback clear, ☐ Listening state obvious, ☐ Speaking animation smooth, ☐ Fallback UI provided, ☐ Accessibility excellent","--listening-color: #6B8FAF, --speaking-color: #22C55E, --waveform-height: 60px, --pulse-duration: 1.5s, --indicator-size: 24px, --voice-accent: #9B8FBB"
|
||||
64,3D Product Preview,General,"360 product view, rotatable, zoomable, touch-to-spin, AR preview, product configurator, interactive 3D model","Product-dependent, neutral backgrounds: Soft Grey #E8E8E8, Pure White #FFFFFF","Shadow gradients, reflection planes, environment lighting colors, accent highlights","Drag-to-rotate, pinch-to-zoom, spin animation, AR placement, material switching, smooth orbit controls","E-commerce, furniture, fashion, automotive, electronics, jewelry, product configurators","Content-heavy sites, blogs, dashboards, low-bandwidth, accessibility-critical",◐ Partial,◐ Partial,❌ Poor (3D rendering),⚠ Alt content needed,◐ Medium,✓ Very High,"Three.js 10/10, model-viewer 10/10, Spline 9/10",2025+ E-commerce 3D,High,"Design a 3D product preview interface. Use: 360° rotation, drag-to-spin, pinch-to-zoom, AR preview button, material/color switcher, hotspot annotations, orbit controls, product configurator, smooth rendering.","Three.js or model-viewer, OrbitControls, touch events for rotation, WebXR for AR, canvas with WebGL, loading placeholder, LOD for performance, environment lighting","☐ 3D model loads fast, ☐ Rotation smooth, ☐ Zoom works (pinch/scroll), ☐ AR button functional, ☐ Colors switchable, ☐ Mobile touch works","--canvas-bg: #F5F5F5, --hotspot-color: #3B82F6, --loading-spinner: primary, --rotation-speed: 0.5, --zoom-min: 0.5, --zoom-max: 2"
|
||||
65,Gradient Mesh / Aurora Evolved,General,"Complex gradients, mesh gradients, multi-color blend, aurora effect, flowing colors, iridescent, holographic, prismatic","Multi-stop gradients: Cyan #00FFFF, Magenta #FF00FF, Yellow #FFFF00, Blue #0066FF, Green #00FF66","Complementary mesh points, smooth color transitions, iridescent overlays, chromatic shifts","CSS mesh-gradient (experimental), SVG gradients, canvas gradients, smooth color morphing, flowing animation","Hero sections, backgrounds, creative brands, music platforms, fashion, lifestyle, premium products","Data interfaces, text-heavy content, accessibility-critical, conservative brands",✓ Full,✓ Full,⚠ Good,⚠ Text contrast,✓ Good,✓ High,"CSS 8/10, SVG 10/10, Canvas 10/10",2025+ Gradient Evolution,Medium,"Design with gradient mesh aurora effect. Use: multi-color mesh gradients, flowing color transitions, aurora/northern lights feel, iridescent overlays, holographic shimmer, prismatic effects, smooth color morphing.","background: conic-gradient or mesh (SVG), animation: gradient flow (background-position), filter: hue-rotate for shimmer, mix-blend-mode: screen, canvas for complex mesh, multiple gradient layers","☐ Mesh gradient visible, ☐ Colors flow smoothly, ☐ Aurora effect achieved, ☐ Performance acceptable, ☐ Text remains readable, ☐ Mobile renders ok","--mesh-color-1: #00FFFF, --mesh-color-2: #FF00FF, --mesh-color-3: #FFFF00, --mesh-color-4: #00FF66, --flow-duration: 10s, --shimmer-intensity: 0.3"
|
||||
66,Editorial Grid / Magazine,General,"Magazine layout, asymmetric grid, editorial typography, pull quotes, drop caps, column layout, print-inspired","High contrast: Black #000000, White #FFFFFF, accent brand color","Muted supporting, pull quote highlights, byline colors, section dividers","Smooth scroll, reveal on scroll, parallax images, text animations, page-flip transitions","News sites, blogs, magazines, editorial content, long-form articles, journalism, publishing","Dashboards, apps, e-commerce catalogs, real-time data, short-form content",✓ Full,✓ Full,⚡ Excellent,✓ WCAG AAA,✓ High,✓ Medium,"CSS Grid 10/10, Tailwind 10/10",2020s Editorial Digital,Low,"Design an editorial magazine layout. Use: asymmetric grid, pull quotes, drop caps, multi-column text, large imagery, bylines, section dividers, print-inspired typography, article hierarchy, white space balance.","display: grid with named areas, column-count for text, ::first-letter for drop caps, blockquote styling, figure/figcaption, gap variations, font: serif for body, variable widths","☐ Grid asymmetric, ☐ Typography editorial, ☐ Pull quotes styled, ☐ Drop caps present, ☐ Images large/impactful, ☐ Mobile reflows well","--grid-cols: asymmetric, --body-font: Georgia/Merriweather, --heading-font: bold sans, --drop-cap-size: 4em, --pull-quote-size: 1.5em, --column-gap: 2rem"
|
||||
67,Chromatic Aberration / RGB Split,General,"RGB split, color fringing, glitch, retro tech, VHS, analog error, distortion, lens effect","Offset RGB: Red #FF0000, Green #00FF00, Blue #0000FF, Black #000000","Neon accents, scan lines, noise overlays, error colors","RGB offset animation, glitch timing, scan line movement, noise flicker, distortion on hover","Music platforms, gaming, tech brands, creative portfolios, nightlife, entertainment, video platforms","Corporate, healthcare, finance, accessibility-critical, elderly users",✓ Full,✓ Dark preferred,⚠ Good,⚠ Can cause strain,◐ Medium,✓ High,"CSS filters 10/10, GSAP 10/10",2020s Retro-Tech,Medium,"Design with chromatic aberration RGB split effect. Use: color channel offset (R/G/B), glitch aesthetic, retro tech feel, VHS error look, lens distortion, scan lines, noise overlay, analog imperfection.","filter: drop-shadow with offset colors, text-shadow: RGB offset (-2px 0 red, 2px 0 cyan), animation: glitch (random offset), ::before for scanlines, mix-blend-mode: screen for overlays","☐ RGB split visible, ☐ Glitch effect controlled, ☐ Scan lines subtle, ☐ Performance ok, ☐ Readability maintained, ☐ Reduced motion option","--rgb-offset: 2px, --red-channel: #FF0000, --green-channel: #00FF00, --blue-channel: #0000FF, --glitch-duration: 0.3s, --scanline-opacity: 0.1"
|
||||
68,Vintage Analog / Retro Film,General,"Film grain, VHS, cassette tape, polaroid, analog warmth, faded colors, light leaks, vintage photography","Faded Cream #F5E6C8, Warm Sepia #D4A574, Muted Teal #4A7B7C, Soft Pink #E8B4B8","Grain overlays, light leak oranges, shadow blues, vintage paper tones, desaturated accents","Film grain overlay, VHS tracking effect, polaroid shake, fade-in transitions, light leak animations","Photography portfolios, music/vinyl brands, vintage fashion, nostalgia marketing, film industry, cafes","Modern tech, SaaS, healthcare, children's apps, corporate enterprise",✓ Full,◐ Partial,⚡ Good,✓ WCAG AA,✓ High,✓ High,"CSS filters 10/10, Canvas 9/10",1970s-90s Analog Revival,Medium,"Design with vintage analog film aesthetic. Use: film grain overlay, faded/desaturated colors, warm sepia tones, light leaks, VHS tracking effect, polaroid frame, analog warmth, nostalgic photography feel.","filter: sepia() contrast() saturate(0.8), background: noise texture overlay, animation: VHS tracking (transform skew), light leak gradient overlay, border for polaroid frame, grain via SVG filter","☐ Film grain visible, ☐ Colors faded/warm, ☐ Light leaks present, ☐ Nostalgic feel achieved, ☐ Performance with filters, ☐ Images look vintage","--sepia-amount: 20%, --contrast: 1.1, --saturation: 0.8, --grain-opacity: 0.15, --light-leak-color: rgba(255,200,100,0.2), --warm-tint: #F5E6C8"
|
||||
69,Bauhaus (包豪斯),Mobile,"bauhaus, geometric, constructivist, primary colors, hard shadow, bold, tactile, functional, poster, mechanical, architectural","Primary Red #D02020, Primary Blue #1040C0, Primary Yellow #F0C020","Background #F0F0F0 (Off-white), Foreground #121212 (Stark Black), Muted #E0E0E0","Hard offset shadows (4px 4px 0px black), mechanical press active:translate, no smooth hover — instant 0ms transitions, dot grid pattern on sections, slide-over transitions","Mobile-first apps needing high personality, onboarding flows, branding-forward product screens, artisan/design brands, editorial mobile experiences","Enterprise dashboards, accessibility-critical contexts (requires extra a11y work), data-heavy screens, conservative industries",✓ Full,◐ Partial (primary palette only),⚡ Excellent,⚠ WCAG AA (high contrast primaries; verify yellow text separately),✓ Mobile-First,◐ Medium,"React Native 10/10, Expo 10/10, SwiftUI 9/10, Flutter 9/10, Tailwind 9/10",1919 Bauhaus Movement,Medium,"Design a Bauhaus mobile app. Use strict geometric shapes (circles and squares only), primary color blocking (Red #D02020, Blue #1040C0, Yellow #F0C020), hard 4px offset black shadows, OFF-WHITE canvas (#F0F0F0), massive bold uppercase headlines (Outfit Black 900), rectangular full-width buttons with mechanical press animation. No gradients. No rounded cards. No soft transitions.","border-radius: 0px (cards/inputs) or 9999px (buttons/FAB), box-shadow: 4px 4px 0px 0px #121212, active:translate-x-[2px] active:translate-y-[2px] active:shadow-none, border: 2px solid #121212, font-family: Outfit, font-weight: 900 uppercase tracking-tighter (headlines)","☐ Geometric shapes only (circle/square), ☐ Primary color blocking applied, ☐ Hard offset shadows 4px, ☐ border-2 border-black on all elements, ☐ Mechanical press active state, ☐ Outfit Black 900 uppercase headlines, ☐ Safe area (pt-safe pb-safe) respected, ☐ Thumb-friendly h-12/h-14 touch targets, ☐ No hover states (mobile-only), ☐ Vertical rhythm single-column stack","--color-red: #D02020, --color-blue: #1040C0, --color-yellow: #F0C020, --color-bg: #F0F0F0, --color-fg: #121212, --border-width: 2px, --shadow-hard: 4px 4px 0px 0px #121212, --radius-block: 0px, --radius-pill: 9999px, --font-display: Outfit, --font-weight-hero: 900"
|
||||
70,Minimalist Monochrome,Mobile,"monochrome, black white, editorial, austere, typographic, sharp, zero radius, high contrast, brutalist, pocket editorial, serif, mechanical","Pure Black #000000, Pure White #FFFFFF","Muted #F5F5F5, Dark Gray #525252, Border Light #E5E5E5","Instant inversion active state (tap → bg-black text-white, zero transition-none), no shadows (strictly 2D), full-bleed horizontal rules (4px black section dividers), subtle paper noise texture (opacity: 0.03), slide-in page transitions with hard edge","Luxury fashion e-commerce mobile, editorial publications, high-end portfolio apps, experimental/avant-garde brands, digital exhibitions","Entertainment, colorful brands, friendly consumer apps, anything requiring visual warmth or gradient",✓ Full (Light Mode Enforced),◐ Dark by section only (inverted sections),⚡ Excellent,✓ WCAG AAA (pure black/white),✓ Mobile-First,◐ Medium,"React Native 10/10, Expo 10/10, SwiftUI 9/10, Tailwind 9/10",2020s Editorial Mobile,Medium,"Design a minimalist monochrome mobile app. Use ONLY black (#000000) and white (#FFFFFF). Zero border-radius on every element. No shadows — depth is created by 1–4px black borders and color inversion only. Typography is the primary visual: Playfair Display for heroes (text-5xl–text-6xl, tracking-tighter, leading-[0.9]), Source Serif 4 for body, JetBrains Mono for labels/tags. Tap states instantly invert (bg-black text-white). Full-width horizontal rules separate sections. Use the word 'MENU' instead of hamburger icon.","border-radius: 0px (ALL elements including modals), box-shadow: none, active:bg-black active:text-white transition-none, border-b-4 border-black (section dividers), divide-y divide-black (lists), font-family: Playfair Display (headers) + Source Serif 4 (body) + JetBrains Mono (labels), background-image: noise SVG opacity-[0.03]","☐ 0px border-radius on ALL elements, ☐ No shadows anywhere, ☐ Instant inversion on every tap (transition-none), ☐ 4px black line separates hero from content, ☐ Safe area respected (pt-safe pb-safe), ☐ h-14 touch targets, ☐ Sticky section headers with border-b, ☐ Typography hero: word spans full screen width, ☐ Paper noise texture on backgrounds, ☐ Menu word-label instead of icon","--color-bg: #FFFFFF, --color-fg: #000000, --color-muted: #F5F5F5, --color-muted-fg: #525252, --color-border: #000000, --color-border-light: #E5E5E5, --radius: 0px, --shadow: none, --border-hairline: 1px solid #E5E5E5, --border-thin: 1px solid #000000, --border-thick: 2px solid #000000, --border-heavy: 4px solid #000000, --font-display: Playfair Display, --font-body: Source Serif 4, --font-mono: JetBrains Mono"
|
||||
71,Modern Dark (Cinema Mobile),Mobile,"dark mode, cinematic, ambient light, glassmorphism, deep black, indigo, glow, blur, atmospheric, reanimated, haptic, premium, layered, frosted glass, linear gradient","Deep #020203, Base #050506, Elevated #0a0a0c, Accent #5E6AD2","Foreground #EDEDEF, Muted #8A8F98, Accent Glow rgba(94 106 210/0.2), Border rgba(255 255 255/0.08), Surface rgba(255 255 255/0.05)","Expo.out Bezier(0.16,1,0.3,1) easing; spring modals (damping:20 stiffness:90); haptic-linked press (Impact Light/Medium); animated ambient light blobs (Reanimated translateX/Y slow oscillation); BlurView glassmorphism headers/nav (intensity 20); scale press 0.97 → 1.0; avoid pure #000000 (OLED smear)","Developer tools, pro productivity apps, fintech/trading dashboards, media/streaming platforms, AI tool interfaces, high-end gaming companion apps","Consumer apps needing warmth, children's apps, health/medical contexts where dark feels harsh, high-accessibility contexts needing maximum contrast",✓ Light mode only as exception,✓ Dark Mode Primary,⚠ Good (blur effects require native driver),⚠ WCAG AA (requires careful accent contrast check),✓ Mobile-First,◐ Medium,"React Native 10/10, Expo 10/10, react-native-skia 9/10, SwiftUI 8/10",2020s Cinematic Mobile,High,"Design a cinematic dark mobile app. Background: LinearGradient from #0a0a0f (top) to #020203 (bottom). Add 2–3 absolute animated 'blob' views: circular, blurRadius 30–50, opacity 0.08–0.12, slow Reanimated oscillation. Cards: borderRadius 16, border rgba(255,255,255,0.08) hairline, subtle top-edge shine gradient. Primary button: #5E6AD2, scale press 0.97, haptic on press. BlurView (intensity 20, tint dark) for tab bar and headers. Typography: Inter 700 for headers, 400 for body. Never use pure #000000. Accent glow: rgba(94,106,210,0.2) behind primary actions.","borderRadius: 16 (cards/buttons), background: LinearGradient #0a0a0f→#020203, border: StyleSheet.hairlineWidth rgba(255,255,255,0.08), BlurView intensity={20} tint='dark', useAnimatedStyle + withRepeat (blob oscillation), Easing.bezier(0.16,1,0.3,1), withSpring damping:20 stiffness:90, Haptics.impactAsync(ImpactFeedbackStyle.Light), scale: 0.97 press","☐ No pure #000000 backgrounds, ☐ LinearGradient base screen, ☐ Animated ambient blobs (Reanimated, native driver), ☐ BlurView on tab bar and headers, ☐ borderRadius 16 on all cards, ☐ Haptic feedback on every Pressable, ☐ Bezier(0.16,1,0.3,1) easing used, ☐ Accent glow behind primary button, ☐ No solid grey borders (rgba only), ☐ Bottom sheets replace all modals","--bg-deep: #020203, --bg-base: #050506, --bg-elevated: #0a0a0c, --surface: rgba(255 255 255/0.05), --foreground: #EDEDEF, --foreground-muted: #8A8F98, --accent: #5E6AD2, --accent-glow: rgba(94 106 210/0.2), --border: rgba(255 255 255/0.08), --radius: 16px, --easing: cubic-bezier(0.16 1 0.3 1), --font: Inter"
|
||||
72,SaaS Mobile (High-Tech Boutique),Mobile,"saas, electric blue, gradient, fintech, spring animation, dual font, glassmorphism, boutique, premium, calistoga, inter, mono, tactile, haptic, bento","Electric Blue #0052FF, Gradient End #4D7CFF","Background #FAFAFA, Foreground #0F172A, Muted #F1F5F9, Card #FFFFFF, Border #E2E8F0","Spring animations (mass:1 damping:15 stiffness:120); gradient buttons (0052FF→4D7CFF); scale press 0.96→1.0 with haptics; floating FAB with gentle bobbing (Reanimated); glassmorphism BlurView navigation bars; staggered fade-in entrance (Y:20→0 + opacity:0→1); pulsing status dot on section badges; layout transitions (LayoutAnimation or Reanimated entering)","B2B SaaS mobile dashboards, fintech apps, developer tool mobile companions, marketing analytics apps, HR/operations apps, modern business productivity","Pure consumer entertainment, children's apps, highly decorative lifestyle apps, contexts where Electric Blue feels too corporate",✓ Full,◐ Partial,⚡ Excellent,✓ WCAG AA,✓ Mobile-First,✓ High,"React Native 10/10, Expo 10/10, NativeWind 10/10, SwiftUI 8/10, Flutter 9/10",2020s SaaS Mobile,Medium,"Design a high-tech boutique SaaS mobile app. Primary canvas: #FAFAFA (warm off-white). Cards: #FFFFFF with 1pt Slate-200 border, iOS shadow (shadowOpacity:0.1, shadowRadius:10, offset y:4), Android elevation:4, padding 24px, borderRadius 16. Buttons: LinearGradient #0052FF→#4D7CFF, height 56px, borderRadius 16, scale press 0.96 + haptic. Section badges: rounded pill with rgba(0,82,255,0.05) bg and rgba(0,82,255,0.2) border + PulseDot + JetBrains Mono text. Typography: Calistoga for heroes (36–42pt), Inter for body (16–18pt), JetBrains Mono for data labels. All screen transitions: spring (mass:1 damping:15 stiffness:120). Always include SafeAreaView.","borderRadius: 16 (buttons/cards), LinearGradient colors={['#0052FF','#4D7CFF']}, shadowOpacity: 0.1, shadowRadius: 10, elevation: 4, Haptics.impactAsync(ImpactFeedbackStyle.Light) on press, withSpring({mass:1, damping:15, stiffness:120}), withTiming Y:20→0 opacity:0→1 staggered entrance, LayoutAnimation.configureNext for list updates, BlurView on nav bars","☐ SafeAreaView wraps all screens, ☐ All touch targets ≥ 44×44px, ☐ Spring config used for all transitions, ☐ Gradient buttons (not flat), ☐ Haptic on every Pressable, ☐ Section badges with PulseDot, ☐ Staggered entrance animation on screen mount, ☐ JetBrains Mono for data labels, ☐ Calistoga for hero headlines, ☐ Elevation/shadow on cards","--bg: #FAFAFA, --fg: #0F172A, --muted: #F1F5F9, --accent: #0052FF, --accent-sec: #4D7CFF, --card: #FFFFFF, --border: #E2E8F0, --radius: 16px, --shadow: shadowOpacity 0.1 shadowRadius 10, --spring: mass 1 damping 15 stiffness 120, --font-display: Calistoga, --font-body: Inter, --font-mono: JetBrains Mono"
|
||||
73,Terminal CLI (Mobile),Mobile,"terminal, cli, matrix green, monospace, hacker, ascii, command line, developer, web3, crypto, sci-fi, OLED, retro-future, field operative","Matrix Green #33FF00, OLED Black #050505","Amber #FFB000, Muted Green #1A3D1A, Error Red #FF3333, Border Green #33FF00","Blinking cursor (500ms opacity loop), typewriter text reveal hook, scanline overlay (repeating lines 0.05 opacity), ASCII art headers, instant color inversion on press (bg-green text-black), haptic on every keystroke, boot sequence splash on launch","Developer tools, Web3/blockchain apps, geek-culture apps, ARG games, sci-fi/noir gaming companions, hacker/security tools, creative studio portfolios","Consumer products, health apps, anything requiring approachability or warmth, children's apps, standard enterprise contexts",✗ No,✓ OLED Dark Only,⚡ Excellent,✓ High contrast (green on black ≫4.5:1 ratio),✓ Mobile-First (OLED optimized),✗ Low,"React Native 10/10, Expo 10/10, NativeWind 9/10",Retro-Future 1980s–2020s,Medium,"Design a Mobile Terminal CLI app. Background: #050505 OLED black. ALL text in Matrix Green #33FF00. Font: JetBrains Mono or SpaceMono ONLY — zero border-radius everywhere. ASCII borders using +, -, |, * characters instead of standard containers. Buttons displayed as [ EXECUTE ] or > PROCEED. On press: instantly inverts to green bg + black text + haptic. Cursor: blinking View opacity 0→1 at 500ms. Show boot sequence on launch (fake log scroll). Progress bars as [#####-----] text. Status bar footer: [BATTERY:88%] [NET:CONNECTED]. Scanline overlay: absolute View with repeating 1px horizontal lines at opacity 0.05. Typewriter effect on new data.","borderRadius: 0 (ALL elements), borderWidth: 1, borderColor: '#33FF00', backgroundColor: '#050505', color: '#33FF00', fontFamily: 'SpaceMono-Regular' or JetBrains Mono, fontSize: 12 or 14 or 16 only, lineHeight: 1.2x fontSize, Haptics.impactAsync(Light) on every press, useAnimatedValue blink 500ms, hitSlop: 12px all sides for bracketed buttons","☐ 0px border-radius everywhere, ☐ ASCII-style borders on cards, ☐ Boot sequence on launch, ☐ Blinking cursor component, ☐ Typewriter hook for new content, ☐ Scanline overlay (0.05 opacity), ☐ Haptic on every button press, ☐ Footer status bar component, ☐ hitSlop on all bracketed buttons (44×44dp), ☐ Reduced motion respected","--bg: #050505, --fg-primary: #33FF00, --fg-amber: #FFB000, --fg-muted: #1A3D1A, --fg-error: #FF3333, --border: #33FF00, --radius: 0px, --font: SpaceMono-Regular or JetBrains Mono, --font-sizes: 12 14 16 only, --blink-duration: 500ms, --scanline-opacity: 0.05"
|
||||
74,Kinetic Brutalism (Mobile),Mobile,"kinetic, brutalism, motion, marquee, acid yellow, uppercase, oversized, aggressive typography, street, zine, high contrast, scroll-driven, haptic, reanimated","Acid Yellow #DFE104, Rich Black #09090B","Off-white #FAFAFA, Dark Gray #27272A, Zinc #A1A1AA, Border Zinc #3F3F46","Infinite marquee (Reanimated, Linear easing, 5s loop, hard clip), hero parallax (scale 1.0→1.3 + fade), sticky section header push, card flood inversion on press (bg→#DFE104, text→#000000), haptic Medium on every press, scroll-triggered interpolate transforms, 0px radius, 2px borders, 100ms color transitions","Immersive storytelling apps, brand flagship mobile, music/culture platforms, sports apps, underground zines, limited-edition product drops, performance dashboards","Calm informational apps, healthcare, finance contexts needing trust, children's, any context where aggressive typography feels inappropriate",✓ Dark Primary,◐ Dark only (inverted sections),⚡ Excellent (native driver required),⚠ WCAG AA (verify zinc body text on dark bg),✓ Mobile-First,✓ High energy,"React Native 10/10, Expo 10/10, Reanimated 10/10, NativeWind 9/10",2020s Mobile Brutalism,High,"Design a Kinetic Brutalism mobile app. Canvas: #09090B. Primary accent: Acid Yellow #DFE104 (text: #000000). Typography: Space Grotesk BOLD. Display text: 60–120pt, uppercase, letterSpacing -1, lineHeight 0.9–1.1x. Body: 18–20pt. Labels: 12pt uppercase letterSpacing +2. Add infinite marquee rows (Reanimated, no easing, hard edge clip). Hero text parallax on scroll (Interpolate: scale 1.0→1.3, opacity 1→0). Card press: instantly flood to #DFE104 + flip text to #000. Haptic Medium on every press. 0px radius. 2px solid borders. NO shadows. No gradients. Scale all fonts by (windowWidth / 375 * size) for responsiveness.","borderRadius: 0, borderWidth: 2, borderColor: '#3F3F46', backgroundColor: '#09090B', color: '#FAFAFA', fontWeight: '800 or 900', letterSpacing: -1 (large) or 2 (labels), lineHeight: 0.9–1.1 * fontSize, Reanimated withRepeat marquee timing 5000ms Easing.linear, Interpolate scroll→scale + opacity, Haptics.impactAsync(Medium), scale press: 0.95, 100ms color transitions","☐ Infinite marquee rows (Reanimated, no fade edges), ☐ Hero parallax scroll (scale+opacity Interpolate), ☐ All display text uppercase, ☐ 0px border-radius, ☐ 2px borders, ☐ Acid yellow card flood on press, ☐ Haptic Medium on every interaction, ☐ Font scale helper (windowWidth/375*size), ☐ Safe area for massive headers, ☐ Reduced motion stops marquees","--bg: #09090B, --fg: #FAFAFA, --muted: #27272A, --muted-fg: #A1A1AA, --accent: #DFE104, --accent-fg: #000000, --border: #3F3F46, --radius: 0px, --border-width: 2px, --shadow: none, --marquee-speed: 5000ms, --press-duration: 100ms, --font: Space Grotesk or Inter"
|
||||
75,Flat Design Mobile (Touch-First),Mobile,"flat, 2D, no shadow, color blocking, geometric, bold, poster, icon, touch-first, minimal, clean, tailored, cross-platform","Blue #3B82F6, Emerald #10B981","Background #FFFFFF, Surface #F3F4F6, Text #111827, Amber #F59E0B, Border #E5E7EB","Immediate press feedback (scale 0.97, no delay), color section blocking (full-width contrasting View), zero elevation/shadow, solid icon containers (colored squares/circles), geometric low-opacity shape overlays, bottom tabs solid fill (no floating)","Cross-platform apps (iOS+Android parity), information-dense dashboards, system UI, brand illustration, onboarding flows, marketing pages, icon design","Ultra-premium contexts needing depth/shadow, dark-mode-first products, contexts where flat design reads as unfinished or sterile",✓ Full,◐ Partial (Dark mode via color swap only),⚡ Excellent (no GPU effects),✓ WCAG AA (large bold type helps),✓ Mobile-First,✓ High,"React Native 10/10, Expo 10/10, NativeWind 10/10, Flutter 9/10, SwiftUI 9/10",2010s–2020s Flat Mobile,Low,"Design a Flat Mobile app. NO shadows (shadowOpacity: 0, elevation: 0). Color creates all hierarchy. Sections: full-width View blocks alternating contrasting bg colors (Blue Hero → White Content → Gray Block). Buttons: solid #3B82F6, borderRadius 8, height 56. Cards: backgroundColor #FFFFFF (on gray bg) or #DBEAFE (blue tint) — no shadow. Text: fontWeight 800 letterSpacing -0.5 (heads), 600 (sub), 400 (body). Inputs: #F3F4F6 bg, focused: borderWidth 2 borderColor #3B82F6. Icons: Lucide strokeWidth 2.5 inside solid colored square/circle. Press feedback: scale 0.97 Pressable. Use position absolute low-opacity geometric shapes (circles, rotated squares) as background decoration.","shadowOpacity: 0, elevation: 0, borderRadius: 6/12/999, height: 48 minimum touch targets, spacing: 4/8/16/24/32/48 system, backgroundColor (section blocking), Pressable scale: pressed ? 0.97 : 1, fontWeight: '800' heads / '600' sub / '400' body, letterSpacing: -0.5 heads / 1 labels, textTransform: 'uppercase' labels, strokeWidth={2.5} icons, borderWidth: 3/4 for featured CTAs","☐ Zero elevation AND shadowOpacity on all elements, ☐ Color-blocking sections (not borders), ☐ All touch targets ≥ 48×48, ☐ No gradients on flat elements, ☐ Icons inside solid colored containers, ☐ Pressable scale feedback, ☐ Geometric shapes as bg decoration, ☐ Bold flat bottom tabs (no floating), ☐ Primary headlines much larger than body, ☐ 4pt spacing system throughout","--bg: #FFFFFF, --surface: #F3F4F6, --fg: #111827, --primary: #3B82F6, --secondary: #10B981, --accent: #F59E0B, --border: #E5E7EB, --radius-sm: 6px, --radius-md: 12px, --radius-pill: 999px, --shadow: none, --elevation: 0, --touch-target: 48px, --spacing: 4 8 16 24 32 48"
|
||||
76,Material You (MD3 Mobile),Mobile,"material design 3, md3, tonal surfaces, pills, soft curves, android, md3 easing, state layers, haptic, fab, google","Primary Violet #6750A4, Secondary Container #E8DEF8, Tertiary #7D5260","Surface #FFFBFE, On Surface #1C1B1F, Surface Container #F3EDF7, Outline #79747E","Tonal elevation (overlay colors instead of strong shadows), pill-shaped buttons and chips (borderRadius 999), emphasized easing Easing.bezier(0.2,0,0,1), state layers (pressed overlays 10–15% opacity), Reanimated-filled label float for inputs, HapticFeedback on FAB/toggles","Android ecosystem apps, cross-platform productivity tools, MD3-based admin panels, data-heavy back-office UI with Material UI","Ultra-minimal brutalist brands, terminal/hacker aesthetics, monochrome editorial apps",✓ Full,✓ Full,⚠ Good (requires gradients and overlays),✓ WCAG AA (with MD3 token checks),✓ Mobile-First,✓ High,"React Native 9/10, Expo 10/10, React Native Paper 9/10","Material Design 3",Medium,"Design a Material You (MD3) mobile app. Use #FFFBFE background, #6750A4 primary, #E8DEF8 secondary container, #F3EDF7 surface container. All interactive elements are pill-shaped (borderRadius: 999). Buttons use Pressable with scale: 0.95 on press and state-layer overlays (black 10% or primary 12%). Inputs use filled M3 style: background #E7E0EC with floating label animation on focus. Elevation is tonal (layering containers) plus light shadow/elevation on Android. Animations use emphasized easing (0.2,0,0,1) at 100–400ms. FABs are tertiary-colored rounded squares/circles with level 3 elevation.","borderRadius: 999 (buttons/chips), containerRadius: 16–28, backgroundColor: '#FFFBFE', colorPrimary: '#6750A4', colorSecondaryContainer: '#E8DEF8', colorSurfaceContainer: '#F3EDF7', outlineColor: '#79747E', Pressable state-layer overlay (opacity 0.1–0.15), Easing.bezier(0.2,0,0,1), HapticFeedback.impactMedium on FAB, floating label using Reanimated translateY/scale","☐ MD3 color tokens applied (background/surface/container), ☐ All CTAs are pill-shaped, ☐ State-layer overlays instead of opacity 0.5 hacks, ☐ Emphasized easing used for all animations, ☐ Floating label inputs implemented, ☐ FAB uses tertiary color with correct elevation, ☐ Safe areas respected for organic shapes, ☐ No pure white background, ☐ No harsh box-shadows (ambient only)","--md3-bg: #FFFBFE, --md3-on-surface: #1C1B1F, --md3-primary: #6750A4, --md3-on-primary: #FFFFFF, --md3-secondary-container: #E8DEF8, --md3-on-secondary-container: #1D192B, --md3-tertiary: #7D5260, --md3-surface-container: #F3EDF7, --md3-outline: #79747E, --radius-pill: 999px, --easing-emphasized: cubic-bezier(0.2,0,0,1)"
|
||||
77,Neo Brutalism (Mobile),Mobile,"neo brutalism, pop art, stickers, thick borders, cream background, hot red, vivid yellow, soft violet, hard offset shadow, mechanical press, collage","Cream #FFFDF5, Hot Red #FF6B6B, Vivid Yellow #FFD93D","Soft Violet #C4B5FD, Pure Black #000000, White #FFFFFF","Thick 4px black borders on all major elements, hard offset shadows (4–8px, no blur), mechanical press: translateX/Y equal to shadow offset, slightly rotated cards/badges (-2deg/2deg), high-saturation color blocking, spring/linear animations only","Creative tools, collab platforms, Gen Z marketing & e-commerce, portfolio sites, sticker-book style content apps","Serious enterprise apps, conservative industries, sober fintech, accessibility-first contexts (must tune contrast)",✓ Light-first,✗ Dark,⚠ Moderate (shadows + transforms),⚠ Requires careful contrast tuning,✓ Mobile-First,✓ High,"React Native 10/10, Expo 10/10, NativeWind 9/10",2020s Neo-Brutalism,High,"Design a Mobile Neo-Brutalist app. Background: Cream #FFFDF5. All content blocks: white or violet with borderWidth 4 borderColor #000. Shadows are solid offset blocks (no blur) using an extra View behind offset by 4px or 8px. Typography: Space Grotesk Bold/Black only (700–900). Buttons: 56px tall, 4px border, 0 radius; press animation translates button to cover the shadow. Cards slightly rotated (-1deg, 2deg). Colors: Hot Red #FF6B6B for primary, Yellow #FFD93D for focus/badges, Soft Violet #C4B5FD as tertiary. Animation: spring/linear only, no ease-out luxury motion.","borderWidth: 4 (primary), 2 (secondary), borderRadius: 0 or 999 (badges only), backgroundColor: '#FFFDF5', shadow implemented as offset View, transform: [{translateX:4},{translateY:4}] on PressIn, fontFamily: 'SpaceGrotesk-Bold', fontWeight: '700/900', transform: [{ rotate: '-1deg' }] on cards, padding: 20,"☐ 4px borders on major elements, ☐ Hard offset shadow implemented via extra View, ☐ Mechanical press hides shadow, ☐ Cream canvas background, ☐ Pop-art color palette used, ☐ Cards/badges slightly rotated, ☐ No gradients or soft shadows, ☐ Only bold/black type weights, ☐ Badges slapped with absolute positioning, ☐ Anti-patterns (no subtle gray, no blur) avoided","--bg: #FFFDF5, --ink: #000000, --accent-primary: #FF6B6B, --accent-secondary: #FFD93D, --accent-muted: #C4B5FD, --white: #FFFFFF, --border-primary: 4px solid #000000, --shadow-offset-small: 4px, --shadow-offset-medium: 8px, --radius: 0px, --radius-pill: 999px, --font: Space Grotesk"
|
||||
78,Bold Typography (Mobile Poster),Mobile,"bold typography, editorial, poster, broadsheet, vermillion, negative space, edge-to-edge type, underline CTA, near-black, warm white","Near Black #0A0A0A, Warm White #FAFAFA","Muted #1A1A1A, Secondary Text #737373, Accent Vermillion #FF3D00, Border #262626","Hero headlines 48–72px (5:1 vs body size), tight tracking (-1.5px), edge-to-edge type, massive vertical spacing (60px+), underline CTAs (2–3px accent line), instant 200ms transitions (no bounce), strictly 0px radius containers, color shifts for active state instead of elevation","Creative brand heroes, reading-focused apps, event/exhibition pages, editorial mobile experiences, landing hero sections","Utility dashboards, kids apps, playful consumer products, contexts needing many icons or heavy imagery",✓ Dark Mode Primary,◐ Light sections optional,⚡ Excellent,✓ Contrast 18:1 achievable,✓ Mobile-First,✓ High,"React Native 10/10, Expo 10/10",Editorial 2020s,Medium,"Design a Bold Typography mobile screen. Background #0A0A0A, text #FAFAFA, accent #FF3D00. Use Inter Tight/Inter 600+ for all type; JetBrains Mono for labels. Headline: 56–72px, tracking -1.5, lineHeight 1.1, full-bleed width with slight bleed off-screen. Body: 16–18px, leading 1.6. Buttons: underline CTA (accent text + 2px underline block), or inverted box with 0 radius. No shadows, no rounded corners. Layout: single column, paddingHorizontal 24, vertical gaps 64 between sections. Animation: 200ms, Easing.bezier(0.25,0,0,1), slight slide-up 10px + fade on mount.","backgroundColor: '#0A0A0A', color: '#FAFAFA', accent: '#FF3D00', borderColor: '#262626', borderRadius: 0, paddingHorizontal: 24, headline style: fontSize:56–72, fontWeight:'700/800', letterSpacing:-1.5, lineHeight:1.1*fontSize, body: fontSize:16–18, lineHeight:1.6*fontSize, underline CTA: 2–3px height View under text, transition: 200ms cubic-bezier(0.25,0,0,1)","☐ H1 at least 4–5× body size, ☐ All containers 0 radius, ☐ Underline CTA pattern used, ☐ Large vertical gaps between sections, ☐ No shadows or soft corners, ☐ Accent used only for interaction, ☐ Text bleeds to/over screen edges, ☐ Animation timings 200ms, ☐ Accessible contrast ≥ 18:1, ☐ Body text never below 16px","--bg: #0A0A0A, --fg: #FAFAFA, --muted: #1A1A1A, --muted-fg: #737373, --accent: #FF3D00, --accent-fg: #0A0A0A, --border: #262626, --font-primary: Inter Tight, --font-display: Playfair Display Italic, --font-mono: JetBrains Mono"
|
||||
79,Academia (Scholarly Mobile),Mobile,"academia, library, mahogany, parchment, brass, crimson, serif, drop cap, arch-top, vignette, leather, scholarly, tactile","Mahogany #1C1714, Oak #251E19","Parchment #E8DFD4, Worn Leather #3D332B, Faded Ink #9C8B7A, Brass #C9A962, Library Crimson #8B2635","Deep mahogany backgrounds, oak surface cards, brass accented CTAs, arch-top hero/imagery, heavy vignette overlays, sepia-tinted images, drop caps with brass Cinzel, Roman numeral volume headings, slow timing-based animations (Easing.out poly(4)), zero neon or modern tech cues","Knowledge management apps, deep reading tools, ritual-heavy personal brands, lore-heavy RPG/roleplay apps, culture-specific community platforms","Hyper-modern tech dashboards, neon/glassmorphism, playful Gen Z branding",✓ Dark Rich,◐ Light parchment sections,⚠ Moderate (vignette + shadows),✓ Legible (serif optimized),◐ Mobile-First,◐ Medium,"React Native 9/10, Expo 10/10",Timeless Scholarly,High,"Design a Scholarly Academia mobile app. Background #1C1714 (mahogany), alt surfaces #251E19 (oak), text #E8DFD4 (parchment). Accent brass #C9A962 for CTAs + borders; crimson #8B2635 for wax seals. Typography: Cormorant Garamond (headings), Crimson Pro (body), Cinzel (labels/overlines). Use arch-top hero containers (borderTopRadius 100). Cards: oak bg, 1px wood-grain border. Inputs: worn-leather background, brass focus border. Global vignette overlay and ornate brass dividers (Unicode glyph + gradient line). Animations: no spring, only Timing with Easing.out(Easing.poly(4)).","backgroundColor: '#1C1714', altSurface: '#251E19', textColor: '#E8DFD4', mutedBg: '#3D332B', borderColor: '#4A3F35', brass: '#C9A962', crimson: '#8B2635', borderRadius: 4 (default), archTopRadius: 100 for hero, shadowOpacity:0.4 shadowRadius:6 elevation:8 for cards, textShadow on headings, vignette overlay via LinearGradient","☐ Mahogany/oak/parchment palette applied, ☐ Brass used on all tappable items, ☐ Arch-top imagery used in hero/cards, ☐ Drop caps & Roman numerals used, ☐ Vignette overlay present, ☐ No sans-serif body fonts, ☐ No neon/bright modern colors, ☐ Animations use non-spring timing, ☐ Inputs use worn-leather style, ☐ Wax seal badges implemented","--bg: #1C1714, --bg-alt: #251E19, --fg: #E8DFD4, --muted: #3D332B, --muted-fg: #9C8B7A, --border: #4A3F35, --accent-brass: #C9A962, --accent-crimson: #8B2635, --radius: 4px, --arch-radius: 100px, --shadow-card: 0 4px 6px rgba(0,0,0,0.4), --font-heading: Cormorant Garamond, --font-body: Crimson Pro, --font-label: Cinzel"
|
||||
80,Cyberpunk Mobile HUD,Mobile,"cyberpunk, neon, glitch, chamfered, orbitron, jetbrains, scanlines, crt, hud, matrix, military, decker","Void #0A0A0F, Card #12121A","Neon Green #00FF88, Neon Magenta #FF00FF, Cyber Cyan #00D4FF, Neutral Text #E0E0E0, Alert Red #FF3366, Border #2A2A3A","Deep void background with neon radiance, chamfered 45° corners via SVG/Skia, scanline overlay, CRT flicker opacity oscillation, glitch animations (translateX ±2), neon pulses around buttons, HUD corner brackets, terminal prompt text inputs, heavy use of blurView holographic panels","Gaming dashboards, crypto/cyberpunk apps, sci-fi companion tools, hacker OS skins, data-heavy monitoring HUDs","Serious enterprise, health/finance requiring calm trust, minimal editorial apps",✗ Light,✓ Dark-only,⚠ Moderate–Heavy (Skia/blur/animations),⚠ Requires careful reduced-motion handling,✓ Mobile-First HUD,✓ High,"React Native 10/10, Skia 9/10, Expo 10/10",Cyber-Noir,High,"Design a Cyberpunk mobile HUD. Background #0A0A0F, card #12121A. Accents: #00FF88 (primary), #FF00FF, #00D4FF. Typography: Orbitron for headings, JetBrains Mono for data. All shapes use chamfered corners via SVG or Skia clipPath. Buttons: neon glow shadows, scale 0.98 + haptic on press, optional glitch jitter on active. Global scanline overlay (semi-transparent horizontal lines) and CRT flicker (root opacity 0.98–1). Inputs: prompt style with '>' in accent, custom blinking block cursor. HUD cards use corner brackets and subtle gradients.","backgroundColor: '#0A0A0F', cardBg: '#12121A', accent: '#00FF88', accent2: '#FF00FF', accent3: '#00D4FF', borderColor: '#2A2A3A', destructive: '#FF3366', borderRadius: 0, chamfer via SVG path, shadowColor accent with animated radius, scanline overlay View pointerEvents='none', withRepeat glitch translateX [-2,2,0], Easing.steps(2)","☐ Chamfered corners used instead of radius, ☐ Scanline & CRT flicker implemented, ☐ Orbitron + JetBrains Mono typography, ☐ Neon glow shadows on primary buttons, ☐ Glitch animation on active states, ☐ Prompt-style inputs with custom cursor, ☐ HUD corner brackets implemented, ☐ Safe-area system status bar styled, ☐ Reduced motion disables glitch/flicker, ☐ Icons configured with Lucide accent color","--bg: #0A0A0F, --card: #12121A, --fg: #E0E0E0, --muted: #1C1C2E, --accent: #00FF88, --accent2: #FF00FF, --accent3: #00D4FF, --border: #2A2A3A, --destructive: #FF3366, --radius: 0px, --font-heading: Orbitron, --font-body: JetBrains Mono"
|
||||
81,Bitcoin DeFi (Mobile),Mobile,"web3, bitcoin, defi, digital gold, fintech, wallet, orange, glassmorphism, gradient, blur, holographic, trust, precision","Bitcoin Orange #F7931A, Burnt Orange #EA580C, Digital Gold #FFD600","Void #030304, Dark Matter #0F1115, Pure Light #FFFFFF, Stardust #94A3B8, Border Dim rgba(30,41,59,0.2)","Deep void + dark matter surfaces, Bitcoin orange/gold gradients for CTAs, pill buttons with glowing shadows, glassmorphic BlurView nav, monospace data rows, gradient text balances + masked orange-gold, pulsing status indicators and vertical ledger timelines, ultra-thin borders, high-precision typography","DeFi dashboards, wallets, NFT marketplaces, Web3 social, metaverse utilities, high-tech fintech brands","Playful casual apps, low-tech brands, ultra-minimal editorial apps",✗ Light,✓ Dark-only,⚠ Moderate (gradients+blur),✓ WCAG AA with care,✓ Mobile-First,✓ High,"React Native 10/10, Expo 10/10, Reanimated 10/10",Fintech/Web3,High,"Design a Bitcoin DeFi mobile app. Background #030304, cards #0F1115, text #FFFFFF, muted #94A3B8. Primary CTA: LinearGradient #EA580C→#F7931A with orange glow shadow. Typography: Space Grotesk Bold for headings, Inter for body, JetBrains Mono for prices/hashes. Use BlurView (intensity 20) for nav bars and floating panels. Cards as 'blocks' with hairline borders and light orange glow on active. Use grid background (low-opacity 50px grid). Gradient text for key balances via MaskedView and LinearGradient orange→gold. Status indicators pulse using Reanimated. Ledger timelines drawn as vertical gradient line with pulsing dots.","backgroundColor: '#030304', cardBg: '#0F1115', textColor: '#FFFFFF', mutedText: '#94A3B8', borderColor: 'rgba(30,41,59,0.2)', accentBitcoin: '#F7931A', accentBurnt: '#EA580C', accentGold: '#FFD600', borderRadius: 24 for cards, radiusPill: 999 for buttons, BlurView intensity 20, LinearGradient on CTAs, shadowColor '#F7931A' shadowRadius up to 10, JetBrains Mono for numeric text","☐ Void/dark-matter palette applied, ☐ Bitcoin orange/gold gradient buttons, ☐ BlurView nav implemented, ☐ Monospace for numeric data, ☐ Hairline borders on blocks, ☐ Gradient text on balances, ☐ Pulsing network status indicators, ☐ Ledger vertical timeline, ☐ Haptics on money actions, ☐ SafeArea + FlashList for heavy lists","--bg-void: #030304, --bg-surface: #0F1115, --fg: #FFFFFF, --fg-muted: #94A3B8, --border-dim: rgba(30,41,59,0.2), --accent-bitcoin: #F7931A, --accent-burnt: #EA580C, --accent-gold: #FFD600, --radius-card: 24px, --radius-pill: 999px, --blur-intensity: 20, --font-heading: Space Grotesk, --font-body: Inter, --font-mono: JetBrains Mono"
|
||||
82,Claymorphism (Mobile),Mobile,"claymorphism, clay, 3d, soft, bubbly, candy, playful, rounded, squish, tactile, inflate, silicone, haptic, spring","Vivid Violet #7C3AED, Hot Pink #DB2777","Canvas #F4F1FA, Soft Charcoal #332F3A, Emerald #10B981, Amber #F59E0B, Lavender-Gray #635F69","Multi-layer shadow stacks (nested View) to simulate clay depth, LinearGradient #A78BFA→#7C3AED buttons, borderRadius 40–50 outer / 32 cards / 20 buttons, Reanimated spring squish (scale 0.92 on press), BlurView glass-clay hybrid cards, floating blobs with slow ±20px drift, Haptics Light on every press","Children education apps, teen social products, crypto gamification, creative tools, brand mascot-led apps","Serious enterprise, high-density data, editorial reading apps, fintech trust signals",✓ Light,⚠ Dark (adjusted),⚠ Moderate–Heavy (shadows+blur),✓ WCAG AA (careful),✓ Mobile-First (thumb zone),✓ High,"React Native 10/10, Reanimated 10/10, Expo 10/10",Consumer/Education,High,"Design a high-fidelity Claymorphism mobile app. Background #F4F1FA (cool lavender-white, never pure white). Primary CTA: LinearGradient #A78BFA to #7C3AED, borderRadius 20, height 56. Cards: borderRadius 32, backgroundColor rgba(255,255,255,0.7) with BlurView. Multi-layer shadow: outer offset(12,12) rgba(160,150,180,0.2) + highlight offset(-8,-8) white. Typography: Nunito Black 900 for headings (48px hero, 32px section, 22px card), DM Sans Medium 500 for body 16px. Spring animations: scale 0.92 on press, spring back damping 10. Background blobs drift ±20px over 8–10s. Bento 2-column grid with hero card spanning full width. Haptics.impactAsync Light on every button press.","backgroundColor: '#F4F1FA', cardBg: 'rgba(255,255,255,0.7)', textPrimary: '#332F3A', textMuted: '#635F69', accentPrimary: '#7C3AED', accentSecondary: '#DB2777', success: '#10B981', warning: '#F59E0B', radiusOuter: 50, radiusCard: 32, radiusButton: 20, shadowStack: 'nested View', gradientButton: ['#A78BFA', '#7C3AED'], springDamping: 10","☐ Background uses #F4F1FA (no pure white), ☐ Multi-layer clay shadow stack applied, ☐ Cards use blurred glass-clay hybrid, ☐ Buttons squish to scale 0.92 on press, ☐ Spring physics on all interactions, ☐ Nunito Black for headings, ☐ Background blobs drifting, ☐ Haptics on every press, ☐ Nested border radius (card 32, inner 24), ☐ Bento layout with hero span","--bg: #F4F1FA, --card-bg: rgba(255,255,255,0.7), --text: #332F3A, --muted: #635F69, --accent: #7C3AED, --accent2: #DB2777, --success: #10B981, --warning: #F59E0B, --radius-outer: 50px, --radius-card: 32px, --radius-button: 20px, --font-heading: Nunito Black, --font-body: DM Sans"
|
||||
83,Enterprise SaaS (Mobile),Mobile,"enterprise, saas, b2b, professional, indigo, violet, gradient, polished, trustworthy, clean, approachable, spring, haptic","Indigo #4F46E5, Violet #7C3AED","Slate 50 #F8FAFC, White #FFFFFF, Slate 900 #0F172A, Slate 500 #64748B, Emerald #10B981, Slate 200 #E2E8F0","Indigo→Violet gradient primary CTAs + active tab highlights, colored card shadows rgba(79,70,229,0.08), pill buttons or 12pt radius, full-width CTA at screen bottom, spring press scale 0.97, floating label inputs with animated focus border, skeletal loading pulses (Indigo/Slate tint), Bottom Sheets with drag dismiss, swipe-to-action list cards, scroll-linked title collapse","B2B backend management, productivity tools, government and finance mobile apps, SaaS companion apps, enterprise dashboards","Pure consumer entertainment, Gen-Z youth apps, gaming UI, ultra-minimal editorial",✓ Light,✓ Dark-ready (token inversion),✓ Performant,✓ WCAG AA,✓ Mobile-First (Safe Area strict),✓ High,"React Native 10/10, Reanimated 10/10, NativeWind 9/10",Enterprise/SaaS,High,"Design a Modern Enterprise SaaS mobile app. Background #F8FAFC, surfaces #FFFFFF, primary #4F46E5 (Indigo), secondary #7C3AED (Violet). Typography: Plus Jakarta Sans, ExtraBold 800 for screen titles, Bold 700 for section headers, SemiBold 600 for buttons, Regular 400 for body. Line height 1.1–1.2 for titles, 1.4–1.5 for body. Primary button: full-width, LinearGradient Indigo→Violet, pill-shaped or radius 12, scale 0.95 on press with medium haptic. Cards: white bg, 16pt radius, hairline border, shadow rgba(79,70,229,0.08). Inputs: white bg, 8pt radius, floating label, Indigo border on focus. Bottom Tab Navigation (3–5 items), gradient active tab icon. Screen padding 16–20pt. Vertical rhythm 24pt between sections, 12pt between items. Shared Element Transition for hero cards opening to detail.","backgroundColor: '#F8FAFC', surfaceBg: '#FFFFFF', textPrimary: '#0F172A', textMuted: '#64748B', primary: '#4F46E5', secondary: '#7C3AED', success: '#10B981', border: '#E2E8F0', radiusCard: 16, radiusButton: 999, radiusInput: 8, shadowCard: 'rgba(79,70,229,0.08)', gradientPrimary: ['#4F46E5', '#7C3AED'], screenPadding: 20","☐ Background #F8FAFC applied, ☐ Indigo→Violet gradient on primary CTA, ☐ Colored card shadows (not gray), ☐ Plus Jakarta Sans typography, ☐ Floating label inputs with Indigo focus, ☐ Scale 0.97 press with haptic Medium, ☐ Bottom Tab Navigation implemented, ☐ Safe Area strict compliance, ☐ Skeletal loading placeholders, ☐ Reduced Motion fallback","--bg: #F8FAFC, --surface: #FFFFFF, --text: #0F172A, --muted: #64748B, --primary: #4F46E5, --secondary: #7C3AED, --success: #10B981, --border: #E2E8F0, --radius-card: 16px, --radius-pill: 999px, --radius-input: 8px, --shadow-card: rgba(79,70,229,0.08), --font: Plus Jakarta Sans"
|
||||
84,Sketch Hand-Drawn (Mobile),Mobile,"sketch, hand-drawn, handwriting, wobbly, imperfect, paper, kalam, organic, collage, post-it, tape, offset shadow, scribble","Red Marker #FF4D4D, Pencil Black #2D2D2D","Warm Paper #FDFBF7, Old Paper #E5E0D8, Blue Ballpoint #2D5DA1, Post-it Yellow #FFF9C4","Wobbly borderRadius (unique per corner: 15/25/20/10), borderWidth 2–3 solid/dashed, hard offset shadow via rear View (4px,4px) #2D2D2D, Kalam Bold headings, PatrickHand Regular body, slight rotation (-1deg/1deg) on cards, absolute SVG scribble overlays (arrows/tape/tacks), jiggle -2deg↔2deg on error, LayoutAnimation spring on layout changes, Haptics on press, paper texture repeating background","Low-fidelity prototyping, creative brands, children/picturebook apps, education tools, journaling apps, gamified puzzles","Enterprise dashboards, high-density data tables, fintech precision tools, medical or legal apps",✓ Light,⚠ Dark (requires texture inversion),✓ Lightweight,⚠ Moderate (small/muted text risk),✓ Mobile-First (wobbly touch targets 48x48),✗ Low-Conversion,"React Native 10/10, Reanimated 9/10, Expo 9/10",Creative/Education,Medium,"Design a Hand-Drawn (Sketch) mobile app. Background #FDFBF7 (warm paper texture). Typography: Kalam Bold for headings (high weight, felt-tip style), PatrickHand Regular for body (human but legible). Colors: Pencil Black #2D2D2D for all text and borders, Red Marker #FF4D4D for accents, Blue Ballpoint #2D5DA1for input focus. Cards: white background, wobbly corner radii (e.g., 15/25/20/10), borderWidth 3, rotate -1deg or +1deg. Hard offset shadow implemented as a second View behind the card offset 4px right and 4px down. Buttons: Post-it yellow #FFF9C4 for primary CTA, press state shifts the button (translateX 4, translateY 4) to cover the shadow. Inputs: PatrickHand font, wobbly border, focus changes to Blue Ballpoint. Add absolute SVG tape and tack decorations. Error: jiggle animation -2deg to +2deg. All touch targets minimum 48x48.","backgroundColor: '#FDFBF7', cardBg: '#FFFFFF', textPrimary: '#2D2D2D', accentRed: '#FF4D4D', accentBlue: '#2D5DA1', accentYellow: '#FFF9C4', border: '#2D2D2D', shadowView: 'offset 4px 4px #2D2D2D', wobblyRadius: [15,25,20,10], fontHeading: 'Kalam-Bold', fontBody: 'PatrickHand-Regular'","☐ Warm paper background texture applied, ☐ Kalam Bold headings, ☐ Wobbly corner radii on all cards, ☐ Hard offset shadow View (not blur), ☐ Cards slightly rotated, ☐ Button press shifts to cover shadow, ☐ SVG tape/tack decorations, ☐ PatrickHand for inputs, ☐ Jiggle error animation, ☐ Minimum 48x48 touch targets","--bg: #FDFBF7, --text: #2D2D2D, --accent-red: #FF4D4D, --accent-blue: #2D5DA1, --postit: #FFF9C4, --border-width: 3px, --shadow-offset: 4px 4px, --font-heading: Kalam Bold, --font-body: Patrick Hand, --rotation-card: -1deg to 1deg"
|
||||
85,Neumorphism (Mobile),Mobile,"neumorphism, soft ui, dual shadow, extruded, inset, clay surface, monochromatic, cool grey, haptic, ceramic, physical, depth","Accent Violet #6C63FF, Clay Base #E0E5EC","Text Dark #3D4852, Text Muted #6B7280, Shadow Light rgba(255,255,255,0.6), Shadow Dark rgba(163,177,198,0.7), Inset Background #D1D9E6","Full-screen #E0E5EC base, dual-layer shadow via nested View (light top-left + dark bottom-right), extruded convex resting state, inset concave pressed/input state, Reanimated scale 0.97 on press, shadow opacity interpolates 1→0.4 on press, Haptics Light on every interaction, 8pt grid, no blur shadows (no shadowRadius blend), nested depth (extruded card contains inset icon slot)","Minimal hardware controls, smart home apps, aesthetic utility tools, health monitors, brand showcase pages","High-density data, bright multi-color apps, apps needing strong visual hierarchy via color, dark-mode-only products",✓ Light-only,✗ Dark (breaks material metaphor),✓ Lightweight,⚠ Moderate (low-contrast risk),✓ Mobile-First,✗ Low-Conversion,"React Native 10/10, react-native-shadow-2 9/10, Reanimated 9/10",Tools/Lifestyle,Medium,"Design a Neumorphism (Soft UI) mobile app. Entire background is a single color #E0E5EC (Cool Clay). No other background colors. Dual shadows: outer dark shadowColor rgba(163,177,198,0.7) offset(6,6) radius 10 + outer light #FFFFFF offset(-6,-6) radius 10 using nested View or react-native-shadow-2. Extruded (convex) for resting buttons and cards. Inset (concave) for inputs and pressed states. Buttons: height 56, borderRadius 16, scale 0.97 on press with shadow opacity→0.4, Haptics.impactAsync Light. Cards: padding 24, borderRadius 32, nested inner icon container uses inset style. Inputs: height 50, borderRadius 16, backgroundColor #E0E5EC (NOT white), inset depth effect, focus borderColor #6C63FF width 1.5. Typography: Plus Jakarta Sans Bold or System. Heading 24–32pt, body 16pt, caption 12pt, letterSpacing -0.5 for headings. Animation: 250ms Bezier(0.4,0,0.2,1). No black shadows, no pure white backgrounds.","backgroundColor: '#E0E5EC', textPrimary: '#3D4852', textMuted: '#6B7280', accent: '#6C63FF', shadowLight: 'rgba(255,255,255,0.6)', shadowDark: 'rgba(163,177,198,0.7)', insetBg: '#D1D9E6', radiusCard: 32, radiusButton: 16, radiusPill: 999, shadowOffset: 6, shadowRadius: 10","☐ Single #E0E5EC base applied across all screens, ☐ Dual shadow (light+dark) implemented via nested View, ☐ Extruded resting state on cards/buttons, ☐ Inset concave state on inputs, ☐ Scale 0.97 press + shadow opacity interpolation, ☐ Haptics Light on all presses, ☐ No black shadows or white backgrounds, ☐ Nested depth pattern (extruded→inset), ☐ Accent #6C63FF on active/focus only, ☐ 8pt grid spacing","--bg: #E0E5EC, --text: #3D4852, --muted: #6B7280, --accent: #6C63FF, --shadow-light: rgba(255,255,255,0.6), --shadow-dark: rgba(163,177,198,0.7), --inset-bg: #D1D9E6, --radius-card: 32px, --radius-button: 16px, --font: Plus Jakarta Sans or System"
|
||||
|
Can't render this file because it contains an unexpected character in line 77 and column 1866.
|
@@ -0,0 +1,74 @@
|
||||
No,Font Pairing Name,Category,Heading Font,Body Font,Mood/Style Keywords,Best For,Google Fonts URL,CSS Import,Tailwind Config,Notes
|
||||
1,Classic Elegant,"Serif + Sans",Playfair Display,Inter,"elegant, luxury, sophisticated, timeless, premium, editorial","Luxury brands, fashion, spa, beauty, editorial, magazines, high-end e-commerce","https://fonts.google.com/share?selection.family=Inter:wght@300;400;500;600;700|Playfair+Display:wght@400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');","fontFamily: { serif: ['Playfair Display', 'serif'], sans: ['Inter', 'sans-serif'] }","High contrast between elegant heading and clean body. Perfect for luxury/premium."
|
||||
2,Modern Professional,"Sans + Sans",Poppins,Open Sans,"modern, professional, clean, corporate, friendly, approachable","SaaS, corporate sites, business apps, startups, professional services","https://fonts.google.com/share?selection.family=Open+Sans:wght@300;400;500;600;700|Poppins:wght@400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');","fontFamily: { heading: ['Poppins', 'sans-serif'], body: ['Open Sans', 'sans-serif'] }","Geometric Poppins for headings, humanist Open Sans for readability."
|
||||
3,Tech Startup,"Sans + Sans",Space Grotesk,DM Sans,"tech, startup, modern, innovative, bold, futuristic","Tech companies, startups, SaaS, developer tools, AI products","https://fonts.google.com/share?selection.family=DM+Sans:wght@400;500;700|Space+Grotesk:wght@400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');","fontFamily: { heading: ['Space Grotesk', 'sans-serif'], body: ['DM Sans', 'sans-serif'] }","Space Grotesk has unique character, DM Sans is highly readable."
|
||||
4,Editorial Classic,"Serif + Serif",Cormorant Garamond,Libre Baskerville,"editorial, classic, literary, traditional, refined, bookish","Publishing, blogs, news sites, literary magazines, book covers","https://fonts.google.com/share?selection.family=Cormorant+Garamond:wght@400;500;600;700|Libre+Baskerville:wght@400;700","@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Libre+Baskerville:wght@400;700&display=swap');","fontFamily: { heading: ['Cormorant Garamond', 'serif'], body: ['Libre Baskerville', 'serif'] }","All-serif pairing for traditional editorial feel."
|
||||
5,Minimal Swiss,"Sans + Sans",Inter,Inter,"minimal, clean, swiss, functional, neutral, professional","Dashboards, admin panels, documentation, enterprise apps, design systems","https://fonts.google.com/share?selection.family=Inter:wght@300;400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');","fontFamily: { sans: ['Inter', 'sans-serif'] }","Single font family with weight variations. Ultimate simplicity."
|
||||
6,Playful Creative,"Display + Sans",Fredoka,Nunito,"playful, friendly, fun, creative, warm, approachable","Children's apps, educational, gaming, creative tools, entertainment","https://fonts.google.com/share?selection.family=Fredoka:wght@400;500;600;700|Nunito:wght@300;400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@300;400;500;600;700&display=swap');","fontFamily: { heading: ['Fredoka', 'sans-serif'], body: ['Nunito', 'sans-serif'] }","Rounded, friendly fonts perfect for playful UIs."
|
||||
7,Bold Statement,"Display + Sans",Bebas Neue,Source Sans 3,"bold, impactful, strong, dramatic, modern, headlines","Marketing sites, portfolios, agencies, event pages, sports","https://fonts.google.com/share?selection.family=Bebas+Neue|Source+Sans+3:wght@300;400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');","fontFamily: { display: ['Bebas Neue', 'sans-serif'], body: ['Source Sans 3', 'sans-serif'] }","Bebas Neue for large headlines only. All-caps display font."
|
||||
8,Wellness Calm,"Serif + Sans",Lora,Raleway,"calm, wellness, health, relaxing, natural, organic","Health apps, wellness, spa, meditation, yoga, organic brands","https://fonts.google.com/share?selection.family=Lora:wght@400;500;600;700|Raleway:wght@300;400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;500;600;700&family=Raleway:wght@300;400;500;600;700&display=swap');","fontFamily: { serif: ['Lora', 'serif'], sans: ['Raleway', 'sans-serif'] }","Lora's organic curves with Raleway's elegant simplicity."
|
||||
9,Developer Mono,"Mono + Sans",JetBrains Mono,IBM Plex Sans,"code, developer, technical, precise, functional, hacker","Developer tools, documentation, code editors, tech blogs, CLI apps","https://fonts.google.com/share?selection.family=IBM+Plex+Sans:wght@300;400;500;600;700|JetBrains+Mono:wght@400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');","fontFamily: { mono: ['JetBrains Mono', 'monospace'], sans: ['IBM Plex Sans', 'sans-serif'] }","JetBrains for code, IBM Plex for UI. Developer-focused."
|
||||
10,Retro Vintage,"Display + Serif",Abril Fatface,Merriweather,"retro, vintage, nostalgic, dramatic, decorative, bold","Vintage brands, breweries, restaurants, creative portfolios, posters","https://fonts.google.com/share?selection.family=Abril+Fatface|Merriweather:wght@300;400;700","@import url('https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Merriweather:wght@300;400;700&display=swap');","fontFamily: { display: ['Abril Fatface', 'serif'], body: ['Merriweather', 'serif'] }","Abril Fatface for hero headlines only. High-impact vintage feel."
|
||||
11,Geometric Modern,"Sans + Sans",Outfit,Work Sans,"geometric, modern, clean, balanced, contemporary, versatile","General purpose, portfolios, agencies, modern brands, landing pages","https://fonts.google.com/share?selection.family=Outfit:wght@300;400;500;600;700|Work+Sans:wght@300;400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Work+Sans:wght@300;400;500;600;700&display=swap');","fontFamily: { heading: ['Outfit', 'sans-serif'], body: ['Work Sans', 'sans-serif'] }","Both geometric but Outfit more distinctive for headings."
|
||||
12,Luxury Serif,"Serif + Sans",Cormorant,Montserrat,"luxury, high-end, fashion, elegant, refined, premium","Fashion brands, luxury e-commerce, jewelry, high-end services","https://fonts.google.com/share?selection.family=Cormorant:wght@400;500;600;700|Montserrat:wght@300;400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Cormorant:wght@400;500;600;700&family=Montserrat:wght@300;400;500;600;700&display=swap');","fontFamily: { serif: ['Cormorant', 'serif'], sans: ['Montserrat', 'sans-serif'] }","Cormorant's elegance with Montserrat's geometric precision."
|
||||
13,Friendly SaaS,"Sans + Sans",Plus Jakarta Sans,Plus Jakarta Sans,"friendly, modern, saas, clean, approachable, professional","SaaS products, web apps, dashboards, B2B, productivity tools","https://fonts.google.com/share?selection.family=Plus+Jakarta+Sans:wght@300;400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');","fontFamily: { sans: ['Plus Jakarta Sans', 'sans-serif'] }","Single versatile font. Modern alternative to Inter."
|
||||
14,News Editorial,"Serif + Sans",Newsreader,Roboto,"news, editorial, journalism, trustworthy, readable, informative","News sites, blogs, magazines, journalism, content-heavy sites","https://fonts.google.com/share?selection.family=Newsreader:wght@400;500;600;700|Roboto:wght@300;400;500;700","@import url('https://fonts.googleapis.com/css2?family=Newsreader:wght@400;500;600;700&family=Roboto:wght@300;400;500;700&display=swap');","fontFamily: { serif: ['Newsreader', 'serif'], sans: ['Roboto', 'sans-serif'] }","Newsreader designed for long-form reading. Roboto for UI."
|
||||
15,Handwritten Charm,"Script + Sans",Caveat,Quicksand,"handwritten, personal, friendly, casual, warm, charming","Personal blogs, invitations, creative portfolios, lifestyle brands","https://fonts.google.com/share?selection.family=Caveat:wght@400;500;600;700|Quicksand:wght@300;400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;600;700&family=Quicksand:wght@300;400;500;600;700&display=swap');","fontFamily: { script: ['Caveat', 'cursive'], sans: ['Quicksand', 'sans-serif'] }","Use Caveat sparingly for accents. Quicksand for body."
|
||||
16,Corporate Trust,"Sans + Sans",Lexend,Source Sans 3,"corporate, trustworthy, accessible, readable, professional, clean","Enterprise, government, healthcare, finance, accessibility-focused","https://fonts.google.com/share?selection.family=Lexend:wght@300;400;500;600;700|Source+Sans+3:wght@300;400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;400;500;600;700&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');","fontFamily: { heading: ['Lexend', 'sans-serif'], body: ['Source Sans 3', 'sans-serif'] }","Lexend designed for readability. Excellent accessibility."
|
||||
17,Brutalist Raw,"Mono + Mono",Space Mono,Space Mono,"brutalist, raw, technical, monospace, minimal, stark","Brutalist designs, developer portfolios, experimental, tech art","https://fonts.google.com/share?selection.family=Space+Mono:wght@400;700","@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');","fontFamily: { mono: ['Space Mono', 'monospace'] }","All-mono for raw brutalist aesthetic. Limited weights."
|
||||
18,Fashion Forward,"Sans + Sans",Syne,Manrope,"fashion, avant-garde, creative, bold, artistic, edgy","Fashion brands, creative agencies, art galleries, design studios","https://fonts.google.com/share?selection.family=Manrope:wght@300;400;500;600;700|Syne:wght@400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700&family=Syne:wght@400;500;600;700&display=swap');","fontFamily: { heading: ['Syne', 'sans-serif'], body: ['Manrope', 'sans-serif'] }","Syne's unique character for headlines. Manrope for readability."
|
||||
19,Soft Rounded,"Sans + Sans",Varela Round,Nunito Sans,"soft, rounded, friendly, approachable, warm, gentle","Children's products, pet apps, friendly brands, wellness, soft UI","https://fonts.google.com/share?selection.family=Nunito+Sans:wght@300;400;500;600;700|Varela+Round","@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;400;500;600;700&family=Varela+Round&display=swap');","fontFamily: { heading: ['Varela Round', 'sans-serif'], body: ['Nunito Sans', 'sans-serif'] }","Both rounded and friendly. Perfect for soft UI designs."
|
||||
20,Premium Sans,"Sans + Sans",Satoshi,General Sans,"premium, modern, clean, sophisticated, versatile, balanced","Premium brands, modern agencies, SaaS, portfolios, startups","https://fonts.google.com/share?selection.family=DM+Sans:wght@400;500;700","@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap');","fontFamily: { sans: ['DM Sans', 'sans-serif'] }","Note: Satoshi/General Sans on Fontshare. DM Sans as Google alternative."
|
||||
21,Vietnamese Friendly,"Sans + Sans",Be Vietnam Pro,Noto Sans,"vietnamese, international, readable, clean, multilingual, accessible","Vietnamese sites, multilingual apps, international products","https://fonts.google.com/share?selection.family=Be+Vietnam+Pro:wght@300;400;500;600;700|Noto+Sans:wght@300;400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700&family=Noto+Sans:wght@300;400;500;600;700&display=swap');","fontFamily: { sans: ['Be Vietnam Pro', 'Noto Sans', 'sans-serif'] }","Be Vietnam Pro excellent Vietnamese support. Noto as fallback."
|
||||
22,Japanese Elegant,"Serif + Sans",Noto Serif JP,Noto Sans JP,"japanese, elegant, traditional, modern, multilingual, readable","Japanese sites, Japanese restaurants, cultural sites, anime/manga","https://fonts.google.com/share?selection.family=Noto+Sans+JP:wght@300;400;500;700|Noto+Serif+JP:wght@400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&family=Noto+Serif+JP:wght@400;500;600;700&display=swap');","fontFamily: { serif: ['Noto Serif JP', 'serif'], sans: ['Noto Sans JP', 'sans-serif'] }","Noto fonts excellent Japanese support. Traditional + modern feel."
|
||||
23,Korean Modern,"Sans + Sans",Noto Sans KR,Noto Sans KR,"korean, modern, clean, professional, multilingual, readable","Korean sites, K-beauty, K-pop, Korean businesses, multilingual","https://fonts.google.com/share?selection.family=Noto+Sans+KR:wght@300;400;500;700","@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');","fontFamily: { sans: ['Noto Sans KR', 'sans-serif'] }","Clean Korean typography. Single font with weight variations."
|
||||
24,Chinese Traditional,"Serif + Sans",Noto Serif TC,Noto Sans TC,"chinese, traditional, elegant, cultural, multilingual, readable","Traditional Chinese sites, cultural content, Taiwan/Hong Kong markets","https://fonts.google.com/share?selection.family=Noto+Sans+TC:wght@300;400;500;700|Noto+Serif+TC:wght@400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700&family=Noto+Serif+TC:wght@400;500;600;700&display=swap');","fontFamily: { serif: ['Noto Serif TC', 'serif'], sans: ['Noto Sans TC', 'sans-serif'] }","Traditional Chinese character support. Elegant pairing."
|
||||
25,Chinese Simplified,"Sans + Sans",Noto Sans SC,Noto Sans SC,"chinese, simplified, modern, professional, multilingual, readable","Simplified Chinese sites, mainland China market, business apps","https://fonts.google.com/share?selection.family=Noto+Sans+SC:wght@300;400;500;700","@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');","fontFamily: { sans: ['Noto Sans SC', 'sans-serif'] }","Simplified Chinese support. Clean modern look."
|
||||
26,Arabic Elegant,"Serif + Sans",Noto Naskh Arabic,Noto Sans Arabic,"arabic, elegant, traditional, cultural, RTL, readable","Arabic sites, Middle East market, Islamic content, bilingual sites","https://fonts.google.com/share?selection.family=Noto+Naskh+Arabic:wght@400;500;600;700|Noto+Sans+Arabic:wght@300;400;500;700","@import url('https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic:wght@400;500;600;700&family=Noto+Sans+Arabic:wght@300;400;500;700&display=swap');","fontFamily: { serif: ['Noto Naskh Arabic', 'serif'], sans: ['Noto Sans Arabic', 'sans-serif'] }","RTL support. Naskh for traditional, Sans for modern Arabic."
|
||||
27,Thai Modern,"Sans + Sans",Noto Sans Thai,Noto Sans Thai,"thai, modern, readable, clean, multilingual, accessible","Thai sites, Southeast Asia, tourism, Thai restaurants","https://fonts.google.com/share?selection.family=Noto+Sans+Thai:wght@300;400;500;700","@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;700&display=swap');","fontFamily: { sans: ['Noto Sans Thai', 'sans-serif'] }","Clean Thai typography. Excellent readability."
|
||||
28,Hebrew Modern,"Sans + Sans",Noto Sans Hebrew,Noto Sans Hebrew,"hebrew, modern, RTL, clean, professional, readable","Hebrew sites, Israeli market, Jewish content, bilingual sites","https://fonts.google.com/share?selection.family=Noto+Sans+Hebrew:wght@300;400;500;700","@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Hebrew:wght@300;400;500;700&display=swap');","fontFamily: { sans: ['Noto Sans Hebrew', 'sans-serif'] }","RTL support. Clean modern Hebrew typography."
|
||||
29,Legal Professional,"Serif + Sans",EB Garamond,Lato,"legal, professional, traditional, trustworthy, formal, authoritative","Law firms, legal services, contracts, formal documents, government","https://fonts.google.com/share?selection.family=EB+Garamond:wght@400;500;600;700|Lato:wght@300;400;700","@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;500;600;700&family=Lato:wght@300;400;700&display=swap');","fontFamily: { serif: ['EB Garamond', 'serif'], sans: ['Lato', 'sans-serif'] }","EB Garamond for authority. Lato for clean body text."
|
||||
30,Medical Clean,"Sans + Sans",Figtree,Noto Sans,"medical, clean, accessible, professional, healthcare, trustworthy","Healthcare, medical clinics, pharma, health apps, accessibility","https://fonts.google.com/share?selection.family=Figtree:wght@300;400;500;600;700|Noto+Sans:wght@300;400;500;700","@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700&family=Noto+Sans:wght@300;400;500;700&display=swap');","fontFamily: { heading: ['Figtree', 'sans-serif'], body: ['Noto Sans', 'sans-serif'] }","Clean, accessible fonts for medical contexts."
|
||||
31,Financial Trust,"Sans + Sans",IBM Plex Sans,IBM Plex Sans,"financial, trustworthy, professional, corporate, banking, serious","Banks, finance, insurance, investment, fintech, enterprise","https://fonts.google.com/share?selection.family=IBM+Plex+Sans:wght@300;400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&display=swap');","fontFamily: { sans: ['IBM Plex Sans', 'sans-serif'] }","IBM Plex conveys trust and professionalism. Excellent for data."
|
||||
32,Real Estate Luxury,"Serif + Sans",Cinzel,Josefin Sans,"real estate, luxury, elegant, sophisticated, property, premium","Real estate, luxury properties, architecture, interior design","https://fonts.google.com/share?selection.family=Cinzel:wght@400;500;600;700|Josefin+Sans:wght@300;400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Josefin+Sans:wght@300;400;500;600;700&display=swap');","fontFamily: { serif: ['Cinzel', 'serif'], sans: ['Josefin Sans', 'sans-serif'] }","Cinzel's elegance for headlines. Josefin for modern body."
|
||||
33,Restaurant Menu,"Serif + Sans",Playfair Display SC,Karla,"restaurant, menu, culinary, elegant, foodie, hospitality","Restaurants, cafes, food blogs, culinary, hospitality","https://fonts.google.com/share?selection.family=Karla:wght@300;400;500;600;700|Playfair+Display+SC:wght@400;700","@import url('https://fonts.googleapis.com/css2?family=Karla:wght@300;400;500;600;700&family=Playfair+Display+SC:wght@400;700&display=swap');","fontFamily: { display: ['Playfair Display SC', 'serif'], sans: ['Karla', 'sans-serif'] }","Small caps Playfair for menu headers. Karla for descriptions."
|
||||
34,Art Deco,"Display + Sans",Poiret One,Didact Gothic,"art deco, vintage, 1920s, elegant, decorative, gatsby","Vintage events, art deco themes, luxury hotels, classic cocktails","https://fonts.google.com/share?selection.family=Didact+Gothic|Poiret+One","@import url('https://fonts.googleapis.com/css2?family=Didact+Gothic&family=Poiret+One&display=swap');","fontFamily: { display: ['Poiret One', 'sans-serif'], sans: ['Didact Gothic', 'sans-serif'] }","Poiret One for art deco headlines only. Didact for body."
|
||||
35,Magazine Style,"Serif + Sans",Libre Bodoni,Public Sans,"magazine, editorial, publishing, refined, journalism, print","Magazines, online publications, editorial content, journalism","https://fonts.google.com/share?selection.family=Libre+Bodoni:wght@400;500;600;700|Public+Sans:wght@300;400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Libre+Bodoni:wght@400;500;600;700&family=Public+Sans:wght@300;400;500;600;700&display=swap');","fontFamily: { serif: ['Libre Bodoni', 'serif'], sans: ['Public Sans', 'sans-serif'] }","Bodoni's editorial elegance. Public Sans for clean UI."
|
||||
36,Crypto/Web3,"Sans + Sans",Orbitron,Exo 2,"crypto, web3, futuristic, tech, blockchain, digital","Crypto platforms, NFT, blockchain, web3, futuristic tech","https://fonts.google.com/share?selection.family=Exo+2:wght@300;400;500;600;700|Orbitron:wght@400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@300;400;500;600;700&family=Orbitron:wght@400;500;600;700&display=swap');","fontFamily: { display: ['Orbitron', 'sans-serif'], body: ['Exo 2', 'sans-serif'] }","Orbitron for futuristic headers. Exo 2 for readable body."
|
||||
37,Gaming Bold,"Display + Sans",Russo One,Chakra Petch,"gaming, bold, action, esports, competitive, energetic","Gaming, esports, action games, competitive sports, entertainment","https://fonts.google.com/share?selection.family=Chakra+Petch:wght@300;400;500;600;700|Russo+One","@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@300;400;500;600;700&family=Russo+One&display=swap');","fontFamily: { display: ['Russo One', 'sans-serif'], body: ['Chakra Petch', 'sans-serif'] }","Russo One for impact. Chakra Petch for techy body text."
|
||||
38,Indie/Craft,"Display + Sans",Amatic SC,Cabin,"indie, craft, handmade, artisan, organic, creative","Craft brands, indie products, artisan, handmade, organic products","https://fonts.google.com/share?selection.family=Amatic+SC:wght@400;700|Cabin:wght@400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Amatic+SC:wght@400;700&family=Cabin:wght@400;500;600;700&display=swap');","fontFamily: { display: ['Amatic SC', 'sans-serif'], sans: ['Cabin', 'sans-serif'] }","Amatic for handwritten feel. Cabin for readable body."
|
||||
39,Startup Bold,"Sans + Sans",Clash Display,Satoshi,"startup, bold, modern, innovative, confident, dynamic","Startups, pitch decks, product launches, bold brands","https://fonts.google.com/share?selection.family=Outfit:wght@400;500;600;700|Rubik:wght@300;400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Rubik:wght@300;400;500;600;700&display=swap');","fontFamily: { heading: ['Outfit', 'sans-serif'], body: ['Rubik', 'sans-serif'] }","Note: Clash Display on Fontshare. Outfit as Google alternative."
|
||||
40,E-commerce Clean,"Sans + Sans",Rubik,Nunito Sans,"ecommerce, clean, shopping, product, retail, conversion","E-commerce, online stores, product pages, retail, shopping","https://fonts.google.com/share?selection.family=Nunito+Sans:wght@300;400;500;600;700|Rubik:wght@300;400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;400;500;600;700&family=Rubik:wght@300;400;500;600;700&display=swap');","fontFamily: { heading: ['Rubik', 'sans-serif'], body: ['Nunito Sans', 'sans-serif'] }","Clean readable fonts perfect for product descriptions."
|
||||
41,Academic/Research,"Serif + Sans",Crimson Pro,Atkinson Hyperlegible,"academic, research, scholarly, accessible, readable, educational","Universities, research papers, academic journals, educational","https://fonts.google.com/share?selection.family=Atkinson+Hyperlegible:wght@400;700|Crimson+Pro:wght@400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&family=Crimson+Pro:wght@400;500;600;700&display=swap');","fontFamily: { serif: ['Crimson Pro', 'serif'], sans: ['Atkinson Hyperlegible', 'sans-serif'] }","Crimson for scholarly headlines. Atkinson for accessibility."
|
||||
42,Dashboard Data,"Mono + Sans",Fira Code,Fira Sans,"dashboard, data, analytics, code, technical, precise","Dashboards, analytics, data visualization, admin panels","https://fonts.google.com/share?selection.family=Fira+Code:wght@400;500;600;700|Fira+Sans:wght@300;400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=Fira+Sans:wght@300;400;500;600;700&display=swap');","fontFamily: { mono: ['Fira Code', 'monospace'], sans: ['Fira Sans', 'sans-serif'] }","Fira family cohesion. Code for data, Sans for labels."
|
||||
43,Music/Entertainment,"Display + Sans",Righteous,Poppins,"music, entertainment, fun, energetic, bold, performance","Music platforms, entertainment, events, festivals, performers","https://fonts.google.com/share?selection.family=Poppins:wght@300;400;500;600;700|Righteous","@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Righteous&display=swap');","fontFamily: { display: ['Righteous', 'sans-serif'], sans: ['Poppins', 'sans-serif'] }","Righteous for bold entertainment headers. Poppins for body."
|
||||
44,Minimalist Portfolio,"Sans + Sans",Archivo,Space Grotesk,"minimal, portfolio, designer, creative, clean, artistic","Design portfolios, creative professionals, minimalist brands","https://fonts.google.com/share?selection.family=Archivo:wght@300;400;500;600;700|Space+Grotesk:wght@300;400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@300;400;500;600;700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');","fontFamily: { heading: ['Space Grotesk', 'sans-serif'], body: ['Archivo', 'sans-serif'] }","Space Grotesk for distinctive headers. Archivo for clean body."
|
||||
45,Kids/Education,"Display + Sans",Baloo 2,Comic Neue,"kids, education, playful, friendly, colorful, learning","Children's apps, educational games, kid-friendly content","https://fonts.google.com/share?selection.family=Baloo+2:wght@400;500;600;700|Comic+Neue:wght@300;400;700","@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;500;600;700&family=Comic+Neue:wght@300;400;700&display=swap');","fontFamily: { display: ['Baloo 2', 'sans-serif'], sans: ['Comic Neue', 'sans-serif'] }","Fun, playful fonts for children. Comic Neue is readable comic style."
|
||||
46,Wedding/Romance,"Script + Serif",Great Vibes,Cormorant Infant,"wedding, romance, elegant, script, invitation, feminine","Wedding sites, invitations, romantic brands, bridal","https://fonts.google.com/share?selection.family=Cormorant+Infant:wght@300;400;500;600;700|Great+Vibes","@import url('https://fonts.googleapis.com/css2?family=Cormorant+Infant:wght@300;400;500;600;700&family=Great+Vibes&display=swap');","fontFamily: { script: ['Great Vibes', 'cursive'], serif: ['Cormorant Infant', 'serif'] }","Great Vibes for elegant accents. Cormorant for readable text."
|
||||
47,Science/Tech,"Sans + Sans",Exo,Roboto Mono,"science, technology, research, data, futuristic, precise","Science, research, tech documentation, data-heavy sites","https://fonts.google.com/share?selection.family=Exo:wght@300;400;500;600;700|Roboto+Mono:wght@300;400;500;700","@import url('https://fonts.googleapis.com/css2?family=Exo:wght@300;400;500;600;700&family=Roboto+Mono:wght@300;400;500;700&display=swap');","fontFamily: { sans: ['Exo', 'sans-serif'], mono: ['Roboto Mono', 'monospace'] }","Exo for modern tech feel. Roboto Mono for code/data."
|
||||
48,Accessibility First,"Sans + Sans",Atkinson Hyperlegible,Atkinson Hyperlegible,"accessible, readable, inclusive, WCAG, dyslexia-friendly, clear","Accessibility-critical sites, government, healthcare, inclusive design","https://fonts.google.com/share?selection.family=Atkinson+Hyperlegible:wght@400;700","@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&display=swap');","fontFamily: { sans: ['Atkinson Hyperlegible', 'sans-serif'] }","Designed for maximum legibility. Excellent for accessibility."
|
||||
49,Sports/Fitness,"Sans + Sans",Barlow Condensed,Barlow,"sports, fitness, athletic, energetic, condensed, action","Sports, fitness, gyms, athletic brands, competition","https://fonts.google.com/share?selection.family=Barlow+Condensed:wght@400;500;600;700|Barlow:wght@300;400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;600;700&family=Barlow:wght@300;400;500;600;700&display=swap');","fontFamily: { display: ['Barlow Condensed', 'sans-serif'], body: ['Barlow', 'sans-serif'] }","Condensed for impact headlines. Regular Barlow for body."
|
||||
50,Luxury Minimalist,"Serif + Sans",Bodoni Moda,Jost,"luxury, minimalist, high-end, sophisticated, refined, premium","Luxury minimalist brands, high-end fashion, premium products","https://fonts.google.com/share?selection.family=Bodoni+Moda:wght@400;500;600;700|Jost:wght@300;400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:wght@400;500;600;700&family=Jost:wght@300;400;500;600;700&display=swap');","fontFamily: { serif: ['Bodoni Moda', 'serif'], sans: ['Jost', 'sans-serif'] }","Bodoni's high contrast elegance. Jost for geometric body."
|
||||
51,Tech/HUD Mono,"Mono + Mono",Share Tech Mono,Fira Code,"tech, futuristic, hud, sci-fi, data, monospaced, precise","Sci-fi interfaces, developer tools, cybersecurity, dashboards","https://fonts.google.com/share?selection.family=Fira+Code:wght@300;400;500;600;700|Share+Tech+Mono","@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&family=Share+Tech+Mono&display=swap');","fontFamily: { hud: ['Share Tech Mono', 'monospace'], code: ['Fira Code', 'monospace'] }","Share Tech Mono has that classic sci-fi look."
|
||||
52,Pixel Retro,"Display + Sans",Press Start 2P,VT323,"pixel, retro, gaming, 8-bit, nostalgic, arcade","Pixel art games, retro websites, creative portfolios","https://fonts.google.com/share?selection.family=Press+Start+2P|VT323","@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');","fontFamily: { pixel: ['Press Start 2P', 'cursive'], terminal: ['VT323', 'monospace'] }","Press Start 2P is very wide/large. VT323 is better for body text."
|
||||
53,Neubrutalist Bold,"Display + Sans",Lexend Mega,Public Sans,"bold, neubrutalist, loud, strong, geometric, quirky","Neubrutalist designs, Gen Z brands, bold marketing","https://fonts.google.com/share?selection.family=Lexend+Mega:wght@100..900|Public+Sans:wght@100..900","@import url('https://fonts.googleapis.com/css2?family=Lexend+Mega:wght@100..900&family=Public+Sans:wght@100..900&display=swap');","fontFamily: { mega: ['Lexend Mega', 'sans-serif'], body: ['Public Sans', 'sans-serif'] }","Lexend Mega has distinct character and variable weight."
|
||||
54,Academic/Archival,"Serif + Serif",EB Garamond,Crimson Text,"academic, old-school, university, research, serious, traditional","University sites, archives, research papers, history","https://fonts.google.com/share?selection.family=Crimson+Text:wght@400;600;700|EB+Garamond:wght@400;500;600;700;800","@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:wght@400;600;700&family=EB+Garamond:wght@400;500;600;700;800&display=swap');","fontFamily: { classic: ['EB Garamond', 'serif'], text: ['Crimson Text', 'serif'] }","Classic academic aesthetic. Very legible."
|
||||
55,Spatial Clear,"Sans + Sans",Inter,Inter,"spatial, legible, glass, system, clean, neutral","Spatial computing, AR/VR, glassmorphism interfaces","https://fonts.google.com/share?selection.family=Inter:wght@300;400;500;600","@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');","fontFamily: { sans: ['Inter', 'sans-serif'] }","Optimized for readability on dynamic backgrounds."
|
||||
56,Kinetic Motion,"Display + Mono",Syncopate,Space Mono,"kinetic, motion, futuristic, speed, wide, tech","Music festivals, automotive, high-energy brands","https://fonts.google.com/share?selection.family=Space+Mono:wght@400;700|Syncopate:wght@400;700","@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Syncopate:wght@400;700&display=swap');","fontFamily: { display: ['Syncopate', 'sans-serif'], mono: ['Space Mono', 'monospace'] }","Syncopate's wide stance works well with motion effects."
|
||||
57,Gen Z Brutal,"Display + Sans",Anton,Epilogue,"brutal, loud, shouty, meme, internet, bold","Gen Z marketing, streetwear, viral campaigns","https://fonts.google.com/share?selection.family=Anton|Epilogue:wght@400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Anton&family=Epilogue:wght@400;500;600;700&display=swap');","fontFamily: { display: ['Anton', 'sans-serif'], body: ['Epilogue', 'sans-serif'] }","Anton is impactful and condensed. Good for stickers/badges."57,Bauhaus Geometric,"Geometric Sans + Single Weight","Outfit","Outfit","bauhaus, geometric, constructivist, bold, uppercase, architectural, mechanical, poster, tactile","Bauhaus mobile apps, bold editorial mobile, design-forward branding apps, art/culture platforms","https://fonts.google.com/share?selection.family=Outfit:wght@400;500;700;900","@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;700;900&display=swap');","fontFamily: { display: ['Outfit', 'sans-serif'], body: ['Outfit', 'sans-serif'] }","Single-family system: Outfit 900 uppercase tracking-tighter for heroes; Outfit 700 uppercase for buttons/nav; Outfit 500 for body. Scale aggressively: text-4xl–text-5xl headlines on mobile."
|
||||
58,Minimalist Monochrome Editorial,"Serif + Serif + Mono (Triple Stack)",Playfair Display,Source Serif 4,"monochrome, editorial, austere, typographic, pocket manifesto, luxury, high contrast, brutalist mobile","Luxury fashion mobile apps, editorial publications, digital exhibitions, portfolio apps, high-contrast e-reader aesthetics","https://fonts.google.com/share?selection.family=JetBrains+Mono:wght@400;500|Playfair+Display:ital,wght@0,400;0,700;0,900;1,400|Source+Serif+4:ital,wght@0,300;0,400;0,600;1,300","@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,300&display=swap');","fontFamily: { display: ['Playfair Display', 'serif'], body: ['Source Serif 4', 'serif'], mono: ['JetBrains Mono', 'monospace'] }","Triple stack: Playfair Display 900 tracking-tighter leading-[0.9] for heroes (text-5xl–text-6xl breaks words graphically). Source Serif 4 300–600 for body legibility. JetBrains Mono 400–500 uppercase tracking-widest for tags/dates/labels. NO UI sans-serif — 100% serif/mono."
|
||||
59,Modern Dark Cinema (Inter System),"Sans + Mono",Inter,Inter,"dark, cinematic, technical, precision, clean, premium, developer, professional, high-end utility","Developer tools, fintech/trading, AI dashboards, streaming platforms, high-end productivity apps","https://fonts.google.com/share?selection.family=Inter:wght@300;400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');","fontFamily: { sans: ['Inter', 'sans-serif'] }","Single-family precision system: Inter 700 (-1.5 tracking) for Display 48pt; Inter 600 (-0.5 tracking) for H1 32pt / H2 24pt; Inter 400 for body 16pt; Inter 500 uppercase +1.2 tracking for labels/mono. Gradient text via mask-view + react-native-linear-gradient (#FFFFFF → rgba(255,255,255,0.7)) on major headers."
|
||||
60,SaaS Mobile Boutique (Calistoga + Inter),"Display Serif + Sans + Mono",Calistoga,Inter,"saas, boutique, electric, warm, editorial, bold, premium, fintech, business, dual font, human warmth","B2B SaaS mobile, fintech apps, analytics dashboards, marketing tools, operations platforms","https://fonts.google.com/share?selection.family=Calistoga:ital@0;1|Inter:wght@300;400;500;600;700|JetBrains+Mono:wght@400;500","@import url('https://fonts.googleapis.com/css2?family=Calistoga:ital@0;1&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');","fontFamily: { display: ['Calistoga', 'serif'], body: ['Inter', 'sans-serif'], mono: ['JetBrains Mono', 'monospace'] }","Tri-stack: Calistoga (adds human warmth) for heroes 36–42pt leading-1.1; Inter 400–600 for body/UI 16–18pt; JetBrains Mono 12pt uppercase tracking-[1.5] for data labels and section badges. Scale: Hero 36–42pt, Section H2 28–32pt, Body 16–18pt, Label 12pt. Avoid italic Calistoga except editorial callouts."
|
||||
61,Terminal CLI Monospace,"Mono + Mono (Single Family)",JetBrains Mono,JetBrains Mono,"terminal, cli, hacker, monospace, matrix, developer, retro-future, command line, precision, OLED","Developer tools, Web3/blockchain apps, hacker aesthetic, sci-fi games, ARG, security tools, geek-culture portfolios","https://fonts.google.com/share?selection.family=JetBrains+Mono:ital,wght@0,400;0,500;1,400","@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,500;1,400&display=swap');","fontFamily: { mono: ['JetBrains Mono', 'monospace'] }","Single monospace system: use ONLY JetBrains Mono (or SpaceMono-Regular as system fallback). Strict sizes: 12pt / 14pt / 16pt only — no in-between. Weight: 400 normal (bold ruins mono character). Line height: 1.2x font size for information density. Letter spacing: normal (monospaced auto-spacing). All UI labels uppercase. ASCII borders and text-based progress bars."
|
||||
62,Kinetic Brutalism (Space Grotesk),"Geometric Sans (Single Dominant)",Space Grotesk,Space Grotesk,"kinetic, brutalist, aggressive, uppercase, oversized, display, motion, street, bold, high-energy, zine","Music/culture apps, sports platforms, brand flagship mobile, performance dashboards, underground product drops","https://fonts.google.com/share?selection.family=Space+Grotesk:wght@400;500;600;700","@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');","fontFamily: { display: ['Space Grotesk', 'sans-serif'], body: ['Space Grotesk', 'sans-serif'] }","Dominant single-family system: Space Grotesk 700–900 for ALL display. Scale: Hero 60–120pt (windowWidth/375*size), Section 40–50pt, Card titles 28–32pt, Body 18–20pt, Labels 12pt. ALL display/buttons/nav: UPPERCASE, letterSpacing -1 (large) / +2 (labels), lineHeight 0.9–1.1x. Use Inter as fallback. Font scale must use PixelRatio helper for responsive sizing."
|
||||
63,Flat Design Mobile (System Bold),"Sans + Sans",Inter,Inter,"flat, clean, system, bold, geometric, cross-platform, icon, poster, minimal, functional, responsive","Cross-platform apps, dashboards, system UI, onboarding, marketing pages, informational apps, icon-heavy interfaces","https://fonts.google.com/share?selection.family=Inter:wght@400;600;700;800","@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');","fontFamily: { sans: ['Inter', 'sans-serif'] }","System-first strategy: Inter as primary, falls back to system SF/Roboto on iOS/Android. Scale: Headlines fontWeight 800 letterSpacing -0.5; Subheadings fontWeight 600 fontSize 18; Body fontWeight 400 lineHeight 24; Labels fontWeight 700 uppercase letterSpacing 1. Thick weights carry all hierarchy since there are no shadows. Use aggressive size contrast (poster rule: body 16pt vs headline 40pt+). Avoid italic."
|
||||
64,Material You MD3 (Roboto System),"Sans (System Default)",Roboto,Roboto,"material design 3, md3, android, google, tonal, friendly, rounded, accessible, adaptive","Android apps, cross-platform tools, productivity software, data-heavy B2B dashboards, enterprise mobile","https://fonts.google.com/share?selection.family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,400","@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap');","fontFamily: { sans: ['Roboto', 'sans-serif'] }","MD3 type scale: Display Large 56px/400/64px. Headline Large 32px/500/40px. Title Large 22px/500/28px. Body Large 16px/400/24px. Label Medium 12px/500/16px. Buttons and Labels: letterSpacing 0.1px. Use system Roboto on Android; load from Google Fonts for iOS parity. Never use custom weights beyond 300–700."
|
||||
65,Neo Brutalism Mobile (Space Grotesk Heavy),"Geometric Sans (Bold-Only)",Space Grotesk,Space Grotesk,"neo brutalism, pop art, loud, bold, heavy, stickers, mechanical, high contrast, cream, gen-z","Creative tools, Gen-Z marketing, e-commerce for youth culture, content portfolios, collage-style apps","https://fonts.google.com/share?selection.family=Space+Grotesk:wght@700","@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@700&display=swap');","fontFamily: { display: ['Space Grotesk', 'sans-serif'], body: ['Space Grotesk', 'sans-serif'] }","Strictly 700 (Bold) and 900 (Black/Heavy) ONLY — never Regular or Light. Display: 48–64px. Heading: 24–32px. Body: 18–20px (stays heavy for brutalist density). Labels: 14px ALL CAPS letterSpacing 2. All buttons and navigation: uppercase. System bold as fallback. No italic, no thin weights."
|
||||
66,Bold Typography Mobile (Inter-Tight Poster),"Sans + Serif (Display) + Mono","Inter","Playfair Display","bold typography, editorial, poster, near-black, vermillion, luxury, type-as-hero, manifesto, high-contrast","Creative brand flagships, reading platforms, event apps, flash pages, luxury mobile experiences","https://fonts.google.com/share?selection.family=Inter:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400|JetBrains+Mono:wght@400|Playfair+Display:ital@1","@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400&family=Playfair+Display:ital@1&display=swap');","fontFamily: { display: ['Inter', 'sans-serif'], quote: ['Playfair Display', 'serif'], mono: ['JetBrains Mono', 'monospace'] }","Tri-stack: Inter 600–800 for all UI (letterSpacing -1.5px heroes, -0.5px subheads). Playfair Display Italic ONLY for pull quotes. JetBrains Mono for labels and stats. Scale: 12px labels, 16px body, 22px sub, 32px section, 40px H2, 56px H1, 72px Hero Statement. 5:1 ratio H1:Body is mandatory. lineHeight 1.1 headlines, 1.6 body. Underlines (2–3pt accent) replace buttons for interactions."
|
||||
67,Academia Mobile (Cormorant + Crimson + Cinzel),"Serif + Book Serif + Engraved (Triple Stack)","Cormorant Garamond","Crimson Pro","academia, library, mahogany, parchment, brass, scholarly, prestige, antique, victorian, leather","Knowledge management apps, scholarly reading tools, personal brand portfolios, RPG games, cultural community platforms","https://fonts.google.com/share?selection.family=Cinzel:wght@400;500;600|Cormorant+Garamond:ital,wght@0,300;0,500;0,700;1,300;1,500|Crimson+Pro:ital,wght@0,300;0,400;0,600;1,300;1,400","@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600&family=Cormorant+Garamond:ital,wght@0,300;0,500;0,700;1,300;1,500&family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,300;1,400&display=swap');","fontFamily: { heading: ['Cormorant Garamond', 'serif'], body: ['Crimson Pro', 'serif'], display: ['Cinzel', 'serif'] }","Triple-stack: Cormorant Garamond Medium for all headings (32–40px tight leading). Crimson Pro Regular for body reading text (16–18px, lineHeight 24–26px). Cinzel SemiBold for ALL-CAPS labels, overlines, section prefixes (10–12px, letterSpacing 2–3px). Drop caps: first letter 60px Cinzel in Brass #C9A962. Section prefix: VOLUME I/II/III in Cinzel 10px. NO sans-serif anywhere."
|
||||
68,Cyberpunk Mobile (Orbitron + JetBrains Mono),"Tech Display + Mono","Orbitron","JetBrains Mono","cyberpunk, neon, glitch, hud, sci-fi, dark, matrix green, magenta, chamfered, tactical","Gaming companion apps, fintech/crypto, data visualization, dark brand apps, cyberpunk narrative games","https://fonts.google.com/share?selection.family=JetBrains+Mono:wght@400;500|Orbitron:wght@700;900","@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Orbitron:wght@700;900&display=swap');","fontFamily: { heading: ['Orbitron', 'sans-serif'], body: ['JetBrains Mono', 'monospace'] }","Dual-stack: Orbitron 700–900 for H1 (42px uppercase letterSpacing 4, fontWeight 900). JetBrains Mono 400–500 for all body/data text (14px letterSpacing 1). Labels: 10px uppercase opacity 0.7. Heading scale aggressive: H1 42px, H2 28px, Section 20px. Body 14px monospace only. NO mixed sans-serif. Fallback: monospace system font. Orbitron requires loading — use NativeWind or useFonts hook."
|
||||
69,Web3 Bitcoin DeFi (Space Grotesk + Inter + Mono),"Geometric Sans + Sans + Mono (Triple)","Space Grotesk","Inter","web3, bitcoin, defi, digital gold, fintech, crypto, trustless, luminescent, precision, dark","DeFi protocols and wallets, NFT platforms, metaverse social apps, high-tech brand landing pages","https://fonts.google.com/share?selection.family=Inter:wght@400;500;600;700|JetBrains+Mono:wght@400;500|Space+Grotesk:wght@500;600;700","@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Space+Grotesk:wght@500;600;700&display=swap');","fontFamily: { heading: ['Space Grotesk', 'sans-serif'], body: ['Inter', 'sans-serif'], mono: ['JetBrains Mono', 'monospace'] }","Tri-stack: Space Grotesk 600–700 for headings (geometric, technical character). Inter 400–600 for all body and UI text (high legibility). JetBrains Mono Medium for all data/stats/prices/hashes (technical accuracy). Buttons: Inter Bold uppercase letterSpacing 1.5. Balance figures use MaskedView gradient text (orange→gold). Heading scale: H1 36–42px, H2 24–28px, body 16–18px, mono labels 12–14px."
|
||||
70,Claymorphism Mobile (Nunito + DM Sans),"Display Rounded + Geometric Sans","Nunito","DM Sans","claymorphism, clay, rounded, playful, candy, bubbly, soft, 3d, children, education, tactile, spring, nunito, dm sans","Children education apps, teen social, brand mascot apps, creative tools, fintech gamification","https://fonts.google.com/share?selection.family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400|Nunito:ital,wght@0,700;0,800;0,900;1,700","@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&family=Nunito:ital,wght@0,700;0,800;0,900;1,700&display=swap');","fontFamily: { display: ['Nunito', 'sans-serif'], body: ['DM Sans', 'sans-serif'] }","Dual-stack: Nunito Black (900) or ExtraBold (800) for ALL headings — rounded terminals are mandatory. DM Sans Medium (500) for body text — clean and geometric. Scale: Hero 48px lineHeight 52 letterSpacing -1. Section Title 32px lineHeight 38. Card Title 22px lineHeight 28. Body 16px lineHeight 24. Never use Nunito for body text (too decorative at small sizes). Never use weights below 700 for any heading. includeFontPadding: false on all Nunito Text components for vertical centering in rounded buttons."
|
||||
71,Enterprise SaaS Mobile (Plus Jakarta Sans),"Geometric Sans (Single Family)","Plus Jakarta Sans","Plus Jakarta Sans","enterprise, saas, b2b, professional, indigo, modern, approachable, legible, ios dynamic type, android scaling","B2B SaaS apps, productivity tools, government and finance mobile apps, admin dashboards, enterprise onboarding","https://fonts.google.com/share?selection.family=Plus+Jakarta+Sans:ital,wght@0,400;0,600;0,700;0,800;1,400","@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,600;0,700;0,800;1,400&display=swap');","fontFamily: { sans: ['Plus Jakarta Sans', 'sans-serif'] }","Single-family system: Plus Jakarta Sans balances professional authority with mobile approachability. Weight scale: ExtraBold 800 for screen titles/hero (line height 1.1–1.2). Bold 700 for section headers. SemiBold 600 for card titles and buttons. Regular 400 for body text (line height 1.4–1.5). Must support iOS Dynamic Type and Android font scaling — never hardcode pixel sizes without respecting system font scale. Button text: uppercase, letterSpacing 0.5. Caption: 12px Regular. Muted: Slate 500 #64748B."
|
||||
72,Sketch Hand-Drawn Mobile (Kalam + Patrick Hand),"Handwritten + Handwritten (Dual)","Kalam","Patrick Hand","sketch, hand-drawn, handwriting, human, imperfect, organic, paper, kalam, patrick hand, education, journal, creative","Journaling apps, prototype tools, children's picturebook apps, creative platforms, gamified puzzle apps","https://fonts.google.com/share?selection.family=Kalam:wght@400;700|Patrick+Hand","@import url('https://fonts.googleapis.com/css2?family=Kalam:wght@400;700&family=Patrick+Hand&display=swap');","fontFamily: { heading: ['Kalam', 'cursive'], body: ['Patrick Hand', 'cursive'] }","Dual handwritten stack: Kalam Bold (700) for all headings — high visual weight, felt-tip marker aesthetic, conveys intentional messiness. Patrick Hand Regular for all body text — highly legible at mobile sizes while remaining distinctly human. Scale: Heading 28–36px with lineHeight adjusted for descenders. Body 16–18px lineHeight 1.5. Labels 14px. Vary font sizes slightly between adjacent elements for spontaneous feel. Avoid alignment: 'center' for long body text — left-aligned reads more naturally. Both fonts require useFonts loading in Expo. Never use these fonts for financial figures or legal text."
|
||||
73,Neumorphism Mobile (Plus Jakarta Sans + System),"Geometric Sans (System Fallback)","Plus Jakarta Sans","Plus Jakarta Sans","neumorphism, soft ui, monochromatic, cool grey, minimal, physical, depth, ceramic, system font, utility","Smart home controls, minimal tools, aesthetic dashboards, health monitors, brand showcase pages","https://fonts.google.com/share?selection.family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,700;1,400","@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,700;1,400&display=swap');","fontFamily: { sans: ['Plus Jakarta Sans', 'sans-serif'] }","Single-family or System fallback: Plus Jakarta Sans Bold/Medium pairs beautifully with the monochromatic #E0E5EC surface — subtle geometry without competing with the depth effect. Heading: 24–32px Bold (700), letterSpacing -0.5 for modern premium feel. Body: 16px Medium (500), lineHeight 1.4. Caption: 12px Regular (400). Use Text Primary #3D4852 (7.5:1 contrast against #E0E5EC) for all primary text. Use Text Muted #6B7280 (4.6:1 contrast) for secondary text. Accent color #6C63FF only on active labels or focus indicators. Never use italic or thin weights — they lose legibility against the embossed background. System (SF Pro / Roboto) is an acceptable fallback for performance-sensitive implementations."
|
||||
|
Can't render this file because it contains an unexpected character in line 58 and column 487.
|
@@ -0,0 +1,162 @@
|
||||
No,UI_Category,Recommended_Pattern,Style_Priority,Color_Mood,Typography_Mood,Key_Effects,Decision_Rules,Anti_Patterns,Severity
|
||||
1,SaaS (General),Hero + Features + CTA,Glassmorphism + Flat Design,Trust blue + Accent contrast,Professional + Hierarchy,Subtle hover (200-250ms) + Smooth transitions,"{""if_ux_focused"": ""prioritize-minimalism"", ""if_data_heavy"": ""add-glassmorphism""}",Excessive animation + Dark mode by default,HIGH
|
||||
2,Micro SaaS,Hero-Centric + Trust,Motion-Driven + Vibrant & Block,Bold primaries + Accent contrast,Modern + Energetic typography,Scroll-triggered animations + Parallax,"{""if_pre_launch"": ""use-waitlist-pattern"", ""if_video_ready"": ""add-hero-video""}",Static design + No video + Poor mobile,HIGH
|
||||
3,E-commerce,Feature-Rich Showcase,Vibrant & Block-based,Brand primary + Success green,Engaging + Clear hierarchy,Card hover lift (200ms) + Scale effect,"{""if_luxury"": ""switch-to-liquid-glass"", ""if_conversion_focused"": ""add-urgency-colors""}",Flat design without depth + Text-heavy pages,HIGH
|
||||
4,E-commerce Luxury,Feature-Rich Showcase,Liquid Glass + Glassmorphism,Premium colors + Minimal accent,Elegant + Refined typography,Chromatic aberration + Fluid animations (400-600ms),"{""if_checkout"": ""emphasize-trust"", ""if_hero_needed"": ""use-3d-hyperrealism""}",Vibrant & Block-based + Playful colors,HIGH
|
||||
5,B2B Service,Feature-Rich Showcase + Trust,Trust & Authority + Minimalism,Professional blue + Neutral grey,Formal + Clear typography,Section transitions + Feature reveals,"{""must_have"": ""case-studies"", ""must_have"": ""roi-messaging""}",Playful design + Hidden credentials + AI purple/pink gradients,HIGH
|
||||
6,Financial Dashboard,Data-Dense Dashboard,Dark Mode (OLED) + Data-Dense,Dark bg + Red/Green alerts + Trust blue,Clear + Readable typography,Real-time number animations + Alert pulse,"{""must_have"": ""real-time-updates"", ""must_have"": ""high-contrast""}",Light mode default + Slow rendering,HIGH
|
||||
7,Analytics Dashboard,Data-Dense + Drill-Down,Data-Dense + Heat Map,Cool→Hot gradients + Neutral grey,Clear + Functional typography,Hover tooltips + Chart zoom + Filter animations,"{""must_have"": ""data-export"", ""if_large_dataset"": ""virtualize-lists""}",Ornate design + No filtering,HIGH
|
||||
8,Healthcare App,Social Proof-Focused,Neumorphism + Accessible & Ethical,Calm blue + Health green,Readable + Large type (16px+),Soft box-shadow + Smooth press (150ms),"{""must_have"": ""wcag-aaa-compliance"", ""if_medication"": ""red-alert-colors""}",Bright neon colors + Motion-heavy animations + AI purple/pink gradients,HIGH
|
||||
9,Educational App,Feature-Rich Showcase,Claymorphism + Micro-interactions,Playful colors + Clear hierarchy,Friendly + Engaging typography,Soft press (200ms) + Fluffy elements,"{""if_gamification"": ""add-progress-animation"", ""if_children"": ""increase-playfulness""}",Dark modes + Complex jargon,MEDIUM
|
||||
10,Creative Agency,Storytelling-Driven,Brutalism + Motion-Driven,Bold primaries + Artistic freedom,Bold + Expressive typography,CRT scanlines + Neon glow + Glitch effects,"{""must_have"": ""case-studies"", ""if_boutique"": ""increase-artistic-freedom""}",Corporate minimalism + Hidden portfolio,HIGH
|
||||
11,Portfolio/Personal,Storytelling-Driven,Motion-Driven + Minimalism,Brand primary + Artistic,Expressive + Variable typography,Parallax (3-5 layers) + Scroll-triggered reveals,"{""if_creative_field"": ""add-brutalism"", ""if_minimal_portfolio"": ""reduce-motion""}",Corporate templates + Generic layouts,MEDIUM
|
||||
12,Gaming,Feature-Rich Showcase,3D & Hyperrealism + Retro-Futurism,Vibrant + Neon + Immersive,Bold + Impactful typography,WebGL 3D rendering + Glitch effects,"{""if_competitive"": ""add-real-time-stats"", ""if_casual"": ""increase-playfulness""}",Minimalist design + Static assets,HIGH
|
||||
13,Government/Public Service,Minimal & Direct,Accessible & Ethical + Minimalism,Professional blue + High contrast,Clear + Large typography,Clear focus rings (3-4px) + Skip links,"{""must_have"": ""wcag-aaa"", ""must_have"": ""keyboard-navigation""}",Ornate design + Low contrast + Motion effects + AI purple/pink gradients,HIGH
|
||||
14,Fintech/Crypto,Trust & Authority,Minimalism + Accessible & Ethical,Navy + Trust Blue + Gold,Professional + Trustworthy,Smooth state transitions + Number animations,"{""must_have"": ""security-first"", ""if_dashboard"": ""use-dark-mode""}",Playful design + Unclear fees + AI purple/pink gradients,HIGH
|
||||
15,Social Media App,Feature-Rich Showcase,Vibrant & Block-based + Motion-Driven,Vibrant + Engagement colors,Modern + Bold typography,Large scroll animations + Icon animations,"{""if_engagement_metric"": ""add-motion"", ""if_content_focused"": ""minimize-chrome""}",Heavy skeuomorphism + Accessibility ignored,MEDIUM
|
||||
16,Productivity Tool,Interactive Demo + Feature-Rich,Flat Design + Micro-interactions,Clear hierarchy + Functional colors,Clean + Efficient typography,Quick actions (150ms) + Task animations,"{""must_have"": ""keyboard-shortcuts"", ""if_collaboration"": ""add-real-time-cursors""}",Complex onboarding + Slow performance,HIGH
|
||||
17,Design System/Component Library,Feature-Rich + Documentation,Minimalism + Accessible & Ethical,Clear hierarchy + Code-like structure,Monospace + Clear typography,Code copy animations + Component previews,"{""must_have"": ""search"", ""must_have"": ""code-examples""}",Poor documentation + No live preview,HIGH
|
||||
18,AI/Chatbot Platform,Interactive Demo + Minimal,AI-Native UI + Minimalism,Neutral + AI Purple (#6366F1),Modern + Clear typography,Streaming text + Typing indicators + Fade-in,"{""must_have"": ""conversational-ui"", ""must_have"": ""context-awareness""}",Heavy chrome + Slow response feedback,HIGH
|
||||
19,NFT/Web3 Platform,Feature-Rich Showcase,Cyberpunk UI + Glassmorphism,Dark + Neon + Gold (#FFD700),Bold + Modern typography,Wallet connect animations + Transaction feedback,"{""must_have"": ""wallet-integration"", ""must_have"": ""gas-fees-display""}",Light mode default + No transaction status,HIGH
|
||||
20,Creator Economy Platform,Social Proof + Feature-Rich,Vibrant & Block-based + Bento Box Grid,Vibrant + Brand colors,Modern + Bold typography,Engagement counter animations + Profile reveals,"{""must_have"": ""creator-profiles"", ""must_have"": ""monetization-display""}",Generic layout + Hidden earnings,MEDIUM
|
||||
21,Remote Work/Collaboration Tool,Feature-Rich + Real-Time,Soft UI Evolution + Minimalism,Calm Blue + Neutral grey,Clean + Readable typography,Real-time presence indicators + Notification badges,"{""must_have"": ""status-indicators"", ""must_have"": ""video-integration""}",Cluttered interface + No presence,HIGH
|
||||
22,Mental Health App,Social Proof-Focused,Neumorphism + Accessible & Ethical,Calm Pastels + Trust colors,Calming + Readable typography,Soft press + Breathing animations,"{""must_have"": ""privacy-first"", ""if_meditation"": ""add-breathing-animation""}",Bright neon + Motion overload,HIGH
|
||||
23,Pet Tech App,Storytelling + Feature-Rich,Claymorphism + Vibrant & Block-based,Playful + Warm colors,Friendly + Playful typography,Pet profile animations + Health tracking charts,"{""must_have"": ""pet-profiles"", ""if_health"": ""add-vet-integration""}",Generic design + No personality,MEDIUM
|
||||
24,Smart Home/IoT Dashboard,Real-Time Monitoring,Glassmorphism + Dark Mode (OLED),Dark + Status indicator colors,Clear + Functional typography,Device status pulse + Quick action animations,"{""must_have"": ""real-time-controls"", ""must_have"": ""energy-monitoring""}",Slow updates + No automation,HIGH
|
||||
25,EV/Charging Ecosystem,Hero-Centric + Feature-Rich,Minimalism + Aurora UI,Electric Blue (#009CD1) + Green,Modern + Clear typography,Range estimation animations + Map interactions,"{""must_have"": ""charging-map"", ""must_have"": ""range-calculator""}",Poor map UX + Hidden costs,HIGH
|
||||
26,Subscription Box Service,Feature-Rich + Conversion,Vibrant & Block-based + Motion-Driven,Brand + Excitement colors,Engaging + Clear typography,Unboxing reveal animations + Product carousel,"{""must_have"": ""personalization-quiz"", ""must_have"": ""subscription-management""}",Confusing pricing + No unboxing preview,HIGH
|
||||
27,Podcast Platform,Storytelling + Feature-Rich,Dark Mode (OLED) + Minimalism,Dark + Audio waveform accents,Modern + Clear typography,Waveform visualizations + Episode transitions,"{""must_have"": ""audio-player-ux"", ""must_have"": ""episode-discovery""}",Poor audio player + Cluttered layout,HIGH
|
||||
28,Dating App,Social Proof + Feature-Rich,Vibrant & Block-based + Motion-Driven,Warm + Romantic (Pink/Red gradients),Modern + Friendly typography,Profile card swipe + Match animations,"{""must_have"": ""profile-cards"", ""must_have"": ""safety-features""}",Generic profiles + No safety,HIGH
|
||||
29,Micro-Credentials/Badges Platform,Trust & Authority + Feature,Minimalism + Flat Design,Trust Blue + Gold (#FFD700),Professional + Clear typography,Badge reveal animations + Progress tracking,"{""must_have"": ""credential-verification"", ""must_have"": ""progress-display""}",No verification + Hidden progress,MEDIUM
|
||||
30,Knowledge Base/Documentation,FAQ + Minimal,Minimalism + Accessible & Ethical,Clean hierarchy + Minimal color,Clear + Readable typography,Search highlight + Smooth scrolling,"{""must_have"": ""search-first"", ""must_have"": ""version-switching""}",Poor navigation + No search,HIGH
|
||||
31,Hyperlocal Services,Conversion + Feature-Rich,Minimalism + Vibrant & Block-based,Location markers + Trust colors,Clear + Functional typography,Map hover + Provider card reveals,"{""must_have"": ""map-integration"", ""must_have"": ""booking-system""}",No map + Hidden reviews,HIGH
|
||||
32,Beauty/Spa/Wellness Service,Hero-Centric + Social Proof,Soft UI Evolution + Neumorphism,Soft pastels (Pink Sage Cream) + Gold accents,Elegant + Calming typography,Soft shadows + Smooth transitions (200-300ms) + Gentle hover,"{""must_have"": ""booking-system"", ""must_have"": ""before-after-gallery"", ""if_luxury"": ""add-gold-accents""}",Bright neon colors + Harsh animations + Dark mode,HIGH
|
||||
33,Luxury/Premium Brand,Storytelling + Feature-Rich,Liquid Glass + Glassmorphism,Black + Gold (#FFD700) + White,Elegant + Refined typography,Slow parallax + Premium reveals (400-600ms),"{""must_have"": ""high-quality-imagery"", ""must_have"": ""storytelling""}",Cheap visuals + Fast animations,HIGH
|
||||
34,Restaurant/Food Service,Hero-Centric + Conversion,Vibrant & Block-based + Motion-Driven,Warm colors (Orange Red Brown),Appetizing + Clear typography,Food image reveal + Menu hover effects,"{""must_have"": ""high_quality_images"", ""if_delivery"": ""emphasize-speed""}",Low-quality imagery + Outdated hours,HIGH
|
||||
35,Fitness/Gym App,Feature-Rich + Data,Vibrant & Block-based + Dark Mode (OLED),Energetic (Orange #FF6B35) + Dark bg,Bold + Motivational typography,Progress ring animations + Achievement unlocks,"{""must_have"": ""progress-tracking"", ""must_have"": ""workout-plans""}",Static design + No gamification,HIGH
|
||||
36,Real Estate/Property,Hero-Centric + Feature-Rich,Glassmorphism + Minimalism,Trust Blue + Gold + White,Professional + Confident,3D property tour zoom + Map hover,"{""if_luxury"": ""add-3d-models"", ""must_have"": ""map-integration""}",Poor photos + No virtual tours,HIGH
|
||||
37,Travel/Tourism Agency,Storytelling-Driven + Hero,Aurora UI + Motion-Driven,Vibrant destination + Sky Blue,Inspirational + Engaging,Destination parallax + Itinerary animations,"{""if_experience_focused"": ""use-storytelling"", ""must_have"": ""mobile-booking""}",Generic photos + Complex booking,HIGH
|
||||
38,Hotel/Hospitality,Hero-Centric + Social Proof,Liquid Glass + Minimalism,Warm neutrals + Gold (#D4AF37),Elegant + Welcoming typography,Room gallery + Amenity reveals,"{""must_have"": ""room-booking"", ""must_have"": ""virtual-tour""}",Poor photos + Complex booking,HIGH
|
||||
39,Wedding/Event Planning,Storytelling + Social Proof,Soft UI Evolution + Aurora UI,Soft Pink (#FFD6E0) + Gold + Cream,Elegant + Romantic typography,Gallery reveals + Timeline animations,"{""must_have"": ""portfolio-gallery"", ""must_have"": ""planning-tools""}",Generic templates + No portfolio,HIGH
|
||||
40,Legal Services,Trust & Authority + Minimal,Trust & Authority + Minimalism,Navy Blue (#1E3A5F) + Gold + White,Professional + Authoritative typography,Practice area reveal + Attorney profile animations,"{""must_have"": ""case-results"", ""must_have"": ""credential-display""}",Outdated design + Hidden credentials + AI purple/pink gradients,HIGH
|
||||
41,Insurance Platform,Conversion + Trust,Trust & Authority + Flat Design,Trust Blue (#0066CC) + Green + Neutral,Clear + Professional typography,Quote calculator animations + Policy comparison,"{""must_have"": ""quote-calculator"", ""must_have"": ""policy-comparison""}",Confusing pricing + No trust signals + AI purple/pink gradients,HIGH
|
||||
42,Banking/Traditional Finance,Trust & Authority + Feature,Minimalism + Accessible & Ethical,Navy (#0A1628) + Trust Blue + Gold,Professional + Trustworthy typography,Smooth number animations + Security indicators,"{""must_have"": ""security-first"", ""must_have"": ""accessibility""}",Playful design + Poor security UX + AI purple/pink gradients,HIGH
|
||||
43,Online Course/E-learning,Feature-Rich + Social Proof,Claymorphism + Vibrant & Block-based,Vibrant learning colors + Progress green,Friendly + Engaging typography,Progress bar animations + Certificate reveals,"{""must_have"": ""progress-tracking"", ""must_have"": ""video-player""}",Boring design + No gamification,HIGH
|
||||
44,Non-profit/Charity,Storytelling + Trust,Accessible & Ethical + Organic Biophilic,Cause-related colors + Trust + Warm,Heartfelt + Readable typography,Impact counter animations + Story reveals,"{""must_have"": ""impact-stories"", ""must_have"": ""donation-transparency""}",No impact data + Hidden financials,HIGH
|
||||
45,Music Streaming,Feature-Rich Showcase,Dark Mode (OLED) + Vibrant & Block-based,Dark (#121212) + Vibrant accents + Album art colors,Modern + Bold typography,Waveform visualization + Playlist animations,"{""must_have"": ""audio-player-ux"", ""if_discovery_focused"": ""add-playlist-recommendations""}",Cluttered layout + Poor audio player UX,HIGH
|
||||
46,Video Streaming/OTT,Hero-Centric + Feature-Rich,Dark Mode (OLED) + Motion-Driven,Dark bg + Poster colors + Brand accent,Bold + Engaging typography,Video player animations + Content carousel (parallax),"{""must_have"": ""continue-watching"", ""if_personalized"": ""add-recommendations""}",Static layout + Slow video player,HIGH
|
||||
47,Job Board/Recruitment,Conversion-Optimized + Feature-Rich,Flat Design + Minimalism,Professional Blue + Success Green + Neutral,Clear + Professional typography,Search/filter animations + Application flow,"{""must_have"": ""advanced-search"", ""if_salary_focused"": ""highlight-compensation""}",Outdated forms + Hidden filters,HIGH
|
||||
48,Marketplace (P2P),Feature-Rich Showcase + Social Proof,Vibrant & Block-based + Flat Design,Trust colors + Category colors + Success green,Modern + Engaging typography,Review star animations + Listing hover effects,"{""must_have"": ""seller-profiles"", ""must_have"": ""secure-payment""}",Low trust signals + Confusing layout,HIGH
|
||||
49,Logistics/Delivery,Feature-Rich Showcase + Real-Time,Minimalism + Flat Design,Blue (#2563EB) + Orange (tracking) + Green,Clear + Functional typography,Real-time tracking animation + Status pulse,"{""must_have"": ""tracking-map"", ""must_have"": ""delivery-updates""}",Static tracking + No map integration + AI purple/pink gradients,HIGH
|
||||
50,Agriculture/Farm Tech,Feature-Rich Showcase,Organic Biophilic + Flat Design,Earth Green (#4A7C23) + Brown + Sky Blue,Clear + Informative typography,Data visualization + Weather animations,"{""must_have"": ""sensor-dashboard"", ""if_crop_focused"": ""add-health-indicators""}",Generic design + Ignored accessibility + AI purple/pink gradients,MEDIUM
|
||||
51,Construction/Architecture,Hero-Centric + Feature-Rich,Minimalism + 3D & Hyperrealism,Grey (#4A4A4A) + Orange (safety) + Blueprint Blue,Professional + Bold typography,3D model viewer + Timeline animations,"{""must_have"": ""project-portfolio"", ""if_team_collaboration"": ""add-real-time-updates""}",2D-only layouts + Poor image quality + AI purple/pink gradients,HIGH
|
||||
52,Automotive/Car Dealership,Hero-Centric + Feature-Rich,Motion-Driven + 3D & Hyperrealism,Brand colors + Metallic + Dark/Light,Bold + Confident typography,360 product view + Configurator animations,"{""must_have"": ""vehicle-comparison"", ""must_have"": ""financing-calculator""}",Static product pages + Poor UX,HIGH
|
||||
53,Photography Studio,Storytelling-Driven + Hero-Centric,Motion-Driven + Minimalism,Black + White + Minimal accent,Elegant + Minimal typography,Full-bleed gallery + Before/after reveal,"{""must_have"": ""portfolio-showcase"", ""if_booking"": ""add-calendar-system""}",Heavy text + Poor image showcase,HIGH
|
||||
54,Coworking Space,Hero-Centric + Feature-Rich,Vibrant & Block-based + Glassmorphism,Energetic colors + Wood tones + Brand,Modern + Engaging typography,Space tour video + Amenity reveal animations,"{""must_have"": ""virtual-tour"", ""must_have"": ""booking-system""}",Outdated photos + Confusing layout,MEDIUM
|
||||
55,Home Services (Plumber/Electrician),Conversion-Optimized + Trust,Flat Design + Trust & Authority,Trust Blue + Safety Orange + Grey,Professional + Clear typography,Emergency contact highlight + Service menu animations,"{""must_have"": ""emergency-contact"", ""must_have"": ""certifications-display""}",Hidden contact info + No certifications,HIGH
|
||||
56,Childcare/Daycare,Social Proof-Focused + Trust,Claymorphism + Vibrant & Block-based,Playful pastels + Safe colors + Warm,Friendly + Playful typography,Parent portal animations + Activity gallery reveal,"{""must_have"": ""parent-communication"", ""must_have"": ""safety-certifications""}",Generic design + Hidden safety info,HIGH
|
||||
57,Senior Care/Elderly,Trust & Authority + Accessible,Accessible & Ethical + Soft UI Evolution,Calm Blue + Warm neutrals + Large text,Large + Clear typography (18px+),Large touch targets + Clear navigation,"{""must_have"": ""wcag-aaa"", ""must_have"": ""family-portal""}",Small text + Complex navigation + AI purple/pink gradients,HIGH
|
||||
58,Medical Clinic,Trust & Authority + Conversion,Accessible & Ethical + Minimalism,Medical Blue (#0077B6) + Trust White,Professional + Readable typography,Online booking flow + Doctor profile reveals,"{""must_have"": ""appointment-booking"", ""must_have"": ""insurance-info""}",Outdated interface + Confusing booking + AI purple/pink gradients,HIGH
|
||||
59,Pharmacy/Drug Store,Conversion-Optimized + Trust,Flat Design + Accessible & Ethical,Pharmacy Green + Trust Blue + Clean White,Clear + Functional typography,Prescription upload flow + Refill reminders,"{""must_have"": ""prescription-management"", ""must_have"": ""drug-interaction-warnings""}",Confusing layout + Privacy concerns + AI purple/pink gradients,HIGH
|
||||
60,Dental Practice,Social Proof-Focused + Conversion,Soft UI Evolution + Minimalism,Fresh Blue + White + Smile Yellow,Friendly + Professional typography,Before/after gallery + Patient testimonial carousel,"{""must_have"": ""before-after-gallery"", ""must_have"": ""appointment-system""}",Poor imagery + No testimonials,HIGH
|
||||
61,Veterinary Clinic,Social Proof-Focused + Trust,Claymorphism + Accessible & Ethical,Caring Blue + Pet colors + Warm,Friendly + Welcoming typography,Pet profile management + Service animations,"{""must_have"": ""pet-portal"", ""must_have"": ""emergency-contact""}",Generic design + Hidden services,MEDIUM
|
||||
62,Florist/Plant Shop,Hero-Centric + Conversion,Organic Biophilic + Vibrant & Block-based,Natural Green + Floral pinks/purples,Elegant + Natural typography,Product reveal + Seasonal transitions,"{""must_have"": ""delivery-scheduling"", ""must_have"": ""care-guides""}",Poor imagery + No seasonal content,MEDIUM
|
||||
63,Bakery/Cafe,Hero-Centric + Conversion,Vibrant & Block-based + Soft UI Evolution,Warm Brown + Cream + Appetizing accents,Warm + Inviting typography,Menu hover + Order animations,"{""must_have"": ""menu-display"", ""must_have"": ""online-ordering""}",Poor food photos + Hidden hours,HIGH
|
||||
64,Brewery/Winery,Storytelling + Hero-Centric,Motion-Driven + Storytelling-Driven,Deep amber/burgundy + Gold + Craft,Artisanal + Heritage typography,Tasting note reveals + Heritage timeline,"{""must_have"": ""product-showcase"", ""must_have"": ""story-heritage""}",Generic product pages + No story,HIGH
|
||||
65,Airline,Conversion + Feature-Rich,Minimalism + Glassmorphism,Sky Blue + Brand colors + Trust,Clear + Professional typography,Flight search animations + Boarding pass reveals,"{""must_have"": ""flight-search"", ""must_have"": ""mobile-first""}",Complex booking + Poor mobile,HIGH
|
||||
66,News/Media Platform,Hero-Centric + Feature-Rich,Minimalism + Flat Design,Brand colors + High contrast,Clear + Readable typography,Breaking news badge + Article reveal animations,"{""must_have"": ""mobile-first-reading"", ""must_have"": ""category-navigation""}",Cluttered layout + Slow loading,HIGH
|
||||
67,Magazine/Blog,Storytelling + Hero-Centric,Swiss Modernism 2.0 + Motion-Driven,Editorial colors + Brand + Clean white,Editorial + Elegant typography,Article transitions + Category reveals,"{""must_have"": ""article-showcase"", ""must_have"": ""newsletter-signup""}",Poor typography + Slow loading,HIGH
|
||||
68,Freelancer Platform,Feature-Rich + Conversion,Flat Design + Minimalism,Professional Blue + Success Green,Clear + Professional typography,Skill match animations + Review reveals,"{""must_have"": ""portfolio-display"", ""must_have"": ""skill-matching""}",Poor profiles + No reviews,HIGH
|
||||
69,Marketing Agency,Storytelling + Feature-Rich,Brutalism + Motion-Driven,Bold brand colors + Creative freedom,Bold + Expressive typography,Portfolio reveals + Results animations,"{""must_have"": ""portfolio"", ""must_have"": ""results-metrics""}",Boring design + Hidden work,HIGH
|
||||
70,Event Management,Hero-Centric + Feature-Rich,Vibrant & Block-based + Motion-Driven,Event theme colors + Excitement accents,Bold + Engaging typography,Countdown timer + Registration flow,"{""must_have"": ""registration"", ""must_have"": ""agenda-display""}",Confusing registration + No countdown,HIGH
|
||||
71,Membership/Community,Social Proof + Conversion,Vibrant & Block-based + Soft UI Evolution,Community brand colors + Engagement,Friendly + Engaging typography,Member counter + Benefit reveals,"{""must_have"": ""member-benefits"", ""must_have"": ""pricing-tiers""}",Hidden benefits + No community proof,HIGH
|
||||
72,Newsletter Platform,Minimal + Conversion,Minimalism + Flat Design,Brand primary + Clean white + CTA,Clean + Readable typography,Subscribe form + Archive reveals,"{""must_have"": ""subscribe-form"", ""must_have"": ""sample-content""}",Complex signup + No preview,MEDIUM
|
||||
73,Digital Products/Downloads,Feature-Rich + Conversion,Vibrant & Block-based + Motion-Driven,Product colors + Brand + Success green,Modern + Clear typography,Product preview + Instant delivery animations,"{""must_have"": ""product-preview"", ""must_have"": ""instant-delivery""}",No preview + Slow delivery,HIGH
|
||||
74,Church/Religious Organization,Hero-Centric + Social Proof,Accessible & Ethical + Soft UI Evolution,Warm Gold + Deep Purple/Blue + White,Welcoming + Clear typography,Service time highlights + Event calendar,"{""must_have"": ""service-times"", ""must_have"": ""community-events""}",Outdated design + Hidden info,MEDIUM
|
||||
75,Sports Team/Club,Hero-Centric + Feature-Rich,Vibrant & Block-based + Motion-Driven,Team colors + Energetic accents,Bold + Impactful typography,Score animations + Schedule reveals,"{""must_have"": ""schedule"", ""must_have"": ""roster""}",Static content + Poor fan engagement,HIGH
|
||||
76,Museum/Gallery,Storytelling + Feature-Rich,Minimalism + Motion-Driven,Art-appropriate neutrals + Exhibition accents,Elegant + Minimal typography,Virtual tour + Collection reveals,"{""must_have"": ""virtual-tour"", ""must_have"": ""exhibition-info""}",Cluttered layout + No online access,HIGH
|
||||
77,Theater/Cinema,Hero-Centric + Conversion,Dark Mode (OLED) + Motion-Driven,Dark + Spotlight accents + Gold,Dramatic + Bold typography,Seat selection + Trailer reveals,"{""must_have"": ""showtimes"", ""must_have"": ""seat-selection""}",Poor booking UX + No trailers,HIGH
|
||||
78,Language Learning App,Feature-Rich + Social Proof,Claymorphism + Vibrant & Block-based,Playful colors + Progress indicators,Friendly + Clear typography,Progress animations + Achievement unlocks,"{""must_have"": ""progress-tracking"", ""must_have"": ""gamification""}",Boring design + No motivation,HIGH
|
||||
79,Coding Bootcamp,Feature-Rich + Social Proof,Dark Mode (OLED) + Minimalism,Code editor colors + Brand + Success,Technical + Clear typography,Terminal animations + Career outcome reveals,"{""must_have"": ""curriculum"", ""must_have"": ""career-outcomes""}",Light mode only + Hidden results,HIGH
|
||||
80,Cybersecurity Platform,Trust & Authority + Real-Time,Cyberpunk UI + Dark Mode (OLED),Matrix Green (#00FF00) + Deep Black,Technical + Clear typography,Threat visualization + Alert animations,"{""must_have"": ""real-time-monitoring"", ""must_have"": ""threat-display""}",Light mode + Poor data viz,HIGH
|
||||
81,Developer Tool / IDE,Minimal + Documentation,Dark Mode (OLED) + Minimalism,Dark syntax theme + Blue focus,Monospace + Functional typography,Syntax highlighting + Command palette,"{""must_have"": ""keyboard-shortcuts"", ""must_have"": ""documentation""}",Light mode default + Slow performance,HIGH
|
||||
82,Biotech / Life Sciences,Storytelling + Data,Glassmorphism + Clean Science,Sterile White + DNA Blue + Life Green,Scientific + Clear typography,Data visualization + Research reveals,"{""must_have"": ""data-accuracy"", ""must_have"": ""clean-aesthetic""}",Cluttered data + Poor credibility,HIGH
|
||||
83,Space Tech / Aerospace,Immersive + Feature-Rich,Holographic/HUD + Dark Mode,Deep Space Black + Star White + Metallic,Futuristic + Precise typography,Telemetry animations + 3D renders,"{""must_have"": ""high-tech-feel"", ""must_have"": ""precision-data""}",Generic design + No immersion,HIGH
|
||||
84,Architecture / Interior,Portfolio + Hero-Centric,Exaggerated Minimalism + High Imagery,Monochrome + Gold Accent + High Imagery,Architectural + Elegant typography,Project gallery + Blueprint reveals,"{""must_have"": ""high-res-images"", ""must_have"": ""project-portfolio""}",Poor imagery + Cluttered layout,HIGH
|
||||
85,Quantum Computing Interface,Immersive + Interactive,Holographic/HUD + Dark Mode,Quantum Blue (#00FFFF) + Deep Black,Futuristic + Scientific typography,Probability visualizations + Qubit state animations,"{""must_have"": ""complexity-visualization"", ""must_have"": ""scientific-credibility""}",Generic tech design + No viz,HIGH
|
||||
86,Biohacking / Longevity App,Data-Dense + Storytelling,Biomimetic/Organic 2.0 + Minimalism,Cellular Pink/Red + DNA Blue + White,Scientific + Clear typography,Biological data viz + Progress animations,"{""must_have"": ""data-privacy"", ""must_have"": ""scientific-credibility""}",Generic health app + No privacy,HIGH
|
||||
87,Autonomous Drone Fleet Manager,Real-Time + Feature-Rich,HUD/Sci-Fi FUI + Real-Time,Tactical Green + Alert Red + Map Dark,Technical + Functional typography,Telemetry animations + 3D spatial awareness,"{""must_have"": ""real-time-telemetry"", ""must_have"": ""safety-alerts""}",Slow updates + Poor spatial viz,HIGH
|
||||
88,Generative Art Platform,Showcase + Feature-Rich,Minimalism + Gen Z Chaos,Neutral (#F5F5F5) + User Content,Minimal + Content-focused typography,Gallery masonry + Minting animations,"{""must_have"": ""fast-loading"", ""must_have"": ""creator-attribution""}",Heavy chrome + Slow loading,HIGH
|
||||
89,Spatial Computing OS / App,Immersive + Interactive,Spatial UI (VisionOS) + Glassmorphism,Frosted Glass + System Colors + Depth,Spatial + Readable typography,Depth hierarchy + Gaze interactions,"{""must_have"": ""depth-hierarchy"", ""must_have"": ""environment-awareness""}",2D design + No spatial depth,HIGH
|
||||
90,Sustainable Energy / Climate Tech,Data + Trust,Organic Biophilic + E-Ink/Paper,Earth Green + Sky Blue + Solar Yellow,Clear + Informative typography,Impact viz + Progress animations,"{""must_have"": ""data-transparency"", ""must_have"": ""impact-visualization""}",Greenwashing + No real data,HIGH
|
||||
91,Personal Finance Tracker,Interactive Product Demo,Glassmorphism + Dark Mode (OLED),Calm blue + success green + alert red + chart accents,Modern + Clear hierarchy,Backdrop blur (10-20px) + Translucent overlays,"{""if_light_mode_needed"": ""provide-theme-toggle"", ""if_low_performance"": ""fallback-to-flat""}",Pure white backgrounds,HIGH
|
||||
92,Chat & Messaging App,Feature-Rich Showcase + Demo,Minimalism + Micro-interactions,Brand primary + bubble contrast (sender/receiver) + typing grey,Professional + Clean hierarchy,Subtle hover 200ms + Smooth transitions + Clean,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Excessive decoration,HIGH
|
||||
93,Notes & Writing App,Minimal & Direct,Minimalism + Flat Design,Clean white/cream + minimal accent + editor syntax colors,Professional + Clean hierarchy,Color shift hover + Fast 150ms transitions + No shadows,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Excessive decoration + Complex shadows + 3D effects,HIGH
|
||||
94,Habit Tracker,Social Proof-Focused + Demo,Claymorphism + Vibrant & Block-based,Streak warm (amber/orange) + progress green + motivational accents,Playful + Rounded + Friendly,Multi-layer shadows + Spring bounce + Soft press 200ms,"{""if_trust_needed"": ""add-testimonials""}",Muted colors + Low energy,HIGH
|
||||
95,Food Delivery / On-Demand,Hero-Centric Design + Feature-Rich,Vibrant & Block-based + Motion-Driven,Appetizing warm (orange/red) + trust blue + map accent,Energetic + Bold + Large,Scroll animations + Parallax + Page transitions,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Muted colors + Low energy,HIGH
|
||||
96,Ride Hailing / Transportation,Conversion-Optimized + Demo,Minimalism + Glassmorphism,Brand primary + map neutral + status indicator colors,Professional + Clean hierarchy,Backdrop blur (10-20px) + Translucent overlays,"{""if_low_performance"": ""fallback-to-flat"", ""if_conversion_focused"": ""add-urgency-colors""}",Excessive decoration,HIGH
|
||||
97,Recipe & Cooking App,Hero-Centric Design + Feature-Rich,Claymorphism + Vibrant & Block-based,Warm food tones (terracotta/sage/cream) + appetizing imagery,Playful + Rounded + Friendly,Multi-layer shadows + Spring bounce + Soft press 200ms,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Muted colors + Low energy,HIGH
|
||||
98,Meditation & Mindfulness,Storytelling-Driven + Social Proof,Neumorphism + Soft UI Evolution,Ultra-calm pastels (lavender/sage/sky) + breathing animation gradient,Subtle + Soft + Monochromatic,Dual shadows (light+dark) + Soft press 150ms,"{""if_trust_needed"": ""add-testimonials""}",Inconsistent styling + Poor contrast ratios,HIGH
|
||||
99,Weather App,Hero-Centric Design,Glassmorphism + Aurora UI,Atmospheric gradients (sky blue → sunset → storm grey) + temp scale,Modern + Clear hierarchy,Backdrop blur (10-20px) + Translucent overlays,"{""if_low_performance"": ""fallback-to-flat""}",Inconsistent styling + Poor contrast ratios,HIGH
|
||||
100,Diary & Journal App,Storytelling-Driven,Soft UI Evolution + Minimalism,Warm paper tones (cream/linen) + muted ink + mood-coded accents,Professional + Clean hierarchy,Subtle hover 200ms + Smooth transitions + Clean,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Excessive decoration,HIGH
|
||||
101,CRM & Client Management,Feature-Rich Showcase + Demo,Flat Design + Minimalism,Professional blue + pipeline stage colors + closed-won green,Professional + Clean hierarchy,Color shift hover + Fast 150ms transitions + No shadows,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Excessive decoration + Complex shadows + 3D effects,HIGH
|
||||
102,Inventory & Stock Management,Feature-Rich Showcase,Flat Design + Minimalism,Functional neutral + status traffic-light (green/amber/red) + scanner accent,Professional + Clean hierarchy,Color shift hover + Fast 150ms transitions + No shadows,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Excessive decoration + Complex shadows + 3D effects,HIGH
|
||||
103,Flashcard & Study Tool,Feature-Rich Showcase + Demo,Claymorphism + Micro-interactions,Playful primary + correct green + incorrect red + progress blue,Playful + Rounded + Friendly,Multi-layer shadows + Spring bounce + Soft press 200ms,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Inconsistent styling + Poor contrast ratios,HIGH
|
||||
104,Booking & Appointment App,Conversion-Optimized,Soft UI Evolution + Flat Design,Trust blue + available green + booked grey + confirm accent,Bold + Clean + Sans-serif,Color shift hover + Fast 150ms transitions + No shadows,"{""if_conversion_focused"": ""add-urgency-colors""}",Complex shadows + 3D effects,HIGH
|
||||
105,Invoice & Billing Tool,Conversion-Optimized + Trust,Minimalism + Flat Design,Professional navy + paid green + overdue red + neutral grey,Professional + Clean hierarchy,Color shift hover + Fast 150ms transitions + No shadows,"{""if_conversion_focused"": ""add-urgency-colors""}",Excessive decoration + Complex shadows + 3D effects,HIGH
|
||||
106,Grocery & Shopping List,Minimal & Direct + Demo,Flat Design + Vibrant & Block-based,Fresh green + food-category colors + checkmark accent,Bold + Clean + Sans-serif,Color shift hover + Fast 150ms transitions + No shadows,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Complex shadows + 3D effects + Muted colors + Low energy,HIGH
|
||||
107,Timer & Pomodoro,Minimal & Direct,Minimalism + Neumorphism,High-contrast on dark + focus red/amber + break green,Professional + Clean hierarchy,Dual shadows (light+dark) + Soft press 150ms,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Excessive decoration,HIGH
|
||||
108,Parenting & Baby Tracker,Social Proof-Focused + Trust,Claymorphism + Soft UI Evolution,Soft pastels (baby pink/sky blue/mint/peach) + warm accents,Playful + Rounded + Friendly,Multi-layer shadows + Spring bounce + Soft press 200ms,"{""if_trust_needed"": ""add-testimonials""}",Inconsistent styling + Poor contrast ratios,HIGH
|
||||
109,Scanner & Document Manager,Feature-Rich Showcase + Demo,Minimalism + Flat Design,Clean white + camera viewfinder accent + file-type color coding,Professional + Clean hierarchy,Color shift hover + Fast 150ms transitions + No shadows,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Excessive decoration + Complex shadows + 3D effects,HIGH
|
||||
110,Calendar & Scheduling App,Feature-Rich Showcase + Demo,Flat Design + Micro-interactions,Clean blue + event category accent colors + success green,Bold + Clean + Sans-serif,Color shift hover + Fast 150ms transitions + No shadows,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Complex shadows + 3D effects,HIGH
|
||||
111,Password Manager,Trust & Authority + Feature-Rich,Minimalism + Accessible & Ethical,Trust blue + security green + dark neutral,Professional + Clean hierarchy,Subtle hover 200ms + Smooth transitions + Clean,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Excessive decoration + Color-only indicators,HIGH
|
||||
112,Expense Splitter / Bill Split,Minimal & Direct + Demo,Flat Design + Vibrant & Block-based,Success green + alert red + neutral grey + avatar accent colors,Bold + Clean + Sans-serif,Color shift hover + Fast 150ms transitions + No shadows,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Complex shadows + 3D effects + Muted colors + Low energy,HIGH
|
||||
113,Voice Recorder & Memo,Interactive Product Demo + Minimal,Minimalism + AI-Native UI,Clean white + recording red + waveform accent,Professional + Clean hierarchy,Subtle hover 200ms + Smooth transitions + Clean,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Excessive decoration,HIGH
|
||||
114,Bookmark & Read-Later,Minimal & Direct + Demo,Minimalism + Flat Design,Paper warm white + ink neutral + minimal accent + tag colors,Professional + Clean hierarchy,Color shift hover + Fast 150ms transitions + No shadows,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Excessive decoration + Complex shadows + 3D effects,HIGH
|
||||
115,Translator App,Feature-Rich Showcase + Interactive Demo,Flat Design + AI-Native UI,Global blue + neutral grey + language flag accent,Bold + Clean + Sans-serif,Color shift hover + Fast 150ms transitions + No shadows,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Complex shadows + 3D effects,HIGH
|
||||
116,Calculator & Unit Converter,Minimal & Direct,Neumorphism + Minimalism,Dark functional + orange operation keys + clear button hierarchy,Professional + Clean hierarchy,Dual shadows (light+dark) + Soft press 150ms,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Excessive decoration,HIGH
|
||||
117,Alarm & World Clock,Minimal & Direct,Dark Mode (OLED) + Minimalism,Deep dark + ambient glow accent + timezone gradient,Professional + Clean hierarchy,Subtle glow + Neon accents + High contrast,"{""if_light_mode_needed"": ""provide-theme-toggle""}",Excessive decoration + Pure white backgrounds,HIGH
|
||||
118,File Manager & Transfer,Feature-Rich Showcase + Demo,Flat Design + Minimalism,"Functional neutral + file type color coding (PDF orange, doc blue, image purple)",Professional + Clean hierarchy,Color shift hover + Fast 150ms transitions + No shadows,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Excessive decoration + Complex shadows + 3D effects,HIGH
|
||||
119,Email Client,Feature-Rich Showcase + Demo,Flat Design + Minimalism,Clean white + brand primary + priority red + snooze amber,Professional + Clean hierarchy,Color shift hover + Fast 150ms transitions + No shadows,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Excessive decoration + Complex shadows + 3D effects,HIGH
|
||||
120,Casual Puzzle Game,Feature-Rich Showcase + Social Proof,Claymorphism + Vibrant & Block-based,Cheerful pastels + progression gradient + reward gold + bright accent,Playful + Rounded + Friendly,Multi-layer shadows + Spring bounce + Soft press 200ms,"{""if_trust_needed"": ""add-testimonials""}",Muted colors + Low energy,HIGH
|
||||
121,Trivia & Quiz Game,Feature-Rich Showcase + Social Proof,Vibrant & Block-based + Micro-interactions,Energetic blue + correct green + incorrect red + leaderboard gold,Energetic + Bold + Large,Haptic feedback + Small 50-100ms animations,"{""if_trust_needed"": ""add-testimonials""}",Muted colors + Low energy,HIGH
|
||||
122,Card & Board Game,Feature-Rich Showcase,3D & Hyperrealism + Flat Design,Game-theme felt green + dark wood + card back patterns,Bold + Clean + Sans-serif,Color shift hover + Fast 150ms transitions + No shadows,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Complex shadows + 3D effects,HIGH
|
||||
123,Idle & Clicker Game,Feature-Rich Showcase,Vibrant & Block-based + Motion-Driven,Coin gold + upgrade blue + prestige purple + progress green,Energetic + Bold + Large,Scroll animations + Parallax + Page transitions,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Muted colors + Low energy,HIGH
|
||||
124,Word & Crossword Game,Minimal & Direct + Demo,Minimalism + Flat Design,Clean white + warm letter tiles + success green + shake red,Professional + Clean hierarchy,Color shift hover + Fast 150ms transitions + No shadows,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Excessive decoration + Complex shadows + 3D effects,HIGH
|
||||
125,Arcade & Retro Game,Feature-Rich Showcase + Hero-Centric,Pixel Art + Retro-Futurism,Neon on black + pixel palette + score gold + danger red,Nostalgic + Monospace + Neon,Subtle hover (200ms) + Smooth transitions,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Inconsistent styling + Poor contrast ratios,HIGH
|
||||
126,Photo Editor & Filters,Feature-Rich Showcase + Interactive Demo,Minimalism + Dark Mode (OLED),Dark editor background + vibrant filter preview strip + tool icon accent,Professional + Clean hierarchy,Subtle glow + Neon accents + High contrast,"{""if_light_mode_needed"": ""provide-theme-toggle""}",Excessive decoration + Pure white backgrounds,HIGH
|
||||
127,Short Video Editor,Feature-Rich Showcase + Hero-Centric,Dark Mode (OLED) + Motion-Driven,Dark background + timeline track accent colors + effect preview vivid,High contrast + Light on dark,Subtle glow + Neon accents + High contrast,"{""if_light_mode_needed"": ""provide-theme-toggle""}",Pure white backgrounds,HIGH
|
||||
128,Drawing & Sketching Canvas,Interactive Product Demo + Storytelling,Minimalism + Dark Mode (OLED),Neutral canvas + full-spectrum color picker + tool panel dark,Professional + Clean hierarchy,Subtle glow + Neon accents + High contrast,"{""if_light_mode_needed"": ""provide-theme-toggle""}",Excessive decoration + Pure white backgrounds,HIGH
|
||||
129,Music Creation & Beat Maker,Interactive Product Demo + Storytelling,Dark Mode (OLED) + Motion-Driven,Dark studio background + track colors rainbow + waveform accent + BPM pulse,High contrast + Light on dark,Subtle glow + Neon accents + High contrast,"{""if_light_mode_needed"": ""provide-theme-toggle""}",Pure white backgrounds,HIGH
|
||||
130,Meme & Sticker Maker,Feature-Rich Showcase + Social Proof,Vibrant & Block-based + Flat Design,Bold primary + comedic yellow + viral red + high saturation accent,Bold + Clean + Sans-serif,Color shift hover + Fast 150ms transitions + No shadows,"{""if_trust_needed"": ""add-testimonials""}",Complex shadows + 3D effects + Muted colors + Low energy,HIGH
|
||||
131,AI Photo & Avatar Generator,Feature-Rich Showcase + Social Proof,AI-Native UI + Aurora UI,AI purple + aurora gradients + before/after neutral,Elegant + Gradient-friendly,Flowing gradients 8-12s + Color morphing,"{""if_trust_needed"": ""add-testimonials""}",Inconsistent styling + Poor contrast ratios,HIGH
|
||||
132,Link-in-Bio Page Builder,Conversion-Optimized + Social Proof,Vibrant & Block-based + Bento Box Grid,Brand-customizable + accent link color + clean white canvas,Energetic + Bold + Large,Large section gaps 48px+ + Color shift hover + Scroll-snap,"{""if_conversion_focused"": ""add-urgency-colors"", ""if_trust_needed"": ""add-testimonials""}",Muted colors + Low energy,HIGH
|
||||
133,Wardrobe & Outfit Planner,Storytelling-Driven + Feature-Rich,Minimalism + Motion-Driven,Clean fashion neutral + full clothes color palette + accent,Professional + Clean hierarchy,Subtle hover 200ms + Smooth transitions + Clean,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Excessive decoration,HIGH
|
||||
134,Plant Care Tracker,Storytelling-Driven + Social Proof,Organic Biophilic + Soft UI Evolution,Nature greens + earth brown + sunny yellow reminder + water blue,Warm + Humanist + Natural,Rounded 16-24px + Natural shadows + Flowing SVG,"{""if_trust_needed"": ""add-testimonials""}",Inconsistent styling + Poor contrast ratios,HIGH
|
||||
135,Book & Reading Tracker,Social Proof-Focused + Feature-Rich,Swiss Modernism 2.0 + Minimalism,Warm paper white + ink brown + reading progress green + book cover colors,Professional + Clean hierarchy,Subtle hover 200ms + Smooth transitions + Clean,"{""if_trust_needed"": ""add-testimonials""}",Excessive decoration,HIGH
|
||||
136,Couple & Relationship App,Storytelling-Driven + Social Proof,Aurora UI + Soft UI Evolution,Warm romantic pink/rose + soft gradient + memory photo tones,Elegant + Gradient-friendly,Flowing gradients 8-12s + Color morphing,"{""if_trust_needed"": ""add-testimonials""}",Inconsistent styling + Poor contrast ratios,HIGH
|
||||
137,Family Calendar & Chores,Feature-Rich Showcase + Social Proof,Flat Design + Claymorphism,Warm playful + member color coding + chore completion green,Playful + Rounded + Friendly,Multi-layer shadows + Spring bounce + Soft press 200ms,"{""if_trust_needed"": ""add-testimonials""}",Complex shadows + 3D effects,HIGH
|
||||
138,Mood Tracker,Storytelling-Driven + Social Proof,Soft UI Evolution + Minimalism,Emotion gradient (blue sad to yellow happy) + pastel per mood + insight accent,Professional + Clean hierarchy,Subtle hover 200ms + Smooth transitions + Clean,"{""if_trust_needed"": ""add-testimonials""}",Excessive decoration,HIGH
|
||||
139,Gift & Wishlist,Minimal & Direct + Conversion,Vibrant & Block-based + Soft UI Evolution,Celebration warm pink/gold/red + category colors + surprise accent,Energetic + Bold + Large,Large section gaps 48px+ + Color shift hover + Scroll-snap,"{""if_conversion_focused"": ""add-urgency-colors""}",Muted colors + Low energy,HIGH
|
||||
140,Running & Cycling GPS,Feature-Rich Showcase + Social Proof,Dark Mode (OLED) + Vibrant & Block-based,Energetic orange + map accent + pace zones (green/yellow/red),High contrast + Light on dark,Subtle glow + Neon accents + High contrast,"{""if_light_mode_needed"": ""provide-theme-toggle"", ""if_trust_needed"": ""add-testimonials""}",Pure white backgrounds + Muted colors + Low energy,HIGH
|
||||
141,Yoga & Stretching Guide,Storytelling-Driven + Social Proof,Organic Biophilic + Soft UI Evolution,Earth calming sage/terracotta/cream + breathing gradient + warm accent,Warm + Humanist + Natural,Rounded 16-24px + Natural shadows + Flowing SVG,"{""if_trust_needed"": ""add-testimonials""}",Inconsistent styling + Poor contrast ratios,HIGH
|
||||
142,Sleep Tracker,Feature-Rich Showcase + Social Proof,Dark Mode (OLED) + Neumorphism,Deep midnight blue + stars/moon accent + sleep quality gradient (poor red to great green),High contrast + Light on dark,Dual shadows (light+dark) + Soft press 150ms,"{""if_light_mode_needed"": ""provide-theme-toggle"", ""if_trust_needed"": ""add-testimonials""}",Pure white backgrounds,HIGH
|
||||
143,Calorie & Nutrition Counter,Feature-Rich Showcase + Social Proof,Flat Design + Vibrant & Block-based,"Healthy green + macro colors (protein blue, carb orange, fat yellow) + progress circle",Bold + Clean + Sans-serif,Color shift hover + Fast 150ms transitions + No shadows,"{""if_trust_needed"": ""add-testimonials""}",Complex shadows + 3D effects + Muted colors + Low energy,HIGH
|
||||
144,Period & Cycle Tracker,Social Proof-Focused + Trust,Soft UI Evolution + Aurora UI,Rose/blush + lavender + fertility green + soft calendar tones,Elegant + Gradient-friendly,Flowing gradients 8-12s + Color morphing,"{""if_trust_needed"": ""add-testimonials""}",Inconsistent styling + Poor contrast ratios,HIGH
|
||||
145,Medication & Pill Reminder,Trust & Authority + Feature-Rich,Accessible & Ethical + Flat Design,Medical trust blue + missed alert red + taken green + clean white,Bold + Clean + Sans-serif,Color shift hover + Fast 150ms transitions + No shadows,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Complex shadows + 3D effects + Color-only indicators,HIGH
|
||||
146,Water & Hydration Reminder,Minimal & Direct + Demo,Claymorphism + Vibrant & Block-based,Refreshing blue + water wave animation + goal progress accent,Playful + Rounded + Friendly,Multi-layer shadows + Spring bounce + Soft press 200ms,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Muted colors + Low energy,HIGH
|
||||
147,Fasting & Intermittent Timer,Feature-Rich Showcase + Social Proof,Minimalism + Dark Mode (OLED),Fasting deep blue/purple + eating window green + timeline neutral,Professional + Clean hierarchy,Subtle glow + Neon accents + High contrast,"{""if_light_mode_needed"": ""provide-theme-toggle"", ""if_trust_needed"": ""add-testimonials""}",Excessive decoration + Pure white backgrounds,HIGH
|
||||
148,Anonymous Community / Confession,Social Proof-Focused + Feature-Rich,Dark Mode (OLED) + Minimalism,Dark protective + subtle gradient + upvote green + empathy warm accent,Professional + Clean hierarchy,Subtle glow + Neon accents + High contrast,"{""if_light_mode_needed"": ""provide-theme-toggle"", ""if_trust_needed"": ""add-testimonials""}",Excessive decoration + Pure white backgrounds,HIGH
|
||||
149,Local Events & Discovery,Hero-Centric Design + Feature-Rich,Vibrant & Block-based + Motion-Driven,City vibrant + event category colors + map accent + date highlight,Energetic + Bold + Large,Scroll animations + Parallax + Page transitions,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Muted colors + Low energy,HIGH
|
||||
150,Study Together / Virtual Coworking,Social Proof-Focused + Feature-Rich,Minimalism + Soft UI Evolution,Calm focus blue + session progress indicator + ambient warm neutrals,Professional + Clean hierarchy,Subtle hover 200ms + Smooth transitions + Clean,"{""if_trust_needed"": ""add-testimonials""}",Excessive decoration,HIGH
|
||||
151,Coding Challenge & Practice,Feature-Rich Showcase + Social Proof,Dark Mode (OLED) + Cyberpunk UI,Code editor dark + success green + difficulty gradient (easy green / medium amber / hard red),High contrast + Light on dark,Subtle glow + Neon accents + High contrast,"{""if_light_mode_needed"": ""provide-theme-toggle"", ""if_trust_needed"": ""add-testimonials""}",Pure white backgrounds,HIGH
|
||||
152,Kids Learning (ABC & Math),Social Proof-Focused + Trust,Claymorphism + Vibrant & Block-based,Bright primary + child-safe pastels + reward gold + interactive accent,Playful + Rounded + Friendly,Multi-layer shadows + Spring bounce + Soft press 200ms,"{""if_trust_needed"": ""add-testimonials""}",Muted colors + Low energy,HIGH
|
||||
153,Music Instrument Learning,Interactive Product Demo + Social Proof,Vibrant & Block-based + Motion-Driven,Musical warm deep red/brown + note color system + skill progress bar,Energetic + Bold + Large,Scroll animations + Parallax + Page transitions,"{""if_trust_needed"": ""add-testimonials""}",Muted colors + Low energy,HIGH
|
||||
154,Parking Finder,Conversion-Optimized + Feature-Rich,Minimalism + Glassmorphism,Trust blue + available green + occupied red + map neutral,Professional + Clean hierarchy,Backdrop blur (10-20px) + Translucent overlays,"{""if_low_performance"": ""fallback-to-flat"", ""if_conversion_focused"": ""add-urgency-colors""}",Excessive decoration,HIGH
|
||||
155,Public Transit Guide,Feature-Rich Showcase + Interactive Demo,Flat Design + Accessible & Ethical,Transit brand line colors + real-time indicator green/red + map neutral,Bold + Clean + Sans-serif,Color shift hover + Fast 150ms transitions + No shadows,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Complex shadows + 3D effects + Color-only indicators,HIGH
|
||||
156,Road Trip Planner,Storytelling-Driven + Hero-Centric,Aurora UI + Organic Biophilic,Adventure warm sunset orange + map teal + stop markers + road neutral,Elegant + Gradient-friendly,Flowing gradients 8-12s + Color morphing,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Inconsistent styling + Poor contrast ratios,HIGH
|
||||
157,VPN & Privacy Tool,Trust & Authority + Conversion-Optimized,Minimalism + Dark Mode (OLED),Dark shield blue + connected green + disconnected red + trust accent,Professional + Clean hierarchy,Subtle glow + Neon accents + High contrast,"{""if_light_mode_needed"": ""provide-theme-toggle"", ""if_conversion_focused"": ""add-urgency-colors""}",Excessive decoration + Pure white backgrounds,HIGH
|
||||
158,Emergency SOS & Safety,Trust & Authority + Social Proof,Accessible & Ethical + Flat Design,Alert red + safety blue + location green + high contrast critical,Bold + Clean + Sans-serif,Color shift hover + Fast 150ms transitions + No shadows,"{""if_trust_needed"": ""add-testimonials""}",Complex shadows + 3D effects + Color-only indicators,HIGH
|
||||
159,Wallpaper & Theme App,Feature-Rich Showcase + Social Proof,Vibrant & Block-based + Aurora UI,Content-driven + trending aesthetic palettes + download accent,Energetic + Bold + Large,Large section gaps 48px+ + Color shift hover + Scroll-snap,"{""if_trust_needed"": ""add-testimonials""}",Muted colors + Low energy,HIGH
|
||||
160,White Noise & Ambient Sound,Minimal & Direct + Social Proof,Minimalism + Dark Mode (OLED),Calming dark + ambient texture visual + subtle sound wave + sleep blue,Professional + Clean hierarchy,Subtle glow + Neon accents + High contrast,"{""if_light_mode_needed"": ""provide-theme-toggle"", ""if_trust_needed"": ""add-testimonials""}",Excessive decoration + Pure white backgrounds,HIGH
|
||||
161,Home Decoration & Interior Design,Storytelling-Driven + Feature-Rich,Minimalism + 3D Product Preview,Neutral interior palette + material texture accent + AR blue,Professional + Clean hierarchy,Subtle hover 200ms + Smooth transitions + Clean,"{""if_ux_focused"": ""prioritize-clarity"", ""if_mobile"": ""optimize-touch-targets""}",Excessive decoration,HIGH
|
||||
|
@@ -0,0 +1,100 @@
|
||||
No,Category,Issue,Platform,Description,Do,Don't,Code Example Good,Code Example Bad,Severity
|
||||
1,Navigation,Smooth Scroll,Web,Anchor links should scroll smoothly to target section,Use scroll-behavior: smooth on html element,Jump directly without transition,html { scroll-behavior: smooth; },<a href='#section'> without CSS,High
|
||||
2,Navigation,Sticky Navigation,Web,Fixed nav should not obscure content,Add padding-top to body equal to nav height,Let nav overlap first section content,pt-20 (if nav is h-20),No padding compensation,Medium
|
||||
3,Navigation,Active State,All,Current page/section should be visually indicated,Highlight active nav item with color/underline,No visual feedback on current location,text-primary border-b-2,All links same style,Medium
|
||||
4,Navigation,Back Button,Mobile,Users expect back to work predictably,Preserve navigation history properly,Break browser/app back button behavior,history.pushState(),location.replace(),High
|
||||
5,Navigation,Deep Linking,All,URLs should reflect current state for sharing,Update URL on state/view changes,Static URLs for dynamic content,Use query params or hash,Single URL for all states,Medium
|
||||
6,Navigation,Breadcrumbs,Web,Show user location in site hierarchy,Use for sites with 3+ levels of depth,Use for flat single-level sites,Home > Category > Product,Only on deep nested pages,Low
|
||||
7,Animation,Excessive Motion,All,Too many animations cause distraction and motion sickness,Animate 1-2 key elements per view maximum,Animate everything that moves,Single hero animation,animate-bounce on 5+ elements,High
|
||||
8,Animation,Duration Timing,All,Animations should feel responsive not sluggish,Use 150-300ms for micro-interactions,Use animations longer than 500ms for UI,transition-all duration-200,duration-1000,Medium
|
||||
9,Animation,Reduced Motion,All,Respect user's motion preferences,Check prefers-reduced-motion media query,Ignore accessibility motion settings,@media (prefers-reduced-motion: reduce),No motion query check,High
|
||||
10,Animation,Loading States,All,Show feedback during async operations,Use skeleton screens or spinners,Leave UI frozen with no feedback,animate-pulse skeleton,Blank screen while loading,High
|
||||
11,Animation,Hover vs Tap,All,Hover effects don't work on touch devices,Use click/tap for primary interactions,Rely only on hover for important actions,onClick handler,onMouseEnter only,High
|
||||
12,Animation,Continuous Animation,All,Infinite animations are distracting,Use for loading indicators only,Use for decorative elements,animate-spin on loader,animate-bounce on icons,Medium
|
||||
13,Animation,Transform Performance,Web,Some CSS properties trigger expensive repaints,Use transform and opacity for animations,Animate width/height/top/left properties,transform: translateY(),top: 10px animation,Medium
|
||||
14,Animation,Easing Functions,All,Linear motion feels robotic,Use ease-out for entering ease-in for exiting,Use linear for UI transitions,ease-out,linear,Low
|
||||
15,Layout,Z-Index Management,Web,Stacking context conflicts cause hidden elements,Define z-index scale system (10 20 30 50),Use arbitrary large z-index values,z-10 z-20 z-50,z-[9999],High
|
||||
16,Layout,Overflow Hidden,Web,Hidden overflow can clip important content,Test all content fits within containers,Blindly apply overflow-hidden,overflow-auto with scroll,overflow-hidden truncating content,Medium
|
||||
17,Layout,Fixed Positioning,Web,Fixed elements can overlap or be inaccessible,Account for safe areas and other fixed elements,Stack multiple fixed elements carelessly,Fixed nav + fixed bottom with gap,Multiple overlapping fixed elements,Medium
|
||||
18,Layout,Stacking Context,Web,New stacking contexts reset z-index,Understand what creates new stacking context,Expect z-index to work across contexts,Parent with z-index isolates children,z-index: 9999 not working,Medium
|
||||
19,Layout,Content Jumping,Web,Layout shift when content loads is jarring,Reserve space for async content,Let images/content push layout around,aspect-ratio or fixed height,No dimensions on images,High
|
||||
20,Layout,Viewport Units,Web,100vh can be problematic on mobile browsers,Use dvh or account for mobile browser chrome,Use 100vh for full-screen mobile layouts,min-h-dvh or min-h-screen,h-screen on mobile,Medium
|
||||
21,Layout,Container Width,Web,Content too wide is hard to read,Limit max-width for text content (65-75ch),Let text span full viewport width,max-w-prose or max-w-3xl,Full width paragraphs,Medium
|
||||
22,Touch,Touch Target Size,Mobile,Small buttons are hard to tap accurately,Minimum 44x44px touch targets,Tiny clickable areas,min-h-[44px] min-w-[44px],w-6 h-6 buttons,High
|
||||
23,Touch,Touch Spacing,Mobile,Adjacent touch targets need adequate spacing,Minimum 8px gap between touch targets,Tightly packed clickable elements,gap-2 between buttons,gap-0 or gap-1,Medium
|
||||
24,Touch,Gesture Conflicts,Mobile,Custom gestures can conflict with system,Avoid horizontal swipe on main content,Override system gestures,Vertical scroll primary,Horizontal swipe carousel only,Medium
|
||||
25,Touch,Tap Delay,Mobile,300ms tap delay feels laggy,Use touch-action CSS or fastclick,Default mobile tap handling,touch-action: manipulation,No touch optimization,Medium
|
||||
26,Touch,Pull to Refresh,Mobile,Accidental refresh is frustrating,Disable where not needed,Enable by default everywhere,overscroll-behavior: contain,Default overscroll,Low
|
||||
27,Touch,Haptic Feedback,Mobile,Tactile feedback improves interaction feel,Use for confirmations and important actions,Overuse vibration feedback,navigator.vibrate(10),Vibrate on every tap,Low
|
||||
28,Interaction,Focus States,All,Keyboard users need visible focus indicators,Use visible focus rings on interactive elements,Remove focus outline without replacement,focus:ring-2 focus:ring-blue-500,outline-none without alternative,High
|
||||
29,Interaction,Hover States,Web,Visual feedback on interactive elements,Change cursor and add subtle visual change,No hover feedback on clickable elements,hover:bg-gray-100 cursor-pointer,No hover style,Medium
|
||||
30,Interaction,Active States,All,Show immediate feedback on press/click,Add pressed/active state visual change,No feedback during interaction,active:scale-95,No active state,Medium
|
||||
31,Interaction,Disabled States,All,Clearly indicate non-interactive elements,Reduce opacity and change cursor,Confuse disabled with normal state,opacity-50 cursor-not-allowed,Same style as enabled,Medium
|
||||
32,Interaction,Loading Buttons,All,Prevent double submission during async actions,Disable button and show loading state,Allow multiple clicks during processing,disabled={loading} spinner,Button clickable while loading,High
|
||||
33,Interaction,Error Feedback,All,Users need to know when something fails,Show clear error messages near problem,Silent failures with no feedback,Red border + error message,No indication of error,High
|
||||
34,Interaction,Success Feedback,All,Confirm successful actions to users,Show success message or visual change,No confirmation of completed action,Toast notification or checkmark,Action completes silently,Medium
|
||||
35,Interaction,Confirmation Dialogs,All,Prevent accidental destructive actions,Confirm before delete/irreversible actions,Delete without confirmation,Are you sure modal,Direct delete on click,High
|
||||
36,Accessibility,Color Contrast,All,Text must be readable against background,Minimum 4.5:1 ratio for normal text,Low contrast text,#333 on white (7:1),#999 on white (2.8:1),High
|
||||
37,Accessibility,Color Only,All,Don't convey information by color alone,Use icons/text in addition to color,Red/green only for error/success,Red text + error icon,Red border only for error,High
|
||||
38,Accessibility,Alt Text,All,Images need text alternatives,Descriptive alt text for meaningful images,Empty or missing alt attributes,alt='Dog playing in park',alt='' for content images,High
|
||||
39,Accessibility,Heading Hierarchy,Web,Screen readers use headings for navigation,Use sequential heading levels h1-h6,Skip heading levels or misuse for styling,h1 then h2 then h3,h1 then h4,Medium
|
||||
40,Accessibility,ARIA Labels,All,Interactive elements need accessible names,Add aria-label for icon-only buttons,Icon buttons without labels,aria-label='Close menu',<button><Icon/></button>,High
|
||||
41,Accessibility,Keyboard Navigation,Web,All functionality accessible via keyboard,Tab order matches visual order,Keyboard traps or illogical tab order,tabIndex for custom order,Unreachable elements,High
|
||||
42,Accessibility,Screen Reader,All,Content should make sense when read aloud,Use semantic HTML and ARIA properly,Div soup with no semantics,<nav> <main> <article>,<div> for everything,Medium
|
||||
43,Accessibility,Form Labels,All,Inputs must have associated labels,Use label with for attribute or wrap input,Placeholder-only inputs,<label for='email'>,placeholder='Email' only,High
|
||||
44,Accessibility,Error Messages,All,Error messages must be announced,Use aria-live or role=alert for errors,Visual-only error indication,role='alert',Red border only,High
|
||||
45,Accessibility,Skip Links,Web,Allow keyboard users to skip navigation,Provide skip to main content link,No skip link on nav-heavy pages,Skip to main content link,100 tabs to reach content,Medium
|
||||
46,Performance,Image Optimization,All,Large images slow page load,Use appropriate size and format (WebP),Unoptimized full-size images,srcset with multiple sizes,4000px image for 400px display,High
|
||||
47,Performance,Lazy Loading,All,Load content as needed,Lazy load below-fold images and content,Load everything upfront,loading='lazy',All images eager load,Medium
|
||||
48,Performance,Code Splitting,Web,Large bundles slow initial load,Split code by route/feature,Single large bundle,dynamic import(),All code in main bundle,Medium
|
||||
49,Performance,Caching,Web,Repeat visits should be fast,Set appropriate cache headers,No caching strategy,Cache-Control headers,Every request hits server,Medium
|
||||
50,Performance,Font Loading,Web,Web fonts can block rendering,Use font-display swap or optional,Invisible text during font load,font-display: swap,FOIT (Flash of Invisible Text),Medium
|
||||
51,Performance,Third Party Scripts,Web,External scripts can block rendering,Load non-critical scripts async/defer,Synchronous third-party scripts,async or defer attribute,<script src='...'> in head,Medium
|
||||
52,Performance,Bundle Size,Web,Large JavaScript slows interaction,Monitor and minimize bundle size,Ignore bundle size growth,Bundle analyzer,No size monitoring,Medium
|
||||
53,Performance,Render Blocking,Web,CSS/JS can block first paint,Inline critical CSS defer non-critical,Large blocking CSS files,Critical CSS inline,All CSS in head,Medium
|
||||
54,Forms,Input Labels,All,Every input needs a visible label,Always show label above or beside input,Placeholder as only label,<label>Email</label><input>,placeholder='Email' only,High
|
||||
55,Forms,Error Placement,All,Errors should appear near the problem,Show error below related input,Single error message at top of form,Error under each field,All errors at form top,Medium
|
||||
56,Forms,Inline Validation,All,Validate as user types or on blur,Validate on blur for most fields,Validate only on submit,onBlur validation,Submit-only validation,Medium
|
||||
57,Forms,Input Types,All,Use appropriate input types,Use email tel number url etc,Text input for everything,type='email',type='text' for email,Medium
|
||||
58,Forms,Autofill Support,Web,Help browsers autofill correctly,Use autocomplete attribute properly,Block or ignore autofill,autocomplete='email',autocomplete='off' everywhere,Medium
|
||||
59,Forms,Required Indicators,All,Mark required fields clearly,Use asterisk or (required) text,No indication of required fields,* required indicator,Guess which are required,Medium
|
||||
60,Forms,Password Visibility,All,Let users see password while typing,Toggle to show/hide password,No visibility toggle,Show/hide password button,Password always hidden,Medium
|
||||
61,Forms,Submit Feedback,All,Confirm form submission status,Show loading then success/error state,No feedback after submit,Loading -> Success message,Button click with no response,High
|
||||
62,Forms,Input Affordance,All,Inputs should look interactive,Use distinct input styling,Inputs that look like plain text,Border/background on inputs,Borderless inputs,Medium
|
||||
63,Forms,Mobile Keyboards,Mobile,Show appropriate keyboard for input type,Use inputmode attribute,Default keyboard for all inputs,inputmode='numeric',Text keyboard for numbers,Medium
|
||||
64,Responsive,Mobile First,Web,Design for mobile then enhance for larger,Start with mobile styles then add breakpoints,Desktop-first causing mobile issues,Default mobile + md: lg: xl:,Desktop default + max-width queries,Medium
|
||||
65,Responsive,Breakpoint Testing,Web,Test at all common screen sizes,Test at 320 375 414 768 1024 1440,Only test on your device,Multiple device testing,Single device development,Medium
|
||||
66,Responsive,Touch Friendly,Web,Mobile layouts need touch-sized targets,Increase touch targets on mobile,Same tiny buttons on mobile,Larger buttons on mobile,Desktop-sized targets on mobile,High
|
||||
67,Responsive,Readable Font Size,All,Text must be readable on all devices,Minimum 16px body text on mobile,Tiny text on mobile,text-base or larger,text-xs for body text,High
|
||||
68,Responsive,Viewport Meta,Web,Set viewport for mobile devices,Use width=device-width initial-scale=1,Missing or incorrect viewport,<meta name='viewport'...>,No viewport meta tag,High
|
||||
69,Responsive,Horizontal Scroll,Web,Avoid horizontal scrolling,Ensure content fits viewport width,Content wider than viewport,max-w-full overflow-x-hidden,Horizontal scrollbar on mobile,High
|
||||
70,Responsive,Image Scaling,Web,Images should scale with container,Use max-width: 100% on images,Fixed width images overflow,max-w-full h-auto,width='800' fixed,Medium
|
||||
71,Responsive,Table Handling,Web,Tables can overflow on mobile,Use horizontal scroll or card layout,Wide tables breaking layout,overflow-x-auto wrapper,Table overflows viewport,Medium
|
||||
72,Typography,Line Height,All,Adequate line height improves readability,Use 1.5-1.75 for body text,Cramped or excessive line height,leading-relaxed (1.625),leading-none (1),Medium
|
||||
73,Typography,Line Length,Web,Long lines are hard to read,Limit to 65-75 characters per line,Full-width text on large screens,max-w-prose,Full viewport width text,Medium
|
||||
74,Typography,Font Size Scale,All,Consistent type hierarchy aids scanning,Use consistent modular scale,Random font sizes,Type scale (12 14 16 18 24 32),Arbitrary sizes,Medium
|
||||
75,Typography,Font Loading,Web,Fonts should load without layout shift,Reserve space with fallback font,Layout shift when fonts load,font-display: swap + similar fallback,No fallback font,Medium
|
||||
76,Typography,Contrast Readability,All,Body text needs good contrast,Use darker text on light backgrounds,Gray text on gray background,text-gray-900 on white,text-gray-400 on gray-100,High
|
||||
77,Typography,Heading Clarity,All,Headings should stand out from body,Clear size/weight difference,Headings similar to body text,Bold + larger size,Same size as body,Medium
|
||||
78,Feedback,Loading Indicators,All,Show system status during waits,Show spinner/skeleton for operations > 300ms,No feedback during loading,Skeleton or spinner,Frozen UI,High
|
||||
79,Feedback,Empty States,All,Guide users when no content exists,Show helpful message and action,Blank empty screens,No items yet. Create one!,Empty white space,Medium
|
||||
80,Feedback,Error Recovery,All,Help users recover from errors,Provide clear next steps,Error without recovery path,Try again button + help link,Error message only,Medium
|
||||
81,Feedback,Progress Indicators,All,Show progress for multi-step processes,Step indicators or progress bar,No indication of progress,Step 2 of 4 indicator,No step information,Medium
|
||||
82,Feedback,Toast Notifications,All,Transient messages for non-critical info,Auto-dismiss after 3-5 seconds,Toasts that never disappear,Auto-dismiss toast,Persistent toast,Medium
|
||||
83,Feedback,Confirmation Messages,All,Confirm successful actions,Brief success message,Silent success,Saved successfully toast,No confirmation,Medium
|
||||
84,Content,Truncation,All,Handle long content gracefully,Truncate with ellipsis and expand option,Overflow or broken layout,line-clamp-2 with expand,Overflow or cut off,Medium
|
||||
85,Content,Date Formatting,All,Use locale-appropriate date formats,Use relative or locale-aware dates,Ambiguous date formats,2 hours ago or locale format,01/02/03,Low
|
||||
86,Content,Number Formatting,All,Format large numbers for readability,Use thousand separators or abbreviations,Long unformatted numbers,"1.2K or 1,234",1234567,Low
|
||||
87,Content,Placeholder Content,All,Show realistic placeholders during dev,Use realistic sample data,Lorem ipsum everywhere,Real sample content,Lorem ipsum,Low
|
||||
88,Onboarding,User Freedom,All,Users should be able to skip tutorials,Provide Skip and Back buttons,Force linear unskippable tour,Skip Tutorial button,Locked overlay until finished,Medium
|
||||
89,Search,Autocomplete,Web,Help users find results faster,Show predictions as user types,Require full type and enter,Debounced fetch + dropdown,No suggestions,Medium
|
||||
90,Search,No Results,Web,Dead ends frustrate users,Show 'No results' with suggestions,Blank screen or '0 results',Try searching for X instead,No results found.,Medium
|
||||
91,Data Entry,Bulk Actions,Web,Editing one by one is tedious,Allow multi-select and bulk edit,Single row actions only,Checkbox column + Action bar,Repeated actions per row,Low
|
||||
92,AI Interaction,Disclaimer,All,Users need to know they talk to AI,Clearly label AI generated content,Present AI as human,AI Assistant label,Fake human name without label,High
|
||||
93,AI Interaction,Streaming,All,Waiting for full text is slow,Stream text response token by token,Show loading spinner for 10s+,Typewriter effect,Spinner until 100% complete,Medium
|
||||
94,Spatial UI,Gaze Hover,VisionOS,Elements should respond to eye tracking before pinch,Scale/highlight element on look,Static element until pinch,hoverEffect(),onTap only,High
|
||||
95,Spatial UI,Depth Layering,VisionOS,UI needs Z-depth to separate content from environment,Use glass material and z-offset,Flat opaque panels blocking view,.glassBackgroundEffect(),bg-white,Medium
|
||||
96,Sustainability,Auto-Play Video,Web,Video consumes massive data and energy,Click-to-play or pause when off-screen,Auto-play high-res video loops,playsInline muted preload='none',autoplay loop,Medium
|
||||
97,Sustainability,Asset Weight,Web,Heavy 3D/Image assets increase carbon footprint,Compress and lazy load 3D models,Load 50MB textures,Draco compression,Raw .obj files,Medium
|
||||
98,AI Interaction,Feedback Loop,All,AI needs user feedback to improve,Thumps up/down or 'Regenerate',Static output only,Feedback component,Read-only text,Low
|
||||
99,Accessibility,Motion Sensitivity,All,Parallax/Scroll-jacking causes nausea,Respect prefers-reduced-motion,Force scroll effects,@media (prefers-reduced-motion),ScrollTrigger.create(),High
|
||||
|
262
personas/_shared/community-skills/ui-ux-pro-max/scripts/core.py
Executable file
262
personas/_shared/community-skills/ui-ux-pro-max/scripts/core.py
Executable file
@@ -0,0 +1,262 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
UI/UX Pro Max Core - BM25 search engine for UI/UX style guides
|
||||
"""
|
||||
|
||||
import csv
|
||||
import re
|
||||
from pathlib import Path
|
||||
from math import log
|
||||
from collections import defaultdict
|
||||
|
||||
# ============ CONFIGURATION ============
|
||||
DATA_DIR = Path(__file__).parent.parent / "data"
|
||||
MAX_RESULTS = 3
|
||||
|
||||
CSV_CONFIG = {
|
||||
"style": {
|
||||
"file": "styles.csv",
|
||||
"search_cols": ["Style Category", "Keywords", "Best For", "Type", "AI Prompt Keywords"],
|
||||
"output_cols": ["Style Category", "Type", "Keywords", "Primary Colors", "Effects & Animation", "Best For", "Light Mode ✓", "Dark Mode ✓", "Performance", "Accessibility", "Framework Compatibility", "Complexity", "AI Prompt Keywords", "CSS/Technical Keywords", "Implementation Checklist", "Design System Variables"]
|
||||
},
|
||||
"color": {
|
||||
"file": "colors.csv",
|
||||
"search_cols": ["Product Type", "Notes"],
|
||||
"output_cols": ["Product Type", "Primary", "On Primary", "Secondary", "On Secondary", "Accent", "On Accent", "Background", "Foreground", "Card", "Card Foreground", "Muted", "Muted Foreground", "Border", "Destructive", "On Destructive", "Ring", "Notes"]
|
||||
},
|
||||
"chart": {
|
||||
"file": "charts.csv",
|
||||
"search_cols": ["Data Type", "Keywords", "Best Chart Type", "When to Use", "When NOT to Use", "Accessibility Notes"],
|
||||
"output_cols": ["Data Type", "Keywords", "Best Chart Type", "Secondary Options", "When to Use", "When NOT to Use", "Data Volume Threshold", "Color Guidance", "Accessibility Grade", "Accessibility Notes", "A11y Fallback", "Library Recommendation", "Interactive Level"]
|
||||
},
|
||||
"landing": {
|
||||
"file": "landing.csv",
|
||||
"search_cols": ["Pattern Name", "Keywords", "Conversion Optimization", "Section Order"],
|
||||
"output_cols": ["Pattern Name", "Keywords", "Section Order", "Primary CTA Placement", "Color Strategy", "Conversion Optimization"]
|
||||
},
|
||||
"product": {
|
||||
"file": "products.csv",
|
||||
"search_cols": ["Product Type", "Keywords", "Primary Style Recommendation", "Key Considerations"],
|
||||
"output_cols": ["Product Type", "Keywords", "Primary Style Recommendation", "Secondary Styles", "Landing Page Pattern", "Dashboard Style (if applicable)", "Color Palette Focus"]
|
||||
},
|
||||
"ux": {
|
||||
"file": "ux-guidelines.csv",
|
||||
"search_cols": ["Category", "Issue", "Description", "Platform"],
|
||||
"output_cols": ["Category", "Issue", "Platform", "Description", "Do", "Don't", "Code Example Good", "Code Example Bad", "Severity"]
|
||||
},
|
||||
"typography": {
|
||||
"file": "typography.csv",
|
||||
"search_cols": ["Font Pairing Name", "Category", "Mood/Style Keywords", "Best For", "Heading Font", "Body Font"],
|
||||
"output_cols": ["Font Pairing Name", "Category", "Heading Font", "Body Font", "Mood/Style Keywords", "Best For", "Google Fonts URL", "CSS Import", "Tailwind Config", "Notes"]
|
||||
},
|
||||
"icons": {
|
||||
"file": "icons.csv",
|
||||
"search_cols": ["Category", "Icon Name", "Keywords", "Best For"],
|
||||
"output_cols": ["Category", "Icon Name", "Keywords", "Library", "Import Code", "Usage", "Best For", "Style"]
|
||||
},
|
||||
"react": {
|
||||
"file": "react-performance.csv",
|
||||
"search_cols": ["Category", "Issue", "Keywords", "Description"],
|
||||
"output_cols": ["Category", "Issue", "Platform", "Description", "Do", "Don't", "Code Example Good", "Code Example Bad", "Severity"]
|
||||
},
|
||||
"web": {
|
||||
"file": "app-interface.csv",
|
||||
"search_cols": ["Category", "Issue", "Keywords", "Description"],
|
||||
"output_cols": ["Category", "Issue", "Platform", "Description", "Do", "Don't", "Code Example Good", "Code Example Bad", "Severity"]
|
||||
},
|
||||
"google-fonts": {
|
||||
"file": "google-fonts.csv",
|
||||
"search_cols": ["Family", "Category", "Stroke", "Classifications", "Keywords", "Subsets", "Designers"],
|
||||
"output_cols": ["Family", "Category", "Stroke", "Classifications", "Styles", "Variable Axes", "Subsets", "Designers", "Popularity Rank", "Google Fonts URL"]
|
||||
}
|
||||
}
|
||||
|
||||
STACK_CONFIG = {
|
||||
"react": {"file": "stacks/react.csv"},
|
||||
"nextjs": {"file": "stacks/nextjs.csv"},
|
||||
"vue": {"file": "stacks/vue.csv"},
|
||||
"svelte": {"file": "stacks/svelte.csv"},
|
||||
"astro": {"file": "stacks/astro.csv"},
|
||||
"swiftui": {"file": "stacks/swiftui.csv"},
|
||||
"react-native": {"file": "stacks/react-native.csv"},
|
||||
"flutter": {"file": "stacks/flutter.csv"},
|
||||
"nuxtjs": {"file": "stacks/nuxtjs.csv"},
|
||||
"nuxt-ui": {"file": "stacks/nuxt-ui.csv"},
|
||||
"html-tailwind": {"file": "stacks/html-tailwind.csv"},
|
||||
"shadcn": {"file": "stacks/shadcn.csv"},
|
||||
"jetpack-compose": {"file": "stacks/jetpack-compose.csv"},
|
||||
"threejs": {"file": "stacks/threejs.csv"},
|
||||
"angular": {"file": "stacks/angular.csv"},
|
||||
"laravel": {"file": "stacks/laravel.csv"},
|
||||
}
|
||||
|
||||
# Common columns for all stacks
|
||||
_STACK_COLS = {
|
||||
"search_cols": ["Category", "Guideline", "Description", "Do", "Don't"],
|
||||
"output_cols": ["Category", "Guideline", "Description", "Do", "Don't", "Code Good", "Code Bad", "Severity", "Docs URL"]
|
||||
}
|
||||
|
||||
AVAILABLE_STACKS = list(STACK_CONFIG.keys())
|
||||
|
||||
|
||||
# ============ BM25 IMPLEMENTATION ============
|
||||
class BM25:
|
||||
"""BM25 ranking algorithm for text search"""
|
||||
|
||||
def __init__(self, k1=1.5, b=0.75):
|
||||
self.k1 = k1
|
||||
self.b = b
|
||||
self.corpus = []
|
||||
self.doc_lengths = []
|
||||
self.avgdl = 0
|
||||
self.idf = {}
|
||||
self.doc_freqs = defaultdict(int)
|
||||
self.N = 0
|
||||
|
||||
def tokenize(self, text):
|
||||
"""Lowercase, split, remove punctuation, filter short words"""
|
||||
text = re.sub(r'[^\w\s]', ' ', str(text).lower())
|
||||
return [w for w in text.split() if len(w) > 2]
|
||||
|
||||
def fit(self, documents):
|
||||
"""Build BM25 index from documents"""
|
||||
self.corpus = [self.tokenize(doc) for doc in documents]
|
||||
self.N = len(self.corpus)
|
||||
if self.N == 0:
|
||||
return
|
||||
self.doc_lengths = [len(doc) for doc in self.corpus]
|
||||
self.avgdl = sum(self.doc_lengths) / self.N
|
||||
|
||||
for doc in self.corpus:
|
||||
seen = set()
|
||||
for word in doc:
|
||||
if word not in seen:
|
||||
self.doc_freqs[word] += 1
|
||||
seen.add(word)
|
||||
|
||||
for word, freq in self.doc_freqs.items():
|
||||
self.idf[word] = log((self.N - freq + 0.5) / (freq + 0.5) + 1)
|
||||
|
||||
def score(self, query):
|
||||
"""Score all documents against query"""
|
||||
query_tokens = self.tokenize(query)
|
||||
scores = []
|
||||
|
||||
for idx, doc in enumerate(self.corpus):
|
||||
score = 0
|
||||
doc_len = self.doc_lengths[idx]
|
||||
term_freqs = defaultdict(int)
|
||||
for word in doc:
|
||||
term_freqs[word] += 1
|
||||
|
||||
for token in query_tokens:
|
||||
if token in self.idf:
|
||||
tf = term_freqs[token]
|
||||
idf = self.idf[token]
|
||||
numerator = tf * (self.k1 + 1)
|
||||
denominator = tf + self.k1 * (1 - self.b + self.b * doc_len / self.avgdl)
|
||||
score += idf * numerator / denominator
|
||||
|
||||
scores.append((idx, score))
|
||||
|
||||
return sorted(scores, key=lambda x: x[1], reverse=True)
|
||||
|
||||
|
||||
# ============ SEARCH FUNCTIONS ============
|
||||
def _load_csv(filepath):
|
||||
"""Load CSV and return list of dicts"""
|
||||
with open(filepath, 'r', encoding='utf-8') as f:
|
||||
return list(csv.DictReader(f))
|
||||
|
||||
|
||||
def _search_csv(filepath, search_cols, output_cols, query, max_results):
|
||||
"""Core search function using BM25"""
|
||||
if not filepath.exists():
|
||||
return []
|
||||
|
||||
data = _load_csv(filepath)
|
||||
|
||||
# Build documents from search columns
|
||||
documents = [" ".join(str(row.get(col, "")) for col in search_cols) for row in data]
|
||||
|
||||
# BM25 search
|
||||
bm25 = BM25()
|
||||
bm25.fit(documents)
|
||||
ranked = bm25.score(query)
|
||||
|
||||
# Get top results with score > 0
|
||||
results = []
|
||||
for idx, score in ranked[:max_results]:
|
||||
if score > 0:
|
||||
row = data[idx]
|
||||
results.append({col: row.get(col, "") for col in output_cols if col in row})
|
||||
|
||||
return results
|
||||
|
||||
|
||||
def detect_domain(query):
|
||||
"""Auto-detect the most relevant domain from query"""
|
||||
query_lower = query.lower()
|
||||
|
||||
domain_keywords = {
|
||||
"color": ["color", "palette", "hex", "#", "rgb", "token", "semantic", "accent", "destructive", "muted", "foreground"],
|
||||
"chart": ["chart", "graph", "visualization", "trend", "bar", "pie", "scatter", "heatmap", "funnel"],
|
||||
"landing": ["landing", "page", "cta", "conversion", "hero", "testimonial", "pricing", "section"],
|
||||
"product": ["saas", "ecommerce", "e-commerce", "fintech", "healthcare", "gaming", "portfolio", "crypto", "dashboard", "fitness", "restaurant", "hotel", "travel", "music", "education", "learning", "legal", "insurance", "medical", "beauty", "pharmacy", "dental", "pet", "dating", "wedding", "recipe", "delivery", "ride", "booking", "calendar", "timer", "tracker", "diary", "note", "chat", "messenger", "crm", "invoice", "parking", "transit", "vpn", "alarm", "weather", "sleep", "meditation", "fasting", "habit", "grocery", "meme", "wardrobe", "plant care", "reading", "flashcard", "puzzle", "trivia", "arcade", "photography", "streaming", "podcast", "newsletter", "marketplace", "freelancer", "coworking", "airline", "museum", "theater", "church", "non-profit", "charity", "kindergarten", "daycare", "senior care", "veterinary", "florist", "bakery", "brewery", "construction", "automotive", "real estate", "logistics", "agriculture", "coding bootcamp"],
|
||||
"style": ["style", "design", "ui", "minimalism", "glassmorphism", "neumorphism", "brutalism", "dark mode", "flat", "aurora", "prompt", "css", "implementation", "variable", "checklist", "tailwind"],
|
||||
"ux": ["ux", "usability", "accessibility", "wcag", "touch", "scroll", "animation", "keyboard", "navigation", "mobile"],
|
||||
"typography": ["font pairing", "typography pairing", "heading font", "body font"],
|
||||
"google-fonts": ["google font", "font family", "font weight", "font style", "variable font", "noto", "font for", "find font", "font subset", "font language", "monospace font", "serif font", "sans serif font", "display font", "handwriting font", "font", "typography", "serif", "sans"],
|
||||
"icons": ["icon", "icons", "lucide", "heroicons", "symbol", "glyph", "pictogram", "svg icon"],
|
||||
"react": ["react", "next.js", "nextjs", "suspense", "memo", "usecallback", "useeffect", "rerender", "bundle", "waterfall", "barrel", "dynamic import", "rsc", "server component"],
|
||||
"web": ["aria", "focus", "outline", "semantic", "virtualize", "autocomplete", "form", "input type", "preconnect"]
|
||||
}
|
||||
|
||||
scores = {domain: sum(1 for kw in keywords if re.search(r'\b' + re.escape(kw) + r'\b', query_lower)) for domain, keywords in domain_keywords.items()}
|
||||
best = max(scores, key=scores.get)
|
||||
return best if scores[best] > 0 else "style"
|
||||
|
||||
|
||||
def search(query, domain=None, max_results=MAX_RESULTS):
|
||||
"""Main search function with auto-domain detection"""
|
||||
if domain is None:
|
||||
domain = detect_domain(query)
|
||||
|
||||
config = CSV_CONFIG.get(domain, CSV_CONFIG["style"])
|
||||
filepath = DATA_DIR / config["file"]
|
||||
|
||||
if not filepath.exists():
|
||||
return {"error": f"File not found: {filepath}", "domain": domain}
|
||||
|
||||
results = _search_csv(filepath, config["search_cols"], config["output_cols"], query, max_results)
|
||||
|
||||
return {
|
||||
"domain": domain,
|
||||
"query": query,
|
||||
"file": config["file"],
|
||||
"count": len(results),
|
||||
"results": results
|
||||
}
|
||||
|
||||
|
||||
def search_stack(query, stack, max_results=MAX_RESULTS):
|
||||
"""Search stack-specific guidelines"""
|
||||
if stack not in STACK_CONFIG:
|
||||
return {"error": f"Unknown stack: {stack}. Available: {', '.join(AVAILABLE_STACKS)}"}
|
||||
|
||||
filepath = DATA_DIR / STACK_CONFIG[stack]["file"]
|
||||
|
||||
if not filepath.exists():
|
||||
return {"error": f"Stack file not found: {filepath}", "stack": stack}
|
||||
|
||||
results = _search_csv(filepath, _STACK_COLS["search_cols"], _STACK_COLS["output_cols"], query, max_results)
|
||||
|
||||
return {
|
||||
"domain": "stack",
|
||||
"stack": stack,
|
||||
"query": query,
|
||||
"file": STACK_CONFIG[stack]["file"],
|
||||
"count": len(results),
|
||||
"results": results
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,114 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
UI/UX Pro Max Search - BM25 search engine for UI/UX style guides
|
||||
Usage: python search.py "<query>" [--domain <domain>] [--stack <stack>] [--max-results 3]
|
||||
python search.py "<query>" --design-system [-p "Project Name"]
|
||||
python search.py "<query>" --design-system --persist [-p "Project Name"] [--page "dashboard"]
|
||||
|
||||
Domains: style, prompt, color, chart, landing, product, ux, typography, google-fonts
|
||||
Stacks: react, nextjs, vue, svelte, astro, swiftui, react-native, flutter, nuxtjs, nuxt-ui, html-tailwind, shadcn, jetpack-compose, threejs
|
||||
|
||||
Persistence (Master + Overrides pattern):
|
||||
--persist Save design system to design-system/MASTER.md
|
||||
--page Also create a page-specific override file in design-system/pages/
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
import io
|
||||
from core import CSV_CONFIG, AVAILABLE_STACKS, MAX_RESULTS, search, search_stack
|
||||
from design_system import generate_design_system, persist_design_system
|
||||
|
||||
# Force UTF-8 for stdout/stderr to handle emojis on Windows (cp1252 default)
|
||||
if sys.stdout.encoding and sys.stdout.encoding.lower() != 'utf-8':
|
||||
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
||||
if sys.stderr.encoding and sys.stderr.encoding.lower() != 'utf-8':
|
||||
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8')
|
||||
|
||||
|
||||
def format_output(result):
|
||||
"""Format results for Claude consumption (token-optimized)"""
|
||||
if "error" in result:
|
||||
return f"Error: {result['error']}"
|
||||
|
||||
output = []
|
||||
if result.get("stack"):
|
||||
output.append(f"## UI Pro Max Stack Guidelines")
|
||||
output.append(f"**Stack:** {result['stack']} | **Query:** {result['query']}")
|
||||
else:
|
||||
output.append(f"## UI Pro Max Search Results")
|
||||
output.append(f"**Domain:** {result['domain']} | **Query:** {result['query']}")
|
||||
output.append(f"**Source:** {result['file']} | **Found:** {result['count']} results\n")
|
||||
|
||||
for i, row in enumerate(result['results'], 1):
|
||||
output.append(f"### Result {i}")
|
||||
for key, value in row.items():
|
||||
value_str = str(value)
|
||||
if len(value_str) > 300:
|
||||
value_str = value_str[:300] + "..."
|
||||
output.append(f"- **{key}:** {value_str}")
|
||||
output.append("")
|
||||
|
||||
return "\n".join(output)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description="UI Pro Max Search")
|
||||
parser.add_argument("query", help="Search query")
|
||||
parser.add_argument("--domain", "-d", choices=list(CSV_CONFIG.keys()), help="Search domain")
|
||||
parser.add_argument("--stack", "-s", choices=AVAILABLE_STACKS, help=f"Stack-specific search. Available: {', '.join(AVAILABLE_STACKS)}")
|
||||
parser.add_argument("--max-results", "-n", type=int, default=MAX_RESULTS, help="Max results (default: 3)")
|
||||
parser.add_argument("--json", action="store_true", help="Output as JSON")
|
||||
# Design system generation
|
||||
parser.add_argument("--design-system", "-ds", action="store_true", help="Generate complete design system recommendation")
|
||||
parser.add_argument("--project-name", "-p", type=str, default=None, help="Project name for design system output")
|
||||
parser.add_argument("--format", "-f", choices=["ascii", "markdown"], default="ascii", help="Output format for design system")
|
||||
# Persistence (Master + Overrides pattern)
|
||||
parser.add_argument("--persist", action="store_true", help="Save design system to design-system/MASTER.md (creates hierarchical structure)")
|
||||
parser.add_argument("--page", type=str, default=None, help="Create page-specific override file in design-system/pages/")
|
||||
parser.add_argument("--output-dir", "-o", type=str, default=None, help="Output directory for persisted files (default: current directory)")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
# Design system takes priority
|
||||
if args.design_system:
|
||||
result = generate_design_system(
|
||||
args.query,
|
||||
args.project_name,
|
||||
args.format,
|
||||
persist=args.persist,
|
||||
page=args.page,
|
||||
output_dir=args.output_dir
|
||||
)
|
||||
print(result)
|
||||
|
||||
# Print persistence confirmation
|
||||
if args.persist:
|
||||
project_slug = args.project_name.lower().replace(' ', '-') if args.project_name else "default"
|
||||
print("\n" + "=" * 60)
|
||||
print(f"✅ Design system persisted to design-system/{project_slug}/")
|
||||
print(f" 📄 design-system/{project_slug}/MASTER.md (Global Source of Truth)")
|
||||
if args.page:
|
||||
page_filename = args.page.lower().replace(' ', '-')
|
||||
print(f" 📄 design-system/{project_slug}/pages/{page_filename}.md (Page Overrides)")
|
||||
print("")
|
||||
print(f"📖 Usage: When building a page, check design-system/{project_slug}/pages/[page].md first.")
|
||||
print(f" If exists, its rules override MASTER.md. Otherwise, use MASTER.md.")
|
||||
print("=" * 60)
|
||||
# Stack search
|
||||
elif args.stack:
|
||||
result = search_stack(args.query, args.stack, args.max_results)
|
||||
if args.json:
|
||||
import json
|
||||
print(json.dumps(result, indent=2, ensure_ascii=False))
|
||||
else:
|
||||
print(format_output(result))
|
||||
# Domain search
|
||||
else:
|
||||
result = search(args.query, args.domain, args.max_results)
|
||||
if args.json:
|
||||
import json
|
||||
print(json.dumps(result, indent=2, ensure_ascii=False))
|
||||
else:
|
||||
print(format_output(result))
|
||||
@@ -0,0 +1,148 @@
|
||||
---
|
||||
name: vercel-react-best-practices
|
||||
description: React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
|
||||
license: MIT
|
||||
metadata:
|
||||
author: vercel
|
||||
version: "1.0.0"
|
||||
---
|
||||
|
||||
# Vercel React Best Practices
|
||||
|
||||
Comprehensive performance optimization guide for React and Next.js applications, maintained by Vercel. Contains 69 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.
|
||||
|
||||
## When to Apply
|
||||
|
||||
Reference these guidelines when:
|
||||
- Writing new React components or Next.js pages
|
||||
- Implementing data fetching (client or server-side)
|
||||
- Reviewing code for performance issues
|
||||
- Refactoring existing React/Next.js code
|
||||
- Optimizing bundle size or load times
|
||||
|
||||
## Rule Categories by Priority
|
||||
|
||||
| Priority | Category | Impact | Prefix |
|
||||
|----------|----------|--------|--------|
|
||||
| 1 | Eliminating Waterfalls | CRITICAL | `async-` |
|
||||
| 2 | Bundle Size Optimization | CRITICAL | `bundle-` |
|
||||
| 3 | Server-Side Performance | HIGH | `server-` |
|
||||
| 4 | Client-Side Data Fetching | MEDIUM-HIGH | `client-` |
|
||||
| 5 | Re-render Optimization | MEDIUM | `rerender-` |
|
||||
| 6 | Rendering Performance | MEDIUM | `rendering-` |
|
||||
| 7 | JavaScript Performance | LOW-MEDIUM | `js-` |
|
||||
| 8 | Advanced Patterns | LOW | `advanced-` |
|
||||
|
||||
## Quick Reference
|
||||
|
||||
### 1. Eliminating Waterfalls (CRITICAL)
|
||||
|
||||
- `async-cheap-condition-before-await` - Check cheap sync conditions before awaiting flags or remote values
|
||||
- `async-defer-await` - Move await into branches where actually used
|
||||
- `async-parallel` - Use Promise.all() for independent operations
|
||||
- `async-dependencies` - Use better-all for partial dependencies
|
||||
- `async-api-routes` - Start promises early, await late in API routes
|
||||
- `async-suspense-boundaries` - Use Suspense to stream content
|
||||
|
||||
### 2. Bundle Size Optimization (CRITICAL)
|
||||
|
||||
- `bundle-barrel-imports` - Import directly, avoid barrel files
|
||||
- `bundle-dynamic-imports` - Use next/dynamic for heavy components
|
||||
- `bundle-defer-third-party` - Load analytics/logging after hydration
|
||||
- `bundle-conditional` - Load modules only when feature is activated
|
||||
- `bundle-preload` - Preload on hover/focus for perceived speed
|
||||
|
||||
### 3. Server-Side Performance (HIGH)
|
||||
|
||||
- `server-auth-actions` - Authenticate server actions like API routes
|
||||
- `server-cache-react` - Use React.cache() for per-request deduplication
|
||||
- `server-cache-lru` - Use LRU cache for cross-request caching
|
||||
- `server-dedup-props` - Avoid duplicate serialization in RSC props
|
||||
- `server-hoist-static-io` - Hoist static I/O (fonts, logos) to module level
|
||||
- `server-no-shared-module-state` - Avoid module-level mutable request state in RSC/SSR
|
||||
- `server-serialization` - Minimize data passed to client components
|
||||
- `server-parallel-fetching` - Restructure components to parallelize fetches
|
||||
- `server-parallel-nested-fetching` - Chain nested fetches per item in Promise.all
|
||||
- `server-after-nonblocking` - Use after() for non-blocking operations
|
||||
|
||||
### 4. Client-Side Data Fetching (MEDIUM-HIGH)
|
||||
|
||||
- `client-swr-dedup` - Use SWR for automatic request deduplication
|
||||
- `client-event-listeners` - Deduplicate global event listeners
|
||||
- `client-passive-event-listeners` - Use passive listeners for scroll
|
||||
- `client-localstorage-schema` - Version and minimize localStorage data
|
||||
|
||||
### 5. Re-render Optimization (MEDIUM)
|
||||
|
||||
- `rerender-defer-reads` - Don't subscribe to state only used in callbacks
|
||||
- `rerender-memo` - Extract expensive work into memoized components
|
||||
- `rerender-memo-with-default-value` - Hoist default non-primitive props
|
||||
- `rerender-dependencies` - Use primitive dependencies in effects
|
||||
- `rerender-derived-state` - Subscribe to derived booleans, not raw values
|
||||
- `rerender-derived-state-no-effect` - Derive state during render, not effects
|
||||
- `rerender-functional-setstate` - Use functional setState for stable callbacks
|
||||
- `rerender-lazy-state-init` - Pass function to useState for expensive values
|
||||
- `rerender-simple-expression-in-memo` - Avoid memo for simple primitives
|
||||
- `rerender-split-combined-hooks` - Split hooks with independent dependencies
|
||||
- `rerender-move-effect-to-event` - Put interaction logic in event handlers
|
||||
- `rerender-transitions` - Use startTransition for non-urgent updates
|
||||
- `rerender-use-deferred-value` - Defer expensive renders to keep input responsive
|
||||
- `rerender-use-ref-transient-values` - Use refs for transient frequent values
|
||||
- `rerender-no-inline-components` - Don't define components inside components
|
||||
|
||||
### 6. Rendering Performance (MEDIUM)
|
||||
|
||||
- `rendering-animate-svg-wrapper` - Animate div wrapper, not SVG element
|
||||
- `rendering-content-visibility` - Use content-visibility for long lists
|
||||
- `rendering-hoist-jsx` - Extract static JSX outside components
|
||||
- `rendering-svg-precision` - Reduce SVG coordinate precision
|
||||
- `rendering-hydration-no-flicker` - Use inline script for client-only data
|
||||
- `rendering-hydration-suppress-warning` - Suppress expected mismatches
|
||||
- `rendering-activity` - Use Activity component for show/hide
|
||||
- `rendering-conditional-render` - Use ternary, not && for conditionals
|
||||
- `rendering-usetransition-loading` - Prefer useTransition for loading state
|
||||
- `rendering-resource-hints` - Use React DOM resource hints for preloading
|
||||
- `rendering-script-defer-async` - Use defer or async on script tags
|
||||
|
||||
### 7. JavaScript Performance (LOW-MEDIUM)
|
||||
|
||||
- `js-batch-dom-css` - Group CSS changes via classes or cssText
|
||||
- `js-index-maps` - Build Map for repeated lookups
|
||||
- `js-cache-property-access` - Cache object properties in loops
|
||||
- `js-cache-function-results` - Cache function results in module-level Map
|
||||
- `js-cache-storage` - Cache localStorage/sessionStorage reads
|
||||
- `js-combine-iterations` - Combine multiple filter/map into one loop
|
||||
- `js-length-check-first` - Check array length before expensive comparison
|
||||
- `js-early-exit` - Return early from functions
|
||||
- `js-hoist-regexp` - Hoist RegExp creation outside loops
|
||||
- `js-min-max-loop` - Use loop for min/max instead of sort
|
||||
- `js-set-map-lookups` - Use Set/Map for O(1) lookups
|
||||
- `js-tosorted-immutable` - Use toSorted() for immutability
|
||||
- `js-flatmap-filter` - Use flatMap to map and filter in one pass
|
||||
- `js-request-idle-callback` - Defer non-critical work to browser idle time
|
||||
|
||||
### 8. Advanced Patterns (LOW)
|
||||
|
||||
- `advanced-effect-event-deps` - Don't put `useEffectEvent` results in effect deps
|
||||
- `advanced-event-handler-refs` - Store event handlers in refs
|
||||
- `advanced-init-once` - Initialize app once per app load
|
||||
- `advanced-use-latest` - useLatest for stable callback refs
|
||||
|
||||
## How to Use
|
||||
|
||||
Read individual rule files for detailed explanations and code examples:
|
||||
|
||||
```
|
||||
rules/async-parallel.md
|
||||
rules/bundle-barrel-imports.md
|
||||
```
|
||||
|
||||
Each rule file contains:
|
||||
- Brief explanation of why it matters
|
||||
- Incorrect code example with explanation
|
||||
- Correct code example with explanation
|
||||
- Additional context and references
|
||||
|
||||
## Full Compiled Document
|
||||
|
||||
For the complete guide with all rules expanded: `AGENTS.md`
|
||||
169
personas/_shared/community-skills/waha-whatsapp/SKILL.md
Normal file
169
personas/_shared/community-skills/waha-whatsapp/SKILL.md
Normal file
@@ -0,0 +1,169 @@
|
||||
---
|
||||
name: waha-whatsapp
|
||||
description: Query WhatsApp via self-hosted WAHA (WhatsApp HTTP API) server at <WAHA_HOST>:3000. Use when user wants to extract messages from WhatsApp groups/contacts, download media (PDFs/images/docs) from chats, archive group transcripts into Obsidian, search chat history, or run BAM/Orta Doğu/Afrika WhatsApp syncs. Triggers on "WhatsApp", "grup mesajları", "gruba atılan PDF", "WAHA", "mesajları çek", "sohbet arşivle", chat IDs (`*@g.us` or `*@c.us`).
|
||||
---
|
||||
|
||||
# WAHA WhatsApp Skill
|
||||
|
||||
Self-hosted WAHA server üzerinden WhatsApp gruplarını/kişilerini okumak, medya indirmek ve içerikleri Obsidian vault'a organize etmek için kullanılır.
|
||||
|
||||
## Bağlantı
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| **Endpoint** | `http://<WAHA_HOST>:3000` |
|
||||
| **API key** | `<WAHA_API_KEY>` (header: `X-Api-Key`) |
|
||||
| **Session** | `default` |
|
||||
| **Engine** | WEBJS (WAHA v2026.4.2) |
|
||||
| **Account** | +90 543 722 38 88 — Ali Gündoğar |
|
||||
| **Swagger** | https://waha.devlike.pro/swagger/ |
|
||||
|
||||
## Ne Zaman Kullanılır
|
||||
|
||||
- "X grubundan mesajları / PDF'leri çek" → bu skill
|
||||
- "WAHA ile …" / "WhatsApp API" → bu skill
|
||||
- Obsidian'a WhatsApp içeriği eşitle → bu skill
|
||||
- Yeni BAM grubu senkronu → bu skill (BAM envanteri `references/bam_groups.md`)
|
||||
|
||||
## Temel Akış
|
||||
|
||||
```
|
||||
1. Session sağlıklı mı? → GET /api/sessions
|
||||
2. Grubu bul → GET /api/default/chats (ad ile filtrele)
|
||||
3. Mesajları çek → GET /api/default/chats/{chatId}/messages?limit=1000&downloadMedia=true
|
||||
4. Medyayı indir → media.url (localhost→host rewrite!)
|
||||
5. Transkript yaz → 6-Geopolitics/BAM/WhatsApp/<slug>.md (YAML frontmatter + linkler)
|
||||
6. Görev/okuma listesi → ilgili Tasks/BAM.md veya ders dosyasına 📎 linklerle ekle
|
||||
```
|
||||
|
||||
## ⚠️ Kritik Detaylar
|
||||
|
||||
1. **Media URL rewrite:** WAHA `http://localhost:3000/...` URL'i döner. Uzaktan erişimde host'u `<WAHA_HOST>:3000` yap:
|
||||
```python
|
||||
url = media["url"].replace("http://localhost:3000", API)
|
||||
```
|
||||
İndirme request'i de aynı `X-Api-Key` header'ını taşımalı.
|
||||
|
||||
2. **Duplicate media:** Aynı mesaj API'de farklı delivery-state ile birden çok döner. Dosya adı → `<YYYYMMDD-HHMM>_<safe-name>.<ext>` ve `os.path.exists()` kontrolüyle duplike yazımı engelle.
|
||||
|
||||
3. **History cache:** WEBJS engine son ~100-1000 mesajı cache'ler. Daha eskisi için `limit=2000` dene, olmazsa webhook + storage config gerekir.
|
||||
|
||||
4. **Özel karakterler:** Türkçe karakterler filename'de korunur; ancak `:`, `/`, `"` temizlenmeli. Kullanılan sanitize regex:
|
||||
```python
|
||||
re.sub(r'[^\w\-. ()çğıöşüÇĞİÖŞÜ]', '_', s)
|
||||
```
|
||||
|
||||
5. **Chat ID formatları:**
|
||||
- Grup: `120363xxxxxxxxxxxx@g.us`
|
||||
- Birey: `905xxxxxxxxx@c.us`
|
||||
- LinkedIn-style ID: `<digits>@lid` (yeni WhatsApp privacy)
|
||||
|
||||
## Hızlı Komutlar (tek satır)
|
||||
|
||||
```bash
|
||||
# Oturum durumu
|
||||
curl -s -H "X-Api-Key: <WAHA_API_KEY>" http://<WAHA_HOST>:3000/api/sessions
|
||||
|
||||
# Tüm sohbetler (ad filtreli)
|
||||
curl -s -H "X-Api-Key: <WAHA_API_KEY>" "http://<WAHA_HOST>:3000/api/default/chats?limit=500" | \
|
||||
python3 -c "import json,sys; d=json.load(sys.stdin); [print(c.get('id',{}).get('_serialized',''),'|',c.get('name','')) for c in d if 'ANAHTAR' in (c.get('name','') or '').lower()]"
|
||||
|
||||
# Tek grup son 3 mesaj
|
||||
curl -s -H "X-Api-Key: <WAHA_API_KEY>" \
|
||||
"http://<WAHA_HOST>:3000/api/default/chats/120363xxx@g.us/messages?limit=3&downloadMedia=false"
|
||||
```
|
||||
|
||||
## Hazır Scriptler
|
||||
|
||||
### `scripts/waha_fetch_group.py`
|
||||
Tek grubu çek, medyayı indir, Obsidian transkriptini yaz.
|
||||
|
||||
```bash
|
||||
python3 ~/.claude/skills/waha-whatsapp/scripts/waha_fetch_group.py \
|
||||
--chat-id "120363422940477656@g.us" \
|
||||
--name "BAM Afrika Çalışmalarına Giriş II" \
|
||||
--slug "Afrika-II" \
|
||||
--parent-dir "<VAULT>/6-Geopolitics/BAM"
|
||||
```
|
||||
|
||||
Çıktılar:
|
||||
- `<parent-dir>/WhatsApp/<slug>.md` — transkript (YAML + timeline)
|
||||
- `<parent-dir>/assets/WhatsApp/<slug>/<YYYYMMDD-HHMM>_<name>.<ext>` — medya
|
||||
|
||||
### `scripts/waha_list_groups.py`
|
||||
Anahtar kelimeye göre grupları listele (id + ad).
|
||||
|
||||
```bash
|
||||
python3 ~/.claude/skills/waha-whatsapp/scripts/waha_list_groups.py bam
|
||||
python3 ~/.claude/skills/waha-whatsapp/scripts/waha_list_groups.py "orta doğu"
|
||||
```
|
||||
|
||||
### `scripts/waha_bulk_fetch.py`
|
||||
Birden çok grup için tek seferde fetch+transcript+index yaz. Grup listesi bir JSON dosyasından okunur — şablon için `references/bam_groups.md`.
|
||||
|
||||
## Transkript Konvansiyonu (Obsidian)
|
||||
|
||||
```markdown
|
||||
---
|
||||
up:: [[BAM WhatsApp Index]]
|
||||
tag:: [[6.1-Geopolitical Analysis]]
|
||||
group:: <Grup Adı>
|
||||
chat_id:: <id@g.us>
|
||||
synced:: YYYY-MM-DD
|
||||
---
|
||||
|
||||
# <Grup Adı> — WhatsApp Transkripti
|
||||
|
||||
**Grup ID:** `<id>`
|
||||
**Mesaj sayısı:** N
|
||||
**Dönem:** YYYY-MM-DD → YYYY-MM-DD
|
||||
|
||||
**YYYY-MM-DD HH:MM** — `<sender>`
|
||||
> metin mesajı
|
||||
|
||||
### YYYY-MM-DD HH:MM — document
|
||||
![[6-Geopolitics/.../assets/WhatsApp/<slug>/<filename>.pdf]]
|
||||
|
||||
> caption
|
||||
```
|
||||
|
||||
- `up::` her zaman ana index notuna link ver (`BAM WhatsApp Index` varsa onu).
|
||||
- Görseller/PDF'ler için `![[...]]` embed; diğer dosya tipleri için `[[... | display]]` wikilink.
|
||||
- CLAUDE.md'nin up/tag kurallarına uy; 99-Tags hub adları bozma.
|
||||
|
||||
## Görev Yazma Kuralı
|
||||
|
||||
Mesajdan çıkarılan ödevler/okumalar → `Tasks/BAM.md` veya ilgili ders dosyasına:
|
||||
|
||||
```
|
||||
- [ ] <özet> 📅 YYYY-MM-DD #bam [#<alt-tag>]
|
||||
📎 Vault: [[6-Geopolitics/.../assets/WhatsApp/<slug>/<dosya>.pdf]]
|
||||
📎 Books: `/mnt/storage/Common/Books/.../<kitap>.pdf`
|
||||
```
|
||||
|
||||
- `📅` = due date (Obsidian Tasks plugin + gcal-sync uyumlu)
|
||||
- Tag mutlaka mapped list'in tag'i olmalı (örn. BAM için `#bam`), yoksa Google Tasks'e sync hatalı gider.
|
||||
|
||||
## Bilinen Gruplar
|
||||
|
||||
Güncel envanter: [`references/bam_groups.md`](references/bam_groups.md).
|
||||
|
||||
13 BAM grubu + Orta Doğu Çalışmaları (Politik İktisat) şu an takip ediliyor. Yeni grup eklendiğinde `references/bam_groups.md`'yi güncelle.
|
||||
|
||||
## Yaygın Tuzaklar
|
||||
|
||||
| Hata | Sebep | Çözüm |
|
||||
|------|-------|-------|
|
||||
| 401 Unauthorized | `X-Api-Key` yanlış/yok | Header ekle |
|
||||
| Boş `/api-json` | Swagger dosyası deploy edilmemiş | Online swagger kullan |
|
||||
| `localhost:3000` erişilemiyor | URL rewrite unutuldu | `API` constant ile değiştir |
|
||||
| Mesaj timestamp `None` | `latestEditMsgKey` / sistem mesajı | `if ts: fmt_ts(ts)` kontrolü |
|
||||
| Aynı PDF tekrar iniyor | `hasMedia=true` fakat body farklı | Dosya adı + `os.path.exists` check |
|
||||
| Drive linki 403 | Hoca "Viewer only" verdi | Önce izin iste, sonra indir |
|
||||
|
||||
## Referanslar
|
||||
|
||||
- [`references/bam_groups.md`](references/bam_groups.md) — güncel grup listesi (id + slug + parent-dir)
|
||||
- [`references/waha_endpoints.md`](references/waha_endpoints.md) — kullanılan/yararlı endpoint'ler ve payloadlar
|
||||
- Vault memory: `~/.claude/projects/-home-salva-Obsidian/memory/reference_waha_api.md`
|
||||
- WAHA resmi: https://waha.devlike.pro/docs/overview/quick-start/
|
||||
@@ -0,0 +1,48 @@
|
||||
# BAM & İlgili Grupların Envanteri
|
||||
|
||||
Son güncel: 2026-04-19 · WAHA cache snapshot.
|
||||
|
||||
Tüm grupların `@g.us` ID'leri + Obsidian slug + hangi klasöre transkript yazılacağı.
|
||||
|
||||
## Akademik / Kurumsal (13 BAM grubu)
|
||||
|
||||
| Slug | Grup Adı | chat_id | Parent Dir | Tipi |
|
||||
|---|---|---|---|---|
|
||||
| Afrika-II | BAM Afrika Çalışmalarına Giriş II | `120363422940477656@g.us` | `6-Geopolitics/BAM` | Akademik |
|
||||
| Svahili-I | BAM Svahili-I 2025 | `120363402693559339@g.us` | `6-Geopolitics/BAM` | Dil dersi |
|
||||
| Afrika-Grup | BAM AFRİKA Grup | `120363422424634563@g.us` | `6-Geopolitics/BAM` | Operasyonel |
|
||||
| Ogrenci | BAM Öğrenci Grubu | `120363404478392928@g.us` | `6-Geopolitics/BAM` | Duyuru |
|
||||
| Ana-Grup-1 | Bölge Araştırmaları Merkezi (BAM) | `120363347208018359@g.us` | `6-Geopolitics/BAM` | Kurumsal |
|
||||
| Ana-Grup-2 | Bölge Araştırmaları Merkezi (BAM) 2 | `120363345183450811@g.us` | `6-Geopolitics/BAM` | Kurumsal |
|
||||
| Kutuphane | BAM KÜTÜPHANE | `120363407285040920@g.us` | `6-Geopolitics/BAM` | Kütüphane |
|
||||
| Mezun | BAM Mezun | `120363407147241044@g.us` | `6-Geopolitics/BAM` | Mezun ağı |
|
||||
| Metodoloji | BAM UI - Metodoloji | `120363422125895119@g.us` | `6-Geopolitics/BAM` | Akademik |
|
||||
| Erkekler | BAM Erkekler | `120363426068079626@g.us` | `6-Geopolitics/BAM` | Sosyal |
|
||||
| Halisaha | BAM halısaha | `120363426094379483@g.us` | `6-Geopolitics/BAM` | Sosyal |
|
||||
| Ajans | BAM Ajans | `120363408189503262@g.us` | `6-Geopolitics/BAM` | Sosyal |
|
||||
| Satranc | BAM Satranç | `120363421630463971@g.us` | `6-Geopolitics/BAM` | Sosyal |
|
||||
|
||||
## Spesifik Ders Grupları
|
||||
|
||||
| Slug | Grup Adı | chat_id | Parent Dir (özel) |
|
||||
|---|---|---|---|
|
||||
| Orta-Dogu-Politik-Iktisat | Orta Doğu Çalışmaları (Politik İktisat) | `120363407185216626@g.us` | `6-Geopolitics/BAM/Ortadoğu Metodoloji - Merve Hoca` |
|
||||
|
||||
Bu gruba özel olarak transkript `.../Ortadoğu Metodoloji - Merve Hoca/WhatsApp/` altında tutulur çünkü ders bazlı içerik (Dr. Fatih Kırşanlı 5 haftalık Politik İktisat).
|
||||
|
||||
## Çalışma Konvansiyonu
|
||||
|
||||
- Akademik/eğitim içerikli gruplardan çıkan **PDF/DOC**'lar → `<parent-dir>/assets/WhatsApp/<slug>/` altına iner, ayrıca ilgili ders dosyasına 📎 link.
|
||||
- **Görev/ödev** bahsi geçen mesajlar → `6-Geopolitics/BAM/Tasks/BAM.md`'ye extract et (tarih + tag'li, Google Tasks'e sync için).
|
||||
- **Etkinlik duyurusu** içeren mesajlar → `BAM WhatsApp Index.md` "Ders / Etkinlik Takvimi" bölümüne eklenir.
|
||||
- **Sosyal/off-topic** gruplar için (Erkekler, halısaha, Ajans, Satranç) transkript yaz ama detaylı görev çıkarma yapma.
|
||||
|
||||
## Nasıl Güncel Tutulur
|
||||
|
||||
Yeni grup eklenince:
|
||||
1. `python3 scripts/waha_list_groups.py <yeni-grup-anahtar>` ile chat_id bul.
|
||||
2. Bu tabloya satır ekle.
|
||||
3. `references/bam_groups_config.json`'a aynı bilgiyi ekle.
|
||||
4. `scripts/waha_bulk_fetch.py references/bam_groups_config.json` çalıştır.
|
||||
|
||||
Grup adı/konusu değişince: Obsidian'daki transkript dosyasının adını değiştirme (slug sabit kalsın) — sadece içerik/title güncellenir.
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"default_parent_dir": "<VAULT>/6-Geopolitics/BAM",
|
||||
"default_tag": "6.1-Geopolitical Analysis",
|
||||
"default_up": "BAM WhatsApp Index",
|
||||
"chats": [
|
||||
{"chat_id": "120363422940477656@g.us", "name": "BAM Afrika Çalışmalarına Giriş II", "slug": "Afrika-II"},
|
||||
{"chat_id": "120363402693559339@g.us", "name": "BAM Svahili-I 2025", "slug": "Svahili-I"},
|
||||
{"chat_id": "120363422424634563@g.us", "name": "BAM AFRİKA Grup", "slug": "Afrika-Grup"},
|
||||
{"chat_id": "120363404478392928@g.us", "name": "BAM Öğrenci Grubu", "slug": "Ogrenci"},
|
||||
{"chat_id": "120363347208018359@g.us", "name": "Bölge Araştırmaları Merkezi (BAM)", "slug": "Ana-Grup-1"},
|
||||
{"chat_id": "120363345183450811@g.us", "name": "Bölge Araştırmaları Merkezi (BAM) 2","slug": "Ana-Grup-2"},
|
||||
{"chat_id": "120363407285040920@g.us", "name": "BAM KÜTÜPHANE", "slug": "Kutuphane"},
|
||||
{"chat_id": "120363407147241044@g.us", "name": "BAM Mezun", "slug": "Mezun"},
|
||||
{"chat_id": "120363422125895119@g.us", "name": "BAM UI - Metodoloji", "slug": "Metodoloji"},
|
||||
{"chat_id": "120363426068079626@g.us", "name": "BAM Erkekler", "slug": "Erkekler"},
|
||||
{"chat_id": "120363426094379483@g.us", "name": "BAM halısaha", "slug": "Halisaha"},
|
||||
{"chat_id": "120363408189503262@g.us", "name": "BAM Ajans", "slug": "Ajans"},
|
||||
{"chat_id": "120363421630463971@g.us", "name": "BAM Satranç", "slug": "Satranc"},
|
||||
{"chat_id": "120363407185216626@g.us", "name": "Orta Doğu Çalışmaları (Politik İktisat)",
|
||||
"slug": "Orta-Dogu-Politik-Iktisat",
|
||||
"parent_dir": "<VAULT>/6-Geopolitics/BAM/Ortadoğu Metodoloji - Merve Hoca",
|
||||
"rel_prefix": "6-Geopolitics/BAM/Ortadoğu Metodoloji - Merve Hoca"}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
# WAHA Kullanılan Endpoint'ler
|
||||
|
||||
Base: `http://<WAHA_HOST>:3000` · Header: `X-Api-Key: <WAHA_API_KEY>` · Session: `default`
|
||||
|
||||
| Amaç | Method + Path | Önemli parametreler |
|
||||
|---|---|---|
|
||||
| Oturum durumu | `GET /api/sessions` | — |
|
||||
| Sunucu sürümü | `GET /api/version` | — |
|
||||
| Tüm sohbetler | `GET /api/{session}/chats?limit=500` | `limit` (default 50) |
|
||||
| Gruplar | `GET /api/{session}/groups?limit=500` | yalnızca `@g.us` |
|
||||
| Grup bilgisi | `GET /api/{session}/chats/{chatId}` | — |
|
||||
| Grup katılımcıları | `GET /api/{session}/groups/{groupId}/participants` | — |
|
||||
| Mesajları oku | `GET /api/{session}/chats/{chatId}/messages?limit=1000&downloadMedia=true` | `limit`, `downloadMedia` (bool), `offset`, `direction` |
|
||||
| Mesaj gönder | `POST /api/sendText` body `{chatId,text}` | `session` in body |
|
||||
| Medya indir | `GET /api/files/{session}/{messageId}.<ext>` | localhost URL → host rewrite gerekli |
|
||||
| Tümünü okundu işaretle | `POST /api/sendSeen` body `{chatId}` | — |
|
||||
|
||||
## Mesaj objesinin yararlı alanları
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "true_<chat>_<msgid>_<author>",
|
||||
"timestamp": 1774868013,
|
||||
"from": "905xxx@c.us",
|
||||
"fromMe": true,
|
||||
"to": "120363xxx@g.us",
|
||||
"body": "text or caption",
|
||||
"hasMedia": true,
|
||||
"media": {
|
||||
"url": "http://localhost:3000/api/files/default/...",
|
||||
"filename": "KISWAHILI 21 ders_13.04.2026.pdf",
|
||||
"mimetype": "application/pdf"
|
||||
},
|
||||
"_data": { "type": "document|image|video|audio|sticker|chat|e2e_notification", ... }
|
||||
}
|
||||
```
|
||||
|
||||
## Sohbet objesinin yararlı alanları (`/chats`)
|
||||
|
||||
```json
|
||||
{
|
||||
"id": {"_serialized": "120363422940477656@g.us"},
|
||||
"name": "BAM Afrika Çalışmalarına Giriş II",
|
||||
"groupMetadata": {"subject": "...", "creation": 1760772564, "owner": {...}}
|
||||
}
|
||||
```
|
||||
|
||||
## Hazır curl örnekleri
|
||||
|
||||
```bash
|
||||
# Tüm grupları BAM ile filtrele
|
||||
curl -s -H "X-Api-Key: $KEY" "$API/api/default/chats?limit=500" | \
|
||||
jq -r '.[] | select(.id._serialized | endswith("@g.us")) |
|
||||
select(.name | test("BAM"; "i")) |
|
||||
"\(.id._serialized)\t\(.name)"'
|
||||
|
||||
# Belirli bir gruptaki son 50 mesajın tip dağılımı
|
||||
curl -s -H "X-Api-Key: $KEY" \
|
||||
"$API/api/default/chats/120363xxx@g.us/messages?limit=50&downloadMedia=false" | \
|
||||
jq -r '.[]._data.type' | sort | uniq -c
|
||||
```
|
||||
|
||||
## Hız / Limit Notları
|
||||
|
||||
- `limit=1000` çoğu WEBJS grup için yeterli (cache 100-1000 arası değişiyor).
|
||||
- Medya indirmek CPU/I/O yoğun; büyük bulk job'larda `downloadMedia=false` ile önce envanter çıkar, sonra seçilen mesajlar için tek tek indir.
|
||||
- WAHA backing browser (Chromium) başına tek session; iki concurrent büyük bulk fetch paralelde yavaşlatır.
|
||||
@@ -0,0 +1,61 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Bulk-fetch multiple WAHA chats and write transcripts + media.
|
||||
|
||||
Reads a JSON config with chat definitions, runs waha_fetch_group.py logic for each.
|
||||
|
||||
Usage:
|
||||
python3 waha_bulk_fetch.py <config.json>
|
||||
|
||||
Config format (example):
|
||||
{
|
||||
"default_parent_dir": "<VAULT>/6-Geopolitics/BAM",
|
||||
"default_tag": "6.1-Geopolitical Analysis",
|
||||
"default_up": "BAM WhatsApp Index",
|
||||
"chats": [
|
||||
{"chat_id": "120363422940477656@g.us", "name": "BAM Afrika II", "slug": "Afrika-II"},
|
||||
{"chat_id": "120363402693559339@g.us", "name": "BAM Svahili-I", "slug": "Svahili-I",
|
||||
"parent_dir": "<VAULT>/6-Geopolitics/BAM"}
|
||||
]
|
||||
}
|
||||
|
||||
A reference config for the 13 BAM groups + Orta Doğu Politik İktisat lives at:
|
||||
~/.claude/skills/waha-whatsapp/references/bam_groups_config.json
|
||||
"""
|
||||
import json, os, subprocess, sys
|
||||
|
||||
HERE = os.path.dirname(os.path.abspath(__file__))
|
||||
FETCH_SCRIPT = os.path.join(HERE, "waha_fetch_group.py")
|
||||
|
||||
def main():
|
||||
if len(sys.argv) < 2:
|
||||
print(f"Usage: {sys.argv[0]} <config.json>")
|
||||
sys.exit(2)
|
||||
cfg = json.load(open(sys.argv[1]))
|
||||
default_parent = cfg.get("default_parent_dir")
|
||||
default_tag = cfg.get("default_tag", "6.1-Geopolitical Analysis")
|
||||
default_up = cfg.get("default_up", "BAM WhatsApp Index")
|
||||
chats = cfg["chats"]
|
||||
|
||||
for c in chats:
|
||||
parent = c.get("parent_dir", default_parent)
|
||||
if not parent:
|
||||
print(f"SKIP {c.get('name')}: no parent_dir")
|
||||
continue
|
||||
cmd = [
|
||||
"python3", FETCH_SCRIPT,
|
||||
"--chat-id", c["chat_id"],
|
||||
"--name", c["name"],
|
||||
"--slug", c["slug"],
|
||||
"--parent-dir", parent,
|
||||
"--tag", c.get("tag", default_tag),
|
||||
"--up", c.get("up", default_up),
|
||||
]
|
||||
if "limit" in c:
|
||||
cmd += ["--limit", str(c["limit"])]
|
||||
if "rel_prefix" in c:
|
||||
cmd += ["--rel-prefix", c["rel_prefix"]]
|
||||
print(f"\n>>> {c['name']} ({c['slug']})")
|
||||
subprocess.run(cmd, check=False)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,169 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Fetch messages + media from one WhatsApp chat via WAHA, write Obsidian transcript.
|
||||
|
||||
Usage:
|
||||
python3 waha_fetch_group.py \
|
||||
--chat-id "120363xxx@g.us" \
|
||||
--name "Group Name" \
|
||||
--slug "Group-Slug" \
|
||||
--parent-dir "<VAULT>/6-Geopolitics/BAM" \
|
||||
[--limit 1000] [--tag "6.1-Geopolitical Analysis"] [--up "BAM WhatsApp Index"]
|
||||
|
||||
Outputs:
|
||||
<parent-dir>/WhatsApp/<slug>.md — transcript note
|
||||
<parent-dir>/assets/WhatsApp/<slug>/<ts>_<name>.<ext> — downloaded media
|
||||
|
||||
Env overrides: WAHA_API, WAHA_KEY, WAHA_SESSION (see waha_list_groups.py).
|
||||
"""
|
||||
import argparse, datetime as dt, json, os, re, sys, urllib.parse, urllib.request
|
||||
|
||||
API = os.environ.get("WAHA_API", "http://<WAHA_HOST>:3000")
|
||||
KEY = os.environ.get("WAHA_KEY", "<WAHA_API_KEY>")
|
||||
SESSION = os.environ.get("WAHA_SESSION", "default")
|
||||
|
||||
EXT_MAP = {
|
||||
"application/pdf": ".pdf", "image/jpeg": ".jpg", "image/png": ".png",
|
||||
"image/webp": ".webp", "video/mp4": ".mp4", "audio/ogg": ".ogg",
|
||||
"audio/mpeg": ".mp3", "application/msword": ".doc",
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": ".docx",
|
||||
"application/vnd.ms-excel": ".xls",
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": ".xlsx",
|
||||
"application/vnd.ms-powerpoint": ".ppt",
|
||||
"application/vnd.openxmlformats-officedocument.presentationml.presentation": ".pptx",
|
||||
}
|
||||
|
||||
def http(url):
|
||||
req = urllib.request.Request(url, headers={"X-Api-Key": KEY})
|
||||
with urllib.request.urlopen(req, timeout=120) as r:
|
||||
return r.read()
|
||||
|
||||
def fetch_json(url):
|
||||
return json.loads(http(url))
|
||||
|
||||
def sanitize(s, max_len=80):
|
||||
s = re.sub(r"[^\w\-. ()çğıöşüÇĞİÖŞÜ]", "_", s or "")
|
||||
s = re.sub(r"__+", "_", s).strip("_").strip()
|
||||
return s[:max_len] or "untitled"
|
||||
|
||||
def download(url_localhost, dest):
|
||||
url = url_localhost.replace("http://localhost:3000", API).replace("https://localhost:3000", API)
|
||||
try:
|
||||
data = http(url)
|
||||
with open(dest, "wb") as f:
|
||||
f.write(data)
|
||||
return len(data)
|
||||
except Exception as e:
|
||||
return f"ERR: {e}"
|
||||
|
||||
def fmt_ts(ts):
|
||||
return dt.datetime.fromtimestamp(ts).strftime("%Y-%m-%d %H:%M") if ts else "?"
|
||||
|
||||
def extension(orig_fname, mime, mtype):
|
||||
if orig_fname and "." in orig_fname:
|
||||
return "." + orig_fname.rsplit(".", 1)[1]
|
||||
return EXT_MAP.get(mime, ".bin")
|
||||
|
||||
def main():
|
||||
ap = argparse.ArgumentParser()
|
||||
ap.add_argument("--chat-id", required=True)
|
||||
ap.add_argument("--name", required=True)
|
||||
ap.add_argument("--slug", required=True)
|
||||
ap.add_argument("--parent-dir", required=True, help="Vault folder; transcripts go to <parent>/WhatsApp/, media to <parent>/assets/WhatsApp/<slug>/")
|
||||
ap.add_argument("--limit", type=int, default=1000)
|
||||
ap.add_argument("--tag", default="6.1-Geopolitical Analysis")
|
||||
ap.add_argument("--up", default="BAM WhatsApp Index")
|
||||
ap.add_argument("--rel-prefix", default=None,
|
||||
help="Relative path prefix used in wikilinks (default: auto-derive from parent-dir)")
|
||||
args = ap.parse_args()
|
||||
|
||||
trans_dir = os.path.join(args.parent_dir, "WhatsApp")
|
||||
asset_dir = os.path.join(args.parent_dir, "assets", "WhatsApp", args.slug)
|
||||
os.makedirs(trans_dir, exist_ok=True)
|
||||
os.makedirs(asset_dir, exist_ok=True)
|
||||
|
||||
rel_prefix = args.rel_prefix
|
||||
if not rel_prefix:
|
||||
idx = args.parent_dir.find("/Obsidian/")
|
||||
rel_prefix = args.parent_dir[idx + len("/Obsidian/"):].strip("/") if idx != -1 else args.parent_dir.strip("/")
|
||||
|
||||
url = f"{API}/api/{SESSION}/chats/{urllib.parse.quote(args.chat_id)}/messages?limit={args.limit}&downloadMedia=true"
|
||||
print(f"Fetching {args.name} ({args.chat_id}) ...", flush=True)
|
||||
msgs = fetch_json(url)
|
||||
msgs = sorted(msgs, key=lambda m: m.get("timestamp") or 0)
|
||||
print(f" → {len(msgs)} messages", flush=True)
|
||||
|
||||
lines = [
|
||||
"---",
|
||||
f"up:: [[{args.up}]]",
|
||||
f"tag:: [[{args.tag}]]",
|
||||
f"group:: {args.name}",
|
||||
f"chat_id:: {args.chat_id}",
|
||||
f"synced:: {dt.date.today().isoformat()}",
|
||||
"---",
|
||||
"",
|
||||
f"# {args.name} — WhatsApp Transkripti",
|
||||
"",
|
||||
f"**Grup ID:** `{args.chat_id}` ",
|
||||
f"**Mesaj sayısı:** {len(msgs)} ",
|
||||
]
|
||||
if msgs:
|
||||
lines.append(f"**Dönem:** {fmt_ts(msgs[0].get('timestamp'))} → {fmt_ts(msgs[-1].get('timestamp'))} ")
|
||||
lines.append("")
|
||||
|
||||
stats = {"media": 0, "text": 0, "downloaded": 0, "bytes": 0}
|
||||
for m in msgs:
|
||||
d = m.get("_data", {}) or {}
|
||||
mtype = d.get("type") or m.get("type") or "unknown"
|
||||
ts = m.get("timestamp")
|
||||
when = fmt_ts(ts)
|
||||
sender = (m.get("from") or "").replace("@c.us", "").replace("@lid", "") or "?"
|
||||
body = (m.get("body") or "").strip()
|
||||
media = m.get("media")
|
||||
|
||||
if media and media.get("url"):
|
||||
stats["media"] += 1
|
||||
orig = media.get("filename") or d.get("filename") or ""
|
||||
mime = media.get("mimetype", "") or d.get("mimetype", "")
|
||||
ext = extension(orig, mime, mtype)
|
||||
date_str = dt.datetime.fromtimestamp(ts).strftime("%Y%m%d-%H%M") if ts else "unknown"
|
||||
safe = sanitize(os.path.splitext(orig)[0]) if orig else mtype
|
||||
fname = f"{date_str}_{safe}{ext}"
|
||||
dest = os.path.join(asset_dir, fname)
|
||||
if os.path.exists(dest):
|
||||
size, status = os.path.getsize(dest), "(exists)"
|
||||
else:
|
||||
res = download(media["url"], dest)
|
||||
if isinstance(res, int):
|
||||
size, status = res, "OK"
|
||||
stats["downloaded"] += 1
|
||||
stats["bytes"] += size
|
||||
else:
|
||||
size, status = 0, res
|
||||
print(f" [{when}] {mtype} {fname} ({size} B) {status}", flush=True)
|
||||
rel = f"{rel_prefix}/assets/WhatsApp/{args.slug}/{fname}"
|
||||
lines.append(f"### {when} — {mtype}")
|
||||
if mtype == "image" or ext == ".pdf":
|
||||
lines.append(f"![[{rel}]]")
|
||||
else:
|
||||
lines.append(f"[[{rel}|{fname}]]")
|
||||
if body:
|
||||
lines.append("")
|
||||
lines.append("> " + body.replace("\n", "\n> "))
|
||||
lines.append("")
|
||||
elif body:
|
||||
stats["text"] += 1
|
||||
lines.append(f"**{when}** — `{sender}`")
|
||||
lines.append("")
|
||||
lines.append("> " + body.replace("\n", "\n> "))
|
||||
lines.append("")
|
||||
|
||||
out_path = os.path.join(trans_dir, f"{args.slug}.md")
|
||||
with open(out_path, "w") as f:
|
||||
f.write("\n".join(lines))
|
||||
|
||||
print(f"\nDONE: {out_path}")
|
||||
print(f" text={stats['text']} media={stats['media']} downloaded={stats['downloaded']} ({stats['bytes']//1024} KB)")
|
||||
print(f" assets: {asset_dir}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env python3
|
||||
"""List WAHA chats matching a keyword.
|
||||
|
||||
Usage:
|
||||
python3 waha_list_groups.py <keyword>
|
||||
python3 waha_list_groups.py "orta doğu"
|
||||
|
||||
Env overrides:
|
||||
WAHA_API (default http://<WAHA_HOST>:3000)
|
||||
WAHA_KEY (default <WAHA_API_KEY>)
|
||||
WAHA_SESSION (default "default")
|
||||
"""
|
||||
import json, os, sys, urllib.request
|
||||
|
||||
API = os.environ.get("WAHA_API", "http://<WAHA_HOST>:3000")
|
||||
KEY = os.environ.get("WAHA_KEY", "<WAHA_API_KEY>")
|
||||
SESSION = os.environ.get("WAHA_SESSION", "default")
|
||||
|
||||
def fetch(url):
|
||||
req = urllib.request.Request(url, headers={"X-Api-Key": KEY})
|
||||
with urllib.request.urlopen(req, timeout=60) as r:
|
||||
return json.loads(r.read())
|
||||
|
||||
def main():
|
||||
if len(sys.argv) < 2:
|
||||
print("Usage: waha_list_groups.py <keyword>")
|
||||
sys.exit(2)
|
||||
q = sys.argv[1].lower()
|
||||
chats = fetch(f"{API}/api/{SESSION}/chats?limit=500")
|
||||
hits = []
|
||||
for c in chats:
|
||||
name = (c.get("name") or c.get("groupMetadata", {}).get("subject", "") or "").strip()
|
||||
if q in name.lower():
|
||||
cid = c.get("id", {})
|
||||
cid = cid.get("_serialized", "") if isinstance(cid, dict) else str(cid)
|
||||
hits.append((cid, name))
|
||||
hits.sort()
|
||||
groups = [(i, n) for i, n in hits if i.endswith("@g.us")]
|
||||
contacts = [(i, n) for i, n in hits if not i.endswith("@g.us")]
|
||||
print(f"\n=== Groups ({len(groups)}) ===")
|
||||
for cid, name in groups:
|
||||
print(f" {cid:<40} | {name}")
|
||||
print(f"\n=== Contacts ({len(contacts)}) ===")
|
||||
for cid, name in contacts:
|
||||
print(f" {cid:<40} | {name}")
|
||||
print(f"\nTotal matches: {len(hits)} of {len(chats)} chats")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user