A cross-platform notebook application built with Tauri and SvelteKit.
This application is built with:
The application uses the SvelteKit static adapter (@sveltejs/adapter-static) to generate static HTML, CSS, and JavaScript files. This is required for Tauri, which serves the application from static files rather than running a Node.js server.
The application uses several Tauri plugins to access native functionality:
The application requires the following permissions (configured in src-tauri/capabilities/default.json):
core:default - Core Tauri functionalityopener:default - Opening URLs and filesstore:allow-* - Full access to the store plugin (load, set, get, save, entries, delete, clear)dialog:default - Native dialogsfs:default - Basic file system operationsfs:allow-app-write - Write access to the application data directoryThe application uses an adapter pattern for storage, allowing it to work seamlessly on different platforms:
@tauri-apps/plugin-store which persists data in a JSON file named success-notebook.json in the application's data directorysuccess-notebook for persistent browser-based storageBoth storage adapters implement the same interface, providing a unified API for storing notebook entries, user preferences, and application state across all platforms.
To run the web application in development mode:
bun run dev
The dev server will start at http://localhost:1420 (or another port if 1420 is in use) with hot module reloading enabled.
To run the application on Android (requires Android SDK and NDK setup):
bunx tauri android dev
This will build the app and deploy it to a connected Android device or emulator.
To do in the root folder and in the src-tauri/tauri-plugin-statusbar:
bun update @tauri-apps/cli @tauri-apps/api --latest
cd src-tauri
cargo update
To build the SvelteKit application for production:
bun run build
The static output will be generated in the build/ directory.
To build the Android APK:
bunx tauri android build --target aarch64
For other Android architectures:
armv7 - ARMv7 (older devices)aarch64 - ARM64 (modern devices)x86 - x86 (emulators)x86_64 - x86_64 (emulators)The APK will be generated in src-tauri/gen/android/app/build/outputs/apk/.
This app has 4 pages:
Also:
//YYYY/MM/DD/YYYY/MM/DD/{day, week, month}history.back()
for compatibility with devices' backward navigation| STATUS | SOURCE | TARGET | HISTORY STATE | NAV |
|---|---|---|---|---|
| ok | today | today/form | [today, today/form] | regular link |
| ok | today/form | date2 | [today, date2] | goto(replaceState=true) |
| ok | date2 | date3 | [today, date3] | goto(replaceState=true) |
| STATUS | SOURCE | TARGET | HISTORY STATE | NAV |
|---|---|---|---|---|
| ok | today | date2 | [today, date2] | goto(replaceState=false) (because coming from home) |
| ok | date2 | date2/form | [today, date2, date2/form] | regular link |
| not ok | date2/form | date3 | [today, date2, date3] | goto(replaceState=true) |
| ok | date3 | date4 | [today, date2, date4] | goto(replaceState=true) |
Since we cannot intercept device's history.back, the trick is to detect
when user is going from date2/form to date3 and force a history.back(-1) followed by a regular goto(replaceState=true). It's implemented in date-picker.svelte