"Architecting high-performance, real-time web applications, custom compilers, and deterministic multiplayer game engines with clean code."
I'm Ali Haggag, a Software Engineer & CS Student focused on System Design, Performance Optimization, and Security Hardening. I specialize in building complex backends, custom language parsers, and low-latency real-time synchronization layers.
-
π€ Logic Arena β Competitive Robot Battle Simulator
v3.6.5- Compiler & Sandbox: Engineered AliScript v3 (Lexer β AST β sandboxed evaluator, no
eval()) with a deterministic 2,000-ops/tick TLE quota β fair execution limits regardless of hardware. - Real-time Sync: 20 TPS server physics engine with client-side
lerpinterpolation to 60 FPS; delta diffing cuts WebSocket payload size by ~80%. - Tech Stack: Next.js 16, NestJS 11, React Three Fiber (Three.js), Socket.io, Redis, PostgreSQL, Prisma, Docker + Nginx, DigitalOcean.
- Compiler & Sandbox: Engineered AliScript v3 (Lexer β AST β sandboxed evaluator, no
-
π Flurry Super App β Real-time Social Super App
v2.0- Communication: WebRTC P2P audio/video via a custom Socket.io signaling server (<50ms latency).
- Resilience: Offline-first PWA β IndexedDB action queue synced through Inngest durable functions and a Workbox service worker.
- Tech Stack: WebRTC, Socket.io, Gemini AI, PWA, React, MongoDB, i18next.
-
ποΈ CS Arena Platform β Developer Ecosystem
- State Engine: Resolved cascading UI filter race conditions using
useTransitionand a URL-first state engine on Next.js 16 Server Components. - Tech Stack: Next.js 16, Sanity CMS, NextAuth, Sentry, Resend, Framer Motion.
- State Engine: Resolved cascading UI filter race conditions using
A few real production issues I've diagnosed and fixed β documented in full on my portfolio.
- The Ghost Match Massacre (Logic Arena, WebSocket/NestJS) β Disconnected players' matches kept running server-side, pinning CPU at 100%. Fixed by tying match lifecycle to live client count.
- Operator Precedence Disaster (AliScript compiler) β
2 + 3 * 4evaluated to20. The expression parser had no precedence tower. Fixed by splitting addition/multiplication into separate parse levels. - Deterministic TLE Quota (Sandboxing) β Wall-clock execution limits made the same script pass on one machine and fail on another. Replaced with a platform-agnostic ops-per-tick counter.
- Systems Design: Domain-Driven Design (DDD), Microservices, Anti-Corruption Layers (Zod), and Enterprise Security pipelines.
- Real-time Protocols: WebSocket event handling, WebRTC signaling, and client-side interpolation buffers.
- Performance Optimization: CPU profiling, database pagination query constraints, and asset bundle pruning.
| Category | Technologies |
|---|---|
| Frontend | |
| Backend | |
| Compiler & Systems | |
| Data & ORM Layer | |
| Real-time & AI | |
| Auth & Security | |
| DevOps & Infra | |
| CMS & State | |
| Monitoring | |
| Design & UI | |
| CS & Tools |







