Skip to content

Repository files navigation

BORMLINE Logo

BORMLINE.

Premium Modest Fashion Affiliate Platform

A full-featured, production-grade affiliate e-commerce platform for premium modest fashion β€” built with React, TypeScript, Tailwind CSS, and Vite.

Features β€’ Tech Stack β€’ Getting Started β€’ Project Structure β€’ Screenshots β€’ License


BORMLINE Homepage Preview

✨ Premium storefront with hero carousel, category grid, and editorial lookbook


Overview

BORMLINE. is a curated affiliate marketplace designed for the Gulf region's modest fashion industry. It connects consumers with premium abaya, sheila, and hijab brands through an elegant storefront experience β€” while providing brands with a complete affiliate tracking, analytics, and partner management system behind the scenes.

The platform demonstrates a real-world Server-to-Server (S2S) postback affiliate tracking workflow, making it ideal for learning, portfolio showcase, or as a starting point for production affiliate platforms.


Features

πŸ›οΈ Storefront (Consumer-Facing)

  • Premium Homepage β€” Hero carousel, visual category grid, trending products, deal-of-the-day countdown, best sellers, Instagram-style lookbook, and newsletter signup
  • Product Catalog β€” Full product listing with category filtering, search, and sorting
  • Product Detail Pages β€” Detailed product view with affiliate click-through tracking
  • Brand Directory β€” Browse and discover partner brands with individual brand pages
  • Product Comparison β€” Side-by-side product comparison tool
  • Wishlist β€” Save and manage favorite products (persisted via localStorage)
  • Global Search β€” Real-time search across products, brands, and categories
  • Contact Page β€” Full contact form with office location details

πŸ”— Affiliate Tracking System

  • Click Tracking β€” Every outbound affiliate click is logged with a unique click_id, referrer, user agent, and timestamp
  • S2S Postback Simulation β€” Simulates server-to-server conversion postbacks with realistic order data, commission calculation, and status tracking (completed/pending/failed/refunded)
  • S2S Journey Page β€” Interactive educational walkthrough explaining the full S2S tracking lifecycle with animated diagrams and live demo capabilities
  • Retargeting Engine β€” Detects abandoned clicks (no conversion) and surfaces personalized re-engagement banners with discount offers

πŸ“Š Admin Dashboard

  • Analytics Dashboard β€” Real-time metrics: total clicks, conversions, revenue, commission earned, conversion rates, and performance charts (powered by Recharts)
  • Product Management β€” Full CRUD for products with image URLs, pricing, categories, and affiliate links
  • Brand Management β€” Add, edit, and delete partner brands with commission rates, API secrets, and integration types (S2S / CSV)
  • Tracking & Postback Logs β€” Detailed click and postback log viewer with CSV export
  • CSV Import/Export β€” Bulk product import via CSV and data export capabilities
  • Brand Applications β€” Review, approve, or reject incoming brand partnership requests
  • Settings β€” Admin profile management and data reset controls
  • Activity Log β€” Audit trail of all admin actions (add/edit/delete/import operations)
  • Auth Guard β€” Protected admin routes with demo login system

🌐 Internationalization & Theming

  • Bilingual Support β€” Full English ↔ Arabic translation with RTL layout support
  • Dark / Light Mode β€” System-aware theme switching with manual override
  • Responsive Design β€” Mobile-first with premium bottom navigation bar, mega dropdown menus, and touch-optimized interactions

🎨 UI & UX

  • 49 Radix UI Components β€” Fully accessible component library (shadcn/ui)
  • Premium Animations β€” Scroll reveal, marquee banners, hover accordion lookbook, staggered loading
  • Glassmorphism & Modern Design β€” Trust strips, bento grids, gradient overlays, and editorial layouts
  • Live Chat Widget β€” Floating support chat bubble (demo mode)
  • Scroll-to-Top β€” Floating button appears on scroll
  • Payment Badges β€” mada, Visa, Mastercard, Tabby, Tamara icons in footer
  • SEO Optimized β€” Open Graph, Twitter Card meta tags, semantic HTML, and robots.txt

Tech Stack

Layer Technology
Framework React 18 + TypeScript
Build Tool Vite 5 (SWC plugin)
Styling Tailwind CSS 3 + CSS Variables
Components shadcn/ui (Radix UI primitives)
Routing React Router v6
State React Context + localStorage persistence
Charts Recharts
Data Fetching TanStack React Query
Forms React Hook Form + Zod
Icons Lucide React
Typography DM Sans (Google Fonts)
Testing Vitest + Playwright
Linting ESLint 9 (flat config)

Getting Started

Prerequisites

  • Node.js β‰₯ 18
  • npm, yarn, pnpm, or bun

Installation

# Clone the repository
git clone https://github.com/abdirizak-30/bormline.git
cd bormline

# Install dependencies
npm install

# Start the development server
npm run dev

The app will be available at http://localhost:3000

Available Scripts

Command Description
npm run dev Start Vite dev server with HMR
npm run build Production build
npm run preview Preview the production build locally
npm run lint Run ESLint
npm run test Run unit tests via Vitest
npm run test:watch Run tests in watch mode

Admin Access (Demo)

Navigate to /admin/login and use the demo credentials:

Field Value
Email admin@bormline.com
Password admin123

⚠️ Note: This is a client-side demo with localStorage persistence. No real backend or database is used. All data resets on localStorage.clear().


Project Structure

BORMLINE./
β”œβ”€β”€ public/                     # Static assets & favicons
β”‚   β”œβ”€β”€ bormline-favicon.svg
β”‚   β”œβ”€β”€ favicon.ico
β”‚   └── robots.txt
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/             # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ ui/                 # 49 shadcn/ui primitives
β”‚   β”‚   β”œβ”€β”€ Layout.tsx          # Global layout (header, footer, nav, chat)
β”‚   β”‚   β”œβ”€β”€ ProductCard.tsx     # Product card component
β”‚   β”‚   β”œβ”€β”€ BrandCard.tsx       # Brand card component
β”‚   β”‚   β”œβ”€β”€ FilterBar.tsx       # Product filter sidebar
β”‚   β”‚   β”œβ”€β”€ AdminShell.tsx      # Admin dashboard shell
β”‚   β”‚   β”œβ”€β”€ AdminGuard.tsx      # Route protection for admin
β”‚   β”‚   β”œβ”€β”€ TrackingButton.tsx  # Affiliate click-through button
β”‚   β”‚   └── ThemeToggle.tsx     # Dark/light mode switcher
β”‚   β”œβ”€β”€ hooks/                  # Custom React hooks
β”‚   β”‚   β”œβ”€β”€ use-auth.tsx        # Authentication context
β”‚   β”‚   β”œβ”€β”€ use-language.tsx    # i18n context (EN/AR)
β”‚   β”‚   β”œβ”€β”€ use-wishlist.ts     # Wishlist state management
β”‚   β”‚   β”œβ”€β”€ use-data-store.ts   # Store event listener hook
β”‚   β”‚   β”œβ”€β”€ use-mobile.tsx      # Mobile breakpoint detection
β”‚   β”‚   └── use-toast.ts        # Toast notification hook
β”‚   β”œβ”€β”€ lib/                    # Core utilities & data
β”‚   β”‚   β”œβ”€β”€ data-store.ts       # In-memory data store + localStorage
β”‚   β”‚   β”œβ”€β”€ data-translations.ts# Arabic product translations
β”‚   β”‚   β”œβ”€β”€ translations.ts     # Full UI translation dictionary
β”‚   β”‚   β”œβ”€β”€ types.ts            # TypeScript interfaces
β”‚   β”‚   └── utils.ts            # Utility functions
β”‚   β”œβ”€β”€ pages/                  # Route-level page components
β”‚   β”‚   β”œβ”€β”€ HomePage.tsx        # Landing page (13 sections)
β”‚   β”‚   β”œβ”€β”€ ProductsPage.tsx    # Product catalog
β”‚   β”‚   β”œβ”€β”€ ProductDetailPage.tsx # Single product view
β”‚   β”‚   β”œβ”€β”€ BrandsPage.tsx      # Brand directory
β”‚   β”‚   β”œβ”€β”€ BrandPage.tsx       # Individual brand page
β”‚   β”‚   β”œβ”€β”€ SearchPage.tsx      # Search results
β”‚   β”‚   β”œβ”€β”€ ComparePage.tsx     # Product comparison
β”‚   β”‚   β”œβ”€β”€ WishlistPage.tsx    # Saved items
β”‚   β”‚   β”œβ”€β”€ ContactPage.tsx     # Contact form
β”‚   β”‚   β”œβ”€β”€ S2SJourneyPage.tsx  # S2S tracking explainer
β”‚   β”‚   β”œβ”€β”€ LegalPage.tsx       # Legal pages (terms, privacy, etc.)
β”‚   β”‚   β”œβ”€β”€ BrandApplyPage.tsx  # Brand partnership application
β”‚   β”‚   β”œβ”€β”€ AgreementPage.tsx   # Partner agreement
β”‚   β”‚   β”œβ”€β”€ AdminPage.tsx       # Admin analytics dashboard
β”‚   β”‚   β”œβ”€β”€ AdminProductsPage.tsx   # Admin product CRUD
β”‚   β”‚   β”œβ”€β”€ AdminBrandsPage.tsx     # Admin brand CRUD
β”‚   β”‚   β”œβ”€β”€ AdminTrackingPage.tsx   # Click & postback logs
β”‚   β”‚   β”œβ”€β”€ AdminImportPage.tsx     # CSV import tool
β”‚   β”‚   β”œβ”€β”€ AdminBrandRequestsPage.tsx # Brand application review
β”‚   β”‚   β”œβ”€β”€ AdminSettingsPage.tsx   # Admin settings
β”‚   β”‚   β”œβ”€β”€ AdminLoginPage.tsx      # Admin authentication
β”‚   β”‚   └── NotFound.tsx            # 404 page
β”‚   β”œβ”€β”€ App.tsx                 # Root app with routing
β”‚   β”œβ”€β”€ main.tsx                # Entry point
β”‚   └── index.css               # Global styles + CSS variables
β”œβ”€β”€ index.html                  # HTML entry point
β”œβ”€β”€ vite.config.ts              # Vite configuration
β”œβ”€β”€ tailwind.config.ts          # Tailwind CSS configuration
β”œβ”€β”€ tsconfig.json               # TypeScript configuration
β”œβ”€β”€ eslint.config.js            # ESLint flat config
β”œβ”€β”€ vitest.config.ts            # Vitest configuration
β”œβ”€β”€ playwright.config.ts        # Playwright E2E config
└── package.json                # Dependencies & scripts

Data Model

The platform operates on five core entities:

Entity Key Fields
Brand id, name, logo_url, website_url, integration_type (s2s/csv), commission_rate, api_secret, country
Product id, brand_id, name, price, original_price, image_url, affiliate_url, category, is_new
ClickLog id, product_id, brand_id, referrer, user_agent, clicked_at
PostbackLog id, click_id, brand_id, product_id, order_id, amount, commission, currency, status
BrandRequest id, name, contact_name, contact_email, category, company_size, status (pending/approved/rejected)

S2S Affiliate Tracking Flow

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    click     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   redirect    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  User    β”‚ ──────────►  β”‚ BORMLINE  β”‚ ───────────►  β”‚ Brand Store  β”‚
β”‚ (Browser)β”‚              β”‚  (Track)  β”‚               β”‚  (Merchant)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜               β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚                             β”‚
                          Log click_id                  User purchases
                               β”‚                             β”‚
                               β–Ό                             β–Ό
                     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                     β”‚  Click Logs DB   │◄─────────│ S2S Postback    β”‚
                     β”‚  (localStorage)  β”‚  match   β”‚ (click_id +     β”‚
                     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ click_id β”‚  order data)    β”‚
                                                   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  1. User clicks an affiliate link on BORMLINE
  2. BORMLINE logs the click with a unique click_id and appends it to the redirect URL
  3. User lands on the brand's website and (optionally) makes a purchase
  4. Brand sends a postback to BORMLINE with the click_id, order ID, amount, and commission
  5. BORMLINE matches the postback to the original click and records the conversion

Product Categories

Category Description
Everyday Abayas Classic, comfortable daily wear
Evening Abayas Silk, embellished, and occasion wear
Modern Abayas Contemporary cuts and trending styles
Winter Abayas Warm, lined abayas for cold weather
Bridal Abayas White and beaded bridal collections
Sheilas & Hijabs Chiffon, silk, and jersey head coverings
Under Abayas Inner dresses and slips

Partner Brands (Seed Data)

Brand Country Integration Commission
Elegance Abaya UAE S2S 15%
Dar Al Abaya Kuwait CSV 10%
Silk & Stitch Bahrain S2S 12%
Modest Crown Saudi Arabia CSV 10%
Nova Abayas Saudi Arabia S2S 8%

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License β€” see the LICENSE file for details.


Author

Abdirizak β€” @abdirizak


BORMLINE. β€” Where Modest Fashion Meets Modern Technology

Releases

Packages

Contributors

Languages