Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Repository files navigation

/home/tahad/Code/annotate-studio/docs/AnnotateStudio-Logo.png

Annotate Studio logo

Annotate Studio

A local-first, AI-powered study environment for the desktop.

Annotate Studio is a fully offline-capable study workspace that brings together flashcards, exam practice, note-taking, PDF annotation, a Pomodoro timer, and optional AI assistance into a single, integrated desktop application. Every feature works without an internet connection; AI is an opt-in enhancement that you configure with your own provider (local or remote).

Built as a hybrid desktop application using Tauri v2 and Next.js 15, it runs natively on Windows, macOS, and Linux without Electron's resource overhead. The Rust backend handles file I/O, the SM-2 spaced repetition engine, AI provider routing, and data persistence via SQLite, while the React frontend provides the interactive canvas, rich text editing, and study tool UIs.

(Screenshot to be added)

Getting Started · Features · Tech Stack

How It Works

The application is organized around an infinite canvas that serves as your primary workspace. From here you open PDFs, write notes, and arrange your materials side by side. Dedicated tabs in the sidebar provide focused tools for flashcards (powered by the SM-2 spaced repetition algorithm), timed exam practice, a Pomodoro timer, and an AI chat panel.

All data lives on your machine at $DATA_DIR/annotate-studio/. Canvas state, flashcard decks, exam results, and settings are persisted as JSON and SQLite files through Tauri's Rust backend. When you configure an AI provider (local Ollama, OpenAI, Anthropic, etc.), requests are routed through a multi-provider adapter that never shares your data without your chosen endpoint.

Features

Canvas Workspace

The canvas is an infinite, pannable (Alt+drag or middle-mouse) and zoomable (Ctrl+scroll) surface. Resources open as draggable, resizable windows using react-rnd:

  • PDF Viewer: Renders pages using PDFium via EmbedPDF's WASM engine. You can annotate with pen, highlighter, rectangle, circle, and arrow tools; select text and send it to the AI for summarisation or explanation; zoom in and out; and export the annotated PDF as a new file.
  • Markdown Notes: A CodeMirror 6-based editor with a formatting toolbar (bold, italic, heading, code, list, link) and live preview. Supports KaTeX inline and block math, fenced code blocks with language labels, tables, blockquotes, and [[wiki-links]] that autocomplete to other files in your workspace.
  • Image Viewer: Displays reference images loaded from your workspace.
  • Window Management: Each resource window can be dragged, resized, minimised (to a shelf at the top of the canvas), maximised to full canvas, tiled horizontally or vertically alongside other windows, or closed. Canvas state (positions, sizes, open resources) is saved to disk automatically.

Flashcards with Spaced Repetition

The flashcard system implements the SM-2 algorithm in Rust, the same algorithm that powers Anki and SuperMemo. Cards are organised into collections, each with its own review period (e.g., 10 cards per day):

  • Review Mode: Cards are presented one at a time with a 3D CSS flip animation. After revealing the answer, you rate your recall: Again (forgot, resets interval), Hard (recalled with difficulty), Good (normal recall), Easy (trivial). The SM-2 engine recalculates the card's ease factor, interval, and next review date.
  • Browse Mode: Displays all cards in a collection as a list with expandable answers, showing each card's ease factor, interval, and repetition count.
  • Card Generation: Paste any study material and the AI will extract Q&A pairs and create flashcards automatically. You can also add cards manually.
  • Filters: Filter cards by Due (ready for review), New (never reviewed), Young (reviewed fewer than 21 times), or Mature (reviewed 21+ times).
  • Notifications: A background poll checks for due cards every 60 seconds and sends a browser notification.

Exam Practice

Exams are created manually or generated by AI, consisting of multiple-choice and verbal (free-text) questions:

  • Exam Creation: Write questions individually or describe a topic to the AI generator, which uses template-based domain detection (Math, Science, Computer Science, History, Language, General) to produce 5-6 MCQ and 1 verbal question with modelled answers.
  • Taking an Exam: Timed mode counts down from your set duration. You navigate questions freely, mark answers, and can toggle instant feedback to see whether each answer is correct as you go.
  • Review: After submission, the app calculates a score percentage, marks pass/fail, and displays every question with your answer, the correct answer, and whether you got it right.
  • State Management: Exams exist in one of three states: draft, in-progress, or completed. You can retake any completed exam.

Pomodoro Timer

A configurable timer for time-boxed study sessions:

  • Durations: Focus (default 25 min), short break (5 min), long break (15 min). All values are customisable from the interface.
  • Session Flow: The timer automatically switches between focus and break sessions. Every fourth break is a long break.
  • Sound: Four sound effects (beep, bell, chime, digital) are generated at runtime via the Web Audio API: no audio files bundled.
  • Visual Feedback: A circular SVG progress indicator shows remaining time. Session count is displayed beneath the timer.

AI Assistance (Optional)

AI capabilities are entirely optional and require configuring a provider in the Settings tab. Supported providers: OpenAI, Anthropic (Claude), Ollama (fully local), DeepSeek, OpenRouter, Groq.

  • AI Counsellor: A dedicated chat panel with a compassionate system prompt, designed to keep you motivated and help you work through study difficulties.
  • Step-by-step Explainer: Describe a topic you are struggling with and the AI returns a structured lesson with an overview, numbered steps, and a summary. You can ask follow-up questions on each step.
  • PDF Summarisation: The app extracts text from the currently open PDF (via pdfjs) and sends it to the AI for a concise summary.
  • Flashcard Generation: AI creates Q&A flashcards from any content you paste.
  • Exam Generation: AI produces topic-specific practice exams.
  • Ask AI from PDF: Select any text in the PDF viewer and click "Ask AI" to get an explanation or elaboration.

Study Tools

  • Motivation Tab: A library of 15 built-in inspirational quotes (refreshable) alongside four static encouragement cards and the AI Counsellor chat.
  • Documents Tab: A grid-style file browser that lists all PDFs, Markdown files, and images in your workspace. Supports search by filename, single-click open on the canvas, and file deletion.
  • Settings Tab: Controls for appearance (5 themes: White, Black, Sepia, Gray, Forest; custom primary colour with 6 presets and a colour picker; custom background image URL), interface scaling (100% to 200%), and AI provider configuration (add, edit, set default, test connection).

Getting Started

Prerequisites

  • Node.js >= 18
  • Rust (nightly or stable with Tauri v2 support)
  • Tauri CLI v2 (cargo install tauri-cli)
  • System dependencies for Tauri (see Tauri prerequisites)

Quick Start

git clone <repo-url>
cd annotate-studio
npm install
npm run dev

The Next.js dev server starts on localhost:3000. To launch the Tauri desktop shell alongside it:

npm run tauri dev

Production Build

npm run build        # static export to dist/
npm run tauri build  # bundle native app

The compiled application will be available in src-tauri/target/release/bundle/.

Configuration

No configuration is required to begin using the app. AI providers can be added later from the Settings tab. For fully local AI, install Ollama; the app detects it automatically when you configure the Ollama provider.

Project Structure

src/
  app/                    # Next.js App Router pages and global styles
  components/
    canvas/               # Infinite canvas, PDF viewer, notes, resource windows
    chatbot/              # AI chat panels (counsellor, explainer)
    layout/               # Sidebar, title bar, glass panel
    study/                # Flashcards, exams, pomodoro, motivation, documents, settings
    ui/                   # Reusable primitives (dialog, etc.)
  lib/
    store.ts              # Zustand global state
    tauri-commands.ts     # Tauri IPC bridge
src-tauri/
  src/
    main.rs               # Application entry point and all Tauri commands
    ai_router.rs          # Multi-provider AI routing
    filesystem.rs         # File system abstraction
    spaced_repetition.rs  # SM-2 algorithm engine
    vector_db.rs          # SQLite-backed keyword / vector search
    analytics.rs          # Study activity logging and stats
  Cargo.toml
  tauri.conf.json

Tech Stack

Layer Technology
Desktop Shell Tauri v2 (Rust)
Frontend Next.js 15, React 19, TypeScript
State Zustand v5
Styling Tailwind CSS v4 + CSS custom properties (5 themes)
PDF Rendering EmbedPDF (PDFium WASM)
Markdown Editor CodeMirror 6
Math Rendering KaTeX
Window Management react-rnd
Database SQLite via rusqlite
AI Networking reqwest (HTTP), provider-agnostic router
Icons Lucide React
Animation Framer Motion

Credits

Idea and Feature Design: Taha Dostifam. This application was conceived and built for personal use, collecting the study tools needed in one place: flashcards with SM-2 repetition, exam practice, PDF annotation, a Pomodoro timer, and optional AI assistance: into a single local-first desktop application.

Engineering: The codebase was developed with LLM-assisted engineering, enabling a broad set of features across TypeScript, React, Rust, and SQLite to be implemented by a single developer.

License.


Study smarter, locally.

About

Professional PDF annotation with smooth performance and precision drawing

Resources

Stars

22 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages