About this project

Cognote is a local Web-based intelligent note system for personal Markdown knowledge notes, emphasizing private deployment and local file storage. It automatically recursively scans Markdown files in a specified directory, organizes them by directory tree and tags, and provides full-text search, AI-assisted organization, and in-browser editing capabilities. Main features - Note browsing and search: The left directory tree displays categories; click a folder to filter, click a note to open it. The top bar supports mixed Chinese-English full-text search, with results sorted by relevance and highlighted. The right-click menu allows creating, editing, categorizing, deleting, or opening the local location. - Chinese full-text search: A self-built inverted index using Chinese bigrams plus English word segmentation, with TF-IDF weighted ranking, solving the problems of Chinese word segmentation and inverted retrieval. - Markdown editing: Integrates Vditor 3.10.8, supporting three modes: instant rendering, WYSIWYG, and split-screen preview, with support for KaTeX math formulas, Mermaid diagrams, and code highlighting. Title, tags (frontmatter), and body are separated, and saves are written to disk in real time. - AI intelligent categorization: Analyzes the current note and returns suggested categories, tags, summaries, and keywords, which can be applied with one click. - AI knowledge expansion: Expanded content can be appended to the end of the current note or generated as a separate new note document. - Review and self-testing: Generates a one-page review summary (key points, commands, common mistakes, self-test questions), generates Q&A self-test questions based on the current note and notes in the same category, and allows asking AI questions about note content with sources cited. Technical features - The backend has zero dependencies and only requires Node.js 22 or above, using built-in http, fetch, fs, and exec modules, together with an in-memory inverted index. - The frontend is a native HTML/CSS/JS single-page application, paired with a self-written lightweight Markdown renderer. - AI supports DeepSeek, OpenAI, Anthropic Claude, Moonshot, Zhipu GLM, Tongyi Qianwen, and custom OpenAI-compatible protocol providers, configurable in the configuration file or Web interface. - Provides an HTTP API covering the directory tree, search, note reading/writing and moving/deleting, AI categorization/expansion/summary/self-testing/Q&A, index rebuilding, configuration reading/writing, and the note reference relationship graph. Usage After cloning the repository, copy config.example.json to config.json, fill in the note directory, port, and AI API Key, run npm start, and then access the local port. When no API Key is configured, note browsing, search, and editing still work normally; only AI features will prompt for configuration. The project provides startup scripts for macOS and Windows. The project uses the MIT license, and the roadmap shows that features such as core index search, index persistence and incremental updates, batch categorization, a bidirectional link reference relationship view, and a review plan based on the forgetting curve have already been implemented.