A Java-based social media application with a graphical user interface that allows users to connect, message, and manage their social network. Built with Java Swing for the frontend and file-based storage for the backend.
- User Authentication: Login and registration system
- Real-time Messaging: Direct messaging between users with WhatsApp-style chat bubbles
- Friend Management: Add, remove, and view friends
- Block System: Block and unblock users
- Profile Management: Edit username, password, profile picture, and bio
- Message Management: Send, edit, and delete messages
- Modern GUI: Dark theme with intuitive user interface inspired by popular social media platforms
- Backend: Java (JDK 8+)
- Frontend: Java Swing (GUI)
- Storage: File-based database (text files)
- Networking: Java Socket programming
- Testing: JUnit 4
VibeSocialMedia/
├── SocialClient.java # Main client application with GUI
├── SocialServer.java # Server application
├── SocialClientTest.java # Client test cases
├── SocialServerTest.java # Server test cases
├── Database/
│ ├── Data/
│ │ ├── userInfo.txt # User profile information
│ │ ├── friends.txt # Friend relationships
│ │ ├── blocked.txt # Blocked user relationships
│ │ ├── msgs.txt # Message history
│ │ └── userPassword.txt # User authentication data
│ ├── ProfilePicture/
│ │ └── default.png # Default profile picture
│ └── logo.jpg # Application logo
├── ServerException/
│ ├── ClientDataException.java
│ ├── CustomException.java
│ ├── InvalidInputException.java
│ └── UserNotFoundException.java
└── lib/ # JUnit testing libraries
- Java Development Kit (JDK) 8 or higher
- Git (for cloning the repository)
-
Clone the repository
git clone <repository-url> cd VibeSocialMedia
-
Compile the Java files
javac -cp "lib/*" *.java ServerException/*.java
-
Open a terminal/command prompt
-
Navigate to the project directory
-
Run the server
java SocialServer
The server will start on port 4242 and display:
Server running on port 4242...
-
Open another terminal/command prompt
-
Navigate to the project directory
-
Run the client
java SocialClient
The client will connect to
localhost:4242and open the login GUI.
-
Login/Register:
- Enter username and password
- If the user doesn't exist, you'll be prompted to create an account
- If the user exists, enter the correct password to login
-
Main Features:
- Chat: Click on any user in the chat list to start messaging
- Friends: Add and manage friends from the friends panel
- Block: Block unwanted users from the blocked panel
- Profile: Edit your profile information including picture and bio
- Search: Search for users to add as friends
The application uses text files for data storage:
- userInfo.txt:
username | password | profilePicture | bio - friends.txt:
username | friend1 | friend2 | ... - blocked.txt:
username | blockedUser1 | blockedUser2 | ... - msgs.txt:
sender | receiver | message1 ; message2 ; ... - userPassword.txt:
username | password
- Port: 4242 (default)
- Host: localhost
- Max Connections: Unlimited (multi-threaded)
- Server Address: 127.0.0.1
- Server Port: 4242