Squish the Stack

Rampart is a complete JavaScript application platform — HTTP server, SQL database with full-text search, vector search, key-value store, networking, crypto, and more — all in a single, tiny footprint. This entire site runs on a Raspberry Pi Zero (the original $5 one). It's fast, portable, and free to use, modify, and redistribute.

We're not kidding about the tiny footprint. Here's the Rampart HTTP server with almost all modules loaded:

Rampart RAM usage screenshot

What's Inside

Full-Text Search with SQL

The same engine that powered eBay's auction search and hundreds of other large sites. Real-time indexing — new or changed documents are instantly searchable. Includes a CSV parser for easy data migration.

docs →

Vector & Semantic Search New

Built-in vector functions for semantic search, RAG, and recommendation. Supports dot product, cosine distance, and L2 metrics using SimSIMD for hardware-accelerated similarity calculations. Pair with embeddings for meaning-based retrieval.

docs →

HTTP, HTTPS & WebSockets

Multi-threaded server built on libevhtp and libevent2. Benchmarks outpaced Nginx on static content while consuming far fewer resources. Full WebSocket support makes real-time apps straightforward.

docs →

Document Text Extraction New

Extract plain text from DOCX, PPTX, XLSX, ODT, EPUB, PDF, RTF, LaTeX, man pages, HTML, Markdown, and more. Transparent gzip decompression and magic-byte detection. Built for feeding search engines and semantic pipelines.

docs →

CURL Module

Full interface to libcurl — fetch URLs, post forms, send email. Supports HTTP, HTTPS, FTP, SMTP, POP3, and IMAP. Parallel async fetching included. Combine with the HTML parser for a robust scraping toolkit.

docs →

Threading

True multi-threaded JavaScript. Each thread runs its own isolated interpreter. Variables are shared via a clipboard with async callbacks — as easy as setTimeout() but actually parallel.

docs →

Redis Client

Direct Redis integration with a custom async XREAD command that works like PUB/SUB. Combined with WebSockets, you get chats, channels, and DMs without wrestling with message queue plumbing.

docs →

LMDB Key-Value Store

Fast, truly ACID compliant, memory-mapped key-value storage. Read-biased and persistent to disk. With auto JSON/CBOR conversion built in. It's not as fast as Redis in raw throughput, but it'll never lose your data.

docs →

Image Processing New

GraphicsMagick integration for resizing, cropping, rotating, color adjustments, and format conversion. Chain operations fluently or combine multiple images into animated GIFs. All from JavaScript.

docs →

Embedded Python

The CPython interpreter, embedded. Load Python modules, run scripts, and manipulate Python variables — all from JavaScript without writing a line of Python. Access the entire Python ecosystem when you need something Rampart doesn't do natively.

docs →

Almanac, Astronomy & Weather New

Sun, Moon, and planet rise/set times and positions for any date and location. Season calculations, holiday lookups by locale and year, and weather forecasts. See it in action in our weather demo.

docs →

Cryptography

OpenSSL-backed encryption, decryption, hashing (MD5 through SHA-512), HMAC, PBKDF2, and RSA key generation. Plus cryptographic-quality random number generation. Sorry, it doesn't generate crypto-currency though.

docs →

HTML Parser

Server-side HTML traversal and manipulation, jQuery-style, via a modded HTMLTidy. Clean up messy markup, extract content from scraped pages, or fix your own imbalanced <div>s. Ask us how we know.

docs →

Networking & Sockets

Low-level async TCP/IP for building client and server apps, plus name resolution. SSL/TLS support included. If you know Node's net module, you'll feel at home.

docs →

Markdown, robots.txt, URLs & More

CommonMark conversion, Google's robots.txt parser for polite crawling, URL parsing and resolution, HyperLogLog for cardinality estimation, fast non-crypto hashing (CityHash, MurmurHash), and all the OS utilities you'd expect.

docs →
External Projects
  • Langtools — AI embeddings, FAISS vector indexing, and tokenization via llama.cpp *
  • Webview — Cross-platform desktop apps with HTML/CSS/JS and native rendering *
  • Iroh Webproxy — Expose remote web servers locally via encrypted P2P tunnels *
  • Lang Derivs — Suffix matching rules for multilingual full-text search **
  • Rampart Iroh — P2P networking with encrypted QUIC, pub/sub, and blob transfer *
  • Rampart Clip — Image/Text to Vector using clip.cpp - Similar to rampart-llamacpp but for image embeddings.
  • WebDAV — Full WebDAV server with web file manager, media playback, and document editing
  • Webshield — Text and image obfuscation to protect content from scraping
  • Self-Hosted Search — Personal search engine from your browsing history via browser extension
  • Wikipedia Search — Full-text keyword and semantic search across Wikipedia articles
  • Rampart Docs — Documentation source with integrated search and typeahead

* included in binary distribution   ** partially included (English only)

Why Rampart?

The modern web stack is heavy. By the time you've configured Node, a database, a search engine, and a cache layer, you've burned a day (or more) and a pile of RAM. We wanted something different — a single download that gives you SQL with full-text search, an HTTP server, a key-value store, crypto, threading, and everything else you need to build real applications. Setup measured in minutes, not days.

We chose the Duktape JavaScript engine over V8 because V8 is a RAM and CPU pig. Our philosophy: do everything difficult in C and let JavaScript be the fun-glue. Nearly every module is coded in C, making the whole thing extremely portable. We include Babel so you get ES2015+ syntax automatically transpiled behind the scenes.

User machines, phones, and IoT devices need to serve their primary purpose without impediment. Rampart stays out of the way. Dedicate a machine or cluster to a Rampart task and you'll get a lot more done with a lot less investment.

Who Are We?

Moat Crossing Systems LLC — a couple of guys who between them have built software that's served many billions of pages of database-backed content on the internet. It started in January 2020 with a phone call where we were complaining about how un-fun web development had become and how resource-heavy everything seemed. Someone said: "If we could full-text index Wikipedia and serve it on a Raspberry Pi Zero, we'd have something unique." So that's what we did.

We hope you'll give it a try. Reach out here or at if you have questions.

The Raspberry Bush

Here's our fancy server farm before it was racked at the ISP. Four Pi Zeros (mirrors of each other, just in case) and two Pi 4s for faster dev builds. The bush sits behind Nginx on an old Xeon for certificate management.

Raspberry Pi server farm

We have no particular bias toward the Pi. The whole point is to demonstrate how much Rampart can do with minimal resources — so you can extrapolate how fast it'll be on real hardware.

         |>>            |>>
       __|__          __|__
      \  |  /         \   /
       | ^ |          | ^ |
     __| o |__________| o |__
    [__|_|__|(rp)|  | |______]
____[|||||||||||||__|||||||||]____
RAMPART