Skip to Content
FeaturesStorefront

Storefront

Overview

The Storefront is the customer-facing side of every Siyahfy store. It renders the vendor’s theme, displays products, handles search and filtering, manages the shopping cart, processes checkout, and provides customer account pages. The storefront is powered by a set of public APIs that deliver theme configuration, product data, collection pages, customer authentication, and order management — all optimized for fast, responsive rendering.

How It Works

Store Resolution

When a customer visits a store URL:

  1. The domain is resolved to a store slug via storefront/resolve-domain.
  2. The active theme configuration is loaded via storefront/:store_slug/theme.
  3. Navigation menus are loaded via storefront/:store_slug/menus.
  4. The storefront renderer assembles the page using theme sections and live data.

Product Browsing

Customers can browse products through:

  • Collection pages — Products grouped by category or custom collection
  • Search — Real-time product search with keyword matching
  • Widget products — Featured, bestselling, or curated product carousels
  • Product detail pages — Full product info with variants, images, pricing, and reviews

Shopping Cart

The cart system supports both guest and authenticated customers:

  • Add products with variant selection
  • Update quantities
  • Remove items
  • Cart validation before checkout (stock check, price verification)
  • Persistent carts for logged-in customers (stored in database)

Checkout Flow

  1. Cart validation — Verify all items are in stock and prices are current.
  2. Shipping address — Customer enters or selects a saved address.
  3. Shipping rates — Calculate shipping costs based on address and cart weight.
  4. Discount — Optionally apply a discount code.
  5. Payment method — Select from available payment methods (Razorpay, Cashfree, COD).
  6. Place order — Create the order and process payment.
  7. Confirmation — Display order confirmation with order ID.

Customer Account

Logged-in customers can:

  • View and edit their profile
  • Manage saved addresses
  • View order history
  • Track order status
  • Cancel orders
  • Add products to wishlist
  • Write product reviews

Key API Endpoints

Store & Theme

GET/api/storefront/resolve-domain

Resolve a custom domain to a store slug

GET/api/storefront/:store_slug/theme

Get active theme configuration for rendering

GET/api/storefront/:store_slug/menus

Get all navigation menus

GET/api/storefront/:store_slug/menus/:handle

Get a specific menu by handle

GET/api/storefront/:store_slug/pages

Get all published pages

GET/api/storefront/:store_slug/pages/:slug

Get a single page by slug

GET/api/storefront/:store_slug/policies

Get store policies

GET/api/storefront/:store_slug/payment-methods

Get available payment methods for checkout

Products & Collections

GET/api/storefront/:store_slug/products/:slug

Get full product details by slug (images, variants, pricing, SEO)

GET/api/storefront/:store_slug/collections/:slug

Get a collection with its products

GET/api/storefront/:store_slug/collection-products

Get paginated products for a collection

GET/api/storefront/:store_slug/search

Search products by keyword

GET/api/storefront/:store_slug/widget-products

Get products for widget sections (featured, bestselling, new arrivals)

GET/api/storefront/:store_slug/widget-products/search

Search products within a widget context

GET/api/storefront/:store_slug/widget-collections

Get collections for widget sections

GET/api/storefront/:store_slug/media-items

Get media library items for the storefront

POST/api/storefront/:store_slug/notify-restock

Sign up for back-in-stock notification on a product

Cart

GET/api/cart/all/:customer_id

Get all cart items for a customer

POST/api/cart/new_manage

Add or update cart items (new cart system)

POST/api/cart/manage

Add, update, or remove cart items (legacy)

DELETE/api/delete_all_item

Clear all items from the cart

POST/api/validateGuestCart

Validate guest cart items (check stock, prices)

Checkout

POST/api/storefront/:store_slug/checkout/validate-cart

Validate cart before checkout (stock, pricing)

POST/api/storefront/:store_slug/checkout/shipping-rates

Calculate shipping rates for the cart and address

POST/api/storefront/:store_slug/checkout/apply-discount

Apply a discount code at checkout

POST/api/storefront/:store_slug/checkout/create-razorpay-order

Create a Razorpay order for payment

POST/api/storefront/:store_slug/checkout/place-order

Place the final order after payment

Customer Authentication

POST/api/storefront/:store_slug/customer/login

Customer login

POST/api/storefront/:store_slug/customer/register

Customer registration

POST/api/storefront/:store_slug/customer/register/verify

Verify registration OTP

Customer Account

GET/api/storefront/:store_slug/customer/profile

Get customer profile

PUT/api/storefront/:store_slug/customer/profile

Update customer profile

GET/api/storefront/:store_slug/customer/orders

Get customer's order history

GET/api/storefront/:store_slug/customer/orders/:order_id

Get details of a specific order

GET/api/storefront/:store_slug/customer/addresses

Get customer's saved addresses

POST/api/storefront/:store_slug/customer/addresses

Add a new address

PUT/api/storefront/:store_slug/customer/addresses/:address_id

Update an address

DELETE/api/storefront/:store_slug/customer/addresses/:address_id

Delete an address

Wishlist

GET/api/wishlist/:customer_id

Get customer's wishlist items

POST/api/wishlist/manage

Add or remove a product from the wishlist

Reviews & Ratings

POST/api/ratingById

Get ratings for a product by ID

POST/api/reviews/manageAuth Required

Submit a product review with rating, text, and optional images

Legacy Storefront APIs

GET/api/products/:type

Get products by type (all, featured, on_sale)

GET/api/getProductBySlug/:slug

Get product details by slug (legacy)

GET/api/getAllCollection

Get all collections for the storefront

GET/api/getCollectionProductByCollectionId

Get products in a collection

GET/api/bannerList

Get promotional banners

POST/api/makeOrder

Place an order (legacy checkout)

GET/api/getSingleOrderGuest/:order_id

Get order details for guest checkout confirmation

POST/api/customer/orders/cancel

Customer-initiated order cancellation

Database Tables

TablePurpose
productsProduct catalog data served to the storefront
collectionsProduct collections for browsing and navigation
customersCustomer accounts for login and profile management
customer_addressesSaved shipping/billing addresses
ordersCustomer order data
cart_itemsPersistent cart for logged-in customers
wishlistCustomer wishlist items
reviewsProduct reviews and ratings
theme_editor_configsActive theme configuration rendered by the storefront
store_menusNavigation menus (header, footer, mobile)
bannersPromotional banner data
discountsDiscount codes validated at checkout
payment_methodsAvailable payment methods shown at checkout
  • Products — Product data displayed on the storefront
  • Orders — Orders created through storefront checkout
  • Customers — Customer registration and account management
  • Theme Editor — Theme configuration that renders the storefront
  • Discounts — Discount codes applied at checkout
  • Payments — Payment processing during checkout
  • Shipping — Shipping rate calculation at checkout