Skip to content
Farhad Nazir

Eyewear e-commerce and store ERP

Designers Glasses

An online eyewear store with a step-by-step prescription lens configurator, contact lens shop and a full admin back office.

Role
Sole full-stack developer (via Techwine Solutions)
Platforms
Web, Backend & API
Status
Live
Timeline
2026
Client
Designers Glasses
  • Web application
  • E-commerce
  • Business system
Designers Glasses lens configurator on the prescription step: frame preview with Official Reseller and 100% Authentic badges, a configuration summary with PKR prices, and a manual prescription form with SPH, CYL, axis and ADD for each eye, dual PD and lab instructionsRecreated from source, demo data

Overview

Designers Glasses is a live online eyewear store in Pakistan that sells designer frames, sunglasses, AI glasses and contact lenses, priced in PKR. Customers can buy a frame on its own or add prescription lenses to it, configured step by step in the browser.

I built the whole platform on my own through Techwine Solutions: the database design, the storefront, the admin back office, the payment integrations, deployment and the client documentation. The production codebase has 152 commits from April to October 2026.

Behind the storefront is an admin panel for running the store. It covers the catalog and variants, the lens pricing engine, orders, customers, coupons, reviews, banners and store settings, with analytics and Excel exports.

Built for: Online eyewear shoppers in Pakistan, and the store owner and staff who manage the catalog, lens pricing and orders.

The problem

Selling prescription eyewear online is much harder than ordinary e-commerce. One order combines a frame variant with a vision type, a prescription (SPH, CYL, axis, ADD, PD and sometimes prism), a lens package with a given index and thickness, and coatings or tints. All of these affect the price, and some options only make sense with others.

Contact lenses add another layer: power, base curve and diameter per eye, sold by the box with quantity discounts. Stock also has to be tracked per frame color and size. Off-the-shelf store builders do not model any of this, so the store needed a purpose-built system.

The solution

I designed a relational lens configuration schema (vision usages, lens packages, add-on groups, add-ons, add-on colors, a per-usage pricing matrix and compatibility rules) and gave the admin a Lens Engine screen to edit it. Lens options and prices live in the database, not in code.

On the storefront, a four-step configurator walks the customer through vision type, prescription, add-ons and lens package while showing a live summary and total. It skips steps that do not apply, checks the prescription, and for high prescriptions only offers thinner lens packages.

Checkout stores the structured prescription on each order item, deducts stock from the exact variant, applies coupons, sends a confirmation email and supports Cash on Delivery and PayPal. I also integrated HBLPay card checkout behind a configuration switch.

Main features

What the software does day to day, taken from the code.
  • Four-step lens configurator

    Vision type, prescription, add-ons and packages, with a live configuration summary and running total. Frame Only goes straight to the cart and Non-Prescription skips the Rx step.

  • Flexible prescription entry

    Customers can type their prescription (both eyes, single or dual PD, optional prism at an extra charge), upload a prescription file, or fill it in from the prescription saved in their account.

  • High-prescription filtering

    When the prescription reaches SPH 4.00 or CYL 2.00 or more in either direction (plus or minus), the configurator only offers packages marked as suitable for high prescriptions, which are the thinner high-index lenses.

  • Admin Lens Engine

    Staff manage vision types, lens packages (index, thickness, branded and non-branded), add-on groups, add-ons and colors, plus a pricing matrix per vision type with auto-fill and package compatibility rules.

  • Contact lens shop with volume pricing

    Per-eye power, base curve and diameter, a same-for-both-eyes option, box quantities and lens colors. Tier pricing is applied automatically based on the total number of boxes.

  • Catalog filters synced to the URL

    Filter by gender, brand, category, frame shape, style, material, face shape, color, size, price and width, with search and sorting. Every filter is kept in the URL so results can be shared and bookmarked.

  • Variant-level inventory

    Stock is deducted per frame color and size at checkout. The admin dashboard shows low-stock alerts across both variants and base products.

  • Analytics and order management

    Revenue and order totals for any date range, compared with the previous period of the same length. Orders can be filtered by type, status, payment status and date, opened with their prescription details, and exported to Excel.

  • Verified-buyer reviews

    Only customers who bought a product can review it. Reviews go through an approval queue, and an Artisan command auto-approves reviews that have been pending for more than 24 hours.

  • Customer accounts and PDF invoices

    Customers see their order history, saved prescription, profile and wishlist, and can download PDF invoices. Order confirmations are sent by email.

Screens marked "recreated from source" were rebuilt from the app's code with demo data, so no client data is shown. The rest are from the software itself.

Designers Glasses admin dashboard with a date range filter and presets, KPI cards for revenue and orders compared with the previous period, active products and partner brands, plus recently added products and low stock alertsRecreated from source, demo data
The admin dashboard: date-filtered revenue and order KPIs, recently added products and low-stock alerts.
Designers Glasses storefront home page with a campaign hero, trust points, brand strip, Men's, Women's, Kid's and AI Glasses category tiles and a Best Sellers grid priced in PKRRecreated from source, demo data
The storefront home page with campaign hero, brand strip, category tiles and the Best Sellers grid.
Designers Glasses admin order management with filters for order type, status, payment status and date, and a table of orders with type badges, PKR totals, order and payment status and Excel exportRecreated from source, demo data
Order management, with filters by type, status, payment and date, order type badges and Excel export.
Designers Glasses mobile storefront with header icons, a Sunglasses banner with For Him and For Her buttons, and a two-column Best Sellers grid with PKR pricesRecreated from source, demo data
The mobile storefront, scrolled to the Sunglasses banner and the Best Sellers grid.

Development and architecture

The platform is a single Laravel 12 application on PHP 8.2. Both the storefront and the admin panel are built from Livewire 3 components (37 in total, most of them full pages), which gives an app-like feel without a separate JavaScript front end. Views use Blade, Tailwind CSS and Alpine.js, built with Vite.

Data lives in MySQL across 56 migrations and 32 Eloquent models: lookup tables for brands, shapes, materials and other attributes, products and variants, contact lens details, the lens configuration tables, orders, reviews, coupons, banners and settings. The site is deployed on Hostinger.

Data-driven lens pricing
I chose to model lens options as related tables (usages, packages, add-ons, colors, a pricing matrix and compatibility pivots) so the store can change its lens offer and prices without a developer.
Rule-based configurator flow
The configurator decides which steps to show from the selected vision type, validates the prescription, and narrows the lens packages when it detects a high prescription.
Encrypted card gateway integration
The HBLPay integration encrypts each order payload with a fresh AES key, RSA-encrypts the credentials and key, decrypts the encrypted return payload and maps response codes to order status. It sits behind a feature flag alongside PayPal and Cash on Delivery.
Prescription stored with each order
Each order item keeps the full prescription and lens choices as structured data, so staff have everything needed to fulfil the order in one place.
Reusable Excel export
A single export class and button component can export any model with a date range, filters and optional joins. Orders, customers and products all use it.
Auth and roles
Laravel Breeze handles sign-up with email verification. A role column and admin middleware protect the back office, and customers and staff are redirected to their own areas after login.

Technology

  • Laravel
  • PHP
  • Livewire
  • MySQL
  • Tailwind CSS
  • Alpine.js
  • Vite
  • Laravel Breeze
  • PayPal JS SDK
  • HBLPay
  • DomPDF
  • Laravel Excel
Faisal Optical Service homepage with emerald top bar, category navigation, a sunglasses hero banner and a strip of designer brand logos

Eyewear e-commerce store

Faisal Optical Service

An online eyewear store with a step-by-step prescription lens configurator and a full admin back office for the optician.

  • Web application
  • E-commerce
  • Business system
AsaanOptics Marketplace storefront landing page prototype with a dark red hero, 'See better. Shop smarter. From optical shops near you.', and eyewear category tiles
Design prototype

Multi-vendor optical marketplace

AsaanOptics Marketplace

A multi-vendor marketplace for optical shops in Pakistan, with prescription ordering, nearby search and escrow-style checkout, currently in development.

  • Web application
  • E-commerce
  • SaaS product
Asaan Optics Desktop Stock Control Center showing stock value at cost and retail, potential profit, stock by category, last 30 days of sales and low-stock alerts

Optical shop management SaaS

Asaan Optics

Optical shop software for Android and Windows: prescriptions, counter sales, stock and staff shifts on one shared shop account.

  • SaaS product
  • Mobile app
  • Desktop app
  • Business system

Have a software idea or a business process that needs a proper system?

Tell me what you are trying to fix. I will reply with honest questions, a practical plan and a realistic estimate.