ronote

module
v0.0.0-...-6db0f5a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2026 License: MIT

README

RoNote

CI

RoNote turns one documentation page or a printed PDF into an editable study doc for IT and CS students. The source is reproduced word for word, with code blocks kept byte-identical and nothing AI-added. Students highlight it, write notes beside it and run its code blocks. Links to other pages on the same site can be imported with a click.

Status: pre-alpha

License: MIT, see LICENSE.

Setup

Not ready yet. After cloning, run make setup to install the commit message hook.

Directories

Path Synopsis
cmd
api command
Command api serves the RoNote HTTP API.
Command api serves the RoNote HTTP API.
eval command
Command eval measures search against a fixed corpus and set of queries (docs/adr/0011-retrieval.md).
Command eval measures search against a fixed corpus and set of queries (docs/adr/0011-retrieval.md).
extract command
Command extract fetches one page with the production fetcher rules and prints its IR: JSON by default, or a readable text dump.
Command extract fetches one page with the production fetcher rules and prints its IR: JSON by default, or a readable text dump.
fakedocling command
Command fakedocling replays recorded answers of docling-serve and pdftext (docs/adr/0013-pdf-import.md) for dev and the end-to-end tests, like cmd/fakellm: the worker runs its real client and needs no docling image.
Command fakedocling replays recorded answers of docling-serve and pdftext (docs/adr/0013-pdf-import.md) for dev and the end-to-end tests, like cmd/fakellm: the worker runs its real client and needs no docling image.
fakeembed command
Command fakeembed serves a deterministic embedder over OpenAI's /v1/embeddings, for dev and the end-to-end tests (docs/adr/0011-retrieval.md), like cmd/fakeidp: they use the real client and need no model.
Command fakeembed serves a deterministic embedder over OpenAI's /v1/embeddings, for dev and the end-to-end tests (docs/adr/0011-retrieval.md), like cmd/fakeidp: they use the real client and need no model.
fakeidp command
Command fakeidp serves a fake GitHub sign-in for dev and end-to-end tests (docs/adr/0010-sign-in-and-sessions.md).
Command fakeidp serves a fake GitHub sign-in for dev and end-to-end tests (docs/adr/0010-sign-in-and-sessions.md).
fakellm command
Command fakellm serves a deterministic stand-in for Anthropic's Messages API, for dev and the end-to-end tests (docs/adr/0012-chat.md), like cmd/fakeembed: they use the real adapter and need no model.
Command fakellm serves a deterministic stand-in for Anthropic's Messages API, for dev and the end-to-end tests (docs/adr/0012-chat.md), like cmd/fakeembed: they use the real adapter and need no model.
worker command
Command worker runs background jobs: imports of pages and PDFs, blob cleanup and indexing, through the jobs port on River (docs/adr/0009-jobs-port.md).
Command worker runs background jobs: imports of pages and PDFs, blob cleanup and indexing, through the jobs port on River (docs/adr/0009-jobs-port.md).
internal
annotation
Package annotation holds the rules for a user's highlights and notes (docs/adr/0007-annotations-and-anchoring.md): a selector points into one block's plain text, counted in UTF-16 code units as the browser counts, and must quote that text exactly when it is written.
Package annotation holds the rules for a user's highlights and notes (docs/adr/0007-annotations-and-anchoring.md): a selector points into one block's plain text, counted in UTF-16 code units as the browser counts, and must quote that text exactly when it is written.
auth
Package auth holds the parts of sign-in that need no database: the GitHub OAuth client, the state and PKCE of a sign-in in progress, session tokens and the cookies that carry them (docs/adr/0010-sign-in-and-sessions.md).
Package auth holds the parts of sign-in that need no database: the GitHub OAuth client, the state and PKCE of a sign-in in progress, session tokens and the cookies that carry them (docs/adr/0010-sign-in-and-sessions.md).
blob
Package blob is the port to file storage: PDFs live there, not in Postgres (docs/adr/0013-pdf-import.md).
Package blob is the port to file storage: PDFs live there, not in Postgres (docs/adr/0013-pdf-import.md).
blob/blobtest
Package blobtest checks that a blob.Store behaves as the port promises, so every adapter is held to the same contract.
Package blobtest checks that a blob.Store behaves as the port promises, so every adapter is held to the same contract.
blob/memblob
Package memblob is an in-memory blob.Store for unit tests.
Package memblob is an in-memory blob.Store for unit tests.
blob/s3blob
Package s3blob adapts any S3-compatible store to blob.Store.
Package s3blob adapts any S3-compatible store to blob.Store.
canon
Package canon puts URLs in the canonical form that sources and imports are keyed by, so the same page is fetched, stored and found once.
Package canon puts URLs in the canonical form that sources and imports are keyed by, so the same page is fetched, stored and found once.
chat
Package chat answers a student's questions from their own library, with answers that cite its blocks (docs/adr/0012-chat.md).
Package chat answers a student's questions from their own library, with answers that cite its blocks (docs/adr/0012-chat.md).
chat/anthropic
Package anthropic adapts Anthropic's Messages API to chat.Model (docs/adr/0012-chat.md).
Package anthropic adapts Anthropic's Messages API to chat.Model (docs/adr/0012-chat.md).
config
Package config loads and validates the service configuration from environment variables.
Package config loads and validates the service configuration from environment variables.
db
Package db opens the Postgres connection pool.
Package db opens the Postgres connection pool.
devserver
Package devserver runs the stand-ins dev and the end-to-end tests talk to instead of a real service: cmd/fakeidp, cmd/fakeembed and cmd/fakellm.
Package devserver runs the stand-ins dev and the end-to-end tests talk to instead of a real service: cmd/fakeidp, cmd/fakeembed and cmd/fakellm.
doccontent
Package doccontent is the format of a user's document (ADR 0006): the blocks of its extraction's IR, each marked with where it came from, plus the blocks the user added.
Package doccontent is the format of a user's document (ADR 0006): the blocks of its extraction's IR, each marked with where it came from, plus the blocks the user added.
docling
Package docling turns a PDF into IR with docling-serve (docs/adr/0013-pdf-import.md): Document is the part of docling's JSON RoNote reads, Map maps it to IR, and code text comes from the text layer through pdftext, since docling joins a code block's lines.
Package docling turns a PDF into IR with docling-serve (docs/adr/0013-pdf-import.md): Document is the part of docling's JSON RoNote reads, Map maps it to IR, and code text comes from the text layer through pdftext, since docling joins a code block's lines.
embed
Package embed turns text into vectors for search (docs/adr/0011-retrieval.md): an OpenAI-compatible HTTP client, Ollama in dev, and a deterministic fake for tests.
Package embed turns text into vectors for search (docs/adr/0011-retrieval.md): an OpenAI-compatible HTTP client, Ollama in dev, and a deterministic fake for tests.
events
Package events delivers import status changes to the API process.
Package events delivers import status changes to the API process.
extract
Package extract turns an HTML page into IR blocks with generic rules that work on any documentation site, refined by the adapter for the page's framework when there is one (package adapter).
Package extract turns an HTML page into IR blocks with generic rules that work on any documentation site, refined by the adapter for the page's framework when there is one (package adapter).
extract/adapter
Package adapter describes documentation frameworks to the extractor: how to recognise their pages, where the content is, which chrome to drop, and how their callouts, tabs and code blocks are built.
Package adapter describes documentation frameworks to the extractor: how to recognise their pages, where the content is, which chrome to drop, and how their callouts, tabs and code blocks are built.
fakedocling
Package fakedocling replays recorded answers of docling-serve and pdftext (docs/adr/0013-pdf-import.md), so dev and the end-to-end tests convert PDFs without the docling image.
Package fakedocling replays recorded answers of docling-serve and pdftext (docs/adr/0013-pdf-import.md), so dev and the end-to-end tests convert PDFs without the docling image.
fakeidp
Package fakeidp is a stand-in for GitHub's OAuth app endpoints, for dev and tests only (docs/adr/0010-sign-in-and-sessions.md).
Package fakeidp is a stand-in for GitHub's OAuth app endpoints, for dev and tests only (docs/adr/0010-sign-in-and-sessions.md).
fakellm
Package fakellm is a deterministic stand-in for Anthropic's Messages API (docs/adr/0012-chat.md), for dev and the end-to-end tests (cmd/fakellm): they run the real adapter and need no model.
Package fakellm is a deterministic stand-in for Anthropic's Messages API (docs/adr/0012-chat.md), for dev and the end-to-end tests (cmd/fakellm): they run the real adapter and need no model.
fetch
Package fetch downloads one HTML page from a user-supplied URL.
Package fetch downloads one HTML page from a user-supplied URL.
httpapi
Package httpapi serves the RoNote HTTP API.
Package httpapi serves the RoNote HTTP API.
httpapi/gen
Package gen provides primitives to interact with the openapi HTTP API.
Package gen provides primitives to interact with the openapi HTTP API.
importer
Package importer runs the import pipeline: fetch a page, or reuse the stored copy, extract it, and keep it as the owner's document; or convert an uploaded PDF (docs/adr/0013-pdf-import.md).
Package importer runs the import pipeline: fetch a page, or reuse the stored copy, extract it, and keep it as the owner's document; or convert an uploaded PDF (docs/adr/0013-pdf-import.md).
ir
Package ir is the document model every importer produces: a closed set of blocks holding inline text runs, with no raw HTML anywhere.
Package ir is the document model every importer produces: a closed set of blocks holding inline text runs, with no raw HTML anywhere.
jobs
Package jobs is the port between code that has work done later and what runs it (docs/adr/0009-jobs-port.md).
Package jobs is the port between code that has work done later and what runs it (docs/adr/0009-jobs-port.md).
jobs/jobstest
Package jobstest checks that an adapter keeps the jobs contract (docs/adr/0009-jobs-port.md): one suite, run against every adapter, each case on a fresh, empty adapter.
Package jobstest checks that an adapter keeps the jobs contract (docs/adr/0009-jobs-port.md): one suite, run against every adapter, each case on a fresh, empty adapter.
jobs/memjobs
Package memjobs runs the jobs port in memory, for unit tests: no Postgres, and retries timed by a clock the test controls (docs/adr/0009-jobs-port.md).
Package memjobs runs the jobs port in memory, for unit tests: no Postgres, and retries timed by a clock the test controls (docs/adr/0009-jobs-port.md).
jobs/riverjobs
Package riverjobs runs the jobs port on River, on Postgres, the default adapter (docs/adr/0009-jobs-port.md).
Package riverjobs runs the jobs port on River, on Postgres, the default adapter (docs/adr/0009-jobs-port.md).
pgtest
Package pgtest starts throwaway, migrated Postgres containers for integration tests and cmd/eval.
Package pgtest starts throwaway, migrated Postgres containers for integration tests and cmd/eval.
ratelimit
Package ratelimit counts events per key in fixed windows, in memory: a limit holds per process (docs/adr/0010-sign-in-and-sessions.md).
Package ratelimit counts events per key in fixed windows, in memory: a limit holds per process (docs/adr/0010-sign-in-and-sessions.md).
s3test
Package s3test starts a throwaway SeaweedFS for integration tests: an S3-compatible store with one bucket.
Package s3test starts a throwaway SeaweedFS for integration tests: an S3-compatible store with one bucket.
search
Package search cuts documents into chunks, embeds them, and finds them again by words and by meaning (docs/adr/0011-retrieval.md).
Package search cuts documents into chunks, embeds them, and finds them again by words and by meaning (docs/adr/0011-retrieval.md).
store
Package store persists RoNote data in Postgres.
Package store persists RoNote data in Postgres.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL