Software engineerOrange County, SoCal

Hi, I'm Hasan. I build ML systems, security tools and production web apps.

I'm a Senior Software Engineer at the Farmacia pharmacy group, where I build the telehealth and e-commerce sites. I also founded DarkForge AI and Dusklayer. Lately I've been building a camera analytics engine, a small language model from scratch, a Raft implementation and a security gateway for MCP.

Open to remote roles and project work

Sentinel Vision demo

Overhead view of an open office with six desks. Each person is boxed and labelled: three read Working, two read Phone usage with the phone itself boxed, and one empty chair reads Absent. A panel lists the six statuses.
  1. 00:01.0Six desks mapped
  2. 00:04.8ID 1 away from desk
  3. 00:07.0ID 6 phone in hand
  4. 00:08.5ID 4 phone in hand
Frames from the Sentinel Vision demo. The video is AI generated, so there are no real people in it. The boxes and labels are what the software drew. More on this project

01

Selected work

Six projects I'd point you to first. The rest are on the work page.

Vision AI product · Live · 2026

Sentinel Vision

Most camera footage only gets watched after something goes wrong. I wanted the camera to report what's happening as short status changes with timestamps.

What I built
Everything: the model export, the rules, the browser demo, the Windows apps, the release pipeline and the site.
  • The same ONNX models run on a Windows GPU, on a plain CPU and in the browser.
  • The rules are regular code, kept separate from the model, with 41 tests.
  • The small model takes about 68 ms a frame on a 2 core CPU with no GPU.

Machine learning · Open source · 2026

forge-lm

I'd used model libraries without really knowing what goes on inside them. So I wrote each piece myself, then wrote the inference a second time in Rust to check I had it right.

What I built
Everything: the BPE tokenizer, the transformer and trainer in PyTorch, the model file format and the Rust engine.
  • Trained from random weights on about 1 MB of Shakespeare. 857K parameters, around 11 minutes on 2 CPU cores.
  • The Rust engine matches PyTorch's logits to 5 decimal places.
  • 45 Python tests and 20 Rust tests.
2345605001,0001,5002,0002,500steploss, nats per tokenlowest validation loss, step 1,000validation 3.11training 1.98
Training and validation loss from the repo's training log. Validation stops improving around step 1,000, so the model is overfitting after that.
$ cargo test --release --test parity logits_match -- --nocapture
largest difference from PyTorch over 4608 logits: 1.1570752e-5
test result: ok. 1 passed; 0 failed

Distributed systems · Open source · 2026

quorum

Consensus bugs hide in rare orderings, like a message that lands after a crash or a leader that doesn't know it's been replaced. They're hard to hit in tests and even harder to reproduce.

What I built
Everything: the Raft node, the key value store on top of it, the simulator and the linearizability checker.
  • The node has no goroutines, timers or sockets, so a whole cluster runs deterministically from a seed.
  • 500 seeds with crashes, partitions and dropped messages: about 330K client operations and no violations.
  • When I break reads on purpose, the checker catches it.
$ go run ./cmd/quorum-sim -seeds 500
500 seeds in 6.37s: 2006617 ticks, 330221 operations (330221 completed), 3244 leader terms, 337948 entries committed,
30313 snapshots, 2055 crashes, 4957 partitions, 12871111 messages (2192855 lost)
no property violated

$ go run ./cmd/quorum-sim -seeds 40 -unsafe-reads
seed 17: VIOLATION at tick 4013: linearizability: no sequential order explains the history of key "k1"
seed 21: VIOLATION at tick 4005: linearizability: no sequential order explains the history of key "k1"
seed 26: VIOLATION at tick 4009: linearizability: no sequential order explains the history of key "k2"
40 seeds in 398ms: 160535 ticks, 29059 operations (29059 completed), 257 leader terms, 19371 entries committed,
1738 snapshots, 164 crashes, 395 partitions, 730476 messages (141629 lost)
3 seed(s) violated a property
Simulator output. The second run has a bug I added on purpose, to make sure the checker fails when it should.
RequestResultReason
tools/list1 of 6 tools shownTools the policy never allows are hidden. One tool with an injection in its description is quarantined.
read_file README.mdAllowed, redactedaws_access_key_id = [REDACTED:aws-access-key-id]
read_file /home/me/.ssh/id_rsaDeniedargument 'path' matches a denied pattern
shell_exec lsDeniedno rule matches 'shell_exec'; default is deny
export_allDeniedits description reads like a prompt injection (concealment, tool-coercion)
fetch_page https://example.comDeniedno rule matches 'fetch_page'; default is deny
What anvil did when I ran it in front of the hostile server from its test suite. That server offers six tools, hides an instruction in one description, leaks a key and exposes a shell.

AI security · Open source · 2026

anvil

An MCP server controls the tool descriptions and results that a model reads. If the server is malicious, or just passes along a bad web page, it can talk the model into running things.

What I built
Everything: the proxy, the policy engine, redaction, the injection scanner, tool pinning, the audit log and the CLI.
  • Deny by default. A blocked call never reaches the server.
  • Against the hostile server in its test suite, it hid 5 of 6 tools and redacted a leaked AWS key.
  • 206 tests. The audit log is hash chained, so edits show up.

Telehealth, client · Live · 2026

FarmaciaRx Care

You can't sell prescription treatments like regular e-commerce. Nothing can be bought without a prescriber, and the first form shouldn't collect health information.

What I built
Design, build, the English and Spanish content, and the compliance copy, which I wrote with the pharmacist.
  • There's no cart. Every page leads to a consultation request.
  • The request form only takes contact details. Medical intake happens later on a secure link.
  • Every product is labeled FDA approved or compounded, and there's a full Spanish version.

Product, founder · Live · 2026

Dusklayer

A prompt for a page is only useful if a model can rebuild the page from the prompt alone. I needed a way to measure that.

What I built
I'm the founder. I built the library, the prompt format, the scoring pipeline, accounts and plans, and the site.
  • Each prompt gets a Fidelity Score: a fresh model rebuilds the page and 10 pairs of frames are compared.
  • 22 layers with 9 looks each.
  • Every layer lists its mobile Lighthouse scores.

Two school projects also have full write-ups: CyberForge, my senior project with a team of five, and Distributed Smart Parking, a class project with a group of seven.

02

Engineering

A few details from the projects, with real output.

ML and vision

Same models on three runtimes

Sentinel Vision exports its models to ONNX once. The same files run on a Windows GPU through DirectML, on a CPU, and in the browser with WebAssembly. These are the timings so far. I haven't timed the GPU path yet.

More on Sentinel Vision
ModelRuntimeInputPer frame
YOLO26nONNX Runtime, CPU640 px68 ms
YOLO26sONNX Runtime, CPU640 px208 ms
YOLO26nChrome, WebAssembly, 2 threads640 pxabout 200 ms
YOLO26-LPyTorch, CPU1280 pxabout 2 s
YOLO26nONNX Runtime, DirectML GPU640 pxNot timed yet
Measured on a 2 core 2.1 GHz Xeon with no GPU.

Systems

Retries that don't double book

In the parking project, a client that gets no reply retries with the same message id. The server keeps the reply it already sent and returns it again, flagged as a duplicate. This is the server log from a test that drops the first reply.

More on the parking project
lamportdirtypemsg_idpayload
126recvREQUESTca77c033reserve A-01 for carol
127sendREPLY092e12e0reply_to ca77c033, granted, lease 30.0
128recvREQUESTca77c033reserve A-01 for carol (same id, second attempt)
129sendREPLY092e12e0reply_to ca77c033, granted, duplicate: true
From lot_server_A.log, trimmed to the relevant fields.

Security

A CI gate for secrets and risky code

pipeline-armor scans a repo for hardcoded secrets and dangerous calls, and fails the build above a severity you pick. It ships with a vulnerable demo app, and its own CI checks that the demo still gets blocked.

More security work
$ pipeline-armor scan demo

 !  [HIGH] patterns   vulnerable_app.py:35           subprocess_shell
 !  [HIGH] patterns   vulnerable_app.py:41           eval_call
 !  [HIGH] patterns   vulnerable_app.py:46           pickle_load
 !  [HIGH] patterns   vulnerable_app.py:62           requests_verify_off
 !  [HIGH] patterns   vulnerable_app.py:68           yaml_unsafe_load
 !  [MEDIUM] secrets    vulnerable_app.py:29           generic_password_assignment
 !  [LOW ] patterns   vulnerable_app.py:52           weak_hash_md5

  6 blocking, 0 allowlisted (policy: fail at MEDIUM).
  BLOCKED.                                             exit code 1
Scanning the demo app that comes with the repo.

More on the engineering page

03

About

I work for a group of pharmacies in California. I build and maintain their sites: the main group site, the telehealth site, the supplement store and the individual store sites. A lot of it is regulated, so I work closely with the pharmacists on what a page can say and what it can collect.

I also run DarkForge AI, a small studio for client work, and Dusklayer, which is my own product. I'm finishing a CS degree at Cal State Long Beach.

More about me

  1. Current

    Senior Software Engineer

    Farmacia pharmacy group, Orange County, CA

  2. 2026 to now

    Founder

    Dusklayer

  3. Jan 2024 to now

    Founder and full stack engineer

    DarkForge AI

  4. Expected May 2027

    B.S. Computer Science

    California State University, Long Beach

04

More code

A few other repos worth a look.

All 20 repos

05

Get in touch

Engineering roles

Hiring an engineer?

I'm open to remote roles and project work. Send me the role or the project and I'll get back to you.

Client projects

Need something built?

Client work goes through my studio, DarkForge AI.