Skip to main content

Vendor Onboarding

Route: /vendor/onboard
File: ayts-fe/app/vendor/onboard/page.tsx
Auth required: Yes (must be logged in to apply)

Purpose

Multi-step form allowing existing customers to apply as vendors (store owners) on the AYTS platform.

Steps

Step 1 — Store Information

  • Store name (required)
  • Store category (Grocery / Pharmacy / Vegetables / etc.)
  • Short description
  • Long description

Step 2 — Contact & Location

  • Store address (street, barangay, city)
  • Phone number
  • Operating hours (open/close times per day)

Step 3 — Store Images

  • Store logo upload (R2)
  • Store banner image upload (R2)
  • At least 1 image required

Step 4 — Review & Submit

  • Summary of entered information
  • Terms of Service acceptance
  • Submit application

API Flow

// Upload images first
POST /api/upload/image → R2 URL

// Submit vendor application
POST /api/vendors/onboard
{
storeName: string,
category: string,
description: string,
address: string,
city: string,
barangay: string,
phone: string,
operatingHours: { ... },
logoUrl: string,
bannerUrl: string,
}
// → Application stored, status: "pending"
// → Admin reviews in Admin → Vendor Applications

Application Status Flow

Customer submits → status: "pending"
Admin reviews in /admin/applications
→ Approve: status "approved" → store created, vendor role assigned
→ Reject: status "rejected" → notification sent to customer

Known Issues / Status

ItemStatus
Multi-step form renders✅ Working
Image uploads✅ Working
Application submitted✅ Stored in DB
Admin approval page❌ Missing — must be built
Approval email to vendor❌ Not wired
Status tracking for vendor⚠️ No UI to check application status

Build ayts-admin/app/(admin)/applications/page.tsx to list pending applications and allow approve/reject actions via:

GET /api/admin/applications
PATCH /api/admin/applications/{id}/review { action: 'approve' | 'reject' }