BiSheng (desktop app codename Latte) is a Windows note-taking application with an instant Markdown rendering editor and optional self-hosted sync.
Public source: This repository is the public open-source tree. Runtime SQLite databases,
uploads/, and Data Protection keys are never shipped; they are created locally when you run the app or server.
UI language: Chinese (Simplified) today. English UI is planned — see Internationalization.
中文说明: 笔生 / Latte 是一款 Windows 笔记应用,支持 Markdown 即时渲染与可选的自托管同步。详细中文文档见
src/docs/。
- Instant Markdown editor — WYSIWYG-style editing powered by a custom
BiSheng.Editorcontrol (Markdig + AvalonEdit) - Folder tree navigation — tree or side-by-side layout, favorites, pins, rename, drag-and-drop
- Full-text search — search across note titles and content (
Ctrl+Shift+F) - Themes — built-in presets (Light, Dark, Latte, 翰墨书香) plus user-defined themes for UI and editor colors
- Export — Markdown, Word (OpenXML), PDF
- Note history & trash — local revision history and soft-delete with purge
- Offline-first — works without a server; data stored in local SQLite (
local.db) - Local backups — scheduled SQLite backups and integrity checks
- Self-hosted ASP.NET Core API + admin web panel
- Incremental sync — push/pull with version tracking and conflict detection
- SignalR — real-time change notifications to connected clients
- Image uploads — note images stored server-side and synced to clients
- API key auth — per-device keys; TOTP support for admin login
- SQLite storage — single-file
bisheng.dbplusuploads/directory
Screenshots coming soon.
| Component | Requirement |
|---|---|
| OS | Windows 10 or later (x64) |
| SDK | .NET 8 SDK |
| Runtime | .NET 8 Desktop Runtime (for published builds) |
| WebView2 | Microsoft Edge WebView2 Runtime (usually preinstalled on Windows 11) |
| Server (optional) | .NET 8 ASP.NET Core Runtime on Windows or Linux |
git clone https://github.com/hillsburg/BiSheng.git
cd BiSheng
dotnet build Bisheng.slnx -c Releasedotnet run --project src/BiSheng.Latte/BiSheng.Latte.csproj -c ReleaseOn first launch the app creates data under %LocalAppData%\BiSheng\Latte\ (local.db, config, images). No server configuration is required.
dotnet run --project src/BiSheng.Server/BiSheng.Server.csproj -c ReleaseBy default the server listens on http://localhost:8090 (see src/BiSheng.Server/appsettings.json). Open the URL in a browser to complete first-time setup (admin account, API keys).
Then in the Latte client: Toolbar → 同步与安全 — enter server URL and API key (from /admin/keys). User guide (Chinese): src/docs/同步与安全设置使用指南.md.
Framework-dependent publish:
dotnet publish src/BiSheng.Latte/BiSheng.Latte.csproj -c Release -r win-x64 --self-contained falseLatte and Server share one product version (BiShengVersion in Directory.Build.props). One GitHub Release ships both:
.\scripts\release\pack-all.ps1See scripts/release/README.md. Tag v0.1.0 (or Actions → Release) publishes Latte Velopack packages + Server zip. In the app: Toolbar → 关于 → 检查更新.
| Path | Description |
|---|---|
src/BiSheng.Latte/ |
WPF desktop client (main application) |
src/BiSheng.Server/ |
ASP.NET Core sync server + admin panel |
src/BiSheng.Editor/ |
Reusable Markdown instant-rendering editor control |
src/BiSheng.Shared/ |
Shared sync protocol DTOs and helpers |
src/ICSharpCode.AvalonEdit/ |
Vendored/forked AvalonEdit (text editing core) |
src/docs/ |
Design documents (Chinese) |
tests/ |
xUnit tests for Server, Latte, and Editor |
dotnet test tests/BiSheng.Server.Tests/BiSheng.Server.Tests.csproj -c Release
dotnet test tests/BiSheng.Latte.Tests/BiSheng.Latte.Tests.csproj -c Release
dotnet test tests/BiSheng.Editor.Tests/BiSheng.Editor.Tests.csproj -c ReleaseCI runs Server and Latte tests on every push (see .github/workflows/ci.yml).
- Client: WPF + MVVM (
CommunityToolkit.Mvvm), DI viaMicrosoft.Extensions.DependencyInjection - Navigation: incremental read-model updates (see
src/docs/导航栏架构设计文档.md) - Sync: shared payload format in
BiSheng.Shared; clientSyncService+ serverSyncService+ SignalR hub - Theming:
ThemeDefinition/ThemeManager— JSON presets applied to WPFDynamicResourcebrushes - Dialogs: centralized
AppDialogservice (themed replacements forMessageBox)
More design docs (Chinese): src/docs/. An English architecture overview is planned.
See CONTRIBUTING.md. Summary:
- Comments in Simplified Chinese (project convention)
- Curly braces on their own lines; blank line after closing
} - XML doc comments on public APIs, enums, properties, and methods
Production deployment guide (Chinese, Apache reverse proxy + HTTPS):
src/docs/部署文档.md- Server backup / restore / upgrade (ops scripts):
src/docs/服务端备份与恢复运维指南.md,scripts/server-backup/,scripts/server-upgrade/ - Client + server update design (Velopack / upgrade script, Chinese):
src/docs/客户端与服务端更新机制设计文档.md
Typical production setup: Kestrel behind Apache/Nginx on port 443, with X-Forwarded-* headers. Security notes: src/docs/认证与安全设计文档.md.
The UI is currently Chinese (Simplified). For open source, we plan:
- English
READMEand contributor docs (this file) - English UI for shell controls (toolbar, navigation, dialogs) via
.resxresources - Gradual translation of settings and sync messages
Contributions for en-US strings are welcome even before the infrastructure lands — open an issue to coordinate.
BiSheng stands on the shoulders of many open-source projects. Thank you to their authors and contributors.
| Project | Role in BiSheng | License (typical) |
|---|---|---|
| AvalonEdit | Text editor core (vendored under src/ICSharpCode.AvalonEdit/) |
MIT |
| Markdig | Markdown parsing / rendering | BSD-2-Clause |
| Velopack | Windows install & auto-update | MIT |
| CommunityToolkit.Mvvm | MVVM helpers for Latte | MIT |
| Entity Framework Core + SQLite provider | Local & server persistence | MIT / Apache-2.0 |
| NLog | Client logging | BSD-3-Clause |
| WebView2 | Preview / web host surfaces | Microsoft terms |
| Open XML SDK | Word export | MIT |
| Otp.NET | Admin TOTP | MIT |
| QRCoder | TOTP setup QR codes | MIT |
| ASP.NET Core / SignalR | Sync server & realtime | MIT |
Full package inventory and notices: THIRD-PARTY-NOTICES.md.
We welcome issues and pull requests! Please read CONTRIBUTING.md before opening a PR.
Good first issues (planned labels): documentation, English UI strings, tests, bug fixes in sync/navigation.
If you discover a security vulnerability, please do not open a public issue. See SECURITY.md (to be added) or email the maintainers privately.
This project is licensed under the MIT License.
Copyright (c) 2026 BiSheng contributors.