Skip to main content

Portfolio Backend API

The blazing-fast backbone powering this very portfolio. Engineered with cutting-edge Bun runtime and ElysiaJS framework for sub-millisecond response times, this modern API showcases type-safe development with Drizzle ORM, Redis-powered caching, MeiliSearch integration for lightning-fast content discovery, and enterprise-grade security patterns. A testament to modern backend architecture.

Portfolio Backend API - Slide 1

The Goal

To build a portfolio backend that isn't just a CRUD wrapper, but a demonstration of modern, high-performance web engineering. The goal was to benchmark the emerging Bun runtime against traditional Node.js/Laravel architectures while maintaining strict type safety and developer ergonomics.

Architecture & Stack

This API leverages the Bun runtime for its exceptional startup time and native API compatibility. The application layer is built on deeply integrated, type-safe technologies:

  • Runtime: Bun (v1.x) for high-performance execution

  • Framework: ElysiaJS for end-to-end type safety and speed

  • Database: Drizzle ORM + PostgreSQL for type-safe SQL queries

  • Search Engine: Meilisearch for typo-tolerant, instant search results

  • Caching: Redis (via ioredis) for response caching and rate limiting

  • Queues: BullMQ for reliable background job processing (email, etc.)

Technical Highlights

End-to-End Type Safety

By combining ElysiaJS (which uses Eden Treaty) and Drizzle ORM, the application achieves near 100% type safety. Database schemas are inferred directly from TypeScript definitions, and API responses are automatically typed for the frontend client.

Performance-First Design

The system is optimized for speed. Public endpoints are cached in Redis with smart invalidation patterns. Images are automatically processed and converted to WebP formats using Sharp. Search queries are offloaded to Meilisearch to keep the primary database efficient.

Enterprise Patterns

Despite being a personal project, it implements improved security practices including JWT authentication with refresh rotation, strict rate limiting, input validation via TypeBox, and proper extensive error handling.

Project Info

Added:January 18, 2026

Tech Stack

PostgreSQL
Bun
ElysiaJS
Redis
Docker
Meilisearch
TypeScript
Drizzle ORM
BullMQ