Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
BACKEND_PORT=3001

# Client (frontend) port
CLIENT_PORT=3000
FRONTEND_PORT=3000

# Signal API Configuration
# URL for the Signal API server (if using Signal tracking)
Expand Down
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# Node modules
node_modules/
client/node_modules/

# Build outputs
dist/
build/
client/build/

# WhatsApp authentication data (IMPORTANT: Keep this private!)
auth_info_baileys/
Expand Down Expand Up @@ -72,9 +70,6 @@ temp/
# Dependency directories
jspm_packages/

# Production build
/build

# Misc
.cache
.parcel-cache
Expand Down
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ git clone https://github.com/gommzystudio/device-activity-tracker.git
cd device-activity-tracker

# Install dependencies
npm install
cd client && npm install && cd ..
cd backend && npm install && cd ..
cd frontend && npm install && cd ..
```

**Requirements:** Node.js 20+, npm, WhatsApp account
Expand All @@ -54,14 +54,14 @@ cp .env.example .env

# (Optional) Customize ports in .env file
# BACKEND_PORT=3001
# CLIENT_PORT=3000
# FRONTEND_PORT=3000

# Build and start containers
docker compose up --build
```

The application will be available at:
- Frontend: [http://localhost:3000](http://localhost:3000) (or your configured `CLIENT_PORT`)
- Frontend: [http://localhost:3000](http://localhost:3000) (or your configured `FRONTEND_PORT`)
- Backend: [http://localhost:3001](http://localhost:3001) (or your configured `BACKEND_PORT`)

To stop the containers:
Expand All @@ -75,10 +75,12 @@ docker compose down

```bash
# Terminal 1: Start backend
cd backend
npm run start:server

# Terminal 2: Start frontend
npm run start:client
cd frontend
npm run start
```

Open `http://localhost:3000`, scan QR code with WhatsApp, then enter phone number to track (e.g., `491701234567`).
Expand Down Expand Up @@ -137,13 +139,13 @@ In the web interface, you can switch between probe methods using the dropdown in

```
device-activity-tracker/
├── src/
── tracker.ts # WhatsApp RTT analysis logic
│ ├── signal-tracker.ts # Signal RTT analysis logic
│ ├── server.ts # Backend API server (both platforms)
── index.ts # CLI interface
├── client/ # React web interface
└── package.json
├── backend/
── src/
├── tracker.ts # WhatsApp RTT analysis logic
├── signal-tracker.ts # Signal RTT analysis logic
── server.ts # Backend API server (both platforms)
└── index.ts # CLI interface
└── frontend/ # React web interface
```

## How to Protect Yourself
Expand Down
2 changes: 0 additions & 2 deletions .dockerignore → backend/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ README.md
.env.local
dist
build
client/node_modules
client/build
baileys_auth_info
*.log
.DS_Store
File renamed without changes.
4 changes: 1 addition & 3 deletions package.json → backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@
"start": "npx tsx src/index.ts",
"start:server": "npm run start:signal-api && npx tsx src/server.ts",
"start:signal-api": "npx tsx src/scripts/init-signal.ts",
"start:client": "cd client && npm start",
"dev": "npm run start:server",
"postinstall": "cd client && npm install"
"dev": "npm run start:server"
},
"dependencies": {
"@whiskeysockets/baileys": "^7.0.0-rc.9",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
backend:
build:
context: .
context: ./backend
dockerfile: Dockerfile
args:
- PORT=${BACKEND_PORT:-3001}
Expand All @@ -20,17 +20,17 @@ services:
- app-network
restart: unless-stopped

client:
frontend:
build:
context: ./client
context: ./frontend
dockerfile: Dockerfile
args:
- PORT=${CLIENT_PORT:-3000}
- PORT=${FRONTEND_PORT:-3000}
- REACT_APP_API_URL=${BACKEND_URL:-http://localhost:3001}
ports:
- "${CLIENT_PORT:-3000}:${CLIENT_PORT:-3000}"
- "${FRONTEND_PORT:-3000}:${FRONTEND_PORT:-3000}"
environment:
- PORT=${CLIENT_PORT:-3000}
- PORT=${FRONTEND_PORT:-3000}
depends_on:
- backend
networks:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion client/package.json → frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "client",
"name": "frontend",
"version": "0.1.0",
"private": true,
"dependencies": {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.