{"id":39617051,"url":"https://github.com/daun-gatal/chouse-ui","last_synced_at":"2026-06-16T06:01:22.402Z","repository":{"id":331902827,"uuid":"1131939870","full_name":"daun-gatal/chouse-ui","owner":"daun-gatal","description":"A modern, production-grade web UI for ClickHouse databases. Built with React, TypeScript, and Bun.","archived":false,"fork":false,"pushed_at":"2026-06-13T00:08:13.000Z","size":10396,"stargazers_count":40,"open_issues_count":5,"forks_count":4,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-13T02:24:37.115Z","etag":null,"topics":["clickhouse","clickhouse-ui","database-management","open-source","rbac","third-party","webapp"],"latest_commit_sha":null,"homepage":"https://chouse-ui.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daun-gatal.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-11T01:43:45.000Z","updated_at":"2026-06-13T00:04:10.000Z","dependencies_parsed_at":"2026-02-11T03:19:44.166Z","dependency_job_id":null,"html_url":"https://github.com/daun-gatal/chouse-ui","commit_stats":null,"previous_names":["daun-gatal/chouse-ui"],"tags_count":60,"template":false,"template_full_name":null,"purl":"pkg:github/daun-gatal/chouse-ui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daun-gatal%2Fchouse-ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daun-gatal%2Fchouse-ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daun-gatal%2Fchouse-ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daun-gatal%2Fchouse-ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daun-gatal","download_url":"https://codeload.github.com/daun-gatal/chouse-ui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daun-gatal%2Fchouse-ui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34393302,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clickhouse","clickhouse-ui","database-management","open-source","rbac","third-party","webapp"],"created_at":"2026-01-18T08:20:10.788Z","updated_at":"2026-06-16T06:01:22.351Z","avatar_url":"https://github.com/daun-gatal.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"public/logo.svg\" alt=\"CHouse UI\" width=\"120\" /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eCHouse UI\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eA web interface for ClickHouse with built-in RBAC, fleet monitoring, and an AI SRE\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#features\"\u003eFeatures\u003c/a\u003e •\n  \u003ca href=\"#architecture\"\u003eArchitecture\u003c/a\u003e •\n  \u003ca href=\"#quick-start\"\u003eQuick Start\u003c/a\u003e •\n  \u003ca href=\"#deployment\"\u003eDeployment\u003c/a\u003e •\n  \u003ca href=\"#configuration\"\u003eConfiguration\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://chouse-ui.com\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Website-chouse--ui.com-blue?style=flat\u0026logo=googlechrome\u0026logoColor=white\" alt=\"Website\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/daun-gatal/chouse-ui/actions/workflows/ci.yml\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/daun-gatal/chouse-ui/ci.yml?label=Build%20%26%20Test\" alt=\"Build \u0026 Test\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/daun-gatal/chouse-ui/actions/workflows/github-pages.yml\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/daun-gatal/chouse-ui/github-pages.yml?label=GitHub%20Pages\" alt=\"GitHub Pages\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/daun-gatal/chouse-ui/actions/workflows/release.yml\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/daun-gatal/chouse-ui/auto-release.yml?label=Release\" alt=\"Release\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## Overview\n\nCHouse UI is the team operator's console for on-prem ClickHouse. Most tools nail one piece — a query workspace, a dashboard, an AI assistant, a cluster monitor; this is the **combination**: a team access layer (app-level **RBAC**, audit logging, and encrypted server-side credentials so the browser never sees a password), **multi-cluster fleet monitoring** with Slack/email alerts, and **Chouse AI** — an autonomous, read-only SRE that runs root-cause scans, optimizes queries and diagnoses errors right in the monitoring tabs, writes fixes with before→after `EXPLAIN` proof, and delivers RCA to Slack on a breach. Open-source and Apache 2.0 — so you never copy-paste an error into a chatbot or hunt for a rewrite; the diagnosis and the fix live next to the problem.\n\n### Why CHouse UI?\n\nCHouse UI provides security and access control features for teams that need:\n\n| Feature | CHouse UI |\n|---------|-------------------|\n| **Credential Management** | Encrypted server-side storage (never in browser) |\n| **Architecture** | Secure backend proxy (no direct browser-to-ClickHouse) |\n| **Access Control** | Full RBAC with granular permissions |\n| **Multi-Connection** | Manage multiple ClickHouse servers |\n| **Audit Trail** | Audit logging |\n| **Monitoring** | ClickHouse-native observability — query logs, memory breakdown, top-resource queries, replica lag, parts/merges, schema lints — no exporter required |\n| **Fleet view** | Watch every cluster at once — one pane, per-card polling, status / memory / lag / exceptions, drill into any node |\n| **Chouse AI (SRE)** | Autonomous read-only diagnostics — root-cause fleet scans with history + auto-RCA to Slack/email, plus in-tab query optimization (before→after `EXPLAIN`) and error/parts diagnosis |\n\n---\n\n## Features\n\n### 🔐 Security \u0026 Access Control\n- **RBAC System** - Role-based permissions (Super Admin, Admin, Developer, Analyst, Viewer, Guest)\n- **ClickHouse User Management** - Create and manage ClickHouse users with native grants (Developer, Analyst, Viewer roles)\n- **Encrypted Credentials** - AES-256-GCM encryption for ClickHouse connection passwords\n- **Password Hashing** - Argon2id for user passwords\n- **JWT Authentication** - Secure token-based sessions with access and refresh tokens\n- **Data Access Rules** - Granular database/table permissions per user or role\n- **Audit Logging** - Track all user actions and query history\n- **AI-Powered Analysis** - Built-in query optimizer and debugger to improve performance and security\n\n### 🗄️ Database Management\n- **Multi-Connection Support** - Manage multiple ClickHouse servers\n- **Database Explorer** - Tree view with schema inspection\n- **Database Operations** - Create and drop databases\n- **Table Management** - Create, alter, and drop tables with various engines (MergeTree, ReplicatedMergeTree, etc.)\n- **File Upload** - Upload CSV, TSV, or JSON files to existing tables\n- **Data Preview** - Sample data with pagination\n\n### 📊 Query Workspace\n- **SQL Editor** - Monaco editor with syntax highlighting, auto-completion, and Visual EXPLAIN\n- **Query Execution** - Run queries with per-query execution statistics\n- **Saved Queries** - Persist frequently used queries, organize by connection\n- **Data Export** - CSV, JSON, TSV formats\n- **AI Assist** - Optimizer / Debugger / Chat with schema-aware context (provider-pluggable: OpenAI, Anthropic, Google, etc.)\n- **Overview Dashboard** - System stats, recent queries, and quick actions (admin only)\n\n### 🔬 Monitoring \u0026 Observability\n- **Query logs** with five sub-views over `system.query_log`:\n  - **Queries** — every execution as a dense table with sortable columns, SQL-keyword tooltip preview, memory-pressure flag (Flame ≥ 25 % / AlertTriangle ≥ 10 % cluster RAM), row checkboxes for side-by-side **Compare**, expanded-row drill-downs for **Profile events** and **Views triggered** (`system.query_views_log`)\n  - **Patterns** — `normalizeQuery()` rollup with cumulative cost (Runs / Avg dur / **Total dur** / Max mem / Read rows / Read bytes), default sort Total dur DESC — finds the patterns hogging the most wall-clock time across all repetitions\n  - **By table** — `arrayJoin(tables)` per-table rollup with `arrayFilter` push-down so busy clusters return in ~1 s\n  - **By Redash** — groups every Redash-originated query by the `query_id` embedded in its leading SQL comment (`/* … query_id: NNNN … */`), so you can map cluster load back to the saved dashboard query. Runs / Min·Avg·Max·Total duration / Min·Max memory / read rows / read bytes, all sortable\n  - **Histogram** — distribution of duration / memory / read rows / read bytes across the active window, with **p50 / p95 / p99** chips (p99 amber-tinted to flag the tail)\n- **Query timeline chart** — stacked bar / stacked area / line variants, per `query_kind`\n- **Custom time range** — 15 m / 1 h / 6 h / 24 h presets + a Grafana-style drill-down calendar (day → month → year) in one popover\n- **Parts** — `system.part_log` stacked area chart of merges, mutations, downloads, removals + paginated event table\n- **Schema advisor** — Nullable column + oversized integer linter over `system.parts_columns`, ranked by on-disk bytes (renamed from \"Schema doctor\" to disambiguate from the AI Fleet Doctor)\n- **Cluster activity** — `system.mutations` + `system.replication_queue` with status chips, a blocked-task indicator strip (long queries / long merges / open mutations / max replica lag), and a per-replica status panel (`system.replicas` lag + queue depth)\n- **Live queries** — running queries with **CPU time + thread count**, sortable by duration / memory / rows / CPU, and kill support. A server-memory pressure strip puts the per-query totals in context (resident / total %)\n- **Metrics** — Overview / Performance / Storage / Merges / Errors / **Memory** / **CPU** / **ZooKeeper** / Network tabs:\n  - **Memory** — server RAM breakdown (RSS attributed to active queries / caches / merges / primary keys / index, vs total), allocator history, and a top-memory-queries table\n  - **CPU** — load avg / threads / pools, CPU mode-split + concurrency charts, and a top-CPU-queries table\n  - **ZooKeeper** — Keeper transactions, traffic, and system-load time-series\n\n### 🛰️ Fleet \u0026 Chouse AI\n- **Fleet view** (`/fleet`) — every configured connection side by side, grid or row layout. Each card polls its own connection independently, so a slow/down cluster never blocks the grid. Status (healthy / degraded / down), memory %, active queries, longest-running, exceptions feed, inventory strip, per-node trend sparklines. Drill into any card → that cluster's monitoring.\n- **Fleet poller** — a backend worker caches per-cluster metric snapshots to SQLite on a schedule (`FLEET_POLL_INTERVAL_SECONDS`), so the fleet page reads one fast endpoint instead of every browser hammering every cluster. HA-safe via a single-instance advisory lease. Toggle with `FLEET_POLLER_ENABLED`.\n- **Threshold alerts** — node memory %, per-query memory, and long-running-query rules with hysteresis to avoid flapping. Delivered as Slack Block Kit cards + email (SMTP), configured per install.\n- **Chouse AI — Fleet Doctor** (`/doctor`) — an autonomous, **read-only** AI SRE. Scans the fleet with a guarded `query_node` tool (single `SELECT`, `system.*` only, ClickHouse `readonly=1`), pins root causes, and writes a structured report: per-node verdict, recommendations, evidence, and a heavy-query deep-dive. Reports persist with a history rail; scope (node subset) + time-window selectable. On an alert breach it can auto-run RCA and deliver the analysis to Slack/email. Advisory only — the AI never mutates the cluster.\n- **Chouse AI in the monitoring tabs** — the same read-only engine surfaced where you're already looking, so you fix a problem without leaving the tab. **Optimize with Chouse AI** on a Query Logs row → an optimized rewrite with the same result, a before→after `EXPLAIN` estimate, and one click to **Open in Explorer**. **Fix** on a `system.errors` row → cause / impact / ordered solutions. **Diagnose** on a part-log row → part-health read (merge pressure, too many parts, partition key). Gated by `ai:optimize`; advisory only — review before running.\n- **Errors** (`/errors`) — a viewer over `system.errors` + the crash log, searchable and paginated, so recurring server-side errors surface without ad-hoc SQL.\n\n### 🎨 User Experience\n- **Editorial design system** — ClickHouse-yellow accent, Geist Sans + Geist Mono typography, hairline borders\n- **Light + dark themes** — full light theme with a warm-stone palette and amber-shifted brand, plus an **Auto** mode that switches by local time of day (light 06:00–18:00, dark otherwise). Every chart, table, and pill is theme-aware\n- **Command palette** — ⌘/Ctrl+K opens RBAC-gated quick switcher (recent queries, pages, databases, tables, saved queries, actions, help)\n- **Responsive** — works on desktop and tablet; container-query layouts adapt per component, not just per viewport\n- **Connection Selector** - Quick server switching\n- **Keyboard Shortcuts** - Power user support\n\n---\n\n## Quick Start\n\n### Prerequisites\n\n- [Bun](https://bun.sh/) v1.0+ (or Node.js 18+)\n- A ClickHouse server (or use Docker Compose)\n\n### Tested Compatibility\n\nSuccessfully tested with:\n- **ClickHouse**: Version 24.11 and 25 (monitoring suite verified end-to-end against a production 24.11 cluster)\n- **PostgreSQL**: Version 18 (for RBAC database)\n- **SQLite**: Version 3.51.0 (via Bun, for RBAC database)\n\n### Development Setup\n\n```bash\n# Clone the repository\ngit clone https://github.com/daun-gatal/chouse-ui.git\ncd chouse-ui\n\n# Install dependencies\nbun install\n\n# Start development servers\nbun run dev\n```\n\nThis starts:\n- **Frontend**: http://localhost:5173\n- **Backend**: http://localhost:5521\n\n### Default Login\n\nOn first run, an admin user is created:\n- **Email**: `admin@localhost`\n- **Username**: `admin`\n- **Password**: `admin123!`\n\n\u003e ⚠️ **Change this password immediately in production!**\n\n---\n\n### Deployment (Docker)\n\n```bash\n# Clone the repository\ngit clone https://github.com/daun-gatal/chouse-ui.git\ncd chouse-ui\n\n# Run with Docker Compose\ndocker-compose up -d\n```\n\nAccess at http://localhost:5521\n\n#### Production Deployment\n\nFor production, we recommend using an external highly-available PostgreSQL database for RBAC storage. See the [Configuration](#configuration) section for details on how to configure `RBAC_POSTGRES_URL`.\n\n---\n\n## Configuration\n\nCHouse UI can be configured using environment variables (`.env` file) or through a grouped YAML configuration file.\n\n### YAML Configuration (Recommended)\n\nYou can set all configuration options via a hierarchical YAML file. To use this, set the `CHOUSE_CONFIG_PATH` environment variable pointing to your YAML file:\n\n```bash\nCHOUSE_CONFIG_PATH=./config.yaml bun run packages/server/src/index.ts\n```\n\nExample (mirrors `.config.example.yaml`):\n```yaml\nport: 5521\nnode_env: production\nrbac:\n  db_type: sqlite           # or postgres\n  sqlite_path: ./data/rbac.db\n  encryption:\n    key: \"\"                 # openssl rand -hex 32  (required)\n    salt: \"\"                # openssl rand -hex 32  (required)\n  admin:\n    email: admin@localhost\n    username: admin\n    password: admin123!\njwt:\n  secret: \"\"                # openssl rand -base64 32  (required)\n  access_expiry: 4h\n  refresh_expiry: 7d\n```\n\n### Environment Variables\n\nAll configuration options are documented in [`.env.example`](.env.example). Key required variables:\n\n- `JWT_SECRET` — JWT signing secret (min 32 bytes) **Required**\n- `RBAC_ENCRYPTION_KEY` — AES-256 key for passwords (32-byte hex) **Required**\n- `RBAC_ENCRYPTION_SALT` — Salt for key derivation (32-byte hex) **Required**\n- `RBAC_DB_TYPE` — `sqlite` (default) or `postgres`\n- `RBAC_POSTGRES_URL` — PostgreSQL connection URL (for multi-instance deployments)\n\n### Generating Secrets\n\n```bash\n# Generate JWT secret\nopenssl rand -base64 32\n\n# Generate encryption key\nopenssl rand -hex 32\n\n# Generate strong password\nopenssl rand -base64 16\n```\n\n---\n\n## RBAC System\n\n### How RBAC Works\n\nCHouse UI has its **own permission system** that controls access to the web interface.\n\n**Two separate things:**\n\n1. **CHouse UI RBAC** (for the web interface):\n   - Controls who can use CHouse UI and what they can do\n   - Stored in CHouse UI's own database\n   - All queries are checked against these permissions before reaching ClickHouse\n\n2. **ClickHouse User Management** (optional feature):\n   - CHouse UI can create ClickHouse users with native grants\n   - These are actual ClickHouse users (not CHouse UI users)\n   - Useful if you want to manage ClickHouse users through the web interface\n\n**In simple terms:** CHouse UI's RBAC controls access to the web interface. It can also optionally create ClickHouse users, but that's a separate feature.\n\n### Role Hierarchy\n\n| Role | Description | Key Permissions |\n|------|-------------|-----------------|\n| **Super Admin** | Full system access | All permissions |\n| **Admin** | Server management | Users, roles, connections |\n| **Developer** | Write access | Insert, update, DDL |\n| **Analyst** | Read access | Select, export |\n| **Viewer** | Read-only | Select only |\n| **Guest** | Read-only access | View all tabs, read-only queries, system tables access |\n\n### Data Access Rules\n\nControl access to specific databases and tables:\n\n```\nRule: Allow \"analyst\" role to access \"analytics.*\"\nRule: Deny \"viewer\" role from \"system.*\"\nRule: Allow user \"john\" to access \"sales.orders\"\n```\n\nFeatures:\n- **Wildcards**: `*` matches any database/table\n- **Patterns**: Regex support for complex rules\n- **Deny Rules**: Explicit denials take precedence\n- **Priority**: Higher priority rules evaluated first\n\n### Permission Categories\n\n- **User Management**: Create, update, delete users\n- **Role Management**: Manage roles and permissions\n- **Connection Management**: Add/edit ClickHouse connections\n- **Query Operations**: Execute queries, DML, DDL; `ai:optimize` (in-tab AI query optimization + error/parts diagnosis)\n- **Table Operations**: Select, insert, update, delete\n- **Metrics \u0026 Monitoring**: Per-tab view grants — `logs:view`, `parts:view`, `schema_advisor:view`, `cluster:view`, `errors:view`\n- **Fleet Monitoring**: `fleet:view`, `doctor:view` (read reports), `doctor:run` (generate scans + schedules)\n- **System**: Audit logs, settings\n\n---\n\n## Architecture\n\nCHouse UI is a monorepo with two main packages:\n\n- **Frontend** (`src/`) — React 19 + Vite SPA with Zustand stores, TanStack Query, and shadcn/ui\n- **Backend** (`packages/server/`) — Bun + Hono API server with RBAC, ClickHouse proxy, and AI optimizer\n\n```mermaid\ngraph TB\n    subgraph Browser[\"Browser (React 19 SPA)\"]\n        UI[\"Vite 7 + React Router v7\"]\n        Stores[\"Zustand 4 Stores\"]\n        RQ[\"TanStack Query v5\"]\n        ApiClient[\"ApiClient (fetch)\"]\n    end\n\n    subgraph Server[\"Bun Server (packages/server)\"]\n        Hono[\"Hono v4\"]\n        MW[\"Middleware: CORS, Rate Limit, SQL Parser, Data Access\"]\n        Routes[\"API Routes: query, explorer, metrics, saved-queries, live-queries, upload, ai-chat\"]\n        Services[\"Services: ClickHouse proxy, AI Optimizer, Query Analyzer, AI Chat, Chat History, AI Config\"]\n        RBAC[\"RBAC: Auth, Users, Roles, Connections, Audit, ClickHouse Users, Data Access, User Preferences, AI Providers, AI Models\"]\n    end\n\n    subgraph External[\"External\"]\n        CH[\"ClickHouse\"]\n        AI[\"AI Provider (OpenAI, Anthropic, Google, etc.)\"]\n        DB[\"SQLite / PostgreSQL\"]\n    end\n\n    UI --\u003e Stores --\u003e ApiClient\n    UI --\u003e RQ --\u003e ApiClient\n    ApiClient --\u003e|\"/api/*\"| Hono\n    Hono --\u003e MW --\u003e Routes --\u003e Services\n    Routes --\u003e RBAC\n    Services --\u003e|\"@clickhouse/client\"| CH\n    Services --\u003e|\"AI SDK v6\"| AI\n    RBAC --\u003e|\"Drizzle ORM\"| DB\n```\n\n---\n\n## Security\n\n### Reporting Vulnerabilities\n\nIf you discover a security vulnerability, please see [SECURITY.md](SECURITY.md) for information on how to report it responsibly.\n\n### Production Checklist\n\n- [ ] Generate unique `JWT_SECRET` (min 32 bytes)\n- [ ] Generate unique `RBAC_ENCRYPTION_KEY` (32 bytes hex)\n- [ ] Generate unique `RBAC_ENCRYPTION_SALT` (32 bytes hex)\n- [ ] Change default admin password\n- [ ] Set `CORS_ORIGIN` to your domain\n- [ ] Use PostgreSQL for multi-instance deployments\n- [ ] Enable HTTPS via reverse proxy\n- [ ] Configure firewall rules\n- [ ] Set up regular backups\n\n### Security Features\n\n| Feature | Description |\n|---------|-------------|\n| **No Browser Credentials** | ClickHouse passwords never reach the frontend |\n| **Encrypted Storage** | AES-256-GCM for ClickHouse connection passwords |\n| **Password Hashing** | Argon2id for user passwords |\n| **JWT Tokens** | Short-lived access tokens, long-lived refresh tokens |\n| **RBAC Enforcement** | Every request checked against permissions |\n| **Query Validation** | SQL parsed and validated against data access rules |\n| **Audit Logging** | All actions logged with user context |\n\n---\n\n## Database Migrations\n\n**Migrations run automatically on server startup** — no manual intervention required.\n\n| Scenario | What Happens |\n|----------|--------------|\n| **Fresh install** | Creates schema, seeds roles/permissions/admin user |\n| **Version upgrade** | Applies only pending migrations |\n| **Normal restart** | No migrations needed |\n\n### Upgrading (Docker)\n\n```bash\ndocker pull ghcr.io/daun-gatal/chouse-ui:latest\ndocker-compose up -d\ndocker logs chouse-ui | grep RBAC   # verify migration status\n```\n\nFor manual migration CLI tools, see `packages/server/` scripts: `bun run rbac:status`, `bun run rbac:migrate`, `bun run rbac:seed`.\n\n---\n\n## Contributing\n\nWe welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on how to contribute to this project.\n\n---\n\n## License\n\nThis project is licensed under the Apache License 2.0. See the [LICENSE](LICENSE) file for details.\n\n### Third-Party Code\n\nThis project was initially based on **[CH-UI](https://github.com/caioricciuti/ch-ui)** by [Caio Ricciuti](https://github.com/caioricciuti). While significant modifications and additions have been made, we acknowledge the original work and maintain attribution as required by the Apache License 2.0.\n\n## Acknowledgments\n\n### Special Thanks\n\n**[CH-UI](https://github.com/caioricciuti/ch-ui)** by [Caio Ricciuti](https://github.com/caioricciuti) — This project was inspired by CH-UI's design and user experience.\n\n**[QueryDog](https://github.com/benjaminwootton/QueryDog)** by [Benjamin Wootton](https://benjaminwootton.com) (Elastic License 2.0) — The Monitoring deep-dive (Logs sub-views Queries / Patterns / By table / Histogram, Parts, Schema doctor, Cluster activity, and the Query timeline chart) is heavily inspired by QueryDog's chart-plus-table layout and aggregation patterns over ClickHouse system tables. No QueryDog source code is bundled here; every component was rewritten on top of React 19 + shadcn/ui + recharts + the editorial design system. Full attribution and the list of adapted ideas is in [NOTICE](./NOTICE).\n\n### Built With\n\n#### Runtime \u0026 Server\n- [Bun](https://bun.sh/) — JavaScript runtime \u0026 package manager\n- [Hono](https://hono.dev/) — Web framework\n- [Drizzle ORM](https://orm.drizzle.team/) — Database ORM (SQLite / PostgreSQL)\n- [Pino](https://getpino.io/) — Structured JSON logging\n- [jose](https://github.com/panva/jose) — JWT signing \u0026 verification\n- [Vercel AI SDK](https://sdk.vercel.ai/) — Multi-provider AI (OpenAI, Anthropic, Google, etc.)\n- [node-sql-parser](https://github.com/taozhi8833998/node-sql-parser) — SQL parsing \u0026 validation\n\n#### Frontend\n- [React](https://react.dev/) v19 — UI library\n- [Vite](https://vitejs.dev/) v7 — Build tool\n- [React Router](https://reactrouter.com/) v7 — Routing\n- [Zustand](https://zustand-demo.pmnd.rs/) — State management\n- [TanStack Query](https://tanstack.com/query) — Data fetching \u0026 caching\n- [TanStack Table](https://tanstack.com/table) — Headless table\n- [TanStack Virtual](https://tanstack.com/virtual) — List virtualization\n- [shadcn/ui](https://ui.shadcn.com/) + [Radix UI](https://www.radix-ui.com/) — UI components\n- [Tailwind CSS](https://tailwindcss.com/) v4 — Styling\n- [Monaco Editor](https://microsoft.github.io/monaco-editor/) — SQL editor\n- [AG Grid](https://www.ag-grid.com/) — Data grid\n- [Recharts](https://recharts.org/) — Charts\n- [uPlot](https://github.com/leeoniya/uPlot) — High-performance time-series charts\n- [React Hook Form](https://react-hook-form.com/) + [Zod](https://zod.dev/) — Forms \u0026 validation\n- [Framer Motion](https://www.framer.com/motion/) — Animations\n- [cmdk](https://cmdk.paco.me/) — Command palette\n- [DOMPurify](https://github.com/cure53/DOMPurify) — HTML sanitization\n\n#### ClickHouse\n- [@clickhouse/client](https://github.com/ClickHouse/clickhouse-js) — Server-side native client\n- [@clickhouse/client-web](https://github.com/ClickHouse/clickhouse-js) — Browser-side client\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaun-gatal%2Fchouse-ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaun-gatal%2Fchouse-ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaun-gatal%2Fchouse-ui/lists"}