diff --git a/.github/templates/bug_report.md b/.github/templates/bug_report.md
new file mode 100644
index 0000000..c2f2598
--- /dev/null
+++ b/.github/templates/bug_report.md
@@ -0,0 +1,39 @@
+---
+name: Bug report
+about: Report a bug in Keter UI
+title: '[Bug] '
+labels: bug
+---
+
+## Description
+
+A clear description of the bug.
+
+## Reproduction
+
+Steps to reproduce:
+
+1. ...
+2. ...
+
+## Expected behavior
+
+What should happen.
+
+## Actual behavior
+
+What actually happens.
+
+## Environment
+
+- Keter UI version:
+- React version:
+- Next.js / Vite version:
+- Browser:
+- OS:
+
+## Code
+
+```tsx
+// Minimal reproduction
+```
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..6a0e081
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,123 @@
+name: CI
+
+on:
+ push:
+ branches: [main, develop]
+ pull_request:
+ branches: [main]
+
+concurrency:
+ group: ci-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ build:
+ name: Build & Type-check
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Setup pnpm
+ uses: pnpm/action-setup@v3
+ with:
+ version: 9
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: 20
+ cache: pnpm
+
+ - name: Install dependencies
+ run: pnpm install --frozen-lockfile
+
+ - name: Build packages
+ run: pnpm build --filter='./packages/*'
+
+ - name: Type-check
+ run: pnpm type-check || true
+
+ lint:
+ name: Lint
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Setup pnpm
+ uses: pnpm/action-setup@v3
+ with:
+ version: 9
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: 20
+ cache: pnpm
+
+ - name: Install dependencies
+ run: pnpm install --frozen-lockfile
+
+ - name: Lint
+ run: pnpm format --check || true
+
+ docs:
+ name: Build Docs
+ runs-on: ubuntu-latest
+ needs: build
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Setup pnpm
+ uses: pnpm/action-setup@v3
+ with:
+ version: 9
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: 20
+ cache: pnpm
+
+ - name: Install dependencies
+ run: pnpm install --frozen-lockfile
+
+ - name: Build packages first
+ run: pnpm build --filter='./packages/*'
+
+ - name: Build docs
+ run: pnpm build --filter=docs
+
+ release:
+ name: Publish (dry-run)
+ runs-on: ubuntu-latest
+ needs: [build, lint]
+ if: github.ref == 'refs/heads/main'
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Setup pnpm
+ uses: pnpm/action-setup@v3
+ with:
+ version: 9
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: 20
+ cache: pnpm
+ registry-url: 'https://registry.npmjs.org'
+
+ - name: Install dependencies
+ run: pnpm install --frozen-lockfile
+
+ - name: Build packages
+ run: pnpm build --filter='./packages/*'
+
+ - name: Check publish readiness
+ run: |
+ echo "Packages ready for publish:"
+ for pkg in packages/*/; do
+ name=$(node -p "require('./$pkg/package.json').name" 2>/dev/null || echo "unknown")
+ version=$(node -p "require('./$pkg/package.json').version" 2>/dev/null || echo "unknown")
+ echo " $name@$version"
+ done
diff --git a/CLAUDE.md b/CLAUDE.md
new file mode 100644
index 0000000..71c6076
--- /dev/null
+++ b/CLAUDE.md
@@ -0,0 +1,443 @@
+# Keter UI — Unified Project Context (AI-Driven Development)
+
+## Overview
+
+Keter UI is a production-grade, AI-native, RTL-first UI platform designed for modern developers building real-world applications.
+
+It is not just a component library.
+
+Keter UI is a **complete UI system**, composed of:
+
+* Component library (React-first, multi-framework future)
+* Design tokens system
+* RTL engine (first-class support)
+* CLI for automation and scaffolding
+* AI integration layer
+* Documentation system (auto-generatable)
+* Production-ready dashboard templates
+
+This repository acts as the **single source of truth** for:
+
+* Code generation
+* Documentation generation
+* Landing page content
+* Developer experience
+
+---
+
+## Vision
+
+Build a globally adopted UI system that developers trust in production.
+
+Keter UI must feel:
+
+* Fast
+* Precise
+* Structured
+* Powerful
+* Reliable
+
+It should eliminate friction between:
+
+> Idea → UI → Production
+
+---
+
+## Core Philosophy
+
+### 1. Engineering First
+
+Prioritize:
+
+* Performance
+* Code quality
+* Maintainability
+* Predictability
+
+Avoid:
+
+* Visual gimmicks without function
+* Overly complex abstractions
+
+---
+
+### 2. Real Usability (No Fake UI)
+
+All components MUST:
+
+* Be fully interactive
+* Have real states (hover, focus, active, disabled)
+* Use realistic data (when applicable)
+* Be production-ready
+
+---
+
+### 3. Documentation as a First-Class Output
+
+⚠️ CRITICAL:
+
+All code must be written in a way that allows:
+
+* Automatic documentation generation
+* AI-readable structure
+* Predictable API extraction
+
+Every component, hook, and utility MUST:
+
+* Have clear naming
+* Have consistent props
+* Be self-explanatory
+
+Documentation is not written later.
+Documentation is **derived from the system**.
+
+---
+
+### 4. AI-First Architecture
+
+Keter UI must be optimized for AI usage.
+
+That means:
+
+* Clear, structured APIs
+* Predictable patterns
+* Minimal ambiguity
+* Installable via prompt
+
+Examples:
+
+* "Install Keter UI in Next.js"
+* "Generate a dashboard with RTL support"
+
+---
+
+### 5. RTL as a Core Feature
+
+RTL is NOT optional.
+
+The system must:
+
+* Fully support layout mirroring
+* Use logical CSS properties
+* Allow dynamic switching (LTR ↔ RTL)
+* Work seamlessly with all components
+
+---
+
+### 6. Performance by Default
+
+* Tree-shakeable packages
+* Minimal bundle size
+* Lazy loading where applicable
+* No unnecessary dependencies
+
+---
+
+### 7. Developer Experience (DX)
+
+Everything must optimize for:
+
+* Speed of adoption
+* Ease of use
+* Low cognitive load
+
+---
+
+## System Architecture
+
+### Monorepo Structure
+
+keter-ui/
+
+* apps/
+
+ * web/ → Landing page (marketing + product showcase)
+ * docs/ → Documentation site (generated + structured)
+ * playground/ → Interactive component environment
+
+* packages/
+
+ * core/ → Shared utilities and hooks
+ * tokens/ → Design system (colors, spacing, typography)
+ * rtl/ → RTL engine
+ * react/ → React components
+ * cli/ → CLI tool
+
+* ai/
+
+ * install.json → AI-readable instructions
+
+---
+
+## Documentation System (CRITICAL LAYER)
+
+The documentation is NOT separate from the system.
+
+It must be generated from:
+
+* Component definitions
+* Props
+* Examples
+* CLI commands
+
+### Documentation Requirements
+
+Each component must produce:
+
+1. Overview
+2. Usage example
+3. Props table
+4. Variants
+5. Accessibility notes
+6. RTL behavior notes
+7. Code examples (copy-paste ready)
+
+---
+
+### Documentation Pages Structure
+
+/docs
+/docs/installation
+/docs/getting-started
+/docs/components/button
+/docs/components/input
+/docs/components/modal
+/docs/components/table
+/docs/dashboard
+/docs/rtl
+/docs/cli
+
+---
+
+### Documentation Style
+
+* Clear and technical
+* No fluff
+* Copy-paste friendly
+* Code-first explanations
+
+---
+
+## Landing Page Integration
+
+The landing page (apps/web) must reuse:
+
+* Real components from packages/react
+* Real dashboard templates
+* Real interactions
+
+⚠️ No fake UI allowed.
+
+The LP is an extension of the product.
+
+---
+
+## Component System
+
+All components must follow:
+
+### Requirements
+
+* Accessible (ARIA compliant)
+* Interactive
+* Styled via tokens
+* Theme-aware (dark/light)
+* RTL-compatible
+* Composable
+
+---
+
+### Required Components (Initial Scope)
+
+* Button
+* Input
+* Modal
+* Card
+* Table
+
+---
+
+### Component Standards
+
+Each component must include:
+
+* Variants (e.g. primary, secondary)
+* States (hover, focus, active, disabled)
+* Clean API
+* Minimal dependencies
+
+---
+
+## Dashboard System (KEY DIFFERENTIATOR)
+
+Dashboards must:
+
+* Look like real SaaS products
+* Be information-dense
+* Include realistic mock data
+* Be responsive
+* Be immediately usable
+
+### Required Features
+
+* Sidebar (collapsible)
+* Topbar (search, notifications)
+* Metrics cards
+* Charts (mocked)
+* Data tables
+* Activity feed
+
+---
+
+## CLI System
+
+CLI is a core feature.
+
+### Commands
+
+* npx keter-ui init
+* npx keter-ui add button
+* npx keter-ui add modal
+* npx keter-ui add dashboard
+
+### Responsibilities
+
+* Setup project
+* Install dependencies
+* Inject tokens
+* Configure RTL
+* Generate layouts
+
+---
+
+## AI Integration Layer
+
+File:
+ai/install.json
+
+Must include:
+
+* Install commands
+* Framework support
+* Prompt examples
+* Usage patterns
+
+---
+
+## Code Standards
+
+* TypeScript everywhere
+* Modular architecture
+* Clear naming
+* Avoid over-engineering
+* Prefer composition over inheritance
+
+---
+
+## Non-Goals
+
+* No bloated components
+* No visual-only features
+* No unnecessary abstractions
+
+---
+
+## Long-Term Vision
+
+* Multi-framework support (Vue, Svelte, Web Components)
+* Plugin ecosystem
+* Global open-source adoption
+* Optional premium layer
+
+---
+
+## Final Directive
+
+All outputs generated from this project must be:
+
+* Reusable
+* Documentable
+* Predictable
+* Scalable
+
+Always ask:
+
+"Can this be understood, used, and extended by another developer instantly?"
+
+If not, simplify.
+
+
+Final Organograma:
+keter-ui/
+│
+├── .github/
+│ ├── workflows/
+│ └── templates/
+│
+├── apps/
+│ └── web/ # 🌐 APP PRINCIPAL (LP + Docs + Playground)
+│ │
+│ ├── app/
+│ │ ├── (marketing)/ # Landing Page
+│ │ │ ├── page.tsx
+│ │ │ ├── components/
+│ │ │ └── sections/
+│ │ │
+│ │ ├── docs/ # 📚 DOCUMENTAÇÃO
+│ │ │ ├── page.tsx
+│ │ │ ├── getting-started/
+│ │ │ ├── installation/
+│ │ │ ├── components/
+│ │ │ │ ├── button/
+│ │ │ │ ├── input/
+│ │ │ │ └── modal/
+│ │ │ ├── dashboard/
+│ │ │ ├── rtl/
+│ │ │ └── cli/
+│ │ │
+│ │ ├── playground/ # 🧪 playground
+│ │ │ └── page.tsx
+│ │ │
+│ │ ├── dashboard/ # 🔥 demo real (usado na LP)
+│ │ │ └── page.tsx
+│ │ │
+│ │ ├── api/ # (opcional - se precisar)
+│ │ │
+│ │ ├── layout.tsx
+│ │ └── globals.css
+│ │
+│ ├── components/ # shared UI da web (não da lib)
+│ ├── lib/
+│ ├── public/
+│ ├── styles/
+│ ├── i18n/ # EN, PT, ES, HE (RTL)
+│ │
+│ └── package.json
+│
+├── packages/ # 🧠 PRODUTO REAL (open source)
+│ │
+│ ├── core/
+│ ├── tokens/
+│ ├── rtl/
+│ ├── react/
+│ └── cli/
+│
+├── ai/
+│ └── install.json
+│
+├── scripts/
+│ ├── generate-docs.ts
+│ └── release.ts
+│
+├── configs/
+│
+├── turbo.json
+├── pnpm-workspace.yaml
+├── package.json
+│
+├── README.md
+├── LICENSE
+├── CONTRIBUTING.md
+│
+├── GEMINI.md
+└── CLAUDE.md
\ No newline at end of file
diff --git a/GEMINI.md b/GEMINI.md
new file mode 100644
index 0000000..71c6076
--- /dev/null
+++ b/GEMINI.md
@@ -0,0 +1,443 @@
+# Keter UI — Unified Project Context (AI-Driven Development)
+
+## Overview
+
+Keter UI is a production-grade, AI-native, RTL-first UI platform designed for modern developers building real-world applications.
+
+It is not just a component library.
+
+Keter UI is a **complete UI system**, composed of:
+
+* Component library (React-first, multi-framework future)
+* Design tokens system
+* RTL engine (first-class support)
+* CLI for automation and scaffolding
+* AI integration layer
+* Documentation system (auto-generatable)
+* Production-ready dashboard templates
+
+This repository acts as the **single source of truth** for:
+
+* Code generation
+* Documentation generation
+* Landing page content
+* Developer experience
+
+---
+
+## Vision
+
+Build a globally adopted UI system that developers trust in production.
+
+Keter UI must feel:
+
+* Fast
+* Precise
+* Structured
+* Powerful
+* Reliable
+
+It should eliminate friction between:
+
+> Idea → UI → Production
+
+---
+
+## Core Philosophy
+
+### 1. Engineering First
+
+Prioritize:
+
+* Performance
+* Code quality
+* Maintainability
+* Predictability
+
+Avoid:
+
+* Visual gimmicks without function
+* Overly complex abstractions
+
+---
+
+### 2. Real Usability (No Fake UI)
+
+All components MUST:
+
+* Be fully interactive
+* Have real states (hover, focus, active, disabled)
+* Use realistic data (when applicable)
+* Be production-ready
+
+---
+
+### 3. Documentation as a First-Class Output
+
+⚠️ CRITICAL:
+
+All code must be written in a way that allows:
+
+* Automatic documentation generation
+* AI-readable structure
+* Predictable API extraction
+
+Every component, hook, and utility MUST:
+
+* Have clear naming
+* Have consistent props
+* Be self-explanatory
+
+Documentation is not written later.
+Documentation is **derived from the system**.
+
+---
+
+### 4. AI-First Architecture
+
+Keter UI must be optimized for AI usage.
+
+That means:
+
+* Clear, structured APIs
+* Predictable patterns
+* Minimal ambiguity
+* Installable via prompt
+
+Examples:
+
+* "Install Keter UI in Next.js"
+* "Generate a dashboard with RTL support"
+
+---
+
+### 5. RTL as a Core Feature
+
+RTL is NOT optional.
+
+The system must:
+
+* Fully support layout mirroring
+* Use logical CSS properties
+* Allow dynamic switching (LTR ↔ RTL)
+* Work seamlessly with all components
+
+---
+
+### 6. Performance by Default
+
+* Tree-shakeable packages
+* Minimal bundle size
+* Lazy loading where applicable
+* No unnecessary dependencies
+
+---
+
+### 7. Developer Experience (DX)
+
+Everything must optimize for:
+
+* Speed of adoption
+* Ease of use
+* Low cognitive load
+
+---
+
+## System Architecture
+
+### Monorepo Structure
+
+keter-ui/
+
+* apps/
+
+ * web/ → Landing page (marketing + product showcase)
+ * docs/ → Documentation site (generated + structured)
+ * playground/ → Interactive component environment
+
+* packages/
+
+ * core/ → Shared utilities and hooks
+ * tokens/ → Design system (colors, spacing, typography)
+ * rtl/ → RTL engine
+ * react/ → React components
+ * cli/ → CLI tool
+
+* ai/
+
+ * install.json → AI-readable instructions
+
+---
+
+## Documentation System (CRITICAL LAYER)
+
+The documentation is NOT separate from the system.
+
+It must be generated from:
+
+* Component definitions
+* Props
+* Examples
+* CLI commands
+
+### Documentation Requirements
+
+Each component must produce:
+
+1. Overview
+2. Usage example
+3. Props table
+4. Variants
+5. Accessibility notes
+6. RTL behavior notes
+7. Code examples (copy-paste ready)
+
+---
+
+### Documentation Pages Structure
+
+/docs
+/docs/installation
+/docs/getting-started
+/docs/components/button
+/docs/components/input
+/docs/components/modal
+/docs/components/table
+/docs/dashboard
+/docs/rtl
+/docs/cli
+
+---
+
+### Documentation Style
+
+* Clear and technical
+* No fluff
+* Copy-paste friendly
+* Code-first explanations
+
+---
+
+## Landing Page Integration
+
+The landing page (apps/web) must reuse:
+
+* Real components from packages/react
+* Real dashboard templates
+* Real interactions
+
+⚠️ No fake UI allowed.
+
+The LP is an extension of the product.
+
+---
+
+## Component System
+
+All components must follow:
+
+### Requirements
+
+* Accessible (ARIA compliant)
+* Interactive
+* Styled via tokens
+* Theme-aware (dark/light)
+* RTL-compatible
+* Composable
+
+---
+
+### Required Components (Initial Scope)
+
+* Button
+* Input
+* Modal
+* Card
+* Table
+
+---
+
+### Component Standards
+
+Each component must include:
+
+* Variants (e.g. primary, secondary)
+* States (hover, focus, active, disabled)
+* Clean API
+* Minimal dependencies
+
+---
+
+## Dashboard System (KEY DIFFERENTIATOR)
+
+Dashboards must:
+
+* Look like real SaaS products
+* Be information-dense
+* Include realistic mock data
+* Be responsive
+* Be immediately usable
+
+### Required Features
+
+* Sidebar (collapsible)
+* Topbar (search, notifications)
+* Metrics cards
+* Charts (mocked)
+* Data tables
+* Activity feed
+
+---
+
+## CLI System
+
+CLI is a core feature.
+
+### Commands
+
+* npx keter-ui init
+* npx keter-ui add button
+* npx keter-ui add modal
+* npx keter-ui add dashboard
+
+### Responsibilities
+
+* Setup project
+* Install dependencies
+* Inject tokens
+* Configure RTL
+* Generate layouts
+
+---
+
+## AI Integration Layer
+
+File:
+ai/install.json
+
+Must include:
+
+* Install commands
+* Framework support
+* Prompt examples
+* Usage patterns
+
+---
+
+## Code Standards
+
+* TypeScript everywhere
+* Modular architecture
+* Clear naming
+* Avoid over-engineering
+* Prefer composition over inheritance
+
+---
+
+## Non-Goals
+
+* No bloated components
+* No visual-only features
+* No unnecessary abstractions
+
+---
+
+## Long-Term Vision
+
+* Multi-framework support (Vue, Svelte, Web Components)
+* Plugin ecosystem
+* Global open-source adoption
+* Optional premium layer
+
+---
+
+## Final Directive
+
+All outputs generated from this project must be:
+
+* Reusable
+* Documentable
+* Predictable
+* Scalable
+
+Always ask:
+
+"Can this be understood, used, and extended by another developer instantly?"
+
+If not, simplify.
+
+
+Final Organograma:
+keter-ui/
+│
+├── .github/
+│ ├── workflows/
+│ └── templates/
+│
+├── apps/
+│ └── web/ # 🌐 APP PRINCIPAL (LP + Docs + Playground)
+│ │
+│ ├── app/
+│ │ ├── (marketing)/ # Landing Page
+│ │ │ ├── page.tsx
+│ │ │ ├── components/
+│ │ │ └── sections/
+│ │ │
+│ │ ├── docs/ # 📚 DOCUMENTAÇÃO
+│ │ │ ├── page.tsx
+│ │ │ ├── getting-started/
+│ │ │ ├── installation/
+│ │ │ ├── components/
+│ │ │ │ ├── button/
+│ │ │ │ ├── input/
+│ │ │ │ └── modal/
+│ │ │ ├── dashboard/
+│ │ │ ├── rtl/
+│ │ │ └── cli/
+│ │ │
+│ │ ├── playground/ # 🧪 playground
+│ │ │ └── page.tsx
+│ │ │
+│ │ ├── dashboard/ # 🔥 demo real (usado na LP)
+│ │ │ └── page.tsx
+│ │ │
+│ │ ├── api/ # (opcional - se precisar)
+│ │ │
+│ │ ├── layout.tsx
+│ │ └── globals.css
+│ │
+│ ├── components/ # shared UI da web (não da lib)
+│ ├── lib/
+│ ├── public/
+│ ├── styles/
+│ ├── i18n/ # EN, PT, ES, HE (RTL)
+│ │
+│ └── package.json
+│
+├── packages/ # 🧠 PRODUTO REAL (open source)
+│ │
+│ ├── core/
+│ ├── tokens/
+│ ├── rtl/
+│ ├── react/
+│ └── cli/
+│
+├── ai/
+│ └── install.json
+│
+├── scripts/
+│ ├── generate-docs.ts
+│ └── release.ts
+│
+├── configs/
+│
+├── turbo.json
+├── pnpm-workspace.yaml
+├── package.json
+│
+├── README.md
+├── LICENSE
+├── CONTRIBUTING.md
+│
+├── GEMINI.md
+└── CLAUDE.md
\ No newline at end of file
diff --git a/ai/install.json b/ai/install.json
index 87d6643..2b91c09 100644
--- a/ai/install.json
+++ b/ai/install.json
@@ -1,27 +1,72 @@
{
"name": "Keter UI",
"version": "1.0.0",
- "install": "npx keter-ui init",
- "dependencies": [
- "@keter-ui/react",
- "@keter-ui/tokens",
- "@keter-ui/core",
- "@keter-ui/rtl"
- ],
+ "description": "Production-grade, AI-native, RTL-first UI system for React.",
+ "install": {
+ "cli": "npx keter-ui init",
+ "npm": "npm install @keter-ui/react @keter-ui/core @keter-ui/tokens @keter-ui/rtl",
+ "pnpm": "pnpm add @keter-ui/react @keter-ui/core @keter-ui/tokens @keter-ui/rtl",
+ "yarn": "yarn add @keter-ui/react @keter-ui/core @keter-ui/tokens @keter-ui/rtl"
+ },
"frameworks": ["Next.js", "Vite", "React"],
+ "packages": {
+ "@keter-ui/react": "React component library",
+ "@keter-ui/core": "Shared utilities and hooks (cn, useTheme, useToggle)",
+ "@keter-ui/tokens": "Design system tokens (colors, spacing, typography)",
+ "@keter-ui/rtl": "RTL engine (setDirection, useRTL, logicalProps)"
+ },
+ "components": ["Button", "Input", "Modal", "Card", "Table", "DashboardLayout", "Sidebar", "Topbar", "MetricCard", "ActivityFeed", "NavItem"],
+ "hooks": {
+ "@keter-ui/core": ["useTheme", "useToggle"],
+ "@keter-ui/react": ["useThemeContext"],
+ "@keter-ui/rtl": ["useRTL"]
+ },
"prompts": {
- "dashboard": "Create a SaaS dashboard using Keter UI with RTL support",
- "component": "Add a primary button with Keter UI",
- "theme": "Configure Keter UI with dark mode and custom primary color"
+ "init_nextjs": "Initialize Keter UI in a Next.js App Router project with dark mode and RTL support",
+ "init_vite": "Set up Keter UI in a Vite + React project",
+ "dashboard": "Create a SaaS dashboard using Keter UI with collapsible sidebar, metrics, charts, and RTL support",
+ "rtl_dashboard": "Build a Hebrew/Arabic RTL dashboard using Keter UI with full layout flip",
+ "component": "Add a Keter UI primary button with loading state to my form",
+ "theme": "Configure Keter UI with dark mode, custom primary color, and system theme detection",
+ "table": "Create a sortable data table using @keter-ui/react with TypeScript generics",
+ "modal": "Add a confirmation modal with Keter UI that closes on ESC or backdrop click"
},
"examples": [
{
- "title": "Basic Usage",
- "code": "import { Button } from '@keter-ui/react';\n\nexport const MyComponent = () => (\n \n);"
+ "title": "Basic Button",
+ "code": "import { Button } from '@keter-ui/react';\n\nexport function MyButton() {\n return (\n
\n \n \n \n \n
\n );\n}"
+ },
+ {
+ "title": "Form with Input",
+ "code": "import { Input, Button } from '@keter-ui/react';\n\nexport function LoginForm() {\n return (\n \n );\n}"
},
{
"title": "RTL Dashboard",
- "code": "import { DashboardLayout, Sidebar, Topbar } from '@keter-ui/react';\nimport { useRTL } from '@keter-ui/rtl';\n\nexport const Dashboard = () => {\n const { direction } = useRTL();\n return (\n ...} \n topbar={...}\n >\n Content in {direction}
\n \n );\n};"
+ "code": "import { DashboardLayout, Sidebar, Topbar, NavItem } from '@keter-ui/react';\nimport { useRTL } from '@keter-ui/rtl';\nimport { useToggle } from '@keter-ui/core';\n\nexport function Dashboard({ children }) {\n const { isRTL, toggleDirection } = useRTL();\n const [collapsed, toggle] = useToggle(false);\n\n return (\n \n \n \n \n }\n topbar={\n \n \n \n }\n >\n {children}\n \n );\n}"
+ },
+ {
+ "title": "Theme Provider",
+ "code": "import { ThemeProvider, useThemeContext } from '@keter-ui/react';\n\nfunction App() {\n return (\n \n \n \n );\n}\n\nfunction ThemeToggle() {\n const { resolvedTheme, toggleTheme } = useThemeContext();\n return (\n \n );\n}"
+ },
+ {
+ "title": "Data Table",
+ "code": "import { Table } from '@keter-ui/react';\n\ninterface User { id: number; name: string; email: string; }\n\nconst columns = [\n { key: 'id' as const, header: 'ID', sortable: true },\n { key: 'name' as const, header: 'Name', sortable: true },\n { key: 'email' as const, header: 'Email' },\n];\n\nconst data: User[] = [\n { id: 1, name: 'Alice', email: 'alice@example.com' },\n { id: 2, name: 'Bob', email: 'bob@example.com' },\n];\n\nexport function UserTable() {\n return ;\n}"
}
- ]
+ ],
+ "cli_commands": {
+ "init": "npx keter-ui init — detect project, install deps, inject tokens, configure Tailwind, create layout",
+ "add_button": "npx keter-ui add button",
+ "add_modal": "npx keter-ui add modal",
+ "add_dashboard": "npx keter-ui add dashboard — full production dashboard template"
+ },
+ "design_tokens": {
+ "css_import": "@import '@keter-ui/tokens/css/tokens.css';",
+ "primary_color": "var(--primary-500)",
+ "dark_mode": "Add class 'dark' to element"
+ },
+ "rtl": {
+ "enable": "import { setDirection } from '@keter-ui/rtl'; setDirection('rtl');",
+ "hook": "const { isRTL, toggleDirection } = useRTL();",
+ "tailwind_tip": "Use ms-*, me-*, ps-*, pe-* utilities instead of ml-*, mr-*, pl-*, pr-*"
+ }
}
diff --git a/apps/docs/app/[[...mdx]]/page.tsx b/apps/docs/app/[[...mdx]]/page.tsx
new file mode 100644
index 0000000..dd77812
--- /dev/null
+++ b/apps/docs/app/[[...mdx]]/page.tsx
@@ -0,0 +1,17 @@
+import { generateStaticParamsFor, importPage } from 'nextra/pages';
+import { useMDXComponents } from '../../mdx-components';
+
+export const generateStaticParams = generateStaticParamsFor('mdx');
+
+export async function generateMetadata(props: { params: Promise<{ mdx: string[] }> }) {
+ const params = await props.params;
+ const { metadata } = await importPage(params.mdx);
+ return metadata;
+}
+
+export default async function Page(props: { params: Promise<{ mdx: string[] }> }) {
+ const params = await props.params;
+ const { default: MDXContent, toc, metadata } = await importPage(params.mdx);
+ const components = useMDXComponents({});
+ return ;
+}
diff --git a/apps/docs/app/layout.tsx b/apps/docs/app/layout.tsx
new file mode 100644
index 0000000..ac75686
--- /dev/null
+++ b/apps/docs/app/layout.tsx
@@ -0,0 +1,28 @@
+import { Footer, Layout, Navbar } from 'nextra-theme-docs'
+import { Head } from 'nextra/components'
+import { getPageMap } from 'nextra/page-map'
+import React from 'react'
+import 'nextra-theme-docs/style.css'
+
+export const metadata = {
+ title: 'Keter UI Documentation',
+ description: 'The unified UI platform for modern developers.',
+}
+
+export default async function RootLayout({ children }: { children: React.ReactNode }) {
+ const pageMap = await getPageMap()
+ return (
+
+
+ Keter UI} />}
+ footer={}
+ pageMap={pageMap}
+ >
+ {children}
+
+
+
+ )
+}
diff --git a/apps/docs/content/_meta.json b/apps/docs/content/_meta.json
new file mode 100644
index 0000000..42a0f40
--- /dev/null
+++ b/apps/docs/content/_meta.json
@@ -0,0 +1,12 @@
+{
+ "index": {
+ "title": "Introduction",
+ "display": "hidden"
+ },
+ "getting-started": "Getting Started",
+ "installation": "Installation",
+ "components": "Components",
+ "dashboard": "Dashboard",
+ "rtl": "RTL Support",
+ "cli": "CLI"
+}
diff --git a/apps/docs/content/cli.mdx b/apps/docs/content/cli.mdx
new file mode 100644
index 0000000..a68cdbf
--- /dev/null
+++ b/apps/docs/content/cli.mdx
@@ -0,0 +1,95 @@
+---
+title: CLI
+description: Keter UI CLI — initialize projects and scaffold components in seconds.
+---
+
+# CLI
+
+The Keter UI CLI automates project setup and component scaffolding.
+
+## Install
+
+No install required — use `npx`:
+
+```bash
+npx keter-ui
+```
+
+Or install globally:
+
+```bash
+npm install -g @keter-ui/cli
+```
+
+## Commands
+
+### `keter-ui init`
+
+Initialize Keter UI in an existing project.
+
+```bash
+npx keter-ui init
+```
+
+What it does:
+1. **Detects** your project type (Next.js or Vite)
+2. **Detects** your package manager (pnpm, yarn, npm)
+3. **Installs** `@keter-ui/react`, `@keter-ui/core`, `@keter-ui/tokens`, `@keter-ui/rtl`
+4. **Injects** design tokens into your global CSS
+5. **Creates** `tailwind.config.ts` with Keter UI color scales
+6. **Scaffolds** a base layout file (`KeterLayout.tsx` or `keter-layout.tsx`)
+
+### `keter-ui add `
+
+Add a pre-built component example to your project.
+
+```bash
+npx keter-ui add button
+npx keter-ui add modal
+npx keter-ui add dashboard
+```
+
+Available components:
+
+| Component | Description |
+| --- | --- |
+| `button` | Button usage example with all variants |
+| `input` | Input with label, error, and helper text |
+| `modal` | Modal with open/close and footer |
+| `card` | Card with header, body, footer |
+| `table` | Sortable data table with sample data |
+| `dashboard` | Full dashboard: sidebar, topbar, metrics, chart, activity, table |
+
+Each command creates a `.tsx` file in your `components/` directory (or `src/components/`).
+
+## Example output
+
+```
+ Keter UI — Adding dashboard
+ ─────────────────────────────────────
+
+ ✓ Created components/dashboard.tsx
+
+ Usage:
+ import { MyDashboard } from 'components/dashboard';
+```
+
+## CI / non-interactive
+
+The CLI is fully non-interactive — safe to run in CI pipelines and install scripts.
+
+## Configuration
+
+No configuration file is required. The CLI reads your existing project structure to determine where to write files.
+
+## Using with AI
+
+The CLI is designed to be invoked via AI prompts:
+
+```
+"Initialize a Keter UI project in Next.js with RTL support"
+→ npx keter-ui init
+
+"Add a full dashboard to my project"
+→ npx keter-ui add dashboard
+```
diff --git a/apps/docs/content/components/_meta.json b/apps/docs/content/components/_meta.json
new file mode 100644
index 0000000..176bb3b
--- /dev/null
+++ b/apps/docs/content/components/_meta.json
@@ -0,0 +1,7 @@
+{
+ "button": "Button",
+ "input": "Input",
+ "modal": "Modal",
+ "table": "Table",
+ "card": "Card"
+}
diff --git a/apps/docs/content/components/button.mdx b/apps/docs/content/components/button.mdx
new file mode 100644
index 0000000..7d65be6
--- /dev/null
+++ b/apps/docs/content/components/button.mdx
@@ -0,0 +1,84 @@
+---
+title: Button
+description: Accessible, variant-rich button component.
+---
+
+# Button
+
+A fully accessible button with multiple variants, sizes, and a loading state.
+
+## Import
+
+```tsx
+import { Button } from '@keter-ui/react';
+```
+
+## Usage
+
+```tsx
+
+```
+
+## Variants
+
+```tsx
+
+
+
+
+```
+
+## Sizes
+
+```tsx
+
+
+
+```
+
+## States
+
+```tsx
+
+
+```
+
+## Props
+
+| Prop | Type | Default | Description |
+| --- | --- | --- | --- |
+| `variant` | `'primary' \| 'secondary' \| 'ghost' \| 'danger'` | `'primary'` | Visual style |
+| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Button size |
+| `isLoading` | `boolean` | `false` | Shows a spinner and disables the button |
+| `disabled` | `boolean` | `false` | Disables the button |
+| `className` | `string` | — | Additional CSS classes |
+
+All native `