Monzim
NestJS
PostgreSQL
MongoDB
Redis
Cloudflare R2

Friniemy: Where Real Friendships Begin

A privacy-first social media platform that blends friendships with playful rivalries. Features crush matching, aura-based rankings, anonymous messages, and a dual-bucket media architecture that enforces privacy at the infrastructure level.

Azraf Al Monzim
Friniemy: Where Real Friendships Begin cover

Project Overview

Friniemy is a gamified social experience for young adults, combining essential social features with unique twists like secret crush matching, location-based leaderboards, and who-viewed-you tracking. Built with NestJS, PostgreSQL, MongoDB, Redis, and Cloudflare R2, it features a privacy-first dual-bucket architecture where public content is served via CDN while private content requires cryptographically signed URLs with automatic expiration.

What happens when you blend the excitement of friendships with the intrigue of rivalries? You get Friniemyβ€”a fresh, engaging social media platform designed to foster genuine connections through fun, gamified interactions while putting privacy first.

🎯 The Vision

Social media has become predictable. The same feeds, the same interactions, the same lack of genuine connection. I wanted to create something differentβ€”a platform where young adults could discover who's really interested in them, compete playfully with friends, and share moments without sacrificing privacy.

Friniemy isn't just another social app. It's a gamified social experience where every interaction matters, every view counts, and authenticity is rewarded.


✨ What Makes Friniemy Different

πŸ’˜ Crush Match System

Ever wondered if someone likes you back? With Friniemy's secret crush matching, you can mark someone as your "crush"β€”and if they do the same, you both get notified. It's like a mutual confession system that makes connections exciting and risk-free.

🌟 Aura System & Leaderboards

Your social presence has value. The Aura system quantifies your popularity through endorsements, comments, and viewsβ€”even split by gender interactions for nuanced insights. Compete on location-based leaderboards to see who's trending in your city or country.

πŸ‘€ Who Viewed You

Curiosity satisfied. See who's been checking out your profile and posts (with their consent, of course). It adds a layer of intrigue to every interactionβ€”knowing someone took the time to look at your content.

πŸ’¬ Anonymous Messages

Sometimes you want to say something without revealing who you are. Send anonymous messages to anyone, sparking conversations that might never happen otherwise. Secret confessions, honest feedback, or just mysterious fun.

🚫 Set as Ex

Blocking someone shouldn't be awkward. "Set as Ex" is our playful take on blockingβ€”hide their content, stop interactions, and move on with a smile.


πŸ› οΈ The Tech Behind the Magic

Building a social platform that handles real-time interactions, media sharing, and privacy controls at scale requires serious engineering. Here's what powers Friniemy:

Backend Architecture

  • NestJS - Enterprise-grade Node.js framework for scalable APIs
  • PostgreSQL - Relational data for users, friendships, and reactions
  • MongoDB - Document storage for posts, media metadata, and flexible content
  • Redis - Real-time online status, typing indicators, and caching
  • Bull Queues - Background job processing for media and notifications

Real-Time Features

  • WebSockets - Instant messaging, notifications, and live updates
  • Redis Pub/Sub - Scalable event broadcasting across servers

Media Infrastructure

  • Cloudflare R2 - S3-compatible storage with global CDN
  • Sharp - High-performance image processing
  • FFmpeg - Video and audio transcoding
  • Dual-Bucket Architecture - Privacy-enforced storage separation

πŸ” Privacy-First Architecture

One of my proudest achievements with Friniemy is the dual-bucket media architecture. Traditional social platforms often rely on application-level privacy checks that can be bypassed. We took a different approach:

The Problem

When you add a custom domain to cloud storage, files become publicly accessible. Anyone with a URL could access "private" contentβ€”a major security flaw.

Our Solution

Public Bucket (cdn.friniemy.com)

  • Open posts served via CDN
  • Permanent URLs, cached globally
  • Lightning-fast delivery worldwide

Private Bucket (No custom domain)

  • Friends-only and private content
  • Cryptographically signed URLs with expiration
  • 5-15 minute access windows
  • Impossible to share or bypass
OPEN content  β†’ Public Bucket β†’ Direct CDN URL (no expiration)
FRIENDS content β†’ Private Bucket β†’ Signed URL (15 min expiry)
PRIVATE content β†’ Private Bucket β†’ Signed URL (5 min expiry)

When users change post privacy, media automatically migrates between buckets in the background. Privacy isn't just enforced in codeβ€”it's enforced at the infrastructure level.


πŸ“Š System Architecture Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        CLIENT LAYER                          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Mobile App  β”‚  Web App  β”‚  Admin Dashboard  β”‚  WebSocket   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
                              β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      API GATEWAY (NestJS)                    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Auth  β”‚  Rate Limiting  β”‚  Validation  β”‚  Logging          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β–Ό                     β–Ό                     β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   PostgreSQL  β”‚    β”‚    MongoDB    β”‚    β”‚     Redis     β”‚
β”‚  Relational   β”‚    β”‚   Documents   β”‚    β”‚    Cache      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🎨 Core Features

Content & Sharing

  • Rich Posts - Text, photos, videos, captions, and hashtags
  • Stories - Ephemeral 24-48 hour content with music overlays
  • Highlights - Curated permanent collections on your profile
  • Post Pinning - Showcase 1-3 favorite posts at the top

Social Connections

  • Follow/Friend System - Unilateral follows or mutual friendships
  • Real-Time Chat - Direct messaging with read receipts
  • Reactions & Comments - Multiple emoji reactions and threaded discussions
  • Last Interaction Time - See when friends last engaged with you

Discovery

  • Explore Section - Trending hashtags and popular users
  • Smart Search - Find users, hashtags, and content
  • Who Searched for Me - Opt-in to see recent profile searches

Safety

  • Reporting System - Auto-prioritized moderation queue
  • Privacy Controls - Public, Friends-Only, or Private content
  • Profile View Controls - Opt-in for tracking features

πŸ“± Platform Status

Platform

Status

Backend API

🟒 In Development

Mobile App

🟑 Coming Soon

Web App

🟑 Coming Soon

Admin Dashboard

🟒 In Development


πŸ—οΈ Engineering Challenges Solved

Signed URL Performance

Generating signed URLs for feeds with 50+ posts was taking 3+ seconds. Solution: Parallel generation with Promise.all() and smart batching reduced this to ~220msβ€”a 13x improvement.

Cache Invalidation at Scale

Privacy changes affected thousands of cached feeds. Solution: Targeted invalidation with staggered refresh prevents cache stampede while maintaining consistency.

Race Conditions in Privacy Migration

Rapid privacy changes caused files to end up in wrong buckets. Solution: Idempotent migrations with version tracking ensure data integrity even under concurrent modifications.

Video Processing Bottleneck

Large videos blocked the entire media queue. Solution: Priority queues with separate workers for images, videos, and audioβ€”images process instantly regardless of video queue depth.


πŸ“š Technical Blog Series

I'm documenting the entire journey of building Friniemy. The first post covers the media architecture in detail:

Building a Privacy-First Media Sharing System β†’

Upcoming posts in the series:

  • Real-time Notifications at Scale: WebSockets, Redis Pub/Sub, and Bull Queues
  • Dual-Database Strategy: Why We Use PostgreSQL AND MongoDB
  • Building a Privacy-Aware Friend Recommendation System
  • End-to-End Encryption for Direct Messages

πŸš€ What's Next

Friniemy is actively being developed. Here's what's on the roadmap:

  • Beta Launch - Early access for waitlist subscribers
  • AI Companion - Your digital friend for personalized interactions
  • Audio Posts - Voice your thoughts in a new format
  • Advanced Analytics - Deeper insights into your social presence
  • Open API - Developer access for third-party integrations

πŸ’­ Why I'm Building This

Social media should bring people together, not just keep them scrolling. I wanted to create a platform where:

  • Curiosity is rewarded - Know who's interested in you
  • Privacy is default - Your content, your control
  • Connections are real - Gamification that encourages genuine interaction
  • Competition is fun - Leaderboards and aura that make engagement exciting

Friniemy is my vision of what social media should beβ€”playful, private, and genuinely social.


Join 1,000+ people on the waitlist. Be among the first to experience where real friendships begin.

Technologies:
NestJS
PostgreSQL
MongoDB
Redis
Cloudflare R2
WebSockets
Bull Queues
TypeScript
Privacy
Social Media
Real-Time
Media Processing
FFmpeg
Sharp
Docker
Microservices