{"_id":"@auravinsmoke/nataforwa","name":"@auravinsmoke/nataforwa","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@auravinsmoke/nataforwa","version":"1.0.0","description":"Nata - Monitor WhatsApp contact activity, typing indicators, and online status in real-time","main":"index.js","type":"module","bin":{"nata":"cli.js"},"scripts":{"start":"node index.js","setup":"node setup.js","init":"node init.js"},"keywords":["whatsapp","monitor","activity","typing","baileys","notification","tracker","presence"],"author":{"name":"auravinsmoke"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/auravinsmoke/nata.git"},"bugs":{"url":"https://github.com/auravinsmoke/nata/issues"},"homepage":"https://github.com/auravinsmoke/nata#readme","dependencies":{"@whiskeysockets/baileys":"^6.7.8","axios":"^1.7.7","dotenv":"^16.4.7","pino":"^9.4.0","qrcode-terminal":"^0.12.0","inquirer":"^9.2.12","chalk":"^5.3.0"},"engines":{"node":">=18.0.0"},"_id":"@auravinsmoke/nataforwa@1.0.0","gitHead":"536dcb4320f2a43ddcf4773bdc79918eed27c960","_nodeVersion":"22.23.1","_npmVersion":"10.9.8","dist":{"integrity":"sha512-+wZf2LpgGiMw1NDaGx3tuDmdFSmsUn75dLBoMNCzDbJ2ZwIN4VBDm0EWBzPiWCo74wRXzaqTeSfANtjrnpxevA==","shasum":"029872a1ee4acd4bfab9cb5691bce305c705ca0b","tarball":"https://registry.npmjs.org/@auravinsmoke/nataforwa/-/nataforwa-1.0.0.tgz","fileCount":14,"unpackedSize":60048,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIE7LEpzJFjEGXEmCYzZCYNoiIwdNcS4elwwAim0ljpZgAiBoyHkZO3uinx2XFBrScc8EmtxwYHk3AsfdB9gyxZi2Cg=="}]},"_npmUser":{"name":"kaniska","email":"sofiyasenthilkumar@gmail.com"},"directories":{},"maintainers":[{"name":"kaniska","email":"sofiyasenthilkumar@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nataforwa_1.0.0_1786635183430_0.8778506035588631"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-13T15:33:03.232Z","1.0.0":"2026-08-13T15:33:03.567Z","modified":"2026-08-13T15:33:03.799Z"},"maintainers":[{"name":"kaniska","email":"sofiyasenthilkumar@gmail.com"}],"description":"Nata - Monitor WhatsApp contact activity, typing indicators, and online status in real-time","homepage":"https://github.com/auravinsmoke/nata#readme","keywords":["whatsapp","monitor","activity","typing","baileys","notification","tracker","presence"],"repository":{"type":"git","url":"git+https://github.com/auravinsmoke/nata.git"},"author":{"name":"auravinsmoke"},"bugs":{"url":"https://github.com/auravinsmoke/nata/issues"},"license":"MIT","readme":"# Nata\n\n[![npm version](https://badge.fury.io/js/nataforwa.svg)](https://www.npmjs.com/package/nataforwa)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nNata - Monitor WhatsApp contact activity, typing indicators, and online status in real-time with push notifications.\n\n## ✨ Features\n\n- 🔍 Real-time typing detection\n- 🟢 Online/offline status monitoring\n- 📊 RTT-based device state detection (Active/Standby/Offline)\n- 📝 Activity logging and statistics\n- 🔔 Push notifications via ntfy.sh\n- 🖼️ Profile picture and status change tracking\n- 📈 Analytics and response time tracking\n\n## 🚀 Quick Start\n\n### Option 1: Global Installation (Recommended)\n\n```bash\n# Install globally\nnpm install -g nataforwa\n\n# Run setup wizard\nnata setup\n\n# Start monitoring\nnata start\n```\n\n### Option 2: Local Installation\n\n```bash\n# Install locally\nnpm install nataforwa\n\n# Run setup\nnpx nata setup\n\n# Start monitoring\nnpx nata start\n```\n\n### Option 3: Clone and Run\n\n```bash\ngit clone https://github.com/yourusername/nata.git\ncd nata\nnpm install\nnpm run setup\nnpm start\n```\n\n## 📋 Setup Process\n\nThe setup wizard will ask you for:\n\n1. **Target phone number** - Phone number to monitor (with country code)\n2. **ntfy.sh topic** - (Optional) Topic name for push notifications\n3. **Contact map creation** - Auto-generates contact-map.json template\n\nAfter setup:\n1. Run `nata start` or `npm start`\n2. Scan QR code with WhatsApp (Settings → Linked Devices)\n3. Check console logs for the LID (Link ID)\n4. Update `contact-map.json` with the actual LID\n5. Restart the monitor\n\n## 📱 Getting the LID (Link ID)\n\nWhen you first run the bot and receive a message from the target contact, check the console logs. You'll see something like:\n\n```\nReceived message from: { lid: \"88978854269138@lid\", ... }\n```\n\nCopy that LID value and update your `contact-map.json`:\n\n```json\n{\n  \"1234567890\": {\n    \"lid\": \"88978854269138@lid\"\n  }\n}\n```\n\n## 🔔 Notifications Setup\n\n1. Install ntfy app from https://ntfy.sh\n2. Subscribe to your topic (set during setup)\n3. Get real-time notifications for:\n   - Typing events\n   - Online/offline status\n   - Device state changes\n   - Message received/sent\n\n## 📊 How It Works\n\n### Device State Detection\n\nUses RTT (Round Trip Time) probing:\n\n- **🟢 ACTIVE** (RTT < 900ms): Screen on / Active usage\n- **🟡 STANDBY** (RTT 900-5000ms): Screen off / Device locked\n- **🔴 OFFLINE** (RTT > 5000ms): Device offline or unreachable\n\n### Activity Tracking\n\nAutomatically tracks:\n- ⌨️ Typing events and durations\n- 🟢 Online/offline events\n- ⏱️ Message response times\n- 🖼️ Profile picture changes\n- 📝 Status/about changes\n- 📅 Daily activity patterns\n- 📊 RTT patterns by state\n\n### Files Generated\n\n- `activity.log` - Activity log with timestamps\n- `stats.json` - Statistics and analytics\n- `auth/` - WhatsApp authentication session\n\n## ⚙️ Configuration\n\n### Environment Variables (.env)\n\n```env\nTARGET_PHONE=1234567890\nNTFY_TOPIC=my_topic_name\n```\n\n### Contact Map (contact-map.json)\n\n```json\n{\n  \"1234567890\": {\n    \"lid\": \"88978854269138@lid\"\n  }\n}\n```\n\n## 🛠️ Commands\n\n```bash\nnata setup   # Run setup wizard\nnata start   # Start monitoring\nnata help    # Show help\n```\n\n## 📦 API Usage (Programmatic)\n\n```javascript\nimport { startMonitor } from 'nataforwa';\n\nstartMonitor({\n  targetPhone: '1234567890',\n  targetLid: '88978854269138@lid',\n  ntfyTopic: 'my_topic',\n  onTyping: (contact) => console.log(`${contact} is typing`),\n  onOnline: (contact) => console.log(`${contact} came online`),\n  onOffline: (contact) => console.log(`${contact} went offline`)\n});\n```\n\n## 🔒 Security & Privacy\n\n- ⚠️ Never commit the `auth/` folder (contains session data)\n- ⚠️ Never commit `.env` files with real credentials\n- ⚠️ Never commit `contact-map.json` with real phone numbers\n- ✅ Use environment variables for sensitive configuration\n- ✅ This is for educational purposes only\n- ✅ Ensure you have consent before monitoring any contacts\n\n## 🐛 Troubleshooting\n\n### QR Code not appearing\n- Ensure WhatsApp Web is not already logged in\n- Clear the `auth/` folder and try again\n\n### Connection issues\n- Check internet connection\n- Verify WhatsApp account is not banned\n- Try restarting the bot\n\n### Missing notifications\n- Verify `NTFY_TOPIC` environment variable\n- Check ntfy.sh subscription\n- Test with: `curl https://ntfy.sh/your_topic -d \"test\"`\n\n### LID not found\n- Send a message from the target contact\n- Check console logs for LID\n- Update contact-map.json with the correct LID\n\n## 📄 License\n\nMIT © 2026\n\n## ⚠️ Disclaimer\n\nThis tool is for educational purposes only. Ensure you comply with WhatsApp's Terms of Service and obtain proper consent before monitoring any contacts. The authors are not responsible for any misuse of this tool.\n\n## 🤝 Contributing\n\nContributions welcome! Please read [CONTRIBUTING.md](CONTRIBUTING.md) first.\n\n## 📞 Support\n\n- 📫 Issues: [GitHub Issues](https://github.com/yourusername/nata/issues)\n- 💬 Discussions: [GitHub Discussions](https://github.com/yourusername/nata/discussions)\n\n## 🙏 Credits\n\nBuilt with:\n- [@whiskeysockets/baileys](https://github.com/WhiskeySockets/Baileys) - WhatsApp Web API\n- [ntfy.sh](https://ntfy.sh) - Simple pub-sub notifications\n","readmeFilename":"README.md","_rev":"1-3fe79170a475027f46f415dbe7a99307"}