Projects
Personal Projects
Real-Time Flood Monitoring (Sri Lanka)
A public river-level monitor built from the government's own flood bulletins — live at dmc-flood-watch.nmmanas.com.
Ingestion — every 30 minutes it pulls three sources: the Disaster Management Centre's 3-hourly PDF reports, a daily reservoir report, and an hourly river-gauge feed. The PDF archive goes back to 2018 (~2,800 reports), parsed into SQLite; a station missing its name is identified by its alert thresholds, and spelling variants of one station are merged into one identity. When sources disagree, the newest reading wins on every surface.
Publishing & alerts — a static page on Cloudflare Workers, redeployed only when its content changes, shows a reading about 18 minutes after it is taken. WhatsApp alerts fire only on a threshold crossed, a confirmed easing, or a further rise — never on a timer — and clear only after six hours below the line; a replay tool shows what any past flood would have sent.
Stack — Python stdlib only, SQLite, systemd timers, cookieless analytics.
Lecture Transcription & Exam Prep Platform
Transcribed 160+ recorded lectures from a structured education program and turned them into an interactive study site — per-topic lessons, lecturer commentary, and quizzes so students can learn and practice from the actual course material.
Transcription pipeline — Modal + faster-whisper (large-v3) and OpenAI Whisper. Outputs clean SRT/TXT per video, then an English translation, feeding directly into the study site.
Study site — Static site deployed as a Cloudflare Worker. Vanilla HTML/CSS/JS, built from Markdown via a Python pipeline. Each lesson has learn, rules, lecture, and quiz tabs. Progress saved to browser localStorage.
Runs unattended — when a class ends, the recording is fetched, transcribed, translated and turned into a published lesson the same night by an AI agent, with the site's browser test suite gating the deploy in CI. Class reminders and new-lesson announcements go to the class WhatsApp groups.
Domain Q&A Service (RAG)
Scraped and cleaned a multilingual corpus of domain-specific rulings from a public authority website, then built a FastAPI RAG service powering Q&A inside a mobile app.
Corpus pipeline — 6-stage pipeline: discover → scrape → align → translate → review → export. Translation gaps filled with an LLM (glossary-guided). Outputs a Markdown corpus + manifest for RAG ingestion.
API service — FastAPI backend with DeepSeek LLM (OpenAI-compatible SDK), pgvector for chunk retrieval and relevance validation, Alembic migrations. Sits behind a mobile backend that handles auth. Deployed in production; CI runs the full test suite against a pgvector Postgres container on every push.
AI Video Production Pipeline
An agent-driven pipeline for short AI-generated films and ads: style contract → keyframes → shot prompts → clips → assembly as code. Two finished films produced end to end, including a 15-second advertisement for about $8 in model spend.
- Provider-agnostic — an image or video backend is one module; a production is a directory whose YAML file holds the shot list, per-shot model routing and a resolution ladder.
- Brand compositing — diffusion models cannot reproduce a specific logo or product, so the brand is composited onto the generated plate from the brand's own files; one overlay spec renders into 16:9, 9:16 and 1:1.
- Cost control — cheap candidate renders, full-quality renders only for the shots picked, and a cost report per film.
- Origin — grew out of an earlier multi-model cartoon pipeline: Claude for story and prompts, Gemini for character sheets, Kling and Hailuo for video, ElevenLabs for voices, ffmpeg for assembly.
Adaptive Tamil Literacy Tutor
A personal tutor (not a digital workbook) that models what a young learner knows and adapts every session — built to help a Grade-2 child learn to read and write Tamil.
- Adaptive engine — Bayesian Knowledge Tracing + a forgetting-curve (half-life) spaced-repetition scheduler over a prerequisite-gated knowledge graph, driven by an append-only, event-sourced log of attempts.
- Generative content pack — a compact table expands at load into 216 per-syllable (uyirmei) concepts, each mastery-tracked uniformly; 7 exercise types feed one engine.
- Stack — offline-first PWA (phone-first), Google Cloud TTS audio, PIN-gated parent dashboard, and a FastAPI backend with a swappable AI provider via
.env. - Reused engine — the engine is content-agnostic: a fork drives an Arabic exam-prep app (right-to-left, fully vocalised script, fully offline) from a different content pack.
The ADHD Task Reset — Self-Published Guide
A short practical guide I wrote and sell, and the site that sells it — live at adhdtaskreset.com.
- Site — hand-authored static HTML on Cloudflare Workers, deployed on push; Gumroad checkout as an in-page overlay.
- Product on the page — an interactive demo of the guide's method on the landing page, plus guide articles and a free printable.
- Discoverability — a schema.org entity graph, sitemap and llms.txt for search and AI crawlers; strict security headers with a CSP tuned to the one third-party script it needs.
Stock Market Screener (Colombo Stock Exchange)
A private dashboard showing the state of every security on the Colombo Stock Exchange, filtered against an eligibility whitelist, for a small monthly investor — decision support, not auto-trading.
- Data collection — six systemd timers collect daily prices, corporate actions, index and macro data unattended, with a daily gap check; 170+ MB of price history in SQLite.
- Backups — nightly to Cloudflare R2 using SQLite's online backup (safe while the timers write), with a restore script that checks integrity and per-table row counts, because an intact but empty database passes an integrity check.
- Stack — Python stdlib only, served over Tailscale.
Self-Hosted Health Ledger
A private, tailnet-only health tracker combining calorie/macro logging and longitudinal biomarker tracking, with two multimodal-AI ingestion paths.
- Food-photo → vision model — a meal photo is estimated for kcal/macros via a vision LLM (xAI Grok), with an editable note as a correction layer.
- Lab-report ingestion — upload a PDF or image → text-layer/vision extract → LLM structuring → editable review cards with out-of-range flags → commit to SQLite.
- Stack — FastHTML + SQLite in a single server-side-rendered process, per-marker Chart.js trend pages, running as a systemd service over Tailscale (health data stays off the public internet).
DSA Coach
Daily DSA practice scheduler with spaced repetition — "just tell me what to do today." ~250-line zero-dependency Python core with a spaced repetition ladder [1, 3, 7, 14, 30, 60, 120, 240, 365] days. Three clean solves = mastered. Deployed as a systemd service on a private VPS, Tailscale-only access.
Markdown Project-Management Vault
A plain-Markdown project management system driven by AI coding sessions. Every project is four files — an immutable brief, a live status, and append-only decision and activity logs — that serve as the durable memory across sessions. A written conventions contract (git model, file-mutability rules, per-deliverable quality bars) keeps each AI session consistent: a session starts from a project's status, does the work in that project's own repo, and distills the outcome back into the vault on wrap-up. Rules that can be checked mechanically are enforced by a hook that blocks or asks before a risky command runs, rather than left to the agent's judgement.
Dashboard — a read-only web viewer generated from each project's frontmatter (zero-dependency Python, stdlib only), running as a systemd service over Tailscale.
Self-Hosted AI Coding on a VPS
Set up an AI coding agent (Claude Code) running on a personal VPS and driven remotely — from the Claude mobile app and from a phone terminal (Termius) over Tailscale — so I can code from anywhere without exposing anything to the public internet. Project repos are backed up to GitHub, and nginx on the same box serves live sites directly from their git working trees (this site included) behind Cloudflare, with hardening, health checks, and memory limits to keep a small box stable.
Operations as code — the box's systemd units and scripts live in their own repo with a drift check against what is deployed. A watchdog restarts stuck services and alerts to WhatsApp, and a daily health digest arrives the same way.
Professional Work
See work experience for roles, platforms and results at Fcode Labs, Gapstars, Rukula and Eutech Cybernetics.