Skip to content
← Portfolio

Agorani

Solo-built P2P marketplace with AI photo-to-listing, real-time chat and five-language translation.

Project
Mobile application
Date
Status
Live on the App Store & Google Play
Stack
React Native, Expo, TypeScript, Cloudflare Workers
Links
Get the app

At a glance

  • Role: Founder and sole engineer; full-time March–September 2026.
  • Stack: React Native (Expo), TypeScript, Hono, tRPC, Cloudflare Workers, D1 and Durable Objects.
  • Outcome: Launched a 62-screen marketplace in five languages; 1,850+ commits.

Scroll for more →

AI-assisted listings and moderation

Workers AI runs Llama 4 Scout vision models. A seller can take a photo and get a draft title, description, and category to edit before publishing. The same vision models screen images for policy violations.

A 70B Llama model translates listings, services, profiles, messages, and reviews across English, Greek, German, Russian, and Spanish. A Qwen3 27B model screens text through the same moderation pipeline, with Llama 4 Scout as fallback. It scores seven categories: prohibited items, counterfeits, adult content, weapons, scams, misleading listings, and offensive language. Edge cases go to a human moderator queue, and sellers can appeal disputed decisions.

Real-time chat on Durable Objects

Buyer and seller chat runs on three Cloudflare Durable Object classes with the WebSocket Hibernation API. Connections remain inexpensive to hold open at scale, and each conversation keeps consistent state without a separate message broker.

Referrals, credits, authentication, and trust

A credits system rewards listing and engagement. Its deferred-attribution referral flow credits the right inviter even if the invitee installs the app well after opening the link. Referral links use a separate subdomain, r.agorani.com, outside the main app’s universal-link hosts. This prevents an older installed build from intercepting a link it cannot handle.

Sign in with Apple, Google SSO, and OTP cover authentication. Transactional email runs through Cloudflare Email Routing, while D1 rate limits the anonymous AI flow to prevent abuse.

System architecture

Scroll to see the full diagram →

Text description

The Expo React Native app and the Astro public-listing and referral sites were built by Alfonso. Both connect over typed HTTPS to the Hono and tRPC Cloudflare Worker designed and operated by Alfonso, which handles validation, authentication, and business workflows. The Worker sends chat commands to three Durable Objects built by Alfonso, reads and writes relational marketplace data through D1 and Drizzle, checks OTP and refresh-token blacklist data in Workers KV, requests vision, translation, and moderation inference from Workers AI, and sends transactional messages through the external Email Routing service. The mobile app also reports funnels, crashes, and errors to the external PostHog and Sentry services. Gold components and ALFONSO labels mark implementation responsibility within Alfonso's delivery scope, not legal ownership; violet components are data stores, amber identifies the AI service, and gray identifies external services.

Mobile, web, edge API, real-time state, data, and AI form one TypeScript product system.

Expo app → Hono and tRPC on Cloudflare Workers → D1, Workers KV, Durable Objects and Workers AI. One TypeScript system across mobile, web and API.

What I owned

  • Product definition, UX, and the Expo application
  • Hono/tRPC API design, D1 schema, shared TypeScript package
  • Durable Objects chat and referral-credit workflows
  • Vision, translation, moderation integrations
  • Analytics, crash reporting, native E2E coverage, store-submission work

Key decisions and trade-offs

  • Share the product model: A shared TypeScript package aligns mobile, web, and API validation, schema, and business rules. In the pnpm workspaces monorepo, it also holds Zod schemas, Drizzle helpers, i18n, and constants. This reduces drift, but schema changes create coordinated compatibility and release coupling across clients and the API.
  • Keep chat state close to each conversation: Durable Objects provide per-conversation real-time state without a separate message broker. The WebSocket Hibernation API keeps long-lived connections inexpensive, at the cost of structuring chat around three stateful Object classes.
  • Keep people in control of AI output: AI inference runs inline, which adds latency and model uncertainty. Editable title, description, and category drafts contain that uncertainty, while ambiguous moderation enters human review instead of forcing an automated decision; sellers can appeal disputed decisions.

Production evidence

  • Live surfaces and infrastructure: The public marketplace and referral surface are live behind Cloudflare. Production infrastructure includes the Hono/tRPC Worker, D1, Workers KV, Durable Objects, Workers AI, and Email Routing.
  • Delivery history: Pre-launch work began in September 2025 alongside Abrila; full-time development ran March–September 2026. The product has 1,850+ commits across the Expo app, Workers backend, Astro web companion, and shared package.
  • Native coverage: 53 Maestro E2E flows across smoke and full suites against the Expo client.
  • Production visibility: PostHog tracks the funnel from installation to the first listing and first completed chat. Sentry reports crashes and errors from the React Native client.

Next case study

Abrila — Offline Sales System →

Hiring for a senior full-stack role?