Back to Projects

Leaflet

Pentest notes and engagement workspace with host tracking, findings, CVSS, credentials, and attack-chain documentation.

Leaflet

Leaflet is a self-hosted markdown note-taking app originally created to capture notes from the HackTheBox CPTS course, but later on expanded to support general note-taking and pentest/CTF workflows. Inspired by Obsidian and Cherry Tree, it keeps notes as plain .md files on disk while adding pentest and CTF workflow tools such as a host tracker, credential vault, flag tracker, attack chain visualizer, methodology checklist, operation log, findings tracker, network topology, and CVSS calculator. Leaflet supports both general and pentest workspaces, combining a rich Milkdown WYSIWYG editor, CodeMirror source mode, LaTeX math, wiki links, backlinks, graph visualization, exports, and Git-based sync with no cloud lock-in.

Tech Stack

Framework

  • SvelteKit 5

Language

  • TypeScript

Styling

  • Tailwind CSS v4

Editor

  • Milkdown
  • CodeMirror 6
  • KaTeX

Database

  • SQLite
  • Drizzle ORM

Frontend

  • Lucide

Tooling

  • pnpm

Runtime

  • Node.js 22 LTS

Metrics

Workspace Modes
General note-taking and pentest/CTF workspaces
Pentest Tools
Engagement-specific panels and utilities for security workflows
Sync Model
Plain Markdown files synced between devices without cloud lock-in

Case Study

The Problem

CPTS, CTF, and penetration testing notes need fast writing, durable structure, and engagement-specific tracking, but many note tools either hide data behind proprietary formats or require cloud sync.

The Solution

Leaflet keeps every note as a portable Markdown file while layering a polished editor, workspace isolation, Git sync, and pentest-only tools that activate when a workspace is marked as CTF-related.

The Results

The finished app supports everyday notes as well as security engagements, with rich editing, source mode, search, backlinks, note graph visualization, images, exports, templates, and dedicated pentest trackers.

The Outcome

Leaflet also became a reference project for agent orchestration and open-source project structure, including an agent AI engineering pipeline with structured outputs, context-passing protocols, and skills-based code generation.

Timeline

CPTS Start

Initial Build

Created Leaflet to capture HackTheBox CPTS notes in a self-hosted Markdown-first workflow.

Editor Milestone

Rich Markdown Workspace

Added Milkdown WYSIWYG editing, CodeMirror source mode, math rendering, syntax-highlighted code blocks, wiki links, backlinks, graph visualization, image handling, and export flows.

Pentest Mode

Engagement Tooling

Added pentest workspaces with host tracking, credential storage, flag tracking, attack chain visualization, command snippets, findings, operation logs, topology, CVSS scoring, and the optional CPTS methodology checklist.

Sync Milestone

Git-Based Sync

Implemented one-click push and pull, a persistent recommendation-driven sync badge, stale and error states, and refreshes on load, focus, and sync actions.

Completed

Finished Project

Completed Leaflet as a self-hosted general and pentest note-taking app with optional AI assistance and agent-orchestration reference structure.