← All work
This site · 2026

Portfolio Infrastructure

This portfolio is itself a backend engineering project. Three services, four languages, a hidden terminal, a CTF challenge, an AI assistant, and a real-time collaborative community drawing canvas. The site is the proof of concept.

Next.jsTypeScriptGoFastAPIPostgreSQLRedisAWS

The problem

Most developer portfolios list technologies and describe projects. That tells you what someone has done but not how they think. I wanted to build something where the site itself is the demonstration, where a technically curious visitor can explore the infrastructure, find hidden layers, and form their own opinion.

Key decisions

Three independent services behind a single Nginx proxy

Next.js handles the frontend and API layer. FastAPI powers the AI assistant and the Lost Explorer text adventure. Go handles real-time WebSocket connections for the community canvas. Each service has a clearly defined responsibility and runs independently - if one goes down, the others continue. This is a deliberate architecture choice, not just a technology showcase.

A hidden layer for technically curious visitors

The site has a CTF challenge with flags hidden across the infrastructure, in HTTP headers, API responses, HTML source, and the AI assistant. There is also a hidden terminal accessible via a keyboard shortcut, with a virtual filesystem and a text adventure game inside it. These features are not advertised. They reward exploration. See bottom of page for a hint.

RAG pipeline for the AI assistant

The assistant is not a general-purpose chatbot. It is trained specifically on my background, projects, and experience using retrieval-augmented generation. FAISS handles vector search in-memory. HuggingFace sentence-transformers generate embeddings. Groq serves LLM inference. The assistant knows when to advocate for me and when to be honest about gaps.

PostgreSQL and Redis as shared infrastructure

PostgreSQL stores persistent data: CTF flag submissions, the leaderboard, canvas stroke audit logs, and Stripe records. Redis handles ephemeral state: rate limiting counters, session tracking, canvas pixel data, and pub-sub messaging between the Go WebSocket clients. Both are accessible across all three services without coupling them directly.

Outcome

The site is live at hatemalfarra.com. The AI assistant, CTF challenge, hidden terminal, Lost Explorer text adventure, real-time collaborative canvas with email verification and moderation, Stripe-powered support and booking, and architecture documentation are all complete and running in production on AWS EC2.

What I learned

Building and operating your own infrastructure changes how you think about software. When you are responsible for deployment, uptime, and debugging, reliability and operational simplicity stop being abstract values and become genuine priorities.

note: press ` to open terminal