Skip to content

A Markdown note-taking application with calendar integration

Notifications You must be signed in to change notification settings

tatwan/ADHDNotes

Repository files navigation

icon_latest_version

GitHub stars GitHub forks Open issues Open pull requests Last commit Repo size Top language Electron React TypeScript Vite

ADHDNotes

A local-first Electron desktop application for ADHD users that combines markdown note-taking with calendar integration, offline bookmarking with content preservation, and implements forced daily task prioritization through intentional friction.

Calendar (Daily) Notes: Task and Time Blocks

  • Notes associated with the calendar

image-20251207151514246

General Notes

  • Create non-calendar dependent notes (like any note taking tool)
  • All your notes are locally stored
  • Full Markdown support
  • Switch Themes and apply your own CSS theme

image-20251207151552239

Bookmarks & Offline Content

Save web articles, documentation, and resources directly into ADHDNotes with full offline access:

  • Browser Extension Integration - Save bookmarks from any website with a single click via the Chrome/Firefox extension
  • Content Preservation - Full article content extracted and stored locally using Mozilla Readability
  • Offline Access - Read saved content even without internet connection
  • AI-Powered Tags - Automatic tag generation to organize your bookmarks
  • Local Asset Storage - Images and favicons stored locally for complete offline experience
  • Rich Metadata - Automatically extracts title, description, and Open Graph data
  • SQLite Database - Fast, reliable local storage with full-text search capabilities

chrome extension

The bookmarks feature runs a local Fastify API server (port 3666) that communicates with the browser extension, ensuring your data never leaves your machine.

image-20251207164637488

Snippets

Capture and save highlighted text from any webpage as editable markdown snippets:

  • Quick Capture - Highlight text on any website, right-click, and select "Add as Snippet"
  • Markdown Storage - All snippets saved as editable markdown for easy formatting and organization
  • Source Tracking - Automatically captures page URL, title, and timestamp for reference
  • Edit Anytime - Full markdown editor for modifying and enhancing your saved snippets
  • Title Editing - Click snippet titles to rename them inline for better organization
  • Drag-and-Drop Reordering - Manually reorder snippets using drag handles
  • Clean Preview - Snippet cards show title first, then rendered preview (no raw markdown)
  • Multiple Snippets - Save multiple snippets from the same page with individual timestamps
  • Bulk Management - Refresh list and delete all snippets with one click
  • Offline Access - All snippets stored locally in SQLite database

right-click to save example

Perfect for saving quotes, code examples, research notes, or any text you want to reference later!

image-20251207164652262

You edit your snippets in markdown:

image-20251207164712594

Daily Planning Wizard

When you open the app on a new day, a planning wizard prompts you to set your focus:

  • Top 3 Priorities - Enter your most important tasks for the day
  • Energy Level - Select Low 🌙, Medium ☀️, or High ⚡ to set expectations
  • Template Injection - Priorities are automatically added to your daily note's "Today's Focus" section
  • Skip Option - Quick skip if you prefer to plan later

This intentional friction helps ADHD users start each day with clarity and focus.

Recurring Tasks

Define tasks that automatically appear in your daily notes based on recurrence patterns:

  • Daily Tasks - Tasks that appear every day
  • Weekday Tasks - Tasks for Monday through Friday only
  • Weekend Tasks - Tasks for Saturday and Sunday only
  • Weekly Tasks - Tasks for a specific day of the week
  • Monthly Tasks - Tasks for a specific day of the month

All recurring task definitions are stored in a single markdown file (recurring-tasks.md) in your ADHDNotes folder. When you navigate to a new date, applicable recurring tasks are automatically added to your daily note.

* [ ] @daily Morning routine
* [ ] @daily 09:00 Take medication
* [ ] @weekdays Stand-up meeting prep
* [ ] @weekends Meal prep
* [ ] @weekly:monday Weekly planning
* [ ] @monthly:1 Pay rent
* [ ] @monthly:last Month-end review

Each day's task instance is independent - completing Monday's recurring task doesn't affect Tuesday's.

Daily Task Migration

Tomorrow when you open the app, if you have incomplete tasks from today, you'll see a modal:

"Review Yesterday's Tasks"

You MUST review each task:

  • Move to Today - Task gets copied to today's note
  • Not Important - Task is dismissed

This is intentional! It forces you to:

  • Reflect on what actually matters
  • Avoid endless task accumulation
  • Make conscious prioritization decisions

You cannot skip this - every task requires a decision.

image-20251207151754132

Features

  • Local-First Architecture: All notes stored as plain .md files on your filesystem for transparency and data ownership
  • Markdown Editor: Powered by CodeMirror 6 with custom extensions for task and time block detection
  • Preview Mode: ⭐ Toggle between markdown editor and beautiful rendered preview with Cmd+/ (macOS) or Ctrl+/ (Windows/Linux)
  • Daily Notes: Automatic daily note creation with date-based organization
  • Project Notes: Organize notes in folders and sub-folders
  • Task Management: Inline task checkboxes (* [ ] and * [x]) with real-time parsing
  • Time Blocks: Schedule time blocks (+ [ ] and + [x]) with duration tracking
  • Calendar Navigation: Visual calendar for quick date jumping with indicators showing dates that have notes
  • Timeline View: Hour-based schedule (8 AM - 10 PM) with drag-and-drop task scheduling
  • Forced Daily Migration: ⭐ Core feature - manually review incomplete tasks from previous days (no automation, intentional friction for reflection)
  • Daily Planning Wizard: ⭐ Start each day by setting your top 3 priorities and energy level
  • Recurring Tasks: ⭐ Define tasks that auto-generate in daily notes based on patterns (@daily, @weekdays, @weekly:monday, @monthly:15)
  • Offline Bookmarks: ⭐ Save web content for offline access via browser extension with full content preservation
  • Snippets: ⭐ Capture highlighted text from any webpage as editable markdown with source tracking, drag-and-drop reordering, and inline title editing
  • Focus Mode: ⭐ Distraction-free writing mode that hides both sidebars (keyboard shortcut or button)
  • AI-Powered Tagging: Automatic tag generation for bookmarks using AI
  • Local API Server: Fastify server (port 3666) for browser extension communication
  • Auto-Save: Debounced auto-save with 3-second interval
  • File Watcher: Automatic detection of external file changes
  • Branding: New app icon and soft pastel UI color palette applied across the app UI to match the ADHDNotes aesthetic (Slate Ink, Calm Teal, Soft Lavender, Pastel Peach)

Technology Stack

  • Electron: Cross-platform desktop framework
  • React + TypeScript: UI framework with type safety
  • Vite: Build tool and development server
  • CodeMirror 6: Advanced markdown editor
  • react-markdown: Beautiful markdown preview rendering
  • Chakra UI: Component library
  • Zustand: Lightweight state management
  • date-fns: Date manipulation
  • @dnd-kit: Drag-and-drop functionality
  • react-calendar: Calendar component with date indicators
  • chokidar: File system watcher
  • electron-store: Local settings persistence
  • Fastify: Fast web framework for local API server
  • better-sqlite3: Native SQLite database for bookmarks
  • Drizzle ORM: Type-safe database ORM
  • jsdom + @mozilla/readability: Web content extraction and parsing

Project Structure

app/
├── electron/               # Electron main process
│   ├── main.ts            # Main process entry point
│   ├── entry.ts           # Entry point with polyfills
│   ├── preload.ts         # Security bridge (IPC)
│   ├── polyfills.ts       # Node.js polyfills for Electron
│   ├── db/                # Database layer
│   │   ├── index.ts       # Database initialization
│   │   └── schema.ts      # Drizzle ORM schemas (bookmarks, tags, highlights, snippets)
│   ├── server/            # Local API server
│   │   └── api.ts         # Fastify routes for browser extension
│   └── services/          # Business logic services
│       ├── scraper.ts     # Web content extraction
│       ├── ai.ts          # AI tag generation
│       └── assets.ts      # Image/favicon downloads
├── src/                   # React application
│   ├── components/        # React components
│   │   ├── layout/       # AppLayout, Sidebar, RightPanel
│   │   ├── editor/       # MarkdownEditor
│   │   ├── calendar/     # CalendarView
│   │   ├── timeline/     # Timeline, TimeSlot
│   │   ├── bookmarks/    # BookmarksList, BookmarkReader
│   │   ├── snippets/     # SnippetList, SnippetViewer
│   │   └── modals/       # MigrationModal
│   ├── stores/           # Zustand state management
│   │   ├── noteStore.ts  # Note loading/saving
│   │   ├── taskStore.ts  # Task operations
│   │   ├── bookmarkStore.ts # Bookmark management
│   │   ├── snippetStore.ts  # Snippet management
│   │   └── appStore.ts   # App settings & migration
│   ├── utils/            # Utility functions
│   │   ├── fileSystem.ts       # File operations
│   │   ├── markdownParser.ts   # Markdown parsing
│   │   ├── dateUtils.ts        # Date utilities
│   │   ├── migrationChecker.ts # Migration logic
│   │   └── recurringTasks.ts   # Recurring task parsing & injection
│   ├── hooks/            # Custom React hooks
│   │   ├── useFileWatcher.ts   # External file changes
│   │   └── useAutoSave.ts      # Auto-save debouncing
│   ├── types/            # TypeScript definitions
│   │   └── index.ts
│   ├── App.tsx           # Main app component
│   └── main.tsx          # React entry point
├── package.json
├── tsconfig.json
├── vite.config.ts
└── README.md

Installation

  1. Clone the repository:
git clone <repository-url>
cd app
  1. Install dependencies:
npm install

Development

Run the app in development mode:

npm run dev

This will:

Browser Extension Installation

To use the Bookmarks and Snippets features, you need to install the browser extension:

Building the Extension

  1. Navigate to the extension directory:
cd extension
  1. Install dependencies (if not already installed):
npm install
  1. Build the extension:
npm run build

This creates the extension files in extension/dist/.

Installing in Chrome/Edge

chrome extension

  1. Open Chrome/Edge and navigate to:

    • Chrome: chrome://extensions/
    • Edge: edge://extensions/
  2. Enable Developer mode (toggle in top-right corner)

  3. Click Load unpacked

  4. Select the extension/dist folder

  5. The ADHDNotes extension should now appear in your extensions list

Using the Extension

Once installed, you can:

  • Save Bookmarks: Right-click on any page → "Save to ADHDNotes"
  • Save Snippets: Highlight text → Right-click → "Add as Snippet"

Note: The ADHDNotes desktop app must be running for the extension to work (it communicates via localhost:3666).

Updating the Extension

After making changes to the extension code:

  1. Rebuild: cd extension && npm run build
  2. Go to chrome://extensions/
  3. Click the refresh icon (🔄) on the ADHDNotes extension card

Building

Build the application for distribution:

npm run electron:build

This will create distributable packages in the release/ directory for:

  • macOS: DMG installer and .app bundle
  • Windows: NSIS installer and portable .exe
  • Linux: AppImage, .deb, and .rpm

Notes Directory Structure

On first launch, the app creates this structure in your Documents folder:

~/Documents/ADHDNotes/
├── daily/
│   ├── 2025-10-25.md
│   ├── 2025-10-26.md
│   └── 2025-10-27.md
├── Notes/
│   ├── Work/
│   │   ├── Project Alpha.md
│   │   └── Sprint Planning.md
│   └── Personal/
│       └── Goals 2025.md
├── themes/
│   ├── default-light.css
│   └── default-dark.css
├── recurring-tasks.md    # Recurring task definitions
├── bookmarks.db          # SQLite database for bookmarks
└── assets/              # Downloaded images and favicons
    ├── favicon-1.png
    └── image-2.jpg

Markdown Syntax

Tasks

* [ ] Incomplete task
* [x] Completed task
  * [ ] Subtask (indented with 2 spaces)

Task Priorities

Add priority markers to highlight urgent or important tasks:

* [ ] !HIGH Urgent task that needs immediate attention
* [ ] !MED Medium priority task
* [ ] !LOW Low priority task for later

In preview mode, these display as colored badges:

  • !HIGH - Red badge for critical/urgent tasks
  • !MED - Orange badge for medium priority
  • !LOW - Blue badge for lower priority tasks

Time Blocks

+ [ ] Time block without time
+ [ ] 09:00 Team meeting (with scheduled time)
+ [x] 14:00 Code review (completed time block)

Scheduling Tasks

You can drag tasks from the editor to specific time slots in the timeline. The task will be updated with the scheduled time:

* [ ] 10:00 Task scheduled for 10 AM

Recurring Tasks

Define recurring tasks in ~/Documents/ADHDNotes/recurring-tasks.md. These are automatically added to new daily notes:

# Patterns
* [ ] @daily Task appears every day
* [ ] @daily 09:00 With scheduled time
* [ ] @weekdays Monday through Friday
* [ ] @weekends Saturday and Sunday
* [ ] @weekly:monday Every Monday (also: tuesday, wednesday, etc.)
* [ ] @weekly:fri Short day names work too
* [ ] @monthly:1 First of every month
* [ ] @monthly:15 15th of every month
* [ ] @monthly:last Last day of every month

The file is created automatically on first launch with example content. Edit it anytime to add, remove, or modify your recurring tasks.

To stop a recurring task: Edit recurring-tasks.md and either delete the line or comment it out by adding // or # at the start of the line.

Preview Mode

Toggle between editing and preview mode using the eye icon button or keyboard shortcut Cmd+/ (macOS) or Ctrl+/ (Windows/Linux):

  • Edit Mode: Raw markdown with syntax highlighting
  • Preview Mode: Beautiful rendered view with styled headings, lists, checkboxes, code blocks, and more

Preview mode shows:

  • Formatted headings with borders
  • Clickable checkboxes for tasks (read-only in preview)
  • Syntax-highlighted code blocks
  • Styled blockquotes, tables, and lists
  • Links, images, and horizontal rules
  • Priority badges for !HIGH, !MED, !LOW tasks

Keyboard Shortcuts

Shortcut Action
Cmd+/ (Mac) / Ctrl+/ Toggle preview mode
Cmd+. (Mac) / Ctrl+. Jump to today's daily note
Cmd+Shift+F (Mac) / Ctrl+Shift+F Toggle Focus Mode (hide sidebars)

Focus Mode: Hides both sidebars to give you a distraction-free writing experience. You can also click the maximize button in the editor header. Press again to restore panels.

Calendar Date Indicators

The calendar shows blue dots on dates that have notes, making it easy to see which days you've been productive!

Core Feature: Forced Daily Migration

When you navigate to a new day, if there are incomplete tasks from the previous day, you'll see a modal that blocks the app until you process each task. This is intentional friction designed to help ADHD users:

  • No "skip" button - You must review your tasks
  • Flexible processing - Review tasks individually or use bulk actions
  • Per-task choices:
    • Move to Today - Copy task to today's note
    • Not Important - Dismiss the task
  • Bulk actions available:
    • Move All - Move all remaining tasks to today at once
    • Ignore All - Dismiss all remaining tasks at once

You can choose to review each task individually (allowing you to move some and ignore others), or use the bulk actions to quickly process all remaining tasks. This provides flexibility while still requiring conscious engagement with your task backlog.

Settings

Settings are stored in electron-store and include:

  • Theme (light/dark/system)
  • Editor font size
  • Timeline start/end hours
  • Auto-save interval
  • Window dimensions
  • Last reviewed date (for migration tracking)

Development Tips

  1. Hot Reload: Changes to React code will hot reload. Electron main process changes require app restart.

  2. Debugging:

    • Renderer process: Use DevTools (opens automatically in dev mode)
    • Main process: Use console.log() - output appears in terminal
  3. File System: All file operations go through IPC for security. See electron/main.ts for available IPC handlers.

  4. State Management: Use Zustand stores instead of prop drilling. Stores are reactive and automatically update components.

Security

  • Context isolation enabled
  • No Node.js integration in renderer
  • All file operations validated to stay within notes directory
  • Local API server (port 3666) only accepts connections from localhost
  • No external network access - all data stays on your machine
  • Bookmarks database encrypted at rest (optional)

Future Features

  • Google Calendar integration
  • Microsoft Calendar integration
  • Full-text search across notes and bookmarks
  • Browser extension for Chrome and Firefox (in beta)
  • Bookmark collections and advanced filtering
  • Markdown export for bookmarks
  • PDF export for notes
  • Mobile companion app
  • Cloud sync (optional, encrypted)

Contributing

This is a personal project built to specification. However, feedback and bug reports are welcome!

License

MIT

Credits

Built with love for ADHD users who need structure without judgment.

About

A Markdown note-taking application with calendar integration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published