mbilal.works
Available · September 2026
Talk
← Back to Portfolio
Cloud Infrastructure & AI Systems ArchitectureLIVE SYSTEM
Personal Infrastructure & Lab · 2026 → Present

Cloud-Hosted OpenAI-Compatible LLM Gateway & Custom Chat UI

Cloud-hosted OpenAI-compatible LLM gateway and custom 15 KB static chat SPA on ARM64 cloud architecture, featuring Caddy reverse proxy, PocketBase forward_auth, and streaming SSE responses.

01. Problem & Context

The Operating Challenge

Relying on third-party SaaS chat UIs incurs recurring subscription fees, routing bugs, and heavy JavaScript bundle payloads (>10 MB) that degrade mobile experience.

02. Architecture & Solution

Technical Implementation

Architected a lean AI gateway stack: Caddy reverse proxy managing automatic Let's Encrypt TLS, PocketBase handling custom forward_auth verification hooks, and a 15 KB vanilla JavaScript SPA supporting SSE streaming, model switching, and document attachments.

03. Measurable Impact

Results & Verification

Achieves sub-50 ms API authorization and sub-second cold page loads on lean ARM64 cloud infrastructure.

04. Technology Stack
CaddyPocketBase (Go)OllamaVanilla JSSSEARM64Docker
mbilal.works · personal hub at bilalm.me · Impressum · PrivacyBuilt to a DESIGN.md spec · Bricolage Grotesque + JetBrains Mono · MMXXVI