README.md (2049B)
1 # WhatsApp Logger 2 3 A self-hosted, privacy-focused tool to log WhatsApp messages to Firebase Firestore. This application acts as a companion device, storing incoming text messages and timestamps in a database even if the sender subsequently deletes or edits them. 4 5 ## Features 6 7 - **Anti-Delete/Anti-Edit:** Stores the original message content immediately upon receipt. 8 - **Silent Logging:** To ensure privacy and security, this application does NOT print any message content, sender numbers, or sensitive data to the server terminal or logs. 9 - **Search & Filter:** Frontend interface includes date-based filtering and text search. 10 - **Export:** Download chat logs as .txt files. 11 - **Separated Architecture:** Frontend and Backend can operate on different infrastructure/domains. 12 13 ## Architecture 14 15 1. **Backend (Node.js/Baileys):** Connects to WhatsApp servers. Serves the QR code for authentication. Pushes encrypted data to Firestore. 16 2. **Database (Firebase Firestore):** Stores messages in a structured format separated by sender ID. 17 3. **Frontend (HTML/JS):** A static web page to view, search, and export logs. 18 19 ## Installation 20 21 ### Backend Setup (Render/VPS) 22 23 1. Clone this repository. 24 2. Run `npm install`. 25 3. Set up a Firebase project (Project B) and generate a Service Account Key. 26 4. Place the service account JSON in the root or set it as an environment variable. 27 5. Deploy to a server (e.g., Render). 28 6. Access the root URL of your deployed server to view the QR code. 29 7. Scan the QR code with WhatsApp (Linked Devices). 30 31 ### Frontend Setup 32 33 1. Edit the `index.html` (or config file) to include the Firebase Web Config for Project B. 34 2. Deploy the static files to your hosting provider (e.g., Firebase Hosting Project A). 35 3. Access your domain (e.g., https://amit.is-a.dev/wp-chat/). 36 37 ## Usage 38 39 Once linked, the system runs automatically. Use the frontend to view logs. The server requires no manual intervention unless the session expires. 40 41 ## License 42 43 Distributed under the MIT License. See `LICENSE` for more information.