Written from scratch · Java 17 · Zero runtime dependencies

A search engine and a browser engine,
built from first principles.

Argus is two hard systems in one codebase: a full-text search engine with an inverted index, BM25 ranking, a durable segment store, and concurrent near-real-time indexing; and a rendering engine that turns HTML, CSS, and JavaScript into pixels — tokenizer, DOM, cascade, layout, paint, and a tree-walking JS interpreter, all hand-written.

200+
passing tests
0
runtime dependencies
6
engine stages, hand-written

Two engines, one repository

Inverted index & BM25

Analysis pipeline (tokenizer, lowercase, stopwords, Porter stemmer), postings with delta + varint compression, and Okapi BM25 / TF-IDF scoring over document-at-a-time scorers.

Durable & concurrent

Segment files, a CRC-framed write-ahead log with torn-tail recovery, an atomic manifest, and near-real-time refresh backed by immutable snapshots for lock-free search.

Query language

A parser for field terms, boolean AND/OR/NOT, +/- clauses, "phrases", prefix*, and grouping — compiled to a scorer tree.

HTML & CSS engine

A tolerant HTML tokenizer and tree builder, a CSS parser with selectors and specificity, and a cascade that resolves computed styles with inheritance and inline overrides.

Layout & paint

A CSS box-model layout engine (block flow, the width/height/margin algorithm, and inline line-breaking with word wrap) painted to a display list and rasterized with Java2D.

JavaScript interpreter

A lexer, recursive-descent parser, and tree-walking interpreter with closures, this, arrays, objects, and DOM bindings — scripts mutate the page before paint.

Real output from the rendering engine

Every image below was produced by Argus — no browser component is embedded.

Argus rendering the world's first website over HTTP
A live website (info.cern.ch) fetched over HTTP and rendered: headings, wrapped text, and inline links.
A page whose content is built entirely by JavaScript
A page whose list and totals are created entirely by JavaScript (createElement in a loop), then styled and painted.
A styled page with cards, borders, and the box model
Backgrounds, borders, the box model, and the cascade — laid out and rasterized by Java2D.

The pipeline

A document flows through six hand-written stages to become pixels.

  1. 1 HTML tokenizer → DOM tree
  2. 2 JavaScript engine mutates the DOM
  3. 3 CSS parser → cascade & computed styles
  4. 4 Box-model layout (block + inline)
  5. 5 Display list
  6. 6 Java2D paint → pixels

Honest scope

What it does

  • Renders static HTML and a practical subset of CSS
  • Runs a real JavaScript subset that reads and mutates the DOM
  • Fetches pages and stylesheets over HTTP/HTTPS
  • Indexes and searches millions of terms with BM25 ranking

What it doesn't

  • It is not Chrome: no flexbox/grid, images, or web fonts
  • It won't run framework-heavy single-page apps
  • No full ECMAScript (no async/await, generators, prototypes)
  • The goal is depth of understanding, not feature parity

Get Argus

One-click native installers — each bundles its own Java runtime, so there is nothing else to install. Built by GitHub Actions with jpackage. The button in the hero picks the right one for your system; grab any platform directly here.

Prefer to run it yourself? Grab the portable jar (any OS), browse all releases, or clone the repo and run mvn verify.