About G-Remover

A high-speed, local-first background extraction service built with a Rust API backend and a Next.js dashboard.

Geric Morit

Geric Morit

Lead Developer & Systems Architect

G-Remover showcases high-performance Rust web service architecture. Neural network inference runs directly in native Rust threads via ONNX Runtime — no Python, no overhead — achieving sub-200ms background extraction with extreme system efficiency.

API Endpoints

GET/api/health

Liveness probe — returns status, timestamp, and service name.

GET/api/info

Returns app version, framework, runtime, and all registered routes.

POST/api/auth/register

Creates a new user. Validates email, enforces password rules (8+ chars, uppercase, number, special char), hashes with bcrypt.

POST/api/auth/login

Verifies credentials, checks bcrypt hash, and returns a signed JWT valid for 24 hours.

POST/api/v1/remove-background

Accepts PNG/JPEG/WebP up to 10MB. Runs RMBG-1.4 (ISNet) inference at 1024×1024 via ONNX Runtime. Returns transparent PNG. Auth is optional. Rate-limited to 10 req/min.

The Tech Stack

Frontend Stack

Next.js 16React framework powering the dashboard with App Router, server-side rendering, and optimized static generation.
TypeScriptStrong static typing across every component for reliability and IDE-level safety.
TailwindCSS v4Utility-first CSS framework behind the dark-mode glassmorphic design system.

Backend Engine

Rust (Edition 2024)Core language providing memory safety without GC, zero-cost abstractions, and native machine-code performance.
Axum v0.7Type-safe async web framework built on Tokio and Tower. Powers all REST endpoints with multipart upload support.
TokioMulti-threaded async runtime with work-stealing scheduler. Handles all non-blocking I/O, timers, and signal handling.
MongoDB (v3.1)Document store for user credentials and session data via the official async Rust driver with connection pooling.

AI & Image Processing

ONNX Runtime (ort v2)Microsoft's cross-platform inference engine running the RMBG-1.4 model natively in Rust with Level 3 graph optimizations.
BRIA RMBG-1.4ISNet-based high-accuracy background removal model trained on 12k+ labelled images. Input is normalized to 1024×1024, output is a per-pixel raw logit map that is min-max normalized before alpha compositing.
ndarray v0.17N-dimensional array library for tensor construction. Handles the 1×3×1024×1024 float tensor fed into ONNX Runtime.
image crate v0.25Handles decoding PNG, JPEG, and WebP uploads, bilinear resize, RGBA compositing, and final PNG encoding.

Security & Middleware

BcryptAdaptive password hashing with configurable salt rounds. Used in the register endpoint before storing credentials.
JWT (HMAC-SHA256)Stateless auth tokens with 24-hour expiry. The remove-background endpoint optionally validates Bearer tokens.
IP Rate LimiterCustom Tower middleware using a token bucket algorithm (10 req/min, burst 20). Applied only to the unauthenticated remove endpoint.
CORS (tower-http)Configurable cross-origin policy allowing all origins, GET/POST/PUT/DELETE methods, and Content-Type/Authorization headers.