Back to Projects
Backend

Synapse

Synapse is a robust backend architecture designed for scalable, real-time communication. While it includes a frontend, the core engineering lies in its event-driven backend which leverages Socket.io for sub-millisecond message delivery and Prisma ORM for complex relationship management. The system handles substantial throughput for features like typing indicators, message queues, and media uploads.

Core Technology

Node.jsSocket.ioPrismaMySQLClerkTypeScript

System Design

Scalable Real-Time Infrastructure

  • Engineered custom Socket.io adapters for distributed event broadcasting.
  • Optimized database schema with composite indexes for rapid message history retrieval.
  • Implemented secure file handling middleware with stream-processing for media uploads.

Architecture

Event-driven backend architecture. Socket.io handles stateful connections for real-time events, while REST endpoints manage stateless resource operations. Prisma ORM optimizes complex join queries on MySQL to ensure low-latency data retrieval.

Architecture Diagram Placeholder

Key Features

01

Real-time bidirectional event streams

02

Optimized SQL query performance

03

Secure media stream handling

04

RBAC middleware implementation