Skip to content

feat: build vendor registration and profile page #2

Description

@EmeditWeb

Problem

Vendors have no way to register or manage their profile
on StepFi-Web. The /vendors page is a placeholder.

Context

Vendors are one of the main participants in the StepFi
protocol. They need to register, list their products, and
see which learner loans are tied to their catalog.

Before Starting

Read these context files:

  • context/architecture-context.md
  • context/code-standards.md

What To Build

  1. Create src/services/vendors.service.ts:

    • listVendors(page, limit) -> GET /vendors
    • getVendor(id) -> GET /vendors/:id
    • registerVendor(data) -> POST /vendors
  2. Build /vendors page showing:

    • Search bar with category filter
    • Grid of vendor cards (name, category, country,
      rating)
    • Each card links to vendor detail page
  3. Build /vendors/register page with form:

    • Name (required)
    • Category (select: Electronics, Bootcamp,
      OnlineCourse, DevTools, Books)
    • Country (required)
    • City (optional)
    • Website (optional, URL validation)
    • Description (optional, max 500 chars)
    • Submit calls POST /vendors with JWT auth
  4. Build /vendors/:id page showing vendor detail

Files To Touch

  • src/pages/Vendors.tsx
  • src/pages/VendorDetail.tsx (new)
  • src/pages/VendorRegister.tsx (new)
  • src/services/vendors.service.ts
  • src/router/index.tsx (add new routes)

Acceptance Criteria

  • Vendor list loads from API with pagination
  • Registration form validates all fields
  • Category dropdown shows all valid options
  • URL validation on website field
  • Auth required for registration
  • Loading, error, empty states handled
  • No hardcoded hex colors

Mandatory Checks Before PR

  • npm run build passes with zero TypeScript errors
  • No any types
  • PR references this issue

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions