AYTS — Architecture Overview
At Your Tayo Service is a local marketplace platform connecting customers with neighborhood stores (grocery, pharmacy, vegetables, and more) in the Philippines.
System Diagram
┌──────────────────────────────────────────────────────────┐
│ CUSTOMERS / VENDORS │
└────────────────┬─────────────────────┬───────────────────┘
│ │
┌───────▼────────┐ ┌────────▼────────┐
│ ayts-fe │ │ ayts-admin │
│ (Storefront) │ │ (Admin + Vendor) │
│ Next.js 16 │ │ Next.js 15 │
│ CF Workers │ │ CF Workers │
└───────┬────────┘ └────────┬─────────┘
│ │
┌───────▼─────────────────────▼─────────┐
│ ayts-api │
│ Hono.js on CF Workers │
│ REST API — auth, orders, payments... │
└──────────┬──────────────┬──────────────┘
│ │
┌─────────▼──┐ ┌──────▼──────┐
│ Supabase │ │ CF R2 │
│ PostgreSQL │ │ (images) │
└────────────┘ └─────────────┘
Three Repositories
| Repo | Purpose | URL |
|---|---|---|
ayts-fe | Customer storefront | https://ayts.jerquinbayudo.workers.dev |
ayts-admin | Admin + Vendor + Rider dashboard | https://ayts-admin.jerquinbayudo.workers.dev |
ayts-api | REST API backend | https://ayts-api.jerquinbayudo.workers.dev |
Infrastructure
| Service | Provider | Notes |
|---|---|---|
| Hosting | Cloudflare Workers | All 3 apps |
| Database | Supabase (PostgreSQL) | Project: vlzinsoahwctcolzmwfa |
| File Storage | Cloudflare R2 | Bucket: ayts |
| CDN for images | R2 Public URL | https://pub-cfc3656f8fe64c31862884b05a8159ad.r2.dev |
| Payments | PayMongo | GCash, Maya, Dragonpay, COD |
| Resend / Nodemailer | Transactional emails | |
| SMS | Semaphore | OTP and notifications |
| ORM | Drizzle ORM | Schema in ayts-api/src/lib/db/schema.ts |
Data Flow — Customer Checkout
Customer → FE (cart/page.tsx)
→ POST /api/orders → Supabase: orders + order_items
→ POST /api/payments/initiate
COD → status: confirmed (immediate)
GCash/Maya → PayMongo → checkoutUrl → redirect
→ PayMongo webhook → POST /api/webhooks/paymongo
→ update order status → notify vendor
Local Development Ports
| Service | Port |
|---|---|
ayts-fe | 3000 |
ayts-admin | 3001 |
ayts-api | 3011 |