- Dispatch tracking MVP: Admin/seller mark orders shipped with delivery partner, tracking number, dispatch date
- Delivery partners settings: Super-admin manages partner list (Firestore-driven, never hardcoded)
- Storefront UI: Coffee palette color update, alignment polish, favicon, checkout layout, marquee gating
- Seller & Admin fixes: Unified Add/Edit product UI, permission-denied errors resolved
- Single-order refresh: Order detail sheet re-fetches tracking data on open
- CI/CD polish: Split workflows (PR-preview vs main-deploy), Firebase deploy auth restored
Executive Summary
Amanah India is a fully-built, production-ready serverless e-commerce marketplace for Indian Muslim brands. The platform serves a multi-seller Islamic bookstore, ethnic wear, attar, and Umrah services — all promoted by Manshurat Publishers.
The storefront is 100% static (no backend server required), hosted on Firebase Hosting with GitHub Actions CI/CD. Orders are managed through a role-based admin portal. All core functionality works entirely client-side via localStorage + Firebase (best-effort).
Current Status: v1.7 — Live and operational with 1,161+ unit tests, complete admin/seller portals, dispatch tracking, business settings runtime configuration, and storefront polish.
Customer storefront
Catalog, checkout, UPI payments, order tracking, profile management, and guest checkout — all client-side.
Admin portal
Role-gated dashboard for orders, products, sellers, customers, reports, and runtime settings.
Seller central
Self-service dashboard with CSV upload, per-seller fulfilment, and dispatch tracking.
Security & quality
CSP headers, Firestore rules, 1,161 unit tests gating every deploy, audit logging.
Order Pipeline
Customer view:
Admin/Seller view:
Documentation Files
| File | Purpose |
|---|---|
README.md | Development setup, deployment, custom-domain auth checklist |
CLAUDE.md | Full codebase inventory, architecture, key files, Firestore schema |
AGENTS.md | AI assistant guide, conventions, code patterns, CI/CD |
docs/PRD.md | Product Requirements Document (v1.0 comprehensive spec) |
docs/amanah-work-summary.md | Downloadable work summary (Markdown) |
docs/project-summary.html | Interactive HTML summary with tabs (this page) |
Release Timeline
Click any release to expand details. Seven releases from June 15 – July 1, 2026.
- Storefront redesign: New navigation, homepage revamp, filterable shop catalog, light-first theme
- Auth fixes: Google sign-in restored on custom domain via authDomain + CSP frame-src fixes
- Super-admin CMS: About/Contact pages togglable without redeploy
- Seller portal stabilization: Gate no longer hides live dashboard when enabled
- Comprehensive testing: 1,161 tests across 20+ modules (Jest)
- Tests in CI: Jest runs on every pull request and gates all deploys
- Documentation: CLAUDE.md refreshed; AGENTS.md guide for AI assistants
- Per-app auth isolation: Separate Firebase instances for admin, seller, storefront
- Business settings panel: Runtime-editable config via Firestore — no deploy required
- Admin improvements: View/edit mode toggle, cancelled-order filters, site launch gate
- Storefront polish: Cart qty stepper restored, New/Sale tags, checkout parity
- SOLID redesign: Layered architecture (domain → infrastructure → components → apps → pages)
- URL renames: shop → catalog, product → product-detail, sell → become-a-seller
- Bug fixes: WhatsApp FAB restoration, seller login unblock
- Seller orders: Per-seller order breakdown and fulfilment stages
- Asset security: CSS/canvas watermarks on book covers, interaction blockers
- Developer experience: bump-versions.mjs cache-busting, pre-commit auto-versioning
- Admin portal MVP: Dashboard, orders, products, sellers, customers, admins, reports
- Access control: Google Sign-In gated by Firestore admins/{uid} roles
- Seller portal: Registration with admin approval, CSV upload, live order management
- Notifications: Telegram bot alerts, order receipts, CSV export
- Customer features: Profile page, order history, 5-stage status tracking, cross-device sync
- Theme: Minimalist Islamic literature design (luxe black & gold, dark/light mode)
- Payments: UPI push payment (mobile deep links, desktop QR code)
- Security: Content Security Policy, asset watermarks, interaction blockers
Current Features
| Feature | Status | Details |
|---|---|---|
| Homepage | ✅ Complete | Hero banner, editor picks, newly launched preview, social reels carousel |
| Catalog (/catalog) | ✅ Complete | 150+ products, multi-parameter filters, search |
| Product Detail | ✅ Complete | Full specs, add-to-cart, qty controls, related products |
| Shopping Cart | ✅ Complete | localStorage primary, Firestore optional sync, pricing breakdown |
| Checkout | ✅ Complete | 4-step flow, guest checkout supported |
| UPI Payment | ✅ Complete | Mobile deep links; Desktop QR code, UPI ID copy |
| Order History | ✅ Complete | 5-stage status tracker, cross-device sync |
| Payment Proof | ✅ Complete | One-time UPI transaction ID submission |
| Order Cancellation | ✅ Complete | Customers can cancel pre-shipment |
| Authentication | ✅ Complete | Google Sign-In + Phone OTP, optional |
| About & Contact | ✅ Complete | CMS-editable visibility toggle without deploy |
| Theme & UI | ✅ Complete | Coffee palette, Amiri/Cormorant Garamond fonts, mobile-first |
| SEO | ✅ Complete | robots.txt, sitemap.xml, OpenGraph tags, branded 404 |
| Feature | Status | Role Access | Details |
|---|---|---|---|
| Dashboard | ✅ | super_admin ops_admin | Revenue, recent orders/sellers, key metrics |
| Orders | ✅ | super_admin ops_admin | Live feed, 6-stage pipeline, payment verification |
| Dispatch Tracking | ✅ | super_admin ops_admin | Mark shipped with delivery partner, tracking #, customer links |
| Products | ✅ | super_admin catalog_admin | CRUD, image upload, CSV bulk import, soft delete |
| Sellers | ✅ | super_admin catalog_admin | CRUD, logo upload, product count tracking |
| Customers | ✅ | super_admin ops_admin | User profiles, order history, read-only |
| Admins | ✅ | super_admin | Add/remove admins, assign roles |
| Reports | ✅ | super_admin ops_admin catalog_admin | Sales insights, inventory reports, CSV export |
| Audit Logging | ✅ | All admin writes | Firestore audit_logs collection |
| Setting | Scope | Firestore Doc | Effect |
|---|---|---|---|
| Site Launch | super_admin | settings/site_launch | Toggle storefront online/offline (coming-soon gate) |
| Seller Portal | super_admin | settings/seller_portal | Toggle /seller between live portal and coming-soon |
| Business Settings | super_admin | settings/business | UPI VPA, WhatsApp, discount tiers, GST — no deploy needed |
| Marketplace Verticals | super_admin | settings/verticals | Show/hide clothing, perfume, umrah categories |
| Best Sellers | super_admin | settings/bestsellers | Recompute ranking from orders |
| Homepage Social | super_admin | settings/social | Instagram reel IDs for homepage carousel |
| Delivery Partners | super_admin | settings/delivery_partners | Courier list with tracking URL patterns |
| Feature | Status | Details |
|---|---|---|
| Registration | ✅ Complete | Google Sign-In with admin approval gate |
| Dashboard | ✅ Complete | Revenue, order count, bestseller products, mobile-friendly |
| Products | ✅ Complete | CSV upload, CRUD, image upload, seller-wise bulk delete |
| Orders | ✅ Complete | Live feed, per-seller fulfilment, dispatch modal |
| Order Export | ✅ Complete | CSV download with date filter |
| Portal Gate | ✅ Complete | Super-admin toggle; coming-soon when disabled |
Technical Stack
| Layer | Technology | Notes |
|---|---|---|
| Hosting | Firebase Hosting | GitHub Actions CI/CD, push to main auto-deploys |
| Frontend | Vanilla JS, HTML, CSS | No bundler, no framework — every file served as-is |
| Auth | Firebase Authentication | Google Sign-In + Phone OTP, optional |
| Database | Cloud Firestore | Orders, users, products, sellers, settings, audit logs |
| Storage | Firebase Storage | Product covers, seller logos |
| Notifications | Telegram Bot + WhatsApp | Client-side HTTP POST (best-effort) |
| FormSubmit.co | Order receipts (best-effort) | |
| Payments | UPI push | Mobile deep links; Desktop QR code |
| Testing | Jest 29 (Node) | 1,161 tests, gates all CI deploys |
Project Structure
Key Globals
| Global | Source | Purpose |
|---|---|---|
window.SITE_CONFIG | config/site-config.js | Business constants |
window.AmanahConfig | js/core/config.js | Runtime config wrapper |
window.AmanahFirebase | js/firebase-service.js | Auth + Firestore wrapper |
window.AmanahOrderStatusPipeline | js/domain/order-status-pipeline.js | Order status definitions |
window._storefrontPage | Page boot script | Per-page orchestration |
BOOKS | data/catalog.js | Product catalog (no window prefix) |
Business Constants
| Collection | Written by | Read by | Purpose |
|---|---|---|---|
orders | Checkout, payment proof | Admin, profile, seller | Customer orders + fulfilment |
users | Auth + profile | Admin customers | User profiles |
products | Admin CRUD | Storefront | Product catalog |
sellers | Admin + signup | Admin, storefront | Seller info |
admins/{uid} | Super_admin | Admin portal | Role assignments |
audit_logs | Admin writes | super_admin | Audit trail |
settings/business | Admin Settings | js/core/config.js | Runtime overrides |
settings/bestsellers | Admin Settings | Catalog/homepage | Best-seller ranking |
settings/social | Admin Settings | Homepage | Instagram reel IDs |
settings/verticals | Admin Settings | verticals-visibility.js | Category visibility |
settings/site_launch | Admin Settings | site-launch-gate.js | Site online/offline |
settings/seller_portal | Admin Settings | seller-portal-gate.js | Seller portal visibility |
settings/delivery_partners | Admin Settings | Dispatch modals | Courier configuration |
- Anyone (no auth): Create orders, read public settings
- Signed-in customer: Read/update own orders, read/write own profile
- Approved seller: Read orders they fulfil, update own seller_fulfilment.<uid>
- Admins: Role-based access via admins/{uid} document
super_admin ops_admin catalog_admin
1,161 Tests
Jest 29 in Node.js environment — no DOM required for domain layer.
20+ Suites
Mirror source tree: domain, core, infrastructure, components, notification.
CI Gates
All deploys require tests to pass — PR-preview and main-deploy workflows.
Test directories:
__tests__/domain/ __tests__/core/ __tests__/infrastructure/ __tests__/components/ __tests__/notification/ admin-utils seller-utils order-export order-fulfilment order-receipt
Telegram Bot (@AlQuranEducationBot)
| Event | Trigger | Content |
|---|---|---|
| New Order | Checkout confirmation | Order ID, customer name/mobile, items, total |
| Payment Approved | Admin action | Order ID, amount |
| Payment Rejected | Admin action | Order ID, reason |
| New Signup | First Google auth | Name, email, mobile |
WhatsApp & Email: Auto-opens wa.me link after checkout with itemized order. Order receipts via FormSubmit.co (best-effort, 10-second timeout, never blocks checkout).
Deployment & CI/CD
| Trigger | Workflow | Jobs |
|---|---|---|
| Pull request to main | .github/workflows/pr-preview.yml | test → deploy-preview |
| Push to main | .github/workflows/main-deploy.yml | test → deploy + firestore rules |
| Manual | Bootstrap Admin (workflow_dispatch) | Seed Firestore data |
Path Filters
CI runs when HTML, CSS, JS, admin, seller, data, config, firestore.rules, or workflow files change. README, docs/, scripts/ skip CI on main.
Cache Busting
Every commit auto-bumps ?v=20260701t in all HTML via pre-commit hook. Ensures fresh JS/CSS (1-hour browser cache).
Current Metrics
| Metric | Value |
|---|---|
| Codebase Size | ~8,977 KB |
| Product Catalog | 150+ products |
| Test Coverage | 1,161 tests across 20+ suites |
| Admin Roles | 3 (super_admin, ops_admin, catalog_admin) |
| Order Statuses | 6 stages |
| Active Sellers | 4 (Manshurat, Good Tree, Alif, Aariz) |
| Marketplace Verticals | 4 (Books, Clothing, Attar, Umrah) |
| Discount Tiers | 5 (5–20% based on MRP) |
| Notifications | Telegram, WhatsApp, Email |