From 78b9d15257b459f6869783e81af81d786d32baa0 Mon Sep 17 00:00:00 2001 From: vctb12 <78221586+vctb12@users.noreply.github.com> Date: Mon, 2 Mar 2026 14:45:18 +0400 Subject: [PATCH] Extend UX system with accessibility helpers and productivity overlays --- README.md | 65 ++- about.html | 58 +-- admin.html | 192 ++++++-- ar-blog.html | 24 +- ar/blog.html | 62 ++- ar/index.html | 35 +- assets/placeholder.svg | 28 +- assets/products/case-mid-tower.svg | 10 + assets/products/chair-ergonomic.svg | 10 + assets/products/cooler-240-aio.svg | 10 + assets/products/cpu-7800x3d.svg | 10 + assets/products/cpu-i7-14700k.svg | 10 + assets/products/gpu-rtx4070s.svg | 10 + assets/products/gpu-rx7800xt.svg | 10 + assets/products/headset-7-1.svg | 10 + assets/products/kb-mech.svg | 10 + assets/products/mobo-b650.svg | 10 + assets/products/monitor-27-165.svg | 10 + assets/products/mouse-pro.svg | 10 + assets/products/psu-850w-gold.svg | 10 + assets/products/ram-32gb-ddr5.svg | 10 + assets/products/ssd-1tb-nvme.svg | 10 + blog.html | 106 +++-- build.html | 87 ++++ buildRules.json | 13 + changelog.html | 45 ++ checkout.html | 164 ++++--- contact.html | 25 +- css/enterprise-upgrades.css | 546 +++++++++++++++++++++++ health.html | 1 + index.html | 86 +--- js/lib/api.js | 19 + js/lib/dom.js | 11 + js/lib/format.js | 2 + js/lib/logger.js | 39 ++ js/lib/rules.js | 27 ++ js/lib/security.js | 13 + js/lib/ux-enhancements.js | 535 ++++++++++++++++++++++ js/pages/chat.js | 77 ++++ js/pages/warranty.js | 75 ++++ netlify.toml | 61 ++- netlify/functions/_utils.js | 3 + netlify/functions/adminLogin.js | 87 ++-- netlify/functions/chat.js | 44 ++ netlify/functions/createOrder.js | 158 +++++-- netlify/functions/createPaymentIntent.js | 12 + netlify/functions/markOrderPaid.js | 22 + netlify/functions/notifyCapture.js | 41 ++ netlify/functions/ordersList.js | 39 ++ netlify/functions/updateOrderStatus.js | 22 + package.json | 14 + partials/footer.html | 16 + partials/header.html | 27 ++ payment-demo.html | 1 + payment.js | 8 +- playwright.config.ts | 15 + products.html | 159 +++++-- products.json | 236 ++++++++-- robots.txt | 3 + script.js | 353 ++++++++++++++- scripts/audit-links.mjs | 76 ++++ scripts/validate-assets.mjs | 38 ++ services.html | 23 +- sitemap.xml | 16 + style.css | 208 +++++++++ tests/e2e/site.spec.ts | 148 ++++++ warranty.html | 88 ++-- warrantyRules.json | 22 + 68 files changed, 3816 insertions(+), 609 deletions(-) create mode 100644 assets/products/case-mid-tower.svg create mode 100644 assets/products/chair-ergonomic.svg create mode 100644 assets/products/cooler-240-aio.svg create mode 100644 assets/products/cpu-7800x3d.svg create mode 100644 assets/products/cpu-i7-14700k.svg create mode 100644 assets/products/gpu-rtx4070s.svg create mode 100644 assets/products/gpu-rx7800xt.svg create mode 100644 assets/products/headset-7-1.svg create mode 100644 assets/products/kb-mech.svg create mode 100644 assets/products/mobo-b650.svg create mode 100644 assets/products/monitor-27-165.svg create mode 100644 assets/products/mouse-pro.svg create mode 100644 assets/products/psu-850w-gold.svg create mode 100644 assets/products/ram-32gb-ddr5.svg create mode 100644 assets/products/ssd-1tb-nvme.svg create mode 100644 build.html create mode 100644 buildRules.json create mode 100644 changelog.html create mode 100644 css/enterprise-upgrades.css create mode 100644 health.html create mode 100644 js/lib/api.js create mode 100644 js/lib/dom.js create mode 100644 js/lib/format.js create mode 100644 js/lib/logger.js create mode 100644 js/lib/rules.js create mode 100644 js/lib/security.js create mode 100644 js/lib/ux-enhancements.js create mode 100644 js/pages/chat.js create mode 100644 js/pages/warranty.js create mode 100644 netlify/functions/chat.js create mode 100644 netlify/functions/createPaymentIntent.js create mode 100644 netlify/functions/markOrderPaid.js create mode 100644 netlify/functions/notifyCapture.js create mode 100644 netlify/functions/ordersList.js create mode 100644 netlify/functions/updateOrderStatus.js create mode 100644 package.json create mode 100644 partials/footer.html create mode 100644 partials/header.html create mode 100644 payment-demo.html create mode 100644 playwright.config.ts create mode 100644 robots.txt create mode 100644 scripts/audit-links.mjs create mode 100644 scripts/validate-assets.mjs create mode 100644 sitemap.xml create mode 100644 tests/e2e/site.spec.ts create mode 100644 warrantyRules.json diff --git a/README.md b/README.md index 130e921..44fbc0a 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,65 @@ -# nex +# Nexus Gaming UAE Storefront +Production-focused static storefront for Netlify (`https://akastore.netlify.app`) with UAE AED/VAT logic, modular JS pages, Netlify Functions, chatbot demo mode, warranty calculator, build configurator, and demo payment lifecycle. + +## Local development + +```bash +python -m http.server 4173 +# open http://127.0.0.1:4173/index.html +``` + +## Commands + +```bash +npm run build +npm run validate-assets +npm run audit-links +npm run test:e2e +``` + +## Environment variables + +### Admin auth +- `ADMIN_USER` +- `ADMIN_PASS_HASH` (bcrypt hash) +- `JWT_SECRET` + +### Optional persistence (Supabase) +- `SUPABASE_URL` +- `SUPABASE_SERVICE_ROLE_KEY` + +Expected tables: +- `orders(orderid text, createdat timestamptz, status text, deliverymode text, promocode text, totals jsonb, items jsonb, customer jsonb)` +- `notify_requests(productid text, sku text, email text, phone text, preferredcontact text, createdat timestamptz)` + +### Optional email +- `RESEND_API_KEY` +- `ORDER_FROM_EMAIL` +- `ORDER_NOTIFY_TO` + +### Optional AI +- `OPENAI_API_KEY` (if missing, chatbot works in demo intent mode) + +### Optional payment provider keys +- (future-ready scaffolding) `TABBY_*` / card provider keys can be added later; demo payment works without keys. + +## Deployment (Netlify) +1. Connect repo. +2. Publish directory: `.` +3. Functions directory: `netlify/functions` +4. Set env vars as needed. + +## Key pages +- `build.html` — Build PC wizard with compatibility checks +- `warranty.html` — dynamic extended warranty calculator +- `payment-demo.html` — demo payment lifecycle +- `health.html` — functions health checks + +## Notes +- No external keys required for demo-mode operation. +- Netlify headers/redirects are configured in `netlify.toml` only (single source of truth). + + +## Layout partials +- Shared navigation/footer are loaded from `partials/header.html` and `partials/footer.html` at runtime with session cache and fallback handling. diff --git a/about.html b/about.html index 96f7072..811e8a9 100644 --- a/about.html +++ b/about.html @@ -8,24 +8,7 @@
-