Skip to content
RKB
Md Abdur Razzak Rakib
Dating & Social

Vivaleve

Dating & Social Platform for STI Community

A privacy-first modular monolithic backend API and real-time social engine for individuals living with STI conditions (HPV, HIV, HSV-1/2)—enabling match discovery via swipes, post feeds, winks, blogs, events, first-date ideas, and Stripe-powered premium messaging and private albums.

What was the measurable impact?

Flushes thousands of buffered social interactions per minute with sub-20ms database queries

What problem did Vivaleve solve?

High-volume social interaction (likes, comments, profile discovery, real-time messaging) caused heavy MongoDB write contention and HTTP event loop lag, while handling sensitive health status privacy, background email delivery, and payment paywalls.

How was Vivaleve solved?

Architected a modular monolith using Express, TypeScript, and MongoDB. Offloaded high-frequency post likes to a write-behind Redis buffer flushed periodically via cron, established asynchronous RabbitMQ message queues for email delivery, post dispatches, comment caching, and notifications, and integrated raw-body Stripe webhook processing and Sharp image blurring for protected asset previews.

How is Vivaleve architected?

Modular Monolith with Write-Behind Redis Buffering, RabbitMQ Queues & Stripe Webhooks

Maintains clear domain boundary separation across feature modules while offloading high-traffic social writes to Redis buffers and heavy async tasks (emails, notifications, media processing) to isolated RabbitMQ worker consumers.

  • Write-behind Redis post like buffer (bufferLike/bufferUnlike) with node-cron periodic flush to MongoDB
  • Asynchronous RabbitMQ message queues for signup emails, post dispatches, comment caching, and notification delivery
  • Stripe webhook pipeline registered prior to express.json() for uncorrupted raw buffer signature verification
  • Sharp image processing pipeline creating blurred preview variants for privacy-protected media before premium unlock

What was hard to build in Vivaleve?

Challenge 1

High-traffic post like actions created excessive synchronous MongoDB write contention and HTTP event loop latency during peak social activity.

How it was solved

Architected a write-behind Redis buffering layer (bufferLike/bufferUnlike) where displayed counts compute dynamically from MongoDB + Redis delta, flushed periodically via node-cron (*/1 * * * *).

Challenge 2

Stripe webhook signature verification failures caused by standard Express automatic JSON body parsing.

How it was solved

Mounted the raw-body Stripe webhook route (/api/stripe/webhook) prior to global express.json() middleware, ensuring payload buffer integrity.

What can Vivaleve do?

  • Mutual swipe match discovery algorithm based on gender preferences, livingWith STI status, and location
  • Write-behind post like buffering in Redis (bufferLike/bufferUnlike) flushed asynchronously to MongoDB via node-cron
  • Asynchronous RabbitMQ message broker managing email queues, post processing, comment caching, and notification dispatches
  • Stripe billing pipeline with checkout sessions, packages, and raw-body webhook signature verification
  • Granular Role-Based Access Control (USER, ADMIN, SUPER_ADMIN) & premium membership gating (blogs, private albums, messaging)
  • Sharp image processing generating blurred preview variants for privacy-protected user media
  • Real-time Socket.IO connection handling & event notifications for instant social updates
  • Winston daily-rotated logger with Morgan HTTP traffic streaming and Zod input schema validation

What tech stack does Vivaleve use?

TypeScriptNode.jsExpress.jsMongoDBMongooseRedisRabbitMQSocket.ioStripeZodSharpDocker