Web Pulse Analytics is a real-time visitor tracking and web analytics platform. It captures page views, events, and visitor attributes, and streams live activity to the dashboard over WebSockets so you can monitor traffic, performance, and user behavior as it happens.
- Real-time visitor tracking — live visitor sessions streamed to the dashboard via Socket.IO
- Event tracking — lightweight client-side script and REST endpoint for capturing page views and custom events
- Rich analytics — global overview, per-project stats, traffic breakdowns, page and activity reports
- Interactive visualizations — traffic globe, geographic maps (Leaflet), and analytics charts (Recharts)
- Authentication & accounts — email/password and Google OAuth (JWT-based session management)
- Team projects — manage multiple tracked sites with per-project dashboards and metrics
- Plans & billing — subscription plans with Razorpay payments and usage-based tracking
- Notifications — email and Telegram alerts for account and platform events
- Security hardening — Helmet, rate limiting, CSRF protection, and CORS-restricted tracking endpoints
- React 19 with Vite — single-page application
- Tailwind CSS — utility-first styling
- Recharts — analytics charts
- react-globe.gl & Leaflet — geo-visualizations
- Framer Motion — animations
- socket.io-client — real-time updates
- Node.js + Express 5
- Socket.IO — real-time visitor streaming
- Supabase (PostgreSQL) — data storage and retrieval
- JWT — authentication and session management (Google OAuth supported)
- geoip-lite & ua-parser-js — visitor geolocation and device detection
- Razorpay — subscription payments
- Cloudinary — media storage
- Resend — transactional email
- Helmet, express-rate-limit, CSRF — security middleware
- Node.js 18 or higher
- npm or yarn
- A Supabase project (for the database)
- Optional: Razorpay, Google OAuth, Cloudinary, Resend, and Telegram credentials for full functionality
-
Clone the repository
git clone https://github.com/heyshreee/Web-Pulse-Analytics.git cd Web-Pulse-Analytics -
Install backend dependencies
cd backend npm install -
Configure the backend environment
cp .env.example .env
At minimum, set the following required variables:
PORT=5000 JWT_SECRET=your-secret SUPABASE_URL=your-supabase-url SUPABASE_SERVICE_KEY=your-service-key FRONTEND_URL=http://localhost:5173
-
Install frontend dependencies
cd ../frontend npm install cp .env.example .envFrontend variables:
VITE_API_URL=http://localhost:5000 VITE_GOOGLE_CLIENT_ID=your-google-client-id VITE_RAZORPAY_KEY_ID=your-razorpay-key-id
-
Start the backend (from
backend/)npm run dev
-
Start the frontend (from
frontend/)npm run dev
-
Access the application
Open
http://localhost:5173in your browser. The API runs onhttp://localhost:5000.
├── backend/ # Express API, Socket.IO, and business logic
│ └── src/
│ ├── config/ # Environment and third-party configuration
│ ├── controllers/# Request handlers
│ ├── middleware/ # Auth, CSRF, rate limiting, CORS
│ ├── routes/ # API route definitions
│ ├── services/ # Business logic (email, plans, usage, etc.)
│ ├── socket/ # Real-time visitor streams
│ └── utils/ # Shared helpers
└── frontend/ # React single-page application
└── src/
├── components/ # Reusable UI components
├── context/ # React context providers
├── hooks/ # Custom hooks
├── pages/ # Application routes/views
└── utils/ # API client and helpers
The API is organized under versioned routes in backend/src/routes.
| Area | Base path | Description |
|---|---|---|
| Tracking | /api/track |
Public visitor tracking and count endpoints |
| Analytics | /api/v1/analytics |
Global and per-project analytics |
| Authentication | /api/v1/auth |
Login, registration, and OAuth |
| Projects | /api/v1/projects |
Project and website management |
| Users | /api/v1/users |
User profile and settings |
| Plans & Payments | /api/v1/plans, /api/v1/payment |
Subscriptions and receipts |
| Notifications | /api/v1/notifications |
Account and alert notifications |
| Usage | /api/v1/usage |
Event volume and quota tracking |
POST /api/track/:trackingId
Content-Type: application/json
{
"page": "/pricing",
"referrer": "https://google.com",
"userAgent": "Mozilla/5.0 ..."
}GET /api/track/:trackingIdReal-time activity is delivered to connected clients over Socket.IO from the backend socket service.
| Command | Description |
|---|---|
npm run dev |
Start server with nodemon |
npm start |
Start the production server |
| Command | Description |
|---|---|
npm run dev |
Start the Vite dev server |
npm run build |
Build for production |
npm run lint |
Run ESLint |
npm run preview |
Preview the production build |
Contributions are welcome. Please follow these steps:
- Fork the repository and create a feature branch (
git checkout -b feature/your-feature-name). - Make your changes and follow the existing code style and conventions.
- Run the linter (
npm run lintinfrontend/) before committing. - Commit with a clear, descriptive message and open a pull request that references any related issues.
This project is licensed under the MIT License — see the LICENSE file for details.