https://github.com/balaganapathitech/whatapplld
This project implements a basic WhatsApp-like messaging system using Java, JDBC, and SQL. It allows users to register, send encrypted messages, post/view stories, and retrieve messages securely using AES encryption. The messages are stored in a MySQL database and can only be decrypted by the intended recipient, ensuring end-to-end encryption.
https://github.com/balaganapathitech/whatapplld
database lld sql whatsapp
Last synced: 6 months ago
JSON representation
This project implements a basic WhatsApp-like messaging system using Java, JDBC, and SQL. It allows users to register, send encrypted messages, post/view stories, and retrieve messages securely using AES encryption. The messages are stored in a MySQL database and can only be decrypted by the intended recipient, ensuring end-to-end encryption.
- Host: GitHub
- URL: https://github.com/balaganapathitech/whatapplld
- Owner: BalaganapathiTech
- Created: 2025-03-01T10:26:58.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2025-03-01T10:37:59.000Z (11 months ago)
- Last Synced: 2025-03-01T11:27:02.165Z (11 months ago)
- Topics: database, lld, sql, whatsapp
- Language: Java
- Homepage:
- Size: 0 Bytes
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
**📌 Features**
✅ **User Registration** – Users can sign up with a username & password.
✅ **End-to-End Encrypted Messaging** – Messages are securely stored & only readable by the intended recipient.
✅ **View Messages** – Retrieve & decrypt received messages.
✅ **Post & View Stories** – Users can share stories visible to all.
✅ **Secure Storage** – Data is stored in MySQL using JDBC.
---
**🛠️ Technologies Used**
- **Programming Language:** Java
- **Database:** MySQL
- **JDBC:** For database connectivity
- **Security:** AES Encryption for secure messaging
- **GitHub:** Version control
---
**📥 Installation & Setup**
1️⃣ **Clone the Repository**
```bash
git clone https://github.com/BalaganapathiTech/WhatappLLD.git
cd WhatsappLLD
```
2️⃣ **Setup MySQL Database**
- Create a database named `WhatsAppDB`.
- Run the provided SQL script (`schema.sql`) to set up tables.
3️⃣ **Configure Database Connection**
- Update `DBConfig.java` with your MySQL credentials:
```java
private static final String URL = "jdbc:mysql://localhost:3306/WhatsAppDB";
private static final String USER = "root";
private static final String PASSWORD = "your_password";
```
**📌 How It Works**
**1️⃣ User Registration**
```plaintext
Enter Username: BalaGanapathi
Enter Password: ********
✅ User registered successfully!
```
**2️⃣ Send an Encrypted Message**
```plaintext
Enter Sender ID: 1
Enter Receiver ID: 2
Enter Message: Hello, how are you?
📩 Message sent successfully!
```
**3️⃣ View Messages (Decrypted)**
```plaintext
Enter Your User ID: 2
📩 Your Messages:
From User 1: Hello, how are you?
```
---
**🔐 Security (End-to-End Encryption)**
- Messages are encrypted using **AES encryption** before storing in the database.
- Only the **recipient** can decrypt and read the message.
- Ensures **privacy & security** of user communications.
---
**📜 Database Schema (MySQL)**
```sql
CREATE TABLE users (
user_id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(255) UNIQUE NOT NULL,
password VARCHAR(255) NOT NULL
);
CREATE TABLE messages (
message_id INT AUTO_INCREMENT PRIMARY KEY,
sender_id INT,
receiver_id INT,
encrypted_message TEXT,
FOREIGN KEY (sender_id) REFERENCES users(user_id),
FOREIGN KEY (receiver_id) REFERENCES users(user_id)
);
```
---
**📌 Future Enhancements**
✅ Real-time messaging using WebSockets
✅ Multimedia support (images, videos)
✅ User status & last seen
✅ Friend requests & blocking
---
**💡 Contributing**
1. Fork the repo
2. Create a new branch (`feature-branch`)
3. Commit your changes
4. Open a pull request
---
**📜 License**
This project is **open-source**
📬 **Questions?** Feel free to raise an issue or contact me! 🚀