From 4f1d70135e84625f1273d25db71829d297047cc1 Mon Sep 17 00:00:00 2001 From: landaiqing Date: Mon, 7 Jul 2025 15:41:46 +0800 Subject: [PATCH] :pencil: README.md --- README.md | 174 ++++++++++++++++++++++++++++++++++++++++----------- README_ZH.md | 165 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 304 insertions(+), 35 deletions(-) create mode 100644 README_ZH.md diff --git a/README.md b/README.md index afb871b..a7387d8 100644 --- a/README.md +++ b/README.md @@ -1,59 +1,163 @@ -# Welcome to Your New Wails3 Project! +# VoidRaft Logo VoidRaft -Congratulations on generating your Wails3 application! This README will guide you through the next steps to get your project up and running. +[中文](README_ZH.md) | **English** -## Getting Started +> *An elegant text snippet recording tool designed for developers.* -1. Navigate to your project directory in the terminal. +VoidRaft is a modern developer-focused text editor that allows you to record, organize, and manage various text snippets anytime, anywhere. Whether it's temporary code snippets, API responses, meeting notes, or daily to-do lists, VoidRaft provides a smooth and elegant editing experience. -2. To run your application in development mode, use the following command: +## Core Features - ``` - wails3 dev - ``` +### Developer-Friendly - This will start your application and enable hot-reloading for both frontend and backend changes. +- Multi-language code block support - Syntax highlighting for 30+ programming languages +- Smart language detection - Automatically recognizes code block language types +- Code formatting - Built-in Prettier support for one-click code beautification +- Block editing mode - Split content into independent code blocks, each with different language settings -3. To build your application for production, use: +### Modern Interface - ``` - wails3 build - ``` +- Clean and elegant design - Simple yet sophisticated user interface +- Dark/Light themes - Adapts to different usage scenarios +- Multi-language support - Built-in internationalization with multiple language switching - This will create a production-ready executable in the `build` directory. +### Extension System -## Exploring Wails3 Features +- Modular architecture - Extensible editor based on CodeMirror 6 +- Rich extensions - Includes various practical editor extensions + - Rainbow bracket matching + - VSCode-style search and replace + - Color picker + - Built-in translation tool + - Text highlighting + - Code folding + - Hyperlink support + - Checkbox support + - Minimap -Now that you have your project set up, it's time to explore the features that Wails3 offers: +## Quick Start -1. **Check out the examples**: The best way to learn is by example. Visit the `examples` directory in the `v3/examples` directory to see various sample applications. +### Download and Use -2. **Run an example**: To run any of the examples, navigate to the example's directory and use: +1. Visit the releases page: https://github.com/landaiqing/voidraft/releases +2. Select and download the appropriate version +3. Run the installer and start using - ``` - go run . - ``` +### Development Environment - Note: Some examples may be under development during the alpha phase. +```bash +# Clone the project +git clone https://github.com/landaiqing/voidraft +cd voidraft -3. **Explore the documentation**: Visit the [Wails3 documentation](https://v3alpha.wails.io/) for in-depth guides and API references. +# Install frontend dependencies +cd frontend +npm install +cd .. -4. **Join the community**: Have questions or want to share your progress? Join the [Wails Discord](https://discord.gg/JDdSxwjhGf) or visit the [Wails discussions on GitHub](https://github.com/wailsapp/wails/discussions). +# Start development server +wails3 dev +``` + +### Production Build + +```bash +# Build application +wails3 package +``` + +After building, the executable will be generated in the `bin` directory. + +## Technical Architecture + +### Core Technologies + +| Layer | Technology Stack | +|-------|------------------| +| Desktop Framework | Wails3 | +| Backend Language | Go 1.21+ | +| Frontend Framework | Vue 3 + TypeScript | +| Editor Core | CodeMirror 6 | +| Build Tool | Vite | +| Data Storage | SQLite | ## Project Structure -Take a moment to familiarize yourself with your project structure: +``` +Voidraft/ +├── frontend/ # Vue 3 frontend application +│ ├── src/ +│ │ ├── views/editor/ # Editor core views +│ │ │ ├── extensions/ # Editor extension system +│ │ │ │ ├── codeblock/ # Code block support +│ │ │ │ ├── translator/ # Translation tool +│ │ │ │ ├── minimap/ # Code minimap +│ │ │ │ ├── vscodeSearch/ # VSCode-style search +│ │ │ │ └── ... # More extensions +│ │ │ └── ... +│ │ ├── components/ # Reusable components +│ │ ├── stores/ # Pinia state management +│ │ └── utils/ # Utility functions +│ └── public/ # Static assets +├── internal/ # Go backend core +│ ├── services/ # Core business services +│ ├── models/ # Data model definitions +│ └── events/ # Event handling mechanisms +└── main.go # Application entry point +``` -- `frontend/`: Contains your frontend code (HTML, CSS, JavaScript/TypeScript) -- `main.go`: The entry point of your Go backend -- `app.go`: Define your application structure and methods here -- `wails.json`: Configuration file for your Wails project +## Development Roadmap -## Next Steps +### Platform Extension Plans -1. Modify the frontend in the `frontend/` directory to create your desired UI. -2. Add backend functionality in `main.go`. -3. Use `wails3 dev` to see your changes in real-time. -4. When ready, build your application with `wails3 build`. +| Platform | Status | Expected Time | +|----------|--------|---------------| +| macOS | Planned | Future versions | +| Linux | Planned | Future versions | -Happy coding with Wails3! If you encounter any issues or have questions, don't hesitate to consult the documentation or reach out to the Wails community. +### Planned Features +- [ ] Custom themes - Customize editor themes +- [ ] Multi-window support - Support editing multiple documents simultaneously +- [ ] Enhanced clipboard - Monitor and manage clipboard history + - Automatic text content saving + - Image content support + - History management +- [ ] Data synchronization - Cloud backup for configurations and documents +- [ ] Extension system - Support for custom plugins + +## Acknowledgments + +> Standing on the shoulders of giants, paying tribute to the open source spirit + +The birth of VoidRaft is inseparable from the following excellent open source projects: + +### Special Thanks + +- **[Heynote](https://github.com/heyman/heynote/)** - VoidRaft is a feature-enhanced version based on Heynote's concept + - Inherits Heynote's elegant block editing philosophy + - Adds more practical features on the original foundation + - Rebuilt with modern technology stack + - Provides richer extension system and customization options + - Thanks to the Heynote team for bringing innovative ideas to the developer community + +### Core Technology Stack + +| Technology | Purpose | Link | +|------------|---------|------| +| Wails3 | Cross-platform desktop application framework | [wails.io](https://v3alpha.wails.io/) | +| Vue.js | Progressive frontend framework | [vuejs.org](https://vuejs.org/) | +| CodeMirror 6 | Modern code editor | [codemirror.net](https://codemirror.net/) | +| Prettier | Code formatting tool | [prettier.io](https://prettier.io/) | +| TypeScript | Type-safe JavaScript | [typescriptlang.org](https://www.typescriptlang.org/) | + +## License + +This project is open source under the [MIT License](LICENSE). + +Welcome to Fork, Star, and contribute code. + +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) +[![GitHub stars](https://img.shields.io/github/stars/landaiqing/Voidraft.svg?style=social&label=Star)](https://github.com/yourusername/Voidraft) +[![GitHub forks](https://img.shields.io/github/forks/landaiqing/Voidraft.svg?style=social&label=Fork)](https://github.com/yourusername/Voidraft) + +*Made with ❤️ by landaiqing* \ No newline at end of file diff --git a/README_ZH.md b/README_ZH.md new file mode 100644 index 0000000..ceba226 --- /dev/null +++ b/README_ZH.md @@ -0,0 +1,165 @@ +# Voidraft Logo Voidraft + +**中文** | [English](README.md) + +> *一个专为开发者打造的优雅文本片段记录工具。* + +Voidraft 是一个现代化的开发者专用文本编辑器,让你能够随时随地记录、整理和管理各种文本片段。无论是临时的代码片段、API 响应、会议笔记,还是日常的待办事项,Voidraft 都能为你提供流畅而优雅的编辑体验。 + +## 核心特性 + +### 开发者友好 + +- 多语言代码块支持 - 支持 30+ 种编程语言的语法高亮 +- 智能语言检测 - 自动识别代码块语言类型 +- 代码格式化 - 内置 Prettier 支持,一键美化代码 +- 块状编辑模式 - 将内容分割为独立的代码块,每个块可设置不同语言 + +### 现代化界面 + +- 清新脱俗的设计 - 简洁而不失优雅的用户界面 +- 深色/浅色主题 - 适应不同使用场景 +- 多语言支持 - 内置国际化功能,支持多种语言切换 + +### 扩展系统 + +- 模块化架构 - 基于 CodeMirror 6 的可扩展编辑器 +- 丰富的扩展 - 包含多种实用编辑器扩展 + - 彩虹括号匹配 + - VSCode 风格搜索替换 + - 颜色选择器 + - 内置翻译工具 + - 文本高亮 + - 代码折叠 + - 超链接支持 + - 复选框支持 + - 小地图 + + +## 快速开始 + +### 下载使用 + +1. 访问发布页面:https://github.com/landaiqing/voidraft/releases +2. 选择适合的版本下载 +3. 运行安装程序,开始使用 + +### 开发环境 + +```bash +# 克隆项目 +git clone https://github.com/landaiqing/voidraft +cd voidraft + +# 安装前端依赖 +cd frontend +npm install +cd .. + +# 启动开发服务器 +wails3 dev +``` + +### 生产构建 + +```bash +# 构建应用 +wails3 package +``` + +构建完成后,可执行文件将生成在 `bin` 目录中。 + +## 技术架构 + +### 核心技术 + +| 层级 | 技术栈 | +|------|--------| +| 桌面框架 | Wails3 | +| 后端语言 | Go 1.21+ | +| 前端框架 | Vue 3 + TypeScript | +| 编辑器核心 | CodeMirror 6 | +| 构建工具 | Vite | +| 数据存储 | SQLite | + +## 项目结构 + +``` +Voidraft/ +├── frontend/ # Vue 3 前端应用 +│ ├── src/ +│ │ ├── views/editor/ # 编辑器核心视图 +│ │ │ ├── extensions/ # 编辑器扩展系统 +│ │ │ │ ├── codeblock/ # 代码块支持 +│ │ │ │ ├── translator/ # 翻译工具 +│ │ │ │ ├── minimap/ # 代码小地图 +│ │ │ │ ├── vscodeSearch/ # VSCode风格搜索 +│ │ │ │ └── ... # 更多扩展 +│ │ │ └── ... +│ │ ├── components/ # 可复用组件 +│ │ ├── stores/ # Pinia 状态管理 +│ │ └── utils/ # 工具函数库 +│ └── public/ # 静态资源文件 +├── internal/ # Go 后端核心 +│ ├── services/ # 核心业务服务 +│ ├── models/ # 数据模型定义 +│ └── events/ # 事件处理机制 +└── main.go # 应用程序入口 +``` + +## 开发路线图 + +### 平台扩展计划 + +| 平台 | 状态 | 预期时间 | +|------|------|----------| +| macOS | 计划中 | 后续版本 | +| Linux | 计划中 | 后续版本 | + +### 计划添加的功能 +- [ ] 自定义主题 - 自定义编辑器主题 +- [ ] 多窗口支持 - 支持同时编辑多个文档 +- [ ] 剪切板增强 - 监听和管理剪切板历史 + - 文本内容自动保存 + - 图片内容支持 + - 历史记录管理 +- [ ] 数据同步 - 配置和文档云端备份 +- [ ] 扩展系统 - 支持自定义插件 + + +## 致谢 + +> 站在巨人的肩膀上,致敬开源精神 + +Voidraft 的诞生离不开以下优秀的开源项目: + +### 特别感谢 + +- **[Heynote](https://github.com/heyman/heynote/)** - Voidraft 是基于 Heynote 概念的功能增强版本 + - 继承了 Heynote 优雅的块状编辑理念 + - 在原有基础上增加了更多实用功能 + - 采用现代化技术栈重新构建 + - 提供更丰富的扩展系统和自定义选项 + - 感谢 Heynote 团队为开发者社区带来的创新思路 + +### 核心技术栈 + +| 技术 | 用途 | 链接 | +|------|------|------------------------------------------------------| +| Wails3 | 跨平台桌面应用框架 | [wails.io](https://v3alpha.wails.io/) | +| Vue.js | 渐进式前端框架 | [vuejs.org](https://vuejs.org/) | +| CodeMirror 6 | 现代化代码编辑器 | [codemirror.net](https://codemirror.net/) | +| Prettier | 代码格式化工具 | [prettier.io](https://prettier.io/) | +| TypeScript | 类型安全的 JavaScript | [typescriptlang.org](https://www.typescriptlang.org/) | + +## 许可证 + +本项目采用 [MIT 许可证](LICENSE) 开源。 + +欢迎 Fork、Star 和贡献代码。 + +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) +[![GitHub stars](https://img.shields.io/github/stars/landaiqing/Voidraft.svg?style=social&label=Star)](https://github.com/yourusername/Voidraft) +[![GitHub forks](https://img.shields.io/github/forks/landaiqing/Voidraft.svg?style=social&label=Fork)](https://github.com/yourusername/Voidraft) + +*Made with ❤️ by landaiqing*