A WhatsApp bot using Baileys that silently monitors and logs all WhatsApp activities.
⚠️ DEVELOPMENT STATUS: This project is heavily under development. Many features described below are planned but not yet implemented or fully tested. Currently, only the basic backend monitoring functionality is working.
- 🔍 Basic Message Monitoring: Captures messages and logs them to database and files
- 🗄️ Database Storage: SQLite database with message storage
- 📝 File Logging: Comprehensive logging to files in
backend/data/logs/
- 🚀 Production Deployment: PM2 process management
- 📊 Real-time Dashboard: React-based web interface (not working)
- 📱 Media Handling: Automatic download and storage of media files (partially working)
- 🔐 Secure Access: JWT-based authentication (not implemented)
- Docker Support: Containerized deployment (not working)
- 🧪 Complete Test Coverage: Comprehensive test suite (in progress)
- Runtime: Node.js 22+ with TypeScript 5.8+
- WhatsApp Client: @whiskeysockets/baileys
- Database: better-sqlite3
- Web Framework: Express 5+
- Logger: winston
- Testing: Jest with ts-jest
- Framework: React 19 with TypeScript
- Build Tool: Vite 7
- Styling: Tailwind CSS 4
- State Management: React built-in hooks + Context API
- Testing: React Testing Library
- Direct Node.js: Run the backend service directly
- PM2 Process Management: Use PM2 for production deployment with auto-restart
- Manual Data Access: View captured data through:
- Log files in
backend/data/logs/
directory - SQLite database at
backend/data/database/your-database.db
- Use any SQLite browser/tool to query the database
- Log files in
Note: The web frontend and Docker deployment are not functional yet.
This project is now organized into a monorepo structure with two main packages:
backend/
: The Node.js application that runs the WhatsApp bot.frontend/
: The React-based web interface for viewing data (currently not functional).
- Node.js 20.19+ or 22.12+
- pnpm 10+
All backend commands must be run from the backend/
directory.
-
Navigate to the backend directory:
cd backend
-
Install dependencies:
pnpm install pnpm approve-builds # Required for better-sqlite3
-
Set up environment:
cp .env.example .env # Edit .env with your configuration
-
Build the backend:
pnpm build
-
Start the bot:
Option A - Direct Node.js:
pnpm start
Option B - PM2 (Production):
pnpm pm2:start # Start with PM2 pnpm pm2:logs # View logs pnpm pm2:stop # Stop the service pnpm pm2:restart # Restart the service
All frontend commands must be run from the frontend/
directory.
-
Navigate to the frontend directory:
cd frontend
-
Install dependencies:
pnpm install
-
Start the development server:
pnpm dev
Since the web interface isn't working yet, monitor the bot through the files located in the backend/data
directory:
- Live logs:
tail -f backend/data/logs/app.log
- Error logs:
tail -f backend/data/logs/error.log
- Debug logs:
tail -f backend/data/logs/debug.log
- Database: Use any SQLite tool to open
backend/data/database/invicta.db
Backend (from backend/
directory):
# Start in development mode
pnpm dev
# Run tests
pnpm test
# Lint code
pnpm lint
Frontend (from frontend/
directory):
# Start in development mode
pnpm dev
# Build for production
pnpm build
# Lint code
pnpm lint
- ❌ Frontend: React web interface doesn't start
- ❌ Docker: Docker compose configuration fails
- ❌ Tests: Many tests are incomplete or failing
⚠️ Media Download: Partially implemented, may not work for all media types
This project is in active development. Contributions are welcome, especially for:
- Fixing the frontend React application
- Implementing proper Docker support
- Expanding test coverage
- Improving media handling functionality
See .env.example
for all available configuration options.
This project is licensed under the Mozilla Public License 2.0 (MPL-2.0).