$ show saber-notes/saber
Saber is a production-grade, cross-platform Flutter application for handwritten note-taking. It is a monolith app with a few standalone packages: a custom vector-ink canvas engine (pen, pencil, highlighter, shape pen, laser pointer), page-based editor, image/PDF/SVG insertion, Quill text overlays, background patterns, shape recognition, and undo/redo. The main entry point is lib/main.dart, which wires routing, i18n, Sentry consent, sharing intents, and background sync. Notes are stored as versioned binary .sbn2 files via the self-contained packages/sbn library, with legacy .sbn support and migration logic. The application persists notes through a file manager responsible for CRUD, import/export, recently-used tracking, and directory watching. Nextcloud sync is implemented over WebDAV with client-side end-to-end encryption: file paths are hex-encrypted, content is encrypted, and conflicts are resolved using last-modified timestamps and a best-file strategy. Settings are managed through typed stow preferences and a large settings surface covering theme, writing tools, editor behavior, performance, and error reporting. Platform runners exist for Android, iOS, macOS, Windows, and Linux, with distribution metadata for Play Store, F-Droid, Flathub, AppImage, Snap, and Windows installers. The codebase is well-tested with unit, widget, golden, and format-compatibility tests, plus CI workflows for all major platforms. It is not a data/research repository; there are no notebooks, ML pipelines, or analytical datasets. Technical drift is moderate: the interactive canvas is a maintained fork of Flutter's InteractiveViewer, some dependencies are pinned or patched for F-Droid builds, and generated i18n files plus legacy format migration code require ongoing upkeep. Overall, this is a mature, actively maintained application with several cleanly separated components that can be reused in other Flutter projects.
The LLM identified 6 files worth highlighting for reuse:
Standalone Dart package defining Saber's note data model and schema: change types, tool IDs, canvas backgrounds, Quill styles, and font fallbacks. It is deliberately decoupled from UI and app logic, so it can be reused by any application that needs to read, write, or migrate .sbn/.sbn2 files.
A custom pan/zoom/rotate widget derived from Flutter's InteractiveViewer and extended with draw-gesture detection so drawing and canvas navigation share one recognizer. It exposes scale limits, boundary margins, and inertia/friction knobs, making it a reusable base for large-canvas editors beyond Saber.
Generic undo/redo stack with typed change items and observable state. It is isolated, covered by editor history tests, and can be extracted into any editor or interactive form requiring undo/redo semantics.
Encrypted WebDAV/Nextcloud sync engine: encrypts file paths and content, diffs local and remote changes, resolves conflicts via last-modified/best-file logic, and runs behind an abstract sync interface. The pattern is a useful reference for client-side E2E sync design.
Custom fragment shader for pressure-sensitive pencil rendering. It is an isolated graphics asset implementing a textured, opacity-varying stroke effect and can be reused directly in any Flutter/Impeller drawing app that needs a pencil feel.
Flutter platform-interface package for integrating the proprietary Onyx e-ink pen SDK on Boox devices. It is packaged as a standalone plugin with a method channel and platform interface, so it can be extracted for other Onyx-compatible Flutter apps.