Personal projects & studies
What I build and study outside my day job.
I build a microservices backend in Fastify and Python, with AI services on top of it, and run it on my own Kubernetes homelab. Alongside it, I study for a Master’s degree in IT at Metropolia, with courses in data science, machine learning, cyber security, and IoT.
- Focus
- Backend, AI services, and DevOps
- Studies
- Master’s in IT, Metropolia, 2025 →
- Stack
- TypeScript, Fastify, Python, FastAPI, LangGraph, PostgreSQL + pgvector, NATS
- Runs on
- Kubernetes, GitLab CI, ArgoCD, Kustomize
Personal projects
Three services behind one Fastify API gateway, and the homelab that deploys them.
Ask questions about a PDF (RAG service)
Upload a PDF, wait for it to be indexed, then ask questions about it. Answers come with page citations and a confidence level. Built with Python, FastAPI, and LangGraph.
How a PDF is indexed
- The asset service publishes an event on NATS when a file is uploaded.
- The RAG service downloads the file from S3 and splits it into chunks of about 1,000 characters.
- Each chunk is embedded and stored in PostgreSQL with pgvector, tagged with its page number.
How a question is answered
- The request goes through the Fastify gateway to the RAG service.
- Questions are refused until the document is indexed, with a clear reason such as “still indexing” or “this file type is not indexed”.
- The closest chunks for that one document are retrieved and sent to the LLM along with the last 10 questions and answers.
- The answer, its confidence, and its page citations are saved to the Q&A history.
Design decisions
- Every lookup is scoped to one tenant and one document, so a question can never pull in text from someone else’s files.
- Only PDFs are indexed. Other files are marked “skipped” rather than failed, so the app can say why Q&A is unavailable.
- Re-indexing replaces a document’s chunks and clears its Q&A history, so old answers never cite pages that have changed.
- Vectors live in PostgreSQL with pgvector (HNSW, cosine distance), next to the rest of the data, so there is no separate vector database to run.
- Page citations and a high, medium, or low confidence level let the reader check an answer against the source.
- It runs as its own service behind the existing gateway, so the Python stack does not leak into the TypeScript services.
Tracing
Ingest and query runs can be traced in LangSmith, tagged with tenant and document IDs. The health endpoint reports whether tracing is on.
An AI agent that asks before it acts
A LangGraph.js agent with a streaming chat API. It runs as its own service, separate from the RAG service.
- Tools: remember and forget notes, read a pasted link (scraped with Firecrawl), crawl a site, sync Gmail, and keep draft notes.
- Any tool that writes data pauses the run until I approve it in the UI, and the conversation then resumes where it stopped.
- Gmail tokens are encrypted at rest.
MCP server with OAuth
The agent’s tools are also exposed over MCP, so an MCP client can use them. Each call runs as the signed-in user.
- Exposes the same tools as the agent: notes, crawling, Gmail, and draft notes.
- Streamable HTTP transport with sessions, served through the API gateway at /mcp.
- Every request needs a bearer token: either the backend’s own user token or a Keycloak access token, checked against Keycloak’s signing keys.
- Tools run as the user in that token, never as a shared service account, so one user can never reach another user’s data.
Homelab & DevOps
Every deploy comes from git. CI never touches the cluster, and ArgoCD syncs whatever is in the repo.
- The homelab started on Proxmox VMs. It now runs on Kubernetes, with Envoy Gateway giving each app a stable hostname.
- A push to main builds a Docker image on a self-hosted GitLab runner and pushes it to the registry.
- CI then commits the new image tag to the Kustomize manifests, and ArgoCD rolls it out within a few minutes.
- Builds skip unchanged apps and reuse a registry cache, so a warm rebuild takes 3–10 minutes instead of 15–35 from cold.
Studies
Courses in the Master’s Degree Programme in Information Technology at Metropolia University of Applied Sciences, which I started in August 2025. Course titles link to the official course pages.
Fundamentals of Data Science and Machine Learning
Working with data in Python, from raw data to simple predictive models.
- Processing data in Python.
- Analysing and visualising data with basic statistics.
- Building models that make predictions.
Artificial Intelligence and Machine Learning
The methods behind the models I use in the RAG service and the agent.
- How machine learning systems learn from data.
- Deep learning for images, text, and related tasks.
Cyber Security
How systems are attacked, and how they are defended.
- Core ideas and current practice in cyber security.
- Common threats and the protections against them.
Internet of Things
Connected devices, and where they are useful.
- How devices connect and communicate.
- Practical applications of IoT.