A full-stack social media platform with real-time chat, end-to-end encryption, and ephemeral stories.
FriendsHub is a production-grade social networking platform where users can share posts, upload ephemeral stories, chat in real-time with end-to-end encryption, and explore their social graph — all wrapped in a responsive, modern UI.
Key highlights:
- E2EE Messaging — Direct and group chat encrypted client-side with ECDH + AES-256-GCM via Web Crypto API
- Real-time — STOMP over WebSocket for instant messaging, typing indicators, read receipts, and online presence
- Ephemeral Stories — 24-hour auto-expiring media stories with viewer analytics
- Smart Social Graph — Friend recommendations, compatibility scores, milestones, and network visualization
- Hardened Security — JWT + refresh tokens, OWASP XSS sanitization, Redis token blacklisting, rate limiting, and Row-Level Security on all tables
flowchart LR
Browser["React 19 SPA"] --> Boot["Spring Boot 3.4"]
Boot --> PG["PostgreSQL (Supabase)"]
Boot --> Redis["Redis (Upstash)"]
Boot --> Storage["Supabase Storage"]
Boot -.->|WebSocket| Browser
AdminUI["Angular Admin"] --> Node["Node.js Chat Service"]
Node --> Mongo["MongoDB Atlas"]
| Layer | Stack |
|---|---|
| Frontend | React 19, Vite, Tailwind CSS 4, Framer Motion |
| Backend | Java 17, Spring Boot 3.4, Spring Security, Spring Data JPA, WebSocket |
| Databases | PostgreSQL (Supabase) with Flyway · Redis (Upstash) · MongoDB Atlas |
| Infrastructure | Docker, GitHub Actions CI, Render (backend), Vercel (frontend) |
# Clone
git clone https://github.com/Jayanand07/Friends-Hub.git && cd Friends-Hub
# Configure
cp .env.example .env # fill in DB, JWT, Supabase, mail credentials
cp frontend/.env.example frontend/.env # fill in API URL and Supabase keys
# Start Redis
docker compose up -d
# Backend (Terminal 1)
mvn spring-boot:run # → http://localhost:8080/api
# Frontend (Terminal 2)
cd frontend && npm install && npm run dev # → http://localhost:5173See Deployment Guide for production setup on Render + Vercel.
Detailed guides live in the docs/ directory:
| Guide | What's inside |
|---|---|
| Project Overview | Architecture, features, and repo map |
| Backend Architecture | Controllers, services, security pipeline, async processing |
| Frontend Architecture | Components, routing, E2EE crypto, WebSocket client |
| API Reference | Every REST & WebSocket endpoint |
| Database Schema | 18 tables, ER diagram, indexes, Flyway migrations |
| Deployment Guide | Render, Vercel, Supabase, Docker setup |
| Chat Service | Node.js + MongoDB microservice |
Contributions are welcome! Please read the Contributing Guide and Code of Conduct before submitting a PR.