RiZBiD is a full-stack, real-time verified bidding platform.
Core business model:
- Sellers submit products to RiZBiD for office verification.
- Admin approves/disapproves listings before publishing.
- Bidders register during a registration window.
- Live bidding starts after registration closes.
- Winner pays.
- RiZBiD handles shipping (7-14 days).
- Winner confirms
Product Receivedto close lifecycle.
- Notification leakage: some live notifications were broadcast globally to all users.
- Payment UI race: winner could still see
Proceed to Paymentafter successful payment if webhook sync lagged. - Image reliability: cross-browser/profile image loading could fail without graceful fallback.
- Frontend startup load: large initial JS bundle due to eager page imports.
- Socket efficiency: auction detail page had suboptimal socket lifecycle.
- Marketing automation missing: no recurring monthly promotional campaign scheduler.
- Documentation drift: old escrow-focused and BidPulse-era docs were out of date.
- Targeted notification delivery by user/admin socket rooms.
- Payment reconciliation fallback to sync paid state reliably.
- One-time payment safeguards and shipping-state transition.
- Robust image URL normalization + runtime fallback.
- Route-level lazy loading to reduce initial bundle.
- Cleaner socket connect/disconnect lifecycle in auction detail page.
- Recurring monthly promotional email campaign (Jan-Dec), 15th every month, repeats yearly.
- Dedupe/send-tracking for promotional emails via MongoDB log model.
- README fully updated to current RiZBiD architecture and flows.
flowchart LR
C[React + Vite] --> API[Express API]
C <--> WS[Socket.io]
API <--> WS
API --> DB[(MongoDB)]
API --> STRIPE[Stripe]
API --> CLOUD[Cloudinary]
API --> MAIL[Brevo / Resend / SMTP]
- Seller submits listing request.
- Admin reviews and either:
- Approves: listing moves to
future. - Disapproves: seller receives reason.
- Approves: listing moves to
- Bidders register during configured registration window.
- If 0 registrations:
- Seller may withdraw (
$9.99) or relist lower ($14.99).
- Seller may withdraw (
- If 1 registration:
- Single bidder wins at starting price.
- If >=2 registrations:
- Live bidding starts with first two registrants.
- 10-second turn cycle + give-up queue logic.
- Winner pays.
- RiZBiD handles shipping (7-14 days).
- Winner confirms
Product Received. - Auction closes (
closed).
completed-> winner can start checkout.- On payment success ->
paid_shipping_pending. - Seller payout computed immediately (5% commission, 95% seller amount).
- Winner sees
Product Receivedbutton. - On confirm received ->
closed.
- Duplicate checkout blocked if payment already completed.
- Active session lock prevents concurrent duplicate payment sessions.
confirm-successendpoint validates Stripe session from success page.reconcileendpoint syncs status from stored Stripe session if webhook was delayed.
Realtime notifications now route to:
user:<id>room for user-targeted events.role:adminroom for admin-targeted events.
No global broadcast for sensitive lifecycle events (payment, failure, approval, payout, receipt, etc.).
- Cron: every month on the 15th at 10:00.
- Repeats automatically every year.
- Timezone configurable with
PROMOTIONAL_EMAIL_TIMEZONE(defaultUTC).
PromotionalEmailLogmodel stores(user, year, month)unique records.- Prevents duplicate sends during restarts/retries.
- Verified, non-banned users with a valid email.
- January Kickoff: Verified Deals to Start the Year
- February Spotlight: Limited Future Bids Open
- March Momentum: Upgrade Season Starts on RiZBiD
- April Advantage: Smart Bidders Register Earlier
- May Drop: New Verified Listings Released
- June Mid-Year Deals: Bid with Confidence
- July Priority Access: Best Upcoming Bids
- August Insider List: Top Performing Categories
- September Power Bids: Verified Listings Expanding
- October Premium Cycle: High-Value Bidding Week
- November Peak Season: Register for Priority Bids
- December Year-End Event: Final Verified Deals
backend/models/PromotionalEmailLog.jsbackend/utils/emailTemplates.js(12 campaign templates)backend/server.js(cron + startup catch-up)
- Endpoint:
POST /api/admin/promotional/trigger - Body options:
month(1-12, optional; defaults to current month)year(optional; defaults to current year)dryRun(true/false, optional)forceSend(true/false, optional; bypasses monthly dedupe)
Example:
{
"month": 2,
"year": 2026,
"dryRun": false,
"forceSend": true
}- Route-level lazy loading for page modules (
React.lazy+Suspense). - AuctionDetails socket lifecycle optimized (connect only when needed, proper teardown).
- Image helper fallback prevents broken-image rendering stalls.
- Targeted socket emission reduces unnecessary event traffic.
- Promotional send dedupe prevents repeat work.
- Initial chunk size reduced significantly by route splitting.
- Pages are now served as separate chunks for faster first load.
POST /api/auth/registerPOST /api/auth/loginGET /api/auth/mePUT /api/auth/updatedetailsPOST /api/auth/send-verification-otpPOST /api/auth/verify-email-otp
GET /api/auctionsGET /api/auctions/:idPOST /api/auctionsPUT /api/auctions/:idDELETE /api/auctions/:idPOST /api/auctions/:id/registerPOST /api/auctions/:id/bidPOST /api/auctions/:id/give-upPOST /api/auctions/:id/no-registration-decision
POST /api/payment/checkout/:auctionIdPOST /api/payment/confirm-successPOST /api/payment/reconcile/:auctionIdPOST /api/payment/confirm-received/:auctionIdPOST /api/webhook
GET /api/admin/statsGET /api/admin/usersGET /api/admin/auctionsPUT /api/admin/users/ban/:idDELETE /api/admin/users/:idDELETE /api/admin/auctions/:idPOST /api/admin/promotional/trigger
NODE_ENV=production
PORT=5000
MONGO_URI=...
JWT_SECRET=...
JWT_EXPIRE=30d
CLIENT_URL=http://localhost:5173
CORS_ORIGIN=http://localhost:5173
CORS_ORIGINS=http://localhost:5173
ADMIN_EMAIL=...
ADMIN_PASS=...
STRIPE_SECRET_KEY=...
STRIPE_WEBHOOK_SECRET=...
CLOUDINARY_CLOUD_NAME=...
CLOUDINARY_API_KEY=...
CLOUDINARY_API_SECRET=...
CLOUDINARY_FOLDER=rizbid
# Promo campaign scheduler timezone
PROMOTIONAL_EMAIL_TIMEZONE=UTC
# Preferred mail provider
BREVO_API_KEY=...
BREVO_SENDER_EMAIL=...
BREVO_SENDER_NAME=RiZBiDVITE_API_URL=http://localhost:5000/api
VITE_SOCKET_URL=http://localhost:5000Backend:
cd backend
npm install
npm run devFrontend:
cd frontend
npm install
npm run devBuild:
cd frontend
npm run build- Add integration tests for payment/webhook/reconcile/receipt flow.
- Add notification preference controls (user can mute promo or specific categories).
- Add queue-based job processing (BullMQ) for high-volume email sends.
- Add tracing/request IDs across API + websocket events.
- Add Redis adapter for socket room scaling in multi-instance deployments.
MIT