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:
- The domain is resolved to a store slug via
storefront/resolve-domain. - The active theme configuration is loaded via
storefront/:store_slug/theme. - Navigation menus are loaded via
storefront/:store_slug/menus. - 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
- Cart validation — Verify all items are in stock and prices are current.
- Shipping address — Customer enters or selects a saved address.
- Shipping rates — Calculate shipping costs based on address and cart weight.
- Discount — Optionally apply a discount code.
- Payment method — Select from available payment methods (Razorpay, Cashfree, COD).
- Place order — Create the order and process payment.
- 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
Products & Collections
Cart
Checkout
Customer Authentication
Customer Account
Wishlist
Reviews & Ratings
Legacy Storefront APIs
Database Tables
| Table | Purpose |
|---|---|
products | Product catalog data served to the storefront |
collections | Product collections for browsing and navigation |
customers | Customer accounts for login and profile management |
customer_addresses | Saved shipping/billing addresses |
orders | Customer order data |
cart_items | Persistent cart for logged-in customers |
wishlist | Customer wishlist items |
reviews | Product reviews and ratings |
theme_editor_configs | Active theme configuration rendered by the storefront |
store_menus | Navigation menus (header, footer, mobile) |
banners | Promotional banner data |
discounts | Discount codes validated at checkout |
payment_methods | Available payment methods shown at checkout |
Related Features
- 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