An open API service indexing awesome lists of open source software.

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.

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! 🚀