Nishant / backend engineer / TypeScript, Node.js, Python

Try to break my backends.

Most portfolios ask you to trust a list of skills. This one hands you five invariants my systems enforce and the tools to attack them. Each lab has a common bug built in on purpose, sitting next to the code I actually ship. Break the bug, then switch to my code and watch it hold.

  • 24 unit tests on the lab logic
  • 5 labs driven in a real browser on every push
  • 0 frameworks, trackers or build steps

01 — 05

The labs

Five bugs that have cost real companies real money. Every lab contains two versions of the same code: a common bug and my code.

Seeing “bug reproduced” is the point, not a failure. Each lab starts on the common bug so you can watch it break. My code is the other option, and it should never break. If you make it break, email me.

  1. 1Run the common bugPick the option tagged common bug and run it. It breaks.
  2. 2Switch to my codePick the option tagged my code, the way my projects do it.
  3. 3Try to break it againSame attack, same inputs. It holds every time.

Concurrency / bank-management-system

Withdraw the same money twice

assert cash_dispensed <= opening_balance
untested

Two ATMs withdraw 60 from an account holding 100 at the same instant. Correct result: one succeeds, one is refused. The database interleaves their statements however it likes.

  1. Race with Read, then write. Usually 120 comes out of a 100 account.
  2. Pick either my code option and race again. Never more than 100.
How the withdrawal is written
timelineidle

Race once to see how the two transactions interleave, step by step.

Idempotency / bank-management-system

Get charged three times for one payment

assert charges(payment_intent) <= 1
untested

The server charges the card, then the response is lost on the way back. The client times out and retries, exactly as a well-behaved client should. Correct result: one charge.

  1. Turn the key off (common bug) and send. You get charged three times.
  2. Turn it back on (my code) and send. One charge.
Request
sequenceidle

Send a payment and watch the retries play out.

Money / ledgerline

Make a cent disappear

assert sum(shares) == total
untested

Split a bill, then add the shares back up. The left column stores money as a JavaScript number, the common bug. The right column is my code: whole cents as integers. Correct result: the shares always add up to the total.

  1. Pick an example. The common bug column loses or invents a cent.
  2. My code column always adds up exactly, and refuses amounts like 1.005 instead of rounding them.
Try one
Or type your own
comparisonlive

Audit trails / ledgerline, aftermark

Rewrite history without getting caught

assert verify(log) detects any change
untested

Every entry stores the SHA-256 of the one before it. You are an attacker with database access: edit an amount, delete the newest row, or re-hash the whole chain. Correct result: every change is detected.

  1. Turn the checkpoint off (common bug), delete the newest row. Verification still says OK.
  2. Turn it back on (my code). The same tampering is caught.
Attacks

Edit any amount directly in the log.

Defence
audit logsha-256

    Authorization / aftermark

    Close an incident on your own

    assert len(approvers(manifest) - {author}) >= 2
    untested

    Alice opened INC-1042. The rule: two people other than Alice must approve the current evidence before it can be resolved. You can act as anyone.

    1. With enforcement off (common bug), as alice: investigate, attach evidence, contain, approve, resolve. She closes it alone.
    2. Turn enforcement on (my code) and try the same. The server refuses.
    Act as
    Do
    incidentINC-1042

      live

      Status page

      Recent main-branch CI runs for every featured repository, read from the GitHub Actions API on every deploy and once a day. If something is red, this page says so.

        source

        Where the labs come from

        Each lab is a simplified version of a guarantee one of these projects actually makes.

        contact

        Hiring for backend work where correctness matters?

        Or you found a way to break my code in one of the labs. Either way, I want to hear about it.

        One-page resume Every claim links to the exact line of code that proves it. PDF, A4.