Home/Projects
Ten case studies

ThingsI built

Three native Mac apps I use every day, two tools for real-time and local-AI work, a multiplayer party game, and four systems built to answer a question about load, noise or adversarial input. Problem, approach and measured result for each. The rest of the code lives on GitHub, 37 public repositories and counting.

01swift · onnx · claude · permissions
Agents on the desktop

Jarvis: a voice assistant in the MacBook notch

A menu bar assistant that wakes to “Hey Jarvis”, hears and speaks on-device, and hands the thinking to Claude behind 43 tools, each one gated by a permission tier enforced in code rather than in the prompt.

Problem

An assistant that can run shell commands, read email and change system settings is only useful if you can trust what it will not do. Prompt-level guardrails are not a safety model.

Approach

Swift and SwiftUI, with openWakeWord on ONNX Runtime and Apple’s SpeechAnalyzer so audio never leaves the Mac. Every tool call passes a dispatcher: denylist, mode allow-list, then Tier 2 approval in the notch with a 12 s timeout. Untrusted content is tagged as data.

Result

Calendar, Gmail, Notion, briefings, the camera and an action log you can ask about. On-device speaker verification gates approvals, saved keys unlock with Touch ID, and a phone app with a hands-free call mode reaches it over a private Tailscale network. 362 tests, grouped by pipeline stage.

SwiftSwiftUIONNX RuntimeClaude APIEventKitKeychain
View the code on GitHub
02hevc · udp · network.framework
Real-time systems

MacStream: Mac to iPad, 20 ms end to end

Low-latency screen streaming from a Mac to an iPad over local Wi-Fi, with touch, Apple Pencil and keyboard control flowing back. Native Swift on both ends, no third-party runtime.

Problem

Remote-desktop tools treat the iPad as a dumb display: latency in the 100 ms range, gestures that do not map to macOS, and a pairing story that is either insecure or painful.

Approach

ScreenCaptureKit into a hardware HEVC encoder, frames chunked over UDP with selective retransmission, keyframe requests and backpressure. An NTP-style clock sync measures true capture-to-display latency. Pairing uses a six-digit code to bootstrap a TLS pre-shared key, then a 256-bit long-term key in both Keychains.

Result

20 ms capture-to-display at 2268×1472 on the Balanced preset, 12 ms on Performance. Under 3% simulated packet loss, retransmission recovered 122 of 137 lost packets and held bitrate at 12 to 15 Mb/s instead of collapsing to the floor.

SwiftSwiftUIVideoToolboxScreenCaptureKitNetwork.frameworkUDP
View the code on GitHub
03node · websockets · no framework
Multiplayer

Contraband: a party game on everyone’s phone

A room-code party game for 3 to 12 people. Everyone answers the same ridiculous prompt; a secret few are smugglers who must hide an assigned word in theirs. Vote for the funniest, then accuse the smugglers. Laughs and getaways both score.

Problem

Phone-based party games fall apart on refresh, leak secrets to the wrong screen, and show the reveal on each phone a beat apart. Players notice all three.

Approach

The server is the only authority: phones send intents, the server validates and sends each player a view containing only what they may know, and a unit test asserts the secrecy. Seat tokens make refresh and reconnect seamless. Timers live on the server; clients render countdowns from a measured clock offset so reveals land in the same beat on every screen.

Result

No build step, no framework, one dependency. Unit tests cover rules, scoring and a full game over WebSockets; an end-to-end test drives three phones and a TV through a whole night in headless Chromium. One-click deploys to Render or Koyeb, optional Claude-generated prompt cards.

Node.jsWebSocketsVanilla JSDockerPlaywright
View the code on GitHub
04electron · typescript · applescript
Desktop craft

Spotify Widget: a vinyl record on the desktop

A Now Playing widget for the Spotify desktop app: a circular album cover that spins at 33⅓, eases to a stop on pause, and sits on the macOS desktop-widget layer with a background pulled from each album’s artwork.

Problem

Spotify’s own window is the wrong shape for a glance. Third-party widgets want OAuth, API keys and a login, and still miss the moment a track changes.

Approach

Electron and TypeScript talking to Spotify over AppleScript only, so there is no login at all. A JXA helper subscribes to Spotify’s distributed notification for instant updates, backed by a sleep-aware poll. Palette extraction is a dependency-free saturation-weighted histogram. One Web Animations rotation, no per-frame JS.

Result

Scratch the record to seek, synced lyrics from LRCLIB, snaps onto the system widget grid at exact macOS widget sizes, and a zero-runtime-dependency build. Two network requests total: album art and lyrics.

ElectronTypeScriptAppleScript / JXAWeb Animations APIesbuild
View the code on GitHub
05react · websockets · typescript
Real-time UI

FleetOS: a live dashboard for 50 robots

A fleet command interface for autonomous robots: a Node WebSocket server simulates 50 robots streaming telemetry five times a second each, and a React and TypeScript front end renders the fleet, a live detail panel and commands with acknowledgements.

Problem

A dashboard fed by 250 telemetry messages a second will either re-render itself to death or fall behind. It also has to survive the server going away without the operator noticing.

Approach

A framework-free WebSocket service owns the socket: JSON validation, a 15 s heartbeat and reconnection with exponential backoff and jitter. Robot updates are batched and throttled into a reducer-backed store before React sees them. Commands apply optimistically and reconcile on the server's ack.

Result

Smooth at 50 robots and 5 Hz per robot, error-state robots sorted first, a rolling battery chart per robot, and a kill-and-restart of the server that reconnects on its own.

React 18TypeScriptViteWebSocketsNode.js
View the code on GitHub
06pyside6 · llama.cpp · ollama
Local AI tooling

Ignition: two local LLMs, side by side

A desktop tool for comparing how two local language models work through the same question. Each model produces a plan, a note per step and a streamed answer, drawn as a graph you can edit and re-run from the middle.

Problem

Reading two models’ answers tells you who got it right, not where their reasoning diverged. And editing a prompt and re-running from scratch loses the thread you were pulling on.

Approach

Single-file PySide6 app. Each panel loads a GGUF through llama-cpp-python, talks to Ollama, or runs a mock backend. Plan steps become nodes in a zoomable graph; editing one re-runs only what follows it and diffs the answer. A token-overlap heatmap shows which steps the final answer leans on.

Result

Side-by-side traces for gpt-oss-20b and gpt-oss-120b class models, session save and load, PNG export, a guardrail slider, and an A/B bench that writes results to JSON.

PythonPySide6llama.cppOllamaQt Graphics
View the code on GitHub
07asyncio · event loop · order book
Concurrent systems

Adaptive market-making simulator

A financial simulation engine that quotes both sides of a market while volatility shifts underneath it, built to test whether an adaptive spread beats a fixed one.

Problem

Market-making strategies look fine on calm data and blow up in stressed regimes. I wanted a harness that could replay volatility spikes and measure PnL variance honestly.

Approach

Python asyncio for non-blocking I/O task management, so order flow, quoting and risk checks run as concurrent tasks. Order book lookups use a sorted structure for O(log n) access.

Result

35.9% reduction in simulated PnL volatility across stress-tested market regimes, compared with the fixed-spread baseline.

PythonasyncioConcurrencySorted containers
View the code on GitHub
08docker · aws · ci/cd
Distributed data

Event-processing platform

A distributed pipeline that ingests, validates and routes high-volume event streams, deployed on AWS with a CI/CD path from commit to container.

Problem

High-volume streams fail quietly: a malformed record slips through and corrupts everything downstream. Throughput and integrity usually fight each other.

Approach

Asyncio workers in Docker containers on AWS, with custom schema validation layers at the ingest boundary. CI/CD builds and ships each change automatically.

Result

Sustained 10,000 records per second with validation on, with data integrity held across concurrent streams.

PythonasyncioDockerAWS EC2 / S3CI/CD
View the code on GitHub
09langchain · vector db · evals
Applied AI

RAG-based AI assistant

A retrieval-augmented generation assistant with an evaluation harness built in from the start, so every change to retrieval or prompting is measured, not eyeballed.

Problem

RAG demos answer confidently and wrongly. Without a test set and failure taxonomy you cannot tell whether a change helped.

Approach

LangChain pipeline over a vector database behind a REST API, with modular evaluation logic and structured failure-mode analysis across a fixed set of test queries.

Result

Measurably fewer hallucinated and irrelevant responses across the test query sets after each retrieval and prompt iteration.

PythonLangChainVector DBREST APIsEvaluation
10scikit-learn · anomaly detection
Machine learning

Credit card fraud detection

An anomaly-detection service that scores transactions in real time, tuned for the precision and recall trade-off that fraud teams actually live with.

Problem

Fraud is rare, so accuracy is meaningless. A model that flags nothing scores 99%. The real target is catching fraud without burying analysts in false alarms.

Approach

Feature engineering over transaction history, a scikit-learn anomaly-detection model, and precision/recall optimisation on held-out datasets, served through a REST API.

Result

Deployed scoring of high-risk transaction patterns in real time, with thresholds chosen from the held-out precision/recall curve.

Pythonscikit-learnPandasREST API
View the code on GitHub
More

On GitHub

Everything else, from course work to the trading tools I tinker with, is public.

0

Public repositories

Full-stack applications and AI-powered features, with an emphasis on clean, working code.

github.com/samarthpaliwal
Hackathon builds

Arizona Hacks winner

A data-driven AI prototype designed and shipped in 24 hours by a two-person team.

Live

Roblox game

Three years in operation. Persistent state, profiling and live ops on a real player base.

Read more

Next: connect

Meeting times, contact details and credentials on one page.