Privacy-first note-taking and brainstorming tool for personal, local use.
Your notes are plain Markdown files on your own machine β no cloud, no account, no data leaving your computer. AI features are optional and work through your existing GitHub Copilot subscription or GitHub Models. Cloud backup via Git is available, but only if you want it. You own your data, completely.
Status: Active development Β· v1.0.0
| Daily journaling | Technical notes with Mermaid & code | Dark mode |
|---|---|---|
![]() |
![]() |
![]() |
| AI chat assistant | AI settings |
|---|---|
![]() |
![]() |
| Category | Capabilities |
|---|---|
| Editor | BlockNote rich-text editor (built on ProseMirror/Tiptap), slash commands, headings, lists, tables, code blocks, images |
| Markdown | Bidirectional Markdown serialisation β all content stored as .md files |
| Page tree | Hierarchical pages with drag-and-drop reordering and reparenting |
| Internal links | [[page-title]] wiki-link syntax with autocomplete and backlinks panel |
| Diagrams | Mermaid diagram blocks with live preview |
| Math | KaTeX equation blocks (inline and display) |
| Version history | Automatic Git commits on every save; diff viewer; one-click restore |
| Remote backup | Optional Git push to any remote (GitHub, GitLab, Gitea) using a PAT |
| Full-text search | SQLite FTS5-powered search across all pages |
| AI assistant | Streaming chat panel with context-aware page inclusion; inline rewrite/expand/summarise actions |
| AI providers | GitHub Models API (PAT) or GitHub Copilot (device-flow OAuth) β switchable in Settings |
| Import / Export | Import Markdown files and ZIP archives; export pages as Markdown or PDF |
| Themes | Light, dark, and system-follow modes |
| Keyboard-first | Full keyboard shortcut coverage |
Frontend
- React 18 + TypeScript
- Vite β sub-second HMR
- Tailwind CSS
- BlockNote β rich-text editor (ProseMirror/Tiptap)
- @dnd-kit β drag-and-drop
- Mermaid + KaTeX
Backend
- Node.js + Express + TypeScript
- isomorphic-git β Git operations in pure JS
- better-sqlite3 β FTS5 search index
- fs-extra β atomic file writes
Shared
- TypeScript monorepo (npm workspaces) with shared type definitions
pergament/
βββ client/ # React frontend (Vite)
βββ server/ # Express API server
βββ shared/ # Shared TypeScript types
βββ docs/ # ADRs and action plan
Data is stored separately from the source code, in your home directory:
~/.pergament/data/
βββ workspace.json # Page tree metadata
βββ pages/
β βββ <uuid>/
β βββ index.md # One Markdown file per page
βββ .pergament/
βββ config.json # All settings (AI tokens, Git config, preferences)
βββ search.db # SQLite FTS5 index (auto-rebuilt)
All settings β including AI tokens and Git credentials β are managed through the in-app Settings UI and stored in ~/.pergament/data/.pergament/config.json. No secrets are ever needed in environment variables or source code.
The data directory location can be overridden with the PERGAMENT_DATA_DIR environment variable (see .env.example).
For a detailed breakdown of every layer β frontend, backend, data model, request flow, and AI integration β see ARCHITECTURE.md.
See docs/adr/ for Architecture Decision Records covering every major design choice.
- Node.js 20+ and npm 10+
- A modern browser (Chrome, Firefox, Edge, Safari)
- Native build tools β required by
better-sqlite3:- macOS:
xcode-select --install - Ubuntu/Debian:
sudo apt install build-essential python3 - Windows: install windows-build-tools or use WSL2
- macOS:
git clone https://github.com/<your-github-username>/pergament.git
cd pergament
npm installnpm run devThis starts:
- Express API server on
http://localhost:3000 - Vite dev server on
http://localhost:5173β open this URL in your browser
On first run, Pergament automatically:
- Creates
~/.pergament/data/with a default config - Initialises a local Git repository inside the data directory
- Builds the full-text search index
The browser does not open automatically in development mode. Navigate to http://localhost:5173 yourself.
npm run build
npm startThe server serves the compiled frontend and API from a single process on http://localhost:3000. In production mode the browser opens automatically on startup (configurable in Settings β General).
Optional: copy
.env.exampleto.envto override the port or data directory path before starting.
All configuration is done through Settings β General / Git / AI in the app UI. There is no manual config file editing required.
The only runtime environment variables are optional overrides:
| Variable | Default | Purpose |
|---|---|---|
PORT |
3000 (or value in config) |
Override the server port |
PERGAMENT_DATA_DIR |
~/.pergament/data |
Override the data directory path |
NODE_ENV |
development |
Set to production for production builds |
In Settings β AI, choose a provider and enter your credentials:
- GitHub Models β paste a GitHub Personal Access Token with
models:readscope - GitHub Copilot β click "Sign in with GitHub" and complete the device flow (requires an active Copilot subscription); no PAT needed
# All tests
npm test --workspaces
# Frontend only
npm test -w client
# Backend only
npm test -w serverclient/src/
βββ components/
β βββ editor/ # BlockNote editor, AI bar, math/mermaid blocks
β βββ layout/ # App shell, sidebar, panels
β βββ sidebar/ # Page tree, search, git status
β βββ ui/ # Generic UI components
βββ context/ # React contexts (pages, settings, toasts)
βββ hooks/ # useTheme, useKeyboardShortcuts
βββ utils/ # AI helpers, templates, tree utilities
server/src/
βββ routes/ # Express route handlers
βββ services/ # Business logic (git, search, config, AI)
βββ utils/ # Shared server utilities
Architecture decisions are documented in docs/adr/.
High-level upcoming work:
- PWA support (installable, offline-capable)
- Plugin/extension system
- Multi-workspace support
- Mobile-responsive layout improvements
Contributions are welcome! Please read CONTRIBUTING.md before opening a pull request.
MIT Β© 2026 Radu TΔmaΘ β Codify Idea
Proudly made in Cluj-Napoca, Romania π·π΄




