Social2gether is a modern full-stack social media web application where people can connect, share, and communicate in real time.
It features user profiles, friend connections, image posting, instant messaging, and video calling powered by Netty Sockets.
- Register & login (JWT authentication)
- Manage personal profile (avatar, bio, etc.)
- Send & accept friend requests
- View friends list & online presence
- Create posts with images
- Like & comment on posts
- Newsfeed with friends’ activities
- One-to-one instant messaging
- Typing indicators & message history
- Online/offline status
- Peer-to-peer video calling (WebRTC)
- Call notifications & status handling
- JWT-based authentication
- BCrypt password hashing
- Token validation for sockets
Backend
- Java 21, Spring Boot
- Netty Socket.IO (real-time communication)
- MySQL 8.1.0
- Spring Security + JWT
Frontend
- React.js (Hooks + Context API)
- Axios (API calls)
- Socket.IO Client
- Tailwind CSS (UI design)
Infrastructure
- Docker & Docker Compose
- Maven (build system)
- Cloudinary (optional media storage)
Socaial2gether/
├── Backend/ # Spring Boot backend
│ ├── src/main/java/... # Controllers, Services, Models
│ ├── src/main/resources/ # application.properties
│ └── pom.xml # Maven build file
│
├── Frontend/myapp/ # React frontend
│ ├── public/ # Static assets
│ ├── src/ # Components, Pages, Context
│ ├── package.json # Dependencies & scripts
│ └── tailwind.config.js # Tailwind setup
│
├── Dockerfile # Docker build file
├── docker-compose.yml # Multi-container setup (if present)
└── README.md # Documentation
⚙️ Installation & Setup
🔧 Prerequisites
Java 21+
Maven
Node.js v18+
MySQL 8+
Docker
(optional)
cd Backend/
# Configure database in src/main/resources/application.properties
spring.datasource.url=jdbc:mysql://localhost:3306/social2gether
spring.datasource.username=root
spring.datasource.password=yourpassword
# Build & run backend
mvn spring-boot:run
Backend runs on: http://localhost:8080
▶️ Frontend Setup
cd Frontend/myapp/
npm install
npm start
Frontend runs on: http://localhost:3000
▶️ Docker (Optional)
# Build images
docker build -t socaial2gether-backend Backend/
docker build -t socaial2gether-frontend Frontend/myapp/
# Or run both via docker-compose
docker-compose up --build
⚙️ Configuration
Key Description Example / Default
DB URL Database connection string jdbc:mysql://localhost:3306/social2gether
DB User Database username root
DB Password Database password yourpassword
JWT Secret Secret for signing JWT tokens your-secret-key
Ports Backend API & socket ports 8080 (API), 9090 (Sockets)
📸 Screenshots (Add Later)
Feature Preview
User Profile (screenshot here)
News Feed (screenshot here)
Chat Interface (screenshot here)
Video Call (screenshot here)
🛡️ Security
Passwords stored with BCrypt hashing
JWT authentication for REST APIs and WebSockets
Role-based access (user authentication checks)
🛣️ Roadmap
Group chat & group video calls
Notifications (real-time + email)
Stories / Status updates
Mobile app (React Native)
CI/CD pipeline (GitHub Actions + Docker Hub)
🤝 Contributing
Fork this repo
Create a new branch: feature/your-feature
Commit changes with clear messages
Push branch & create a PR