这是一个 默认完全离线 运行的临时笔记应用,支持快速草稿、条目存档、Markdown 预览、录音附件、ZIP 备份和可选 AI 标签。所有笔记数据默认仅保存在本地浏览器;只有用户主动启用大模型功能并点击测试连接或使用 AI 功能时,才会请求用户自己配置的服务。随手的草稿、临时信息都可以在这里安全地记录和管理,无需打开臃肿的笔记应用。
A default-offline temporary note app supporting quick drafts, entry archiving, Markdown preview, recording attachments, ZIP backup, and optional AI tagging. Notes stay in your local browser by default; network requests only happen when you explicitly enable LLM features and click the connection test or use AI actions against your own configured service.
When you need to quickly capture ideas, inspiration, or to-dos, Temp Notes provides a fast and secure environment to record and manage your notes without opening a bloated note app. For temporary text pasting or storing ephemeral information, it's a lightweight tool that opens instantly, helping you efficiently manage temporary information.
Your notes, your data, always in your control: ZIP import/export makes it easy to backup, migrate, or recover your text and recordings anytime.
- Repository: https://github.com/Muyu-Chen/Temp-Notes
- 中文 README: Read the Chinese version
Your notes, your data, always under your control. ZIP import/export makes backup, migration, and recovery simple anytime.
Two independent deployments with the same core app (isolated by browser same-origin policy, data does not interoperate):
| URL | Description |
|---|---|
| muyyy.link/draft | Deployment 1, currently close to the GitHub version |
| imagingmodel.com/draft | Deployment 2, slightly behind GitHub but more stable |
Why is data not shared? Due to the same-origin policy, pages from different domains cannot access each other's local storage. Notes are strictly isolated per domain.
Clone the repository and open ./index.html directly. No server configuration is required.
git clone https://github.com/Muyu-Chen/Temp-Notes.git
You can run it locally after cloning, clone directly on a server, or upload the entire folder to any static hosting platform (such as GitHub Pages or Netlify). This project is fully static and needs no backend.
- Default offline: local browser execution with no automatic network connection
- Open source: all JavaScript files are open, with no hidden network requests
- Local storage only: notes are stored in LocalStorage/IndexedDB
- Never uploaded by default: your notes are not sent anywhere unless you explicitly enable and use user-configured LLM features
- No tracking: no analytics, no cookies, no hidden connections
- LLM features are disabled by default. The connection test sends
GET {base_url}/modelsonly after you enable LLM settings and click the test button. AI tag generation sends the selected entry text only after you clickAI 生成标签;base_url,api_key, andmodelare user-provided and user-stored.
In the JavaScript codebase:
- No automatic
fetch()requests - No
XMLHttpRequest - No
WebSocketconnections - No external resource dependencies required for offline usage
- Only local LocalStorage/IndexedDB operations
- Optional LLM connectivity uses
fetch()only after explicit user action.
All code is open and auditable.
Temp-Notes/
├── css/ # Style directory
│ ├── theme.css # Theme system (color variables)
│ ├── base.css # Base styles (resets, utilities)
│ ├── layout.css # Layout structure
│ └── components.css # UI component styles
├── js/ # JavaScript modules
│ ├── main.js # Thin app entry (DOM ready -> bootstrap)
│ ├── app-controller.js # App-level coordinator
│ ├── constants.js # Stable app constants
│ ├── crypto.js # Encryption primitives
│ ├── crypto-js.min.js # Local CryptoJS dependency
│ ├── storage.js # Storage module barrel export
│ ├── utils.js # Utility module barrel export
│ ├── bootstrap/ # Startup orchestration and event binding
│ ├── services/ # Business services
│ ├── storage/ # IndexedDB and data persistence modules
│ ├── ui/ # DOM wrappers, views, modal, UI feedback
│ ├── lib/ # Focused helper modules
│ └── vendor/ # Local third-party browser libraries
├── tests/ # Vitest regression tests
├── index.html # App entry page
├── README.md # English documentation
└── README-CHINESE.md # Chinese documentation
-
Entry and bootstrap layer
main.js: waits for DOM readiness and starts the appbootstrap/app-bootstrap.js: creates core objects and runs startup stepsbootstrap/bind-events.js: binds DOM events to controller actionsbootstrap/first-run.js: first-run flag and usage notice
-
Presentation layer
ui/ui-controller.js: toast, metadata, and shell-level UI feedbackui/item-list-view.js: archived entry list renderingui/recycle-list-view.js: recycle bin list renderingui/dom-manager.js: DOM access wrapperui/modal.js: common modal componentcss/*: all style files
-
Coordination and service layer
app-controller.js: app-level coordinator and shared stateservices/*: draft, entry, encryption, recycle bin, settings, theme, import/export flows
-
Data access layer
storage/idb.js: IndexedDB connection and store setupstorage/*-storage.js: draft, item, recycle, settings, and import/export storage helpersstorage.js: public storage export surface
-
Utilities layer
lib/*: text, time, byte, ID, and platform helpersutils.js: public utility export surface
| Module | Responsibility | Exports |
|---|---|---|
main.js |
App entry | DOM ready startup |
bootstrap/app-bootstrap.js |
Startup orchestration | bootstrapApp |
bootstrap/bind-events.js |
Event binding | bindAppEvents |
bootstrap/first-run.js |
First-run state | initializeFirstRun |
app-controller.js |
App coordination | AppController class |
services/draft-service.js |
Draft autosave and archive flow | DraftService |
services/item-service.js |
Entry title and delete flow | ItemService |
services/encryption-service.js |
Entry encryption/decryption flow | EncryptionService |
services/recycle-service.js |
Recycle bin data state | RecycleService |
services/recycle-actions-service.js |
Recycle bin restore/delete/clear actions | RecycleActionsService |
services/import-export-service.js |
JSON/ZIP import/export flow | ImportExportService |
services/llm-service.js |
Optional LLM connection and AI tag requests | LLMService |
services/settings-service.js |
Font size, LLM settings, data clearing | Settings helpers |
services/theme-manager.js |
Theme load/apply/toggle | Theme helpers |
storage/idb.js |
IndexedDB setup | getDB, store constants |
storage/draft-storage.js |
Draft persistence | Draft load/save helpers |
storage/item-storage.js |
Entry persistence | Item load/save helpers |
storage/recycle-storage.js |
Recycle bin persistence | Recycle load/save helpers |
storage/settings-storage.js |
Settings object-store access | readSetting, writeSetting |
storage/import-export-storage.js |
Import/export normalization | Export, normalize, merge helpers |
ui/ui-controller.js |
UI feedback and metadata | UIController class |
ui/dom-manager.js |
DOM management | DOMManager class |
ui/item-list-view.js |
Entry list rendering | ItemListView class |
ui/recycle-list-view.js |
Recycle bin rendering | RecycleListView class |
ui/markdown-renderer.js |
Markdown rendering wrapper | renderMarkdown |
lib/download-utils.js |
Single-entry text export helpers | File payload and filename helpers |
ui/modal.js |
Modal UI | Modal class |
lib/* |
Focused utility helpers | Text/time/bytes/id/platform helpers |
vendor/* |
Local third-party libraries | JSZip, Marked, DOMPurify |
constants.js |
Stable constants | STORAGE_KEYS |
crypto.js |
Encryption primitives | Encrypt/decrypt/verify helpers |
- CSS variable definitions (
--bg,--text,--accent, etc.) - Dark/light theme switching
- Global reset (
box-sizing,margin, font, etc.) - Utility classes (
.muted,.small,.mono)
- Main containers (
.app,header,.main,.panel) - Responsive design (media queries)
- UI components (
button,textarea,input,card, etc.) - Interaction states (
hover,active)
This project uses Vitest for regression tests.
- Install dependencies:
npm install- Run the test suite:
npm testThe current suite covers regression behavior for:
- draft lifecycle rules: archive, clear, new draft, autosave, encrypted item loading, and timestamp preservation
- item operations: title rename fallbacks, encrypted title metadata, delete-to-recycle behavior
- recycle bin state: load-once init, add, delete, restore, and clear
- recycle bin auto-clean rules: never/7/30/90-day retention and setting-triggered cleanup
- import/export helpers: payload normalization, empty item filtering, deduplication, sorting, ZIP wrapper behavior, recording import/export, and export envelope shape
- single-entry TXT/MD export helpers: filename cleanup, timestamp format, MIME type, and encrypted-menu visibility
- settings: Markdown mode persistence, recycle retention, and LLM settings persistence
- LLM connection and AI tag service: no request when disabled/incomplete, correct OpenAI-compatible
/modelsand/chat/completionsrequests, success/failure states, and local failure logs - Markdown rendering: fallback escaping and local
marked+DOMPurifyintegration - text utilities: title resolution, first-line fallback, clamping, and mixed-language word count
Ctrl+S: Save current draftCtrl+K: Search archived entriesCtrl+L: Clear draft
User input
↓
DOMManager reads/writes DOM state
↓
bindAppEvents routes browser events
↓
AppController coordinates services
↓
Services update app state and call storage modules
↓
UIController and view modules render feedback
↓
User receives feedback
- 🖊️ First-run usage guide popup
- ✍️ Auto-save drafts
- 📦 Entry archive management
- 🔍 Full-text search
- 📊 Real-time word/storage stats
- 🌓 Dark/light theme switching
- 💾 Export full backup to ZIP, including
notes.jsonand local recordings - 📄 Export a single archived entry as TXT or Markdown
- 📥 Import from legacy JSON or ZIP (merge + dedup supported)
- 👀 Local Markdown preview with persistent edit/preview mode
- 🧹 Optional recycle bin auto-cleanup
- 🏷️ Entry pinning, favorites, tags, tag filtering, and optional AI tag generation
- 🎙️ Local draft recording attachments with playback, rename, export, recycle, and restore
- 🔌 Optional OpenAI-compatible LLM connection test
- ⌨️ Rich keyboard shortcuts
- Switched to IndexedDB for larger storage capacity and broader client compatibility.
- Added symmetric encryption to protect data with a password.
- Merged draft-to-entry save logic to update matched entries instead of duplicating.
- Optimized Chinese font stack for better readability.
- Beautified scrollbar style.
- Added font size settings.
- Replaced clear entry with a More panel containing recycle bin + import/export.
- Built recycle bin UI with single delete, bulk clear, and confirmation dialogs.
- Changed delete flow to move entries into recycle bin first.
- Implemented recycle bin management with double confirmation for destructive actions.
- Added legacy JSON import/export with deduplication and format compatibility.
- Implemented a hard break logic: if draft becomes empty, next save must create a new entry ID.
- Set default encryption password to
passwordwhen input is empty; default-password notes can auto-decrypt. - Retained password hint after decryption for quick re-encryption.
- Added a small GitHub link next to the main title.
- Enabled click-to-edit entry titles outside encryption flow.
- Auto-filled encryption modal title from current entry title.
- Fallback to first line of body when title is empty.
- Added first-run bootstrap logic to maintain the
firstOpenflag and insert the usage notice when needed. - Clear draft without confirmation after the draft has been archived; ask for confirmation only for never-archived drafts.
- Re-saving an unchanged archived draft keeps the original update timestamp.
- Save single-entry changes incrementally instead of rewriting the full archive list for common edits.
- Add local Markdown preview for drafts.
- Add single-entry TXT/Markdown export from the archived entry menu.
- Persist Markdown edit/preview mode across entries and reloads.
- Add configurable recycle bin auto-cleanup.
- Add optional OpenAI-compatible LLM settings and connection test.
- Add entry pinning, favorites, tags, and tag filtering.
- Add manual AI tag generation through the optional OpenAI-compatible configuration.
- Add local draft recording attachments with playback, rename, export, recycle, and restore.
- Upgrade full backup to ZIP with
notes.jsonplus recording files, while keeping legacy JSON import.
- Upgrade
Ctrl+Kinto a global quick switcher that can search archived entries, recycle bin entries, and the current draft, with keyboard navigation and enter-to-open. - Add batch actions for archived entries, including multi-select delete, batch export, and batch encryption/decryption where safe.
- Add draft version history for recent edits, with simple restore support for accidental overwrites.
- Improve first-load performance and add a restrained loading state for large local databases.
- Add recording playback controls inside entries, including seek, speed, and rename/remove attachment actions.
- Add image attachment support with local previews, size warnings, and ZIP backup compatibility.
- Add an attachment manager that lists large files and helps users clean storage without deleting the whole entry.
- Plan optional audio transcription as a future LLM action; transcription must only run after explicit user action and use the user-configured provider.
- Add configurable default password in Settings. New notes encrypted with an empty password should use this updated default, while previously encrypted notes keep their original default password.
- Add one-click migration from old default password to new default password, so previously default-password-encrypted notes can be batch-updated safely (backup recommended before migration).
- Add remember-password-after-decrypt as a user option, so users can choose whether to auto-fill next time.
- Add archive auto-clean rules separate from recycle bin cleanup, such as deleting or moving entries older than a selected retention period.
- Add backup reminders and backup health checks, including last export time and estimated local storage usage.
- Add import preview before merge, showing new, duplicate, and conflicting entries.
- Improve Markdown editing with toolbar actions for headings, bold, links, lists, code blocks, and task lists.
- Add split-view Markdown preview on larger screens while keeping the current edit/preview toggle on narrow screens.
- Add local search inside the active draft, including match count and next/previous navigation.
- Add reusable note templates for common temporary-note formats such as meeting notes, daily logs, and task lists.
- Add AI-assisted draft actions such as summarize, polish, continue writing, and extract tasks using the optional LLM configuration.
- Add per-action confirmation showing which text will be sent before any LLM request.
- Add model capability notes in Settings so users understand which configured models are suitable for summarization, rewriting, or transcription.
- Keep all LLM features default-off, user-triggered, and routed only through the user-configured OpenAI-compatible provider.
- Add optional sync with user-configured server
POST/GETendpoints, disabled by default and separated from local-only usage. - Add a lightweight Python server component with basic data receive/read APIs + CORS support for self-hosted sync.
- Add conflict handling for sync, including local-first merge rules and a manual conflict review screen.
- Consider PWA support for installability, offline launch, and mobile-friendly capture workflows.
- Add browser compatibility checks for recording, attachment storage, and large IndexedDB payloads.
-
Add a new UI component
- Write styles in
css/components.css - Add focused rendering logic in
js/ui/ - Use
ui/ui-controller.jsonly for shared UI feedback and metadata
- Write styles in
-
Add a new business feature
- Put the core flow in
js/services/ - Keep
app-controller.jsas the coordinator - Bind DOM events in
bootstrap/bind-events.js
- Put the core flow in
-
Add new storage data
- Add load/save methods in
js/storage/ - Define new storage keys in
constants.js - Export shared storage helpers through
storage.jswhen needed
- Add load/save methods in
-
Add new utility helpers
- Implement focused helpers in
js/lib/ - Export public helper surfaces through
utils.jswhen needed
- Implement focused helpers in
/* Add a new theme in css/theme.css */
[data-theme="custom"] {
--bg: #your-color;
--text: #your-color;
/* ... other variables ... */
}- Module independence: each JS module handles a single responsibility.
- Input validation: validate all public API inputs.
- Error handling: use try-catch around critical operations.
- Performance: debounced draft save (250ms).
- Accessibility: keep semantic HTML structure.
- Browser storage size limits (typically 5-10MB)
- No offline sync
- Single-tab usage recommended (multi-tab may conflict)
- Chrome/Edge 85+
- Firefox 78+
- Safari 14+
- ES6 module support required
AGPL-3.0 (GNU Affero General Public License v3.0)
- All modifications must be open sourced.
- Commercial usage must open source the full code.
- Network service usage is also covered.
See the LICENSE file for details.
If you need commercial licensing or a different license agreement, please visit:
Contact us to discuss commercial license options or cooperation.
Developer: MuYYY @ Chengdu Insaite Technology Co., Ltd.
Latest version: 1.1.0
License: AGPL-3.0
AI usage: This project was built with AI assistance. Some code was AI-generated, then reviewed and edited manually. The documents in ./doc were generated to help AI understand the project and should be treated as reference material, which have not been manually edited.