Skip to content

Repository files navigation

FriendsHub

A full-stack social media platform with real-time chat, end-to-end encryption, and ephemeral stories.

🌐 Live Demo  ·  API Docs  ·  Deploy Guide  ·  Contribute

CI Java Spring Boot React License


About

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

Architecture

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"]
Loading
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)

Getting Started

# 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:5173

See Deployment Guide for production setup on Render + Vercel.


Documentation

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

Contributing

Contributions are welcome! Please read the Contributing Guide and Code of Conduct before submitting a PR.

License

MIT — built by Jay Anand

About

A full-stack social media platform built with Spring Boot and React featuring posts, stories, realtime chat, notifications, group messaging, and advanced privacy controls with JWT authentication and cloud media storage.

Resources

Code of conduct

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages