Rohan Roy

Projects

Sciimp

A custom binary codec and lightweight player for playing video as synced, colored ASCII art in the terminal.

2026C++20 / FFmpeg / Zstandard / MiniAudio / CMake

Problem

Playing video as ASCII art in the terminal is usually CPU-heavy because decoding, pixel-to-ASCII mapping, and ANSI rendering all happen live during playback, causing dropped frames and audio drift.

Architecture

Split into two C++ components: an offline encoder (FFmpeg for decoding, downsampling + luminance-to-ASCII mapping with monochrome / 16 / 256 / RGB24 palettes, RLE + delta P-frames, Zstandard compression into a 23-byte-header .ascv file) and a bare-metal terminal player (startup index scan for O(1) seeking, zero-heap-allocation render loop, single-buffer ANSI flush, MiniAudio sidecar .wav track as master clock).

Decisions

Offloaded all heavy work to a one-time encode step so playback is near-zero CPU; used I-frames + delta P-frames with zstd instead of raw frames to keep files small; drove frame pacing off the audio device cursor rather than wall-clock timers to keep video and audio in sync.

Learned

Binary format design, video decoding with FFmpeg, delta encoding and compression tradeoffs, low-latency terminal rendering, and clock-sync strategies for audio/video playback.

CFriendSubmission

A Chrome extension that shows your Codeforces friends' submissions directly in the problem page sidebar.

2026JavaScript / Chrome Extension / Codeforces API

Problem

On Codeforces you can't easily see how your friends approached the problem you're currently viewing — checking each friend's submission history means leaving the problem page and digging through profiles.

Architecture

Content script injected into Codeforces problem pages renders a 'Friends' Submissions' sidebar panel; popup handles Codeforces API key/secret setup; friends list cached locally for ~24h and submissions for ~6h with a manual refresh button to force re-fetch.

Decisions

Used local caching with short TTLs to stay within Codeforces API limits while keeping data fresh; colored handles by rating (Legendary Grandmaster, Grandmaster, Master, etc.) to match the Codeforces UX; kept it a dependency-free unpacked extension for simple install via chrome://extensions.

Learned

Chrome extension content scripts and popups, authenticated Codeforces API usage, client-side caching strategies, and matching an existing site's UI conventions.

Air Quality Monitoring System

A real-time IoT environmental monitoring platform tracking AQI, temperature, humidity, and fire hazards — ESP8266 sensors stream to Firebase, served through a Flask backend with a live web dashboard and an AI-powered Telegram bot for alerts and queries.

2025ESP8266 / Firebase / Flask / Telegram Bot API / Gemini AI

Problem

Traditional air quality monitoring relies on expensive, bulky government stations with no indoor coverage — leaving homes, labs, and offices with no accessible way to track AQI, temperature, humidity, or fire hazards in real time.

Architecture

Four-layer IoT stack: ESP8266 firmware (Arduino/C++) reads MQ135 (AQI), DHT11 (temp/humidity), and flame sensor, POSTing JSON to Firebase Realtime Database; Flask backend on PythonAnywhere exposes /api/data (last 50 records, threshold checks) and /telegram_webhook; web dashboard polls every 10s across Temperature/Humidity, Air Dashboard, and Fire Safety views; AQMonitor Telegram bot handles /status, /csv, /help plus free-text queries routed to Gemini 2.5 Flash with the last 50 readings as historical context.

Decisions

Chose Firebase over ThingSpeak for lower-latency realtime sync; Telegram bot over GSM SMS for zero-cost bidirectional alerting and commands; 5-minute alert cooldown to prevent notification spam during sustained violations; .env with absolute paths for credential safety on PythonAnywhere; injected 50-reading history into the Gemini prompt so the AI can answer trend questions like 'is the air getting worse?'

Learned

Sensor interfacing and calibration (MQ135 analog-to-AQI mapping), WiFi reconnection and HTTP POST on ESP8266, Flask REST design and WSGI deployment, Telegram webhook security, cooldown-based alerting, CSV export via in-memory buffers, and prompt engineering with historical sensor context.