|
| 1 | +<p align="center"> |
| 2 | + <img src="app/assets/ufriend.png" alt="UFriend logo" width="88" height="88"> |
| 3 | +</p> |
| 4 | + |
| 5 | +# UFriend |
| 6 | + |
| 7 | +**A Windows workspace for email, recordings, image text, and everyday writing.** |
| 8 | + |
| 9 | +UFriend keeps your workspace on your computer and connects to separately configured local or cloud AI services. Review the original material alongside the result, edit it, and decide how to use it. The interface supports English and Traditional Chinese, with light, dark, and system themes. |
| 10 | + |
| 11 | +**Current version: 0.1.38 · Windows x64 · Electron 44** |
| 12 | + |
| 13 | +[Releases](https://github.com/breeze0305/UFriend/releases) · [Documentation](docs/README.md) · [使用手冊(繁體中文)](docs/guides/APP_README.md) · [Report an issue](https://github.com/breeze0305/UFriend/issues) |
| 14 | + |
| 15 | +## Features |
| 16 | + |
| 17 | +| Workflow | Available functionality | |
| 18 | +| --- | --- | |
| 19 | +| Email | Import EML files or connect Gmail; read HTML mail, manage attachments and drafts, send mail, summarize and classify messages, and schedule daily organization. | |
| 20 | +| Recordings | Import audio or video, choose a transcription language, queue or schedule jobs, jump to timestamps, and edit or export TXT and SRT transcripts. | |
| 21 | +| Captioned video | Burn timed subtitles into a new MP4 with progress and cancellation, keeping the source video. Requires the optional FFmpeg runtime. | |
| 22 | +| Image text | Import an image or read a clipboard image, run OCR, compare the source with editable text, and copy the result. Automatic clipboard capture is opt-in. | |
| 23 | +| Writing | Stream chat responses, keep separate conversations, translate text, and polish writing by purpose and tone. Optional profile context and task prompts are configurable. | |
| 24 | +| Workspace | Local persistence and recovery backups, data cleanup, diagnostics, and system tray operation. | |
| 25 | + |
| 26 | +AI results need review. Mail summaries currently use Traditional Chinese, independently of the interface language. Meeting tools provide transcription and subtitles; speaker diarization and automatic meeting summaries are not implemented. |
| 27 | + |
| 28 | +## Run the Windows release |
| 29 | + |
| 30 | +1. Open [GitHub Releases](https://github.com/breeze0305/UFriend/releases) and download the Windows x64 release ZIP. GitHub's **Source code** archives are not runnable desktop packages. |
| 31 | +2. Extract the **entire ZIP** into a normal folder. Keep the adjacent DLLs, `resources`, `locales`, and license files with the executable. |
| 32 | +3. If another version is running, quit it from the system tray menu, then launch `UFriend.exe` from the extracted folder. |
| 33 | +4. For English, open **設定 → 一般 → 軟體介面語言**, choose **English**, and save. |
| 34 | + |
| 35 | +The desktop package does not require Node.js. AI models and services are installed separately. |
| 36 | + |
| 37 | +**Optional media runtime:** the public ZIP does not include the FFmpeg executable. For captioned-video export or cloud speech transcription, run `Install media runtime.cmd` in the extracted application folder. The installer downloads the pinned build from Gyan's official site and verifies its hashes. It needs 7-Zip; an already extracted package can instead be supplied through the PowerShell installer's `-From` option. See the [runtime guide](docs/development/FFMPEG_RUNTIME.md) for exact commands and paths. Local Whisper uses its own independently installed runtime. |
| 38 | + |
| 39 | +Workspace data is separate from the application folder. Use the data-location control in **Settings → General** to find it. Fully quit UFriend before backing up the workspace or replacing application files. |
| 40 | + |
| 41 | +## Configure AI and Gmail |
| 42 | + |
| 43 | +### Local AI |
| 44 | + |
| 45 | +The desktop repository contains HTTP adapters, **not model weights or model-service source code**. The following services are independent projects and are currently available by contacting the maintainer. Cloning this repository or installing a desktop release does not install them. |
| 46 | + |
| 47 | +| Service | Default endpoint | Current implementation | |
| 48 | +| --- | --- | --- | |
| 49 | +| PC LLM API | `http://127.0.0.1:8765` | Qwen2.5-1.5B-Instruct Q4_K_M with llama.cpp CUDA | |
| 50 | +| PC OCR API | `http://127.0.0.1:8767` | PP-OCRv5 mobile detection and recognition on CPU | |
| 51 | +| PC Whisper API | `http://127.0.0.1:8768` | Multilingual Whisper Small with PyTorch CUDA; Base is optional | |
| 52 | + |
| 53 | +Install and start each required service using its own README. In the local model settings, select PC API, save the endpoints, and test the connections. Only loopback endpoints are supported for these services. UFriend does not install, start, or stop them. See the [PC model guide](docs/guides/PC_MODELS.md) for requirements. |
| 54 | + |
| 55 | +### Cloud AI |
| 56 | + |
| 57 | +Configure your own compatible API endpoint, key, and text, vision, or speech model in the cloud settings. Text and OCR use the OpenAI-compatible Chat Completions format; speech requires Audio Transcriptions with segment timestamps. Compatibility varies by provider and model. |
| 58 | + |
| 59 | +Text, OCR, and speech have separate defaults, and you can select a source for each task. A failed task does not automatically switch to another source. See [model sources and data flows](docs/guides/MODEL_SOURCES.md). |
| 60 | + |
| 61 | +### Gmail |
| 62 | + |
| 63 | +Bring your own **Google Desktop OAuth client configuration**. Enable Gmail API in your Google Cloud project, configure its consent screen and permitted users, then import the downloaded Desktop client JSON in **Settings → Email accounts → Advanced settings**. Follow the [Gmail setup guide](docs/guides/GMAIL_SETUP_GUIDE.md), then authorize your account in the system browser. |
| 64 | + |
| 65 | +The repository and public release contain an empty OAuth template; no shared client or Gmail credentials are supplied. EML import and local drafts can be used without a Gmail connection. Connected mail currently supports Gmail only. |
| 66 | + |
| 67 | +## Build from source |
| 68 | + |
| 69 | +Use Windows x64 with Node.js 24.x, npm, Windows PowerShell 5.1, and the .NET Framework 4.x C# compiler. Electron is installed through the lockfile. The desktop itself does not require Python or CUDA; separate model services have their own requirements. |
| 70 | + |
| 71 | +```powershell |
| 72 | +git clone https://github.com/breeze0305/UFriend.git |
| 73 | +cd UFriend |
| 74 | +npm ci |
| 75 | +npm run build:native |
| 76 | +``` |
| 77 | + |
| 78 | +Prepare the pinned FFmpeg runtime and the `UFRIEND_TEST_FFMPEG` test path as described in the [installation guide](docs/guides/INSTALL_BUILD.md) and [FFmpeg runtime guide](docs/development/FFMPEG_RUNTIME.md). Then run: |
| 79 | + |
| 80 | +```powershell |
| 81 | +npm run check |
| 82 | +npm test |
| 83 | +npm start |
| 84 | +``` |
| 85 | + |
| 86 | +After quitting the app, create a Windows portable package without an embedded FFmpeg executable: |
| 87 | + |
| 88 | +```powershell |
| 89 | +npm run package -- --without-ffmpeg |
| 90 | +``` |
| 91 | + |
| 92 | +For a local package using the prepared FFmpeg runtime, use `npm run package`. The output is written to `dist/UFriend-<version>/`, or a timestamped directory if that version already exists. Packaging does not run the full test suite for you. See the installation guide for isolated development data, UI smoke tests, media prerequisites, and packaging details. |
| 93 | + |
| 94 | +## Architecture and data |
| 95 | + |
| 96 | +```mermaid |
| 97 | +flowchart LR |
| 98 | + UI[Electron renderer] --> Main[Main process and task control] |
| 99 | + Main --> Data[Local workspace and encrypted credentials] |
| 100 | + Main --> Gmail[Gmail API] |
| 101 | + Main --> Local[Independent local LLM / OCR / speech services] |
| 102 | + Main --> Cloud[Configured cloud API] |
| 103 | + Main --> FFmpeg[Local FFmpeg process] |
| 104 | +``` |
| 105 | + |
| 106 | +- Mail, files, settings, and completed work are stored locally. Ordinary workspace files are not encrypted by UFriend. Credentials use Electron `safeStorage`, backed by the Windows user account. |
| 107 | +- Gmail operations connect to Google. External email images connect to their source websites. Local inference does not make every feature offline. |
| 108 | +- Cloud tasks send the necessary input to the configured endpoint. Chat includes the current conversation history; enabled profile context is included only in the applicable text tasks. Provider retention and charges depend on the provider. |
| 109 | +- Model output does not independently send mail, delete messages, create calendar events, or execute programs. |
| 110 | + |
| 111 | +UGen300 integration is not implemented or verified on hardware. Device-pool timing simulations in the interface do not perform model inference. Outlook, Yahoo, and calendar integrations are also outside the current supported scope. |
| 112 | + |
| 113 | +## Documentation and project files |
| 114 | + |
| 115 | +- [User and developer documentation](docs/README.md) |
| 116 | +- [Model adapter contracts](app/models/README.md) |
| 117 | +- [Windows clipboard component](app/native/README.md) |
| 118 | +- [Contributing](CONTRIBUTING.md) and [security reporting](SECURITY.md) |
| 119 | + |
| 120 | +`app/` contains the desktop application, `scripts/` the build and verification tools, and `tests/` the automated tests. Dependencies, release output, credentials, personal data, and model runtimes are excluded from source control. |
| 121 | + |
| 122 | +## License and third-party components |
| 123 | + |
| 124 | +UFriend is licensed under the [MIT License](LICENSE). |
| 125 | + |
| 126 | +Third-party components retain their respective licenses. These include Electron, Lucide, DOMPurify, MailParser, Nodemailer, and OpenCC. The separately installed FFmpeg build has its own license; UFriend's MIT license does not replace it. See [third-party notices](THIRD_PARTY_NOTICES.md), the [FFmpeg runtime and source information](docs/development/FFMPEG_RUNTIME.md) and [Google asset attribution](app/assets/GOOGLE-BRANDING.md). |
0 commit comments