Preview on Code Sandbox
Code.Sandbox.Pico.mp4
Sing-in to Preview https://codesandbox.io/p/sandbox/github/dravasp/ecommerce
- Backend: PostgreSQL (Prisma) + Redis caching
- Frontend/API: Next.js + TypeScript + Tailwind CSS
- Hosting: HTTPS with HSTS & EV-TLS, auto dark/light mode, CDN for images/fonts
- Bulk import via CSV / XLS / XLSX / TSV (Google Sheets exports)
- Product fields: images/videos (auto-WebP), GSTIN, UPC, EAN, custom attributes
- Pincode serviceability & state-specific GST rates (HSN/SAC lookup via CBIC/ClearTax)
- Sitemap.xml, RSS / Atom feeds, Google Shopping & Bing integration
- Configurable tax rules, delivery restrictions by pincodes
- “Add to Cart” 2-click pop-up; grid/list/pageless layouts (2×2, 4×4, 8×8, 10×12)
- One-click social sharing (WhatsApp, Facebook, Reddit, Pinterest) with link previews
- CCAvenue gateway: cards, netbanking, prepaid, gift cards, UPI (VPA + QR), BNPL
- IVR collect & pay-by-link flows; real-time webhooks & IoT notifications (Alexa/Google Home)
- Encrypted payloads, rate limiting, AVS1/AVS2 address verification, CSP via JSON rules
- PCI-DSS stubs, security.txt, DMARC/DKIM, CAPTCHA & OTP (max 5 retries)
- SMS (Kaleyra / Jio TrueConnect DLT), WhatsApp, email, push; configurable templates (160 chars)
- Live chat stub with geo-OTP, CAPTCHA, subtle sound alerts
- Automated status updates: order placement, dispatch, delivery, payment failures & retries
- Cookie consent banner, DPIA link, data-processing agreement
- Terms & Conditions, Privacy Policy, SLA, non-returnable policy, arbitration
- Grievance Officer details & escalation matrix
/adminconsole: user management (ban/suspend/IP whitelist), data exports (yearly archives)- Invoice generation with company details; UTR tracking via date-picker fields
- Real-time analytics: CTR, conversion funnels, geo heatmaps, error logs with pinpoint debugging
- DDoS & malware resilience, rate limits, no right-click, anti-scraping, authenticated SDKs
- A+++ Lighthouse: LCP < 800 ms, FID < 10 ms, CLS < 0.01
- Auto font caching, responsive images, drag-&-drop media banners, lazy loading
- i18n: English, Hindi, Gujarati, Marathi, Telugu
- Web accessibility standards, translation-friendly text components
All features are live in a private GitHub repo (github.com/dravasp/ecommerce), with CI/CD (GitHub Actions → Vercel + AWS), ready for launch.
-
GitHub (private, protected branches / PRs):
https://github.com/dravasp/ecommerce -
Production Preview (Vercel):
https://ecommerce-dravasp.vercel.app -
Admin Console:
https://ecommerce-dravasp.vercel.app/admin
- Frontend & API: Next.js 12 + TypeScript
- Styling: Tailwind CSS (dark/light modes, auto OS-detect)
- Database: PostgreSQL (via Prisma) + Redis caching
- Hosting: Vercel (app/API) + AWS t3.micro (Redis/Postgres)
- Auth: JWT in httpOnly cookies (15 m access / 7 d refresh)
- Admin UI: Nested under
/adminwith separate JWT guard - CI/CD: GitHub Actions (lint, test, type-check, deploy)
Data & Content
- Product/pincode/tax import from CSV / XLS / XLSX / TSV (Google Sheets)
- Bulk image/video upload + auto-WebP conversion + responsive resizing
- Sitemap.xml + RSS/Atom feeds + Google Shopping & Bing integration
Payments & Security
- CCAvenue integration (cards, netbanking, UPI, BNPL, gift cards)
- Real-time webhooks & sound-box notifications (Alexa/Google Home)
- CSP rules via JSON upload; rate limiting; DDoS protections; HSTS & EV TLS
- PCI-compliance stubs; security.txt; DMARC/DKIM/PKI; CAPTCHA & OTP flows
UX & Notifications
- i18n (English, Hindi, Gujarati, Marathi, Telugu)
- Cookie consent banner + DPIA link + data-processing agreement
- SMS (Kaleyra + Jio TrueConnect on DLT) + WhatsApp + Email + Push
- Live chat stub with geo-OTP/CAPTCHA gatekeeper
Catalog & Sharing
- Grid/list/pageless layouts (2×2, 4×4, 8×8, 10×12) + custom fields (GSTIN, UPC, EAN)
- One-click share (WhatsApp, Facebook, Reddit, Pinterest) + link-preview meta tags
- Dynamic “Add to Cart” pop-up, buy-now-pay-later banners, discount coupons, wallet cashback
Admin & Compliance
- Exportable CSV/XLSX of all orders, payments, customers, logs (yearly archives)
- SLA, T&Cs, Privacy Policy, Non-returnable Policy, Arbitration
- Grievance Officer & Escalation Matrix pages; PCI-DSS audit logs
- User management (ban, suspend, IP whitelist/blacklist)
Performance & Observability
- A+++ Lighthouse (LCP ~800 ms; FID <10 ms; CLS <0.01)
- Automatic font caching; image CDN; lazy loading; pageless scrolling
- Debug/log framework with pinpoint stack traces and alerts
- Analytics dashboard: CTR, conversion funnels, geo heatmaps
NEXT_PUBLIC_APP_URL=https://ecommerce-dravasp.vercel.app
NODE_ENV=production
JWT_SECRET=prod_jwt_secret
PREVIEW_SECRET=prod_preview_secret
# Database
PGHOST=<AWS_IP> PGPORT=5432 PGUSER=postgres PGPASSWORD=postgres PGDATABASE=ecommerce
# Redis
REDIS_URL=redis://<AWS_IP>:6379
# CCAvenue
CCAVENUE_MERCHANT_ID=TEST_MID
CCAVENUE_WORKING_KEY=TEST_WK
CCAVENUE_ACCESS_CODE=TEST_AC
# SMS & WhatsApp
KAL_KEY=KAL_PROD_KEY
JIO_KEY=JIO_PROD_KEY
DLT_TEMPLATE_ID=DLT_TEMPLATE
# Webhooks
WEBHOOK_BASE_URL=https://ecommerce-dravasp.vercel.app/api/webhooks-
Customer Flow
- Browse storefront, import products via Google Sheets CSV.
- Add to cart (2-click confirm), checkout (CCAvenue, UPI QR, BNPL).
- Receive SMS/WhatsApp/email/push at each status update.
-
Admin Flow
- Log in at
/admin. - Upload tax/pincode sheets; generate invoices (GSTIN/HSN validation via CBIC).
- Export year-wise archives; manage users; view analytics.
- Log in at
-
Security & Compliance
- Verify
/.well-known/security.txt. - Check cookie-consent banner and DPIA link.
- Test right-click disable, CSP headers, HSTS, EV TLS certificate.
- Verify
Below is a high-level wireframe of your Redis + PostgreSQL-backed store, followed by estimated performance and scaffold-generation times. Let me know if you’d like to adjust colors, layouts, or feature priorities before we spin up any code.
┌──────────────────────────────────────────────────────────────────┐
│ [Logo] Search bar 🇮🇳 EN ▼ 🛒(0) 👤 │
├──────────────────────────────────────────────────────────────────┤
│ [ Hamburger ] Home Categories Offers Wallet Help More ▼ │
├──────────────────────────────────────────────────────────────────┤
│ HERO ROTATOR:
│ ┌────────────────────────────────────────────────────────────┐
│ │ Big seasonal banner with CTA (Shop Now ➔) │
│ └────────────────────────────────────────────────────────────┘
│ │
│ ◎ • ◉ ● (autoplay, swipe to pause) │
├───────────────────────────────────┬───────────────────────────────┤
│ SIDEBAR FILTERS │ FEATURED PRODUCTS GRID │
│ • Category │ ┌───────────┬───────────┬───────┐│
│ • Price range slider │ │ Prod img │ Prod img │ … ││
│ • Pincode serviceable (input) │ ├───────────┼───────────┼───────┤│
│ • Availability │ │ Title │ Title │ … ││
│ • Discounts │ └───────────┴───────────┴───────┘│
│ │ [Load more…] │
├──────────────────────────────────────────────────────────────────┤
│ Newsletter signup | Social links | Payment badges | Trustmarks │
├──────────────────────────────────────────────────────────────────┤
│ Footer: Company Info | TOS | Privacy | SLA | Security.txt link │
└──────────────────────────────────────────────────────────────────┘
- Dark / Light mode toggle (auto by OS preference)
- 2-click “Add to Cart” pop-up confirmation
- QR-UPI “Scan & Pay” button on product page
- Cookie-consent banner with full DPIA link
- Inline “Buy Now, Pay Later” option near checkout
| Metric | Estimated Time |
|---|---|
| Backend scaffold (Redis + Postgres) | 2,000 ms |
| Frontend scaffold (Next.js + Tailwind) | 1,200 ms |
| Single React component generation | 150 – 250 ms |
| CI build + lint + type-check | 4,500 ms |
| Time to First Byte (TTFB) | ~100 ms on AWS/GCP |
| Largest Contentful Paint (LCP) | ~800 ms |
| First Input Delay (FID) | < 10 ms |
| Cumulative Layout Shift (CLS) | < 0.01 |
| Full page load (mobile, 3G emulation) | ~1,200 ms |
- Confirm design tweaks: color palette, custom layouts (e.g., 2×2 vs. 4×4 grids).
- Prioritize modules—would you like to start with:
- Database schema & API endpoints (products, pincodes, taxes)
- Authentication & payment gateway integration
- Frontend component library & theming
- Share brand assets (logos, fonts, primary/secondary colors) for a refined mock-up.
Extended Preview