Skip to content

Commit 8dec6b9

Browse files
committed
fix: make some tweaks to the ui
1 parent 1bda937 commit 8dec6b9

9 files changed

Lines changed: 6468 additions & 521 deletions

File tree

README.md

Lines changed: 2 additions & 236 deletions
Original file line numberDiff line numberDiff line change
@@ -1,237 +1,3 @@
1-
# CH-UI 🚀
1+
# Formizee Analytics
22

3-
[![GitHub license](https://img.shields.io/github/license/caioricciuti/ch-ui)](https://github.com/caioricciuti/ch-ui/blob/main/LICENSE)
4-
![Node.js Version](https://img.shields.io/badge/node-%3E%3D20.x-brightgreen)
5-
![npm Version](https://img.shields.io/badge/npm-%3E%3D10.x-brightgreen)
6-
[![Docker Image](https://img.shields.io/badge/docker-ghcr.io%2Fcaioricciuti%2Fch--ui-blue)](https://github.com/caioricciuti/ch-ui/pkgs/container/ch-ui)
7-
8-
![Docker Pulls](https://img.shields.io/badge/pulls-30.6k-blue?logo=docker&style=flat-square)
9-
10-
A modern, feature-rich web interface for ClickHouse databases. CH-UI provides an intuitive platform for managing ClickHouse databases, executing queries, and visualizing metrics about your instance.
11-
12-
## 🌟 Key Features
13-
14-
### Core Functionality
15-
- **🔄 ClickHouse Integration**: Seamless connection and interaction with ClickHouse databases
16-
- **📝 Advanced SQL Editor**:
17-
- Intelligent IntelliSense with autocomplete suggestions
18-
- Syntax highlighting
19-
- Query history tracking
20-
- Multi-tab query execution
21-
- **📊 Dynamic Data Visualization**:
22-
- Interactive data tables with sorting and filtering
23-
- Custom visualization options
24-
- Real-time data updates
25-
26-
### Performance & Architecture
27-
- **⚡ Optimized Performance**:
28-
- IndexedDB-based caching system
29-
- Efficient state management
30-
- Responsive UI even with large datasets
31-
- **🔒 TypeScript Implementation**: Full TypeScript support for improved code quality and developer experience
32-
- **📦 Custom Table Management**: Built-in table handling without third-party dependencies
33-
34-
### Monitoring & Analytics
35-
- **📈 Enhanced Metrics Dashboard**:
36-
- Query performance monitoring
37-
- Table statistics and insights
38-
- System settings overview
39-
- Network performance metrics
40-
- Resource utilization tracking
41-
42-
### User Experience
43-
- **🎨 Modern UI/UX**:
44-
- Clean, intuitive interface
45-
- Responsive design
46-
- Dark/Light mode support
47-
- Customizable layouts
48-
49-
## 📸 Screenshots
50-
51-
<div style="display: flex; justify-content: space-between; margin-bottom: 20px;">
52-
<img src="./public/screen-shots/settings.png" alt="Settings Interface" width="32%" />
53-
<img src="./public/screen-shots/main-page.png" alt="Main Dashboard" width="32%" />
54-
<img src="./public/screen-shots/instance-metrics.png" alt="Instance Metrics" width="32%" />
55-
</div>
56-
57-
## 🚀 Getting Started
58-
59-
### Option 1: Docker (Recommended)
60-
61-
#### Simple Start
62-
```bash
63-
docker run -p 5521:5521 ghcr.io/caioricciuti/ch-ui:latest
64-
```
65-
66-
#### Using Docker Compose
67-
Create a `docker-compose.yml`:
68-
```yaml
69-
services:
70-
ch-ui:
71-
image: ghcr.io/caioricciuti/ch-ui:latest
72-
restart: always
73-
ports:
74-
- "5521:5521"
75-
environment:
76-
VITE_CLICKHOUSE_URL: "http://your-clickhouse-server:8123"
77-
VITE_CLICKHOUSE_USER: "your-username"
78-
VITE_CLICKHOUSE_PASS: "your-password"
79-
```
80-
81-
Then run:
82-
```bash
83-
docker-compose up -d
84-
```
85-
86-
#### Environment Variables
87-
| Variable | Description | Required | Default |
88-
|----------|-------------|-----------|---------|
89-
| VITE_CLICKHOUSE_URL | ClickHouse server URL | Yes | - |
90-
| VITE_CLICKHOUSE_USER | ClickHouse username | Yes | - |
91-
| VITE_CLICKHOUSE_PASS | ClickHouse password | No | "" |
92-
| VITE_CLICKHOUSE_USE_ADVANCED | Enable advanced ClickHouse features (e.g., custom settings, system tables access) | No | false |
93-
| VITE_CLICKHOUSE_CUSTOM_PATH | Custom path for ClickHouse HTTP interface | No | - |
94-
95-
#### Advanced Docker Configuration
96-
```yaml
97-
services:
98-
ch-ui:
99-
image: ghcr.io/caioricciuti/ch-ui:latest
100-
restart: always
101-
ports:
102-
- "5521:5521"
103-
environment:
104-
VITE_CLICKHOUSE_URL: "http://your-clickhouse-server:8123"
105-
VITE_CLICKHOUSE_USER: "your-username"
106-
VITE_CLICKHOUSE_PASS: "your-password"
107-
# Advanced Options
108-
VITE_CLICKHOUSE_USE_ADVANCED: "true" # Enable advanced features
109-
VITE_CLICKHOUSE_CUSTOM_PATH: "/custom/path" # Optional: Custom HTTP path
110-
```
111-
112-
Or using Docker run with advanced options:
113-
```bash
114-
docker run -p 5521:5521 \
115-
-e VITE_CLICKHOUSE_URL=http://your-clickhouse-server:8123 \
116-
-e VITE_CLICKHOUSE_USER=your-username \
117-
-e VITE_CLICKHOUSE_PASS=your-password \
118-
-e VITE_CLICKHOUSE_USE_ADVANCED=true \
119-
-e VITE_CLICKHOUSE_CUSTOM_PATH=/custom/path \
120-
ghcr.io/caioricciuti/ch-ui:latest
121-
```
122-
123-
### Option 2: Build from Source
124-
125-
#### Prerequisites
126-
- Node.js >= 20.x
127-
- npm >= 10.x
128-
129-
#### Installation Steps
130-
```bash
131-
# Clone the repository
132-
git clone https://github.com/caioricciuti/ch-ui.git
133-
134-
# Navigate to project directory
135-
cd ch-ui
136-
137-
# Install dependencies
138-
npm install
139-
140-
# Build the project
141-
npm run build
142-
143-
# Start for development
144-
npm run dev
145-
146-
# Start for production
147-
npm run preview
148-
```
149-
150-
## 🧪 Development Environment
151-
152-
### Local ClickHouse Instance
153-
For development purposes, you can run a local ClickHouse instance using Docker:
154-
155-
```bash
156-
# Start ClickHouse
157-
docker-compose -f docker-compose-dev.yml up -d
158-
159-
# Stop ClickHouse
160-
docker-compose -f docker-compose-dev.yml down
161-
```
162-
163-
Default credentials:
164-
- URL: http://localhost:8123
165-
- Username: dev
166-
- Password: dev
167-
168-
Data is persisted in `.clickhouse_local_data` directory.
169-
170-
## 🔒 Security Recommendations
171-
172-
### Production Deployment
173-
When deploying CH-UI in a production environment, consider the following security measures:
174-
175-
1. **Reverse Proxy Setup**
176-
- Use Nginx/Apache as a reverse proxy
177-
- Enable HTTPS
178-
- Implement authentication
179-
180-
2. **Network Security**
181-
- Run on a private network when possible
182-
- Use VPN for remote access
183-
- Implement IP whitelisting
184-
185-
### Example Nginx Configuration with Basic Auth
186-
```nginx
187-
server {
188-
listen 80;
189-
server_name your-domain.com;
190-
191-
location / {
192-
auth_basic "Restricted Access";
193-
auth_basic_user_file /etc/nginx/.htpasswd;
194-
195-
proxy_pass http://localhost:5521;
196-
proxy_set_header Host $host;
197-
proxy_set_header X-Real-IP $remote_addr;
198-
}
199-
}
200-
```
201-
202-
## 📚 Documentation
203-
204-
![Website](https://img.shields.io/website?url=https%3A%2F%2Fch-ui.caioricciuti.com)
205-
206-
207-
For detailed documentation, visit our [official documentation](https://ch-ui.caioricciuti.com/docs/getting-started?utm_source=ch-ui&utm_medium=gitHubReadme).
208-
209-
## 🤝 Contributing
210-
211-
Contributions are welcome! Please feel free to submit a Pull Request.
212-
213-
## ❤️ Sponsors
214-
215-
<div align="center">
216-
<a href="https://iberodata.es/?utm_source=ch-ui&utm_medium=github" target="_blank">
217-
<img src="https://iberodata.es/logo.png" alt="Iberodata" width="100"/>
218-
</a>
219-
220-
<p><strong>Iberodata</strong> - Empowering businesses with data-driven solutions</p>
221-
</div>
222-
223-
## ☕ Support the Project
224-
225-
If you find CH-UI helpful, consider supporting its development:
226-
227-
<div align="center">
228-
<a href="https://buymeacoffee.com/caioricciuti?utm_source=ch-ui&utm_medium=github">
229-
<img src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=&slug=caioricciuti&button_colour=FF813F&font_colour=ffffff&font_family=Cookie&outline_colour=000000&coffee_colour=FFDD00" alt="Buy Me A Coffee" />
230-
</a>
231-
</div>
232-
233-
Your support helps maintain and improve CH-UI! ✨
234-
235-
## 📄 License
236-
237-
This project is licensed under the MIT License - see the [LICENSE](./LICENSE.md) file for details.
3+
A fork of [ch-ui](https://github.com/caioricciuti/ch-ui) for internal usage with clickhouse

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
5-
<link rel="icon" type="image/svg+xml" href="/logo.png" />
5+
<link rel="icon" type="image/svg+xml" href="/logo.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>CH-UI - Data is better when we see it!</title>
7+
<title>Analytics</title>
88
</head>
99
<body>
1010
<div id="root"></div>

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "ch-ui",
2+
"name": "@formizee/clickhouse-ui",
33
"private": true,
44
"author": {
55
"name": "Caio Ricciuti",
@@ -46,6 +46,7 @@
4646
"cmdk": "^1.0.0",
4747
"date-fns": "^3.6.0",
4848
"framer-motion": "^11.1.7",
49+
"lodash": "4.17.21",
4950
"lucide-react": "^0.368.0",
5051
"monaco-editor": "^0.48.0",
5152
"papaparse": "^5.4.1",
@@ -90,5 +91,6 @@
9091
"chrome >= 88",
9192
"firefox >= 79",
9293
"safari >= 14"
93-
]
94+
],
95+
"packageManager": "pnpm@9.12.3"
9496
}

0 commit comments

Comments
 (0)