Skip to content
All projects

Easy-DB: Dynamic REST API & SQLite Automation Library

A zero-boilerplate Rust library distributed via crates.io that instantly converts SQLite tables into a secure REST API, bundled with its own asynchronous HTTP client.

Easy-DB Rust source: table name validation and table creation

Rust · SQLite · crates.io

A Rust library on crates.io that turns SQLite tables into a secure REST API instantly.

Performance & metrics

  • Minimal memory footprint achieved by completely bypassing heavy ORMs in favor of raw query mapping
  • High-throughput concurrent HTTP request handling leveraging Tokio's asynchronous event loop
  • Zero network latency for database operations due to the embedded nature of the SQLite engine

Why I built it

Writing repetitive CRUD endpoints and DTO boilerplate for every new backend project is a significant time sink. I built this library to eliminate that friction: define your SQLite tables, and the engine instantly spins up a secure REST API along with a built-in HTTP client. It is designed as a drop-in solution for rapid prototyping and embedded backend architectures.

Architecture & decisions

The library is engineered on top of Axum and Tokio. The core database state is wrapped in an Arc<Mutex<Connection>> to ensure thread-safe sharing across asynchronous route handlers. The server engine (EasyDB) dynamically injects endpoints into the Axum router by iterating over exposed tables at initialization. While network I/O is fully asynchronous, the inherently synchronous SQLite disk operations are managed via a strict locking mechanism. The bundled EasyClient utilizes reqwest under the hood, directly mapped to consume the generated API out-of-the-box.

Key features

  • Zero-boilerplate REST API generation via dynamic endpoint injection
  • Bundled asynchronous EasyClient module ready to consume the generated API natively
  • Strict identifier sanitization layer actively preventing column/table name injection attacks
  • Dynamic parameterized queries ensuring absolute immunity to standard SQL Injection vectors
  • Autonomous URL-based filtering and sorting engine (e.g., ?_sort=age&_order=desc)

Technical review

The most critical engineering decision in this library was securing the dynamic SQL generation. Standard prepared statements (?) do not protect against malicious table or column names (identifier injection). To counter this, I implemented a strict validation boundary (is_valid_identifier) that aggressively sanitizes all incoming keys through an ASCII/Alphanumeric filter before they ever touch the query string. Distributing this on crates.io makes it a highly portable, production-ready micro-tool for any Rust developer looking to bypass backend boilerplate.

Backend & API

Smart TV Local Media Server: Rust & Axum Backend

A high-performance, asynchronous media streaming and indexing server built in Rust. It dynamically generates video thumbnails and temporal scrubbing previews via FFmpeg subprocesses while efficiently serving raw media files over HTTP.

  • Rust
  • Axum
  • Tokio
  • +4

Tools & Utilities

Rust ASCII Terminal Video Engine

A multithreaded Rust CLI engine that intercepts media streams, executes hardware-accelerated frame extraction via FFmpeg, and renders real-time ASCII-mapped video synchronized with an isolated audio thread directly within the terminal.

  • Rust
  • Crossterm
  • Rodio
  • +3

Tools & Utilities

OCR PNG to Text Converter

An automated optical character recognition tool that bulk-extracts text from PNG images and converts them into editable documents, bypassing manual data entry.

  • Python
  • Tkinter
  • Tesseract OCR
  • +2

Need something similar?

I can build a system like this for you, too.

Describe your project in a few sentences, and we'll work out the right approach and an estimated scope together.