Dan Doca

New Yolk

Founding Full-stack Engineer · February 2023 to present

New Yolk lets customers buy farm animals, laying hens and dairy cattle, that it keeps on its farms. Customers earn the egg and milk output, withdraw their earnings and trade animals with each other. I joined as the first engineer in a three-person founding team (CEO, sales, engineering), and I built the platform and run it in production.

Open the product

Customer figures from October 2026; other counts from November 2026. Completed deposits are not revenue.

Definitions

The $16.2M+ figure is the total value of deposits customers completed through the product. It is not revenue, sales, GMV, audited cash, or cash collected in a bank account.

12k+
monthly active customers
19k+
customers who have paid
$16.2M+
completed customer deposits
157,000+
animals sold between customers
170,000+
staff approvals
270,000+
leads in the CRM

The system

  1. People and apps

    • CustomersFarm web app (Next.js, English and Arabic with right-to-left layouts)
    • CustomersiOS and Android app (React Native, Expo)
    • StaffCRM (Next.js)
  2. Shared

    • one typed API (305 tRPC procedures, access rules in 23 shared procedure builders), plus shared domain packages for money rules and validation. One Turborepo monorepo of 4 user-facing apps and 22 packages.

    Outside

    • card payments (Stripe and regional card processors)
    • Meta Lead Ads
  3. Data and work after commit

    • PostgreSQL with Prisma (127 data models, ledgers and audit notes).
    • A transactional outbox delivers contracts, email and notifications after commit (68,000+ events queued across 8 topics since August 2026).
    • Scheduled jobs.

    Outside

    • email delivery
Responsibility and code structure, not a deployment topology.

Decisions

  1. A sale either fully happens or doesn't happen.

    Problem
    The first marketplace, launched in August 2024, settled a sale in separate steps. Early fixes had to deal with duplicate purchases and duplicate listings.
    Decision
    Settle each trade in one PostgreSQL transaction: the buyer's Wallet, the seller's balance, ownership of the animals and the 8% seller fee. In the October 2026 rebuild every purchase also carries a request key and a quote fingerprint, so a repeated request returns the same receipt instead of buying twice.
    Trade-off
    Nothing slow can run inside that transaction, so receipts, email and notifications moved out of it into the outbox.
    Result
    157,000+ animals sold between customers since August 2024, and 2,048 purchases in the six weeks after the rebuild. Server-side paging tested at 5,000 listings and 45,000 animals.
    Evidence
    Production counts, 16 November 2026. Paging figures from the rebuild's test fixtures, not production inventory.
  2. Eight card payments taken, never fulfilled.

    Problem
    In August 2026 an audit of card checkouts found payments the card processor had captured with no deposit or animals behind them.
    Decision
    Recover each one through the existing locked, idempotent fulfilment path, never by editing balances by hand. When the first recovery rolled back, I stopped, found the cause in a database constraint, fixed it and resumed. Then I added a reconciler that runs every five minutes. It fulfils a payment only when the processor reports it complete with an exact amount and currency match, and it is safe to run twice.
    Trade-off
    A payment the reconciler cannot prove stays unfulfilled and visible to staff, rather than being credited on a guess.
    Result
    All 8 payments recovered and all 111 animals credited the same day.
    Evidence
    The incident's own audit log and the fix's pull request.
  3. Undo without rewriting history.

    Problem
    Staff sometimes need to reverse a purchase. Editing past records would break the ledger and the audit trail.
    Decision
    A reversal is a new record bound to the original payment receipt, and it refunds the funding sources that receipt recorded. A reversal type without enough evidence behind it is blocked, not guessed.
    Trade-off
    Some reversals need a staff decision instead of a button.
    Result
    Every staff action leaves an audit note, 2.4 million so far. Reversals are covered by tests against real PostgreSQL, including rollback.
    Evidence
    Production counts, 16 November 2026. Test suites in the reversal pull requests.
  4. A lost response must not become a second withdrawal.

    Problem
    A withdrawal can reach the server even when its response never reaches the phone. An app restart makes that uncertainty harder to recover from.
    Decision
    Save the request on the device before sending it. After an uncertain result, retry the same request identity. The server checks for an existing result and returns its receipt; a changed request cannot reuse that identity.
    Trade-off
    The app has to show an unresolved request until it can reconcile it. That is more work than showing a generic error, but it keeps the difference between a failed request and a missing response.
    Result
    In the code, the mobile app restores pending requests after a restart, and the server returns the existing receipt for a matching retry.
    Evidence
    Source review, 20 September 2026. The walkthrough uses synthetic data. It explains how the recovery is built, not a newly verified production rollout or a measured business improvement.

    Follow a lost response

    Synthetic walkthrough · 1 / 4

    Ready to send

    PhoneRequest saved on deviceDEMO-104
    ServerNo request recorded yet0 recorded requests

    The device saves request DEMO-104 before sending. If local storage fails, it does not send the request.

    ReceiptAwaiting request

    An explanation of the recovery design. No account, network request or money movement.

  5. Returning to the app should preserve the task.

    Problem
    Customers need to return to an existing session without repeatedly requesting an email code. A long-lived session also needs protection when the device changes hands.
    Decision
    Separate the account session from device unlock. Use native authentication on cold launch and after a longer background interval, while preserving the screen behind the lock. Keep retry and sign-out available when unlock or connectivity fails.
    Trade-off
    Protecting the main screen is not enough if a purchase dialog still shows in the app switcher. The dialog window needs the same privacy treatment.
    Result
    A record of the Android review build from 10 September covers unlock, passcode fallback, offline recovery, sign-out and app-switcher privacy, with synthetic data. It does not establish iPhone behaviour or store availability.
    Evidence
    Source review, 20 September 2026, and the Android review-build record. They explain how the app is built; neither is a newly verified production rollout or a measured business improvement.

The operating side

How it ships

What I'd do differently

Put money in one transaction from the first version. The 2024 marketplace needed fixes for duplicate purchases before settlement moved into a single transaction in 2025, and the rebuild started from that rule.

Contact

Questions about any of this are welcome. The fastest way to reach me is email.