Back to work
2026·E-commerce · Solar EnergyPRODUCTION

RUSTAM BATTERY

Solar energy commerce for Pakistan's hottest summers.

Production e-commerce + marketing site for one of Lahore's most trusted solar energy companies. Custom system-size calculator, complete product catalog (solar panels, batteries, inverters), WhatsApp-first lead capture, and SEO tuned for the Pakistani solar search market.

RUSTAM BATTERY — live site screenshot
Duration
8 weeks
Team
Solo full-stack + client design input
My role
Lead full-stack engineer
Outcome
Avg. bill reduction
70%
Installations
500+
Years in business
10
System payback
4 yrs
The story

From brief to production system.

Challenge

Pakistani solar buyers research extensively before purchasing — they want brand comparisons (Osaka vs AGS vs Phoenix), real-world bill savings, and direct human contact. A static brochure site wouldn't have moved the needle; they needed interactive sizing tools, brand-by-brand product depth, and an instant contact path that matched how customers actually buy.

Solution

Built a Next.js 15 site using App Router + Server Components for SEO weight, with client-side calculator and PWA support for offline browsing. Catalog covers Canadian Solar / JinkoSolar / LONGi panels and Osaka / AGS / Phoenix / Alaska batteries. Replaced contact forms with one-tap WhatsApp deeplinks since that's how Pakistani customers prefer to talk.

Outcome

Site ranks on page 1 for several 'solar Lahore' queries, generates daily WhatsApp leads, and converts visitors directly into site-visit bookings — replacing the old cold-call funnel.

Process · 8 weeks

How it shipped, week by week.

Week 1–2
01 / 5

Discovery

Sat with the founder, mapped how solar customers actually shop in Pakistan, audited competitor sites, and wrote the keyword strategy.

Week 3–4
02 / 5

Catalog + design

Built the product schema (brands, models, prices), designed the home and product pages, and got the photoshoot done for the team page.

Week 5–6
03 / 5

Calculator + WhatsApp

Shipped the solar sizing calculator, integrated WhatsApp deeplinks with prefilled message templates, and wired Google Maps for the showroom.

Week 7
04 / 5

SEO + performance

Geo meta tags for Punjab/Lahore, JSON-LD LocalBusiness markup, Lighthouse pass for performance and accessibility.

Week 8
05 / 5

Launch

Submitted to Google Search Console, set up analytics, handed over the admin docs to the client team.

Inside the system

What it does. How it's built.

Features

  • Custom solar system size calculator (kW + savings estimate)
  • Full product catalog with brand filters and live pricing
  • Battery comparison guide (tubular vs lithium)
  • One-tap WhatsApp lead capture (no forms)
  • Google Maps store location with directions
  • Team trust page with founder photo
  • PWA installable on mobile home screen
  • Aggressive SEO for Pakistani solar keywords

Architecture

  • 01Next.js 15 App Router with Turbopack build pipeline
  • 02Server Components for the marketing + catalog routes
  • 03Client Components only for calculator + interactive UI
  • 04Static generation for product pages → fast TTFB
  • 05next/image with responsive srcsets for product photos
  • 06PWA manifest + service worker for offline support
  • 07WhatsApp deeplinks instead of contact form backend
  • 08Vercel edge hosting with global CDN
Stack
Next.js 15React 19TypeScriptTailwind CSSServer ComponentsTurbopackPWAVercelWhatsApp APIGoogle Maps
From the codebase

Annotated excerpts.

01 · The system-size calculator. Takes monthly bill + location, returns recommended kW and estimated payback.
lib/calculator.tstypescript
interface QuoteInput {
  monthlyBillPKR: number;
  cityIrradiance: number; // kWh/m²/day
  loadFactor?: number;
}

export function recommendSystemSize(input: QuoteInput) {
  const { monthlyBillPKR, cityIrradiance, loadFactor = 0.85 } = input;

  // Approx unit cost in PKR (residential slab average)
  const PKR_PER_UNIT = 42;
  const monthlyKwh = monthlyBillPKR / PKR_PER_UNIT;
  const dailyKwh = monthlyKwh / 30;

  // System size in kW to cover daily generation
  const systemKw = dailyKwh / (cityIrradiance * loadFactor);

  // Payback at ~70% bill offset
  const annualSavings = monthlyBillPKR * 12 * 0.7;
  const upfrontCost = systemKw * 145000; // PKR per kW installed
  const paybackYears = upfrontCost / annualSavings;

  return {
    systemKw: Math.round(systemKw * 10) / 10,
    panelsNeeded: Math.ceil((systemKw * 1000) / 580),
    paybackYears: Math.round(paybackYears * 10) / 10,
    annualSavingsPKR: Math.round(annualSavings),
  };
}
02 · WhatsApp deeplink builder. Pre-fills the message with the customer's quote details so the sales team gets context immediately.
lib/whatsapp.tstypescript
const SHOWROOM_NUMBER = "923213770402"; // +92 321 3770402

interface LeadContext {
  product?: string;
  systemKw?: number;
  city?: string;
}

export function whatsappLink(ctx: LeadContext = {}) {
  const lines = [
    "Hi! I'm interested in solar from your website.",
    ctx.product && `Product: ${ctx.product}`,
    ctx.systemKw && `Recommended size: ${ctx.systemKw} kW`,
    ctx.city && `Location: ${ctx.city}`,
  ].filter(Boolean);

  const text = encodeURIComponent(lines.join("\n"));
  return `https://wa.me/${SHOWROOM_NUMBER}?text=${text}`;
}
Other projects

Continue browsing

Have a project like this in mind? Let's talk.

Send me a brief and I'll respond within 24 hours.

← Home© 2025 Ali RazzaqContact →