|
1 | | -# README |
| 1 | +# openGemini Studio |
2 | 2 |
|
3 | | -## About |
| 3 | +<p align="center"> |
| 4 | + <a href="README.md">English</a> | <a href="README_zh-CN.md">简体中文</a> |
| 5 | +</p> |
4 | 6 |
|
5 | | -This is the official Wails Vue-TS template. |
| 7 | +<p align="center"> |
| 8 | + <img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="License"> |
| 9 | + <img src="https://img.shields.io/badge/Go-1.24+-00ADD8?logo=go" alt="Go Version"> |
| 10 | + <img src="https://img.shields.io/badge/Vue.js-3.x-4FC08D?logo=vue.js" alt="Vue.js"> |
| 11 | + <img src="https://img.shields.io/badge/TypeScript-5.x-3178C6?logo=typescript" alt="TypeScript"> |
| 12 | +</p> |
6 | 13 |
|
7 | | -You can configure the project by editing `wails.json`. More information about the project settings can be found |
8 | | -here: https://wails.io/docs/reference/project-config |
| 14 | +A modern, cross-platform desktop client for [openGemini](https://github.com/openGemini/openGemini) time-series database. Built with Wails, Vue 3, and TypeScript to provide a native desktop experience for database management, query execution, and data visualization. |
9 | 15 |
|
10 | | -## Live Development |
| 16 | +## 📋 Table of Contents |
11 | 17 |
|
12 | | -To run in live development mode, run `wails dev` in the project directory. This will run a Vite development |
13 | | -server that will provide very fast hot reload of your frontend changes. If you want to develop in a browser |
14 | | -and have access to your Go methods, there is also a dev server that runs on http://localhost:34115. Connect |
15 | | -to this in your browser, and you can call your Go code from devtools. |
| 18 | +- [Features](#-features) |
| 19 | +- [Screenshots](#-screenshots) |
| 20 | +- [Getting Started](#-getting-started) |
| 21 | + - [Prerequisites](#prerequisites) |
| 22 | + - [Installation](#installation) |
| 23 | +- [Usage](#-usage) |
| 24 | +- [Building from Source](#-building-from-source) |
| 25 | +- [Development](#-development) |
| 26 | +- [Architecture](#-architecture) |
| 27 | +- [Contributing](#-contributing) |
| 28 | +- [License](#-license) |
| 29 | +- [Community](#-community) |
| 30 | +- [Acknowledgments](#-acknowledgments) |
16 | 31 |
|
17 | | -## Building |
| 32 | +## ✨ Features |
18 | 33 |
|
19 | | -To build a redistributable, production mode package, use `wails build`. |
| 34 | +### Core Functionality |
| 35 | +- **Multi-Connection Management**: Connect to multiple openGemini instances simultaneously with support for HTTP/HTTPS protocols |
| 36 | +- **SQL Query Editor**: Advanced InfluxQL query editor with syntax highlighting and auto-completion |
| 37 | +- **Query Execution**: Execute queries with real-time results display and performance metrics |
| 38 | +- **Data Visualization**: View query results in a customizable table format with resizable columns |
| 39 | +- **Query History**: Persistent query history with success/failure tracking and execution time |
| 40 | + |
| 41 | +### Database Operations |
| 42 | +- **Database Explorer**: Browse databases, measurements, retention policies, and fields in a tree view |
| 43 | +- **Metadata Management**: View and manage database metadata including retention policies |
| 44 | +- **Data Writing**: Support for INSERT operations with line protocol |
| 45 | +- **Batch Operations**: Execute multiple queries in sequence |
| 46 | + |
| 47 | +### User Experience |
| 48 | +- **Cross-Platform**: Native desktop application for Windows, macOS, and Linux |
| 49 | +- **Internationalization**: Built-in support for English and Chinese (zh-CN) |
| 50 | +- **Theme Support**: Light, dark, and system-following theme modes |
| 51 | +- **Customizable**: Configurable fonts, history limits, and data directories |
| 52 | +- **Debug Mode**: Optional debug mode for detailed logging and diagnostics |
| 53 | + |
| 54 | +### Security & Connectivity |
| 55 | +- **TLS/SSL Support**: Secure connections with custom CA certificates |
| 56 | +- **Certificate Management**: Client certificate and key support |
| 57 | +- **Authentication**: Username/password authentication |
| 58 | +- **Flexible Configuration**: Per-connection security settings |
| 59 | + |
| 60 | +## 📸 Screenshots |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | +## 🚀 Getting Started |
| 65 | + |
| 66 | +### Prerequisites |
| 67 | + |
| 68 | +**For End Users:** |
| 69 | +- No prerequisites needed - download and run the pre-built binary for your platform |
| 70 | + |
| 71 | +**For Developers:** |
| 72 | +- Go 1.19 or higher |
| 73 | +- Node.js 16 or higher |
| 74 | +- npm or yarn |
| 75 | +- Wails CLI v2 |
| 76 | + |
| 77 | +### Installation |
| 78 | + |
| 79 | +#### Download Pre-built Binaries |
| 80 | + |
| 81 | +Download the latest release for your platform from the [Releases](https://github.com/openGemini/openGemini-studio/releases) page: |
| 82 | + |
| 83 | +- **Windows**: `openGemini-studio-windows-amd64.exe` |
| 84 | +- **macOS**: `openGemini-studio-darwin-universal` |
| 85 | +- **Linux**: `openGemini-studio-linux-amd64` |
| 86 | + |
| 87 | +#### Install from Source |
| 88 | + |
| 89 | +```bash |
| 90 | +# Clone the repository |
| 91 | +git clone https://github.com/openGemini/openGemini-studio.git |
| 92 | +cd openGemini-studio |
| 93 | + |
| 94 | +# Install Wails CLI (if not already installed) |
| 95 | +go install github.com/wailsapp/wails/v2/cmd/wails@latest |
| 96 | + |
| 97 | +# Install dependencies and build |
| 98 | +wails build |
| 99 | +``` |
| 100 | + |
| 101 | +## 💡 Usage |
| 102 | + |
| 103 | +### Creating a Connection |
| 104 | + |
| 105 | +1. Launch openGemini Studio |
| 106 | +2. Click the "Add Connection" button in the sidebar |
| 107 | +3. Enter connection details: |
| 108 | + - **Connection Name**: Friendly name for the connection |
| 109 | + - **Address**: openGemini server address (e.g., `localhost:8086`) |
| 110 | + - **Protocol**: HTTP or HTTPS |
| 111 | + - **Authentication**: Enable and provide credentials if required |
| 112 | +4. Click "Test Connection" to verify |
| 113 | +5. Click "Save Connection" to persist |
| 114 | + |
| 115 | +### Executing Queries |
| 116 | + |
| 117 | +1. Select a database from the connection tree |
| 118 | +2. Enter your InfluxQL query in the editor |
| 119 | +3. Click "Execute Query" or press `Ctrl+Enter` (Windows/Linux) or `Cmd+Enter` (macOS) |
| 120 | +4. View results in the table below |
| 121 | + |
| 122 | +### Managing Query History |
| 123 | + |
| 124 | +- Click the "Query History" button to view past queries |
| 125 | +- Click on a history item to append it to the current query editor |
| 126 | +- Clear history using the "Clear History" button |
| 127 | + |
| 128 | +### Configuring Settings |
| 129 | + |
| 130 | +Access settings via the gear icon: |
| 131 | +- **Language**: Switch between English and Chinese |
| 132 | +- **Theme**: Choose light, dark, or system theme |
| 133 | +- **Custom Font**: Set a custom font family |
| 134 | +- **Max History Count**: Configure the number of queries to retain (10-500) |
| 135 | +- **Debug Mode**: Enable detailed logging for troubleshooting |
| 136 | + |
| 137 | +## 🔨 Building from Source |
| 138 | + |
| 139 | +### Prerequisites |
| 140 | + |
| 141 | +Install the following dependencies: |
| 142 | + |
| 143 | +```bash |
| 144 | +# Install Wails CLI |
| 145 | +go install github.com/wailsapp/wails/v2/cmd/wails@latest |
| 146 | + |
| 147 | +# Verify installation |
| 148 | +wails doctor |
| 149 | +``` |
| 150 | + |
| 151 | +### Build Commands |
| 152 | + |
| 153 | +```bash |
| 154 | +# Development build |
| 155 | +wails build |
| 156 | + |
| 157 | +# Production build with optimizations |
| 158 | +wails build -clean |
| 159 | + |
| 160 | +# Build for specific platform |
| 161 | +wails build -platform windows/amd64 |
| 162 | +wails build -platform darwin/universal |
| 163 | +wails build -platform linux/amd64 |
| 164 | +``` |
| 165 | + |
| 166 | +### Output |
| 167 | + |
| 168 | +Built binaries are placed in the `build/bin/` directory. |
| 169 | + |
| 170 | +## 🛠 Development |
| 171 | + |
| 172 | +### Running in Development Mode |
| 173 | + |
| 174 | +```bash |
| 175 | +# Start development server with hot reload |
| 176 | +wails dev |
| 177 | +``` |
| 178 | + |
| 179 | +This runs a Vite development server with hot module replacement. The application will automatically reload when you modify frontend code. Backend changes require a restart. |
| 180 | + |
| 181 | +### Project Structure |
| 182 | + |
| 183 | +``` |
| 184 | +openGemini-studio/ |
| 185 | +├── app.go # Main application logic |
| 186 | +├── data_struct.go # Data models and structures |
| 187 | +├── http_client.go # OpenGemini HTTP client |
| 188 | +├── database.go # BoltDB persistence layer |
| 189 | +├── logger.go # Logging infrastructure |
| 190 | +├── frontend/ # Vue.js frontend |
| 191 | +│ ├── src/ |
| 192 | +│ │ ├── components/ # Vue components |
| 193 | +│ │ ├── composables/ # Vue composables |
| 194 | +│ │ ├── locales/ # i18n translations |
| 195 | +│ │ └── types/ # TypeScript types |
| 196 | +│ └── wailsjs/ # Generated Wails bindings |
| 197 | +└── build/ # Build output directory |
| 198 | +``` |
| 199 | + |
| 200 | +### Frontend Development |
| 201 | + |
| 202 | +```bash |
| 203 | +cd frontend |
| 204 | + |
| 205 | +# Install dependencies |
| 206 | +npm install |
| 207 | + |
| 208 | +# Run Vite dev server |
| 209 | +npm run dev |
| 210 | + |
| 211 | +# Build frontend |
| 212 | +npm run build |
| 213 | + |
| 214 | +# Type checking |
| 215 | +npm run type-check |
| 216 | +``` |
| 217 | + |
| 218 | +### Backend Development |
| 219 | + |
| 220 | +The backend is written in Go and uses: |
| 221 | +- **Wails v2**: Desktop application framework |
| 222 | +- **BoltDB**: Embedded database for configuration storage |
| 223 | +- **openGemini Go Client**: Official openGemini client library |
| 224 | + |
| 225 | +## 🏗 Architecture |
| 226 | + |
| 227 | +### Technology Stack |
| 228 | + |
| 229 | +**Frontend:** |
| 230 | +- Vue 3 (Composition API) |
| 231 | +- TypeScript |
| 232 | +- Vue I18n (internationalization) |
| 233 | +- Tailwind CSS |
| 234 | + |
| 235 | +**Backend:** |
| 236 | +- Go 1.24+ |
| 237 | +- Wails v2 |
| 238 | +- BoltDB (embedded database) |
| 239 | +- openGemini Go client |
| 240 | + |
| 241 | +### Data Flow |
| 242 | + |
| 243 | +1. User interacts with Vue.js frontend |
| 244 | +2. Frontend calls Go methods via Wails bindings |
| 245 | +3. Go backend communicates with openGemini server |
| 246 | +4. Results are returned to frontend for display |
| 247 | +5. Configuration and history are persisted to BoltDB |
| 248 | + |
| 249 | +## 🤝 Contributing |
| 250 | + |
| 251 | +We welcome contributions from the community! Here's how you can help: |
| 252 | + |
| 253 | +### Ways to Contribute |
| 254 | + |
| 255 | +- 🐛 **Report Bugs**: Open an issue with details about the bug |
| 256 | +- 💡 **Suggest Features**: Share your ideas in the discussions |
| 257 | +- 📝 **Improve Documentation**: Help us improve README, guides, and code comments |
| 258 | +- 🔧 **Submit Pull Requests**: Fix bugs or implement new features |
| 259 | + |
| 260 | +### Contribution Workflow |
| 261 | + |
| 262 | +1. Fork the repository |
| 263 | +2. Create a feature branch (`git checkout -b feature/amazing-feature`) |
| 264 | +3. Make your changes |
| 265 | +4. Add tests if applicable |
| 266 | +5. Commit your changes (`git commit -s -S -m 'Add amazing feature'`) |
| 267 | +6. Push to the branch (`git push origin feature/amazing-feature`) |
| 268 | +7. Open a Pull Request |
| 269 | + |
| 270 | +### Code Style |
| 271 | + |
| 272 | +- **Go**: Follow [Effective Go](https://golang.org/doc/effective_go) guidelines |
| 273 | +- **TypeScript/Vue**: Follow [Vue.js Style Guide](https://vuejs.org/style-guide/) |
| 274 | +- **Commits**: Use conventional commit messages |
| 275 | + |
| 276 | +## 📄 License |
| 277 | + |
| 278 | +Copyright 2025 openGemini Authors |
| 279 | + |
| 280 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 281 | +you may not use this file except in compliance with the License. |
| 282 | +You may obtain a copy of the License at |
| 283 | + |
| 284 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 285 | + |
| 286 | +Unless required by applicable law or agreed to in writing, software |
| 287 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 288 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 289 | +See the License for the specific language governing permissions and |
| 290 | +limitations under the License. |
| 291 | + |
| 292 | +## 🌐 Community |
| 293 | + |
| 294 | +### Get Help |
| 295 | + |
| 296 | +- **GitHub Issues**: [Report bugs or request features](https://github.com/openGemini/openGemini-studio/issues) |
| 297 | +- **Discussions**: [Ask questions and share ideas](https://github.com/openGemini/openGemini-studio/discussions) |
| 298 | +- **openGemini Community**: [Join the main openGemini community](https://github.com/openGemini/openGemini) |
| 299 | + |
| 300 | +### Stay Updated |
| 301 | + |
| 302 | +- Watch this repository for updates |
| 303 | +- Star the project if you find it useful |
| 304 | +- Follow [@openGemini](https://github.com/openGemini) on GitHub |
| 305 | + |
| 306 | +## 🙏 Acknowledgments |
| 307 | + |
| 308 | +This project is built with amazing open source technologies: |
| 309 | + |
| 310 | +- [openGemini](https://github.com/openGemini/openGemini) - High-performance time-series database |
| 311 | +- [Wails](https://wails.io/) - Build desktop apps using Go & Web Technologies |
| 312 | +- [Vue.js](https://vuejs.org/) - The Progressive JavaScript Framework |
| 313 | +- [TypeScript](https://www.typescriptlang.org/) - JavaScript with syntax for types |
| 314 | +- [BoltDB](https://github.com/etcd-io/bbolt) - Embedded key/value database |
| 315 | + |
| 316 | +--- |
| 317 | + |
| 318 | +<p align="center"> |
| 319 | + Made with ❤️ by the openGemini community |
| 320 | +</p> |
0 commit comments