A full-stack user tracking and analytics platform built with Next.js and Express.js.
- User Tracking: Track user sessions, events, and behavior
- Admin Dashboard: Modern Next.js dashboard with real-time analytics
- Profile Management: Track and manage user profiles
- Event Analytics: Detailed event tracking and analysis
- Webhook Integration: Server-side event tracking via webhooks
- API Key Authentication: Secure webhook endpoints
- JWT Authentication: Secure access to admin dashboard
- Frontend: Next.js 15, React 19, TypeScript, Tailwind CSS
- Backend: Express.js, Node.js, MongoDB
- Authentication: JWT (JSON Web Tokens)
- Database: MongoDB with Mongoose ODM
- Deployment: Vercel-ready
# Install dependencies
npm install
# Start both client and server
npm run watch
# Or start separately
npm run client # Client on http://localhost:3000
npm run server # Server on http://localhost:8000Create server/.env:
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
REFRESH_TOKEN_SECRET=your_refresh_token_secret
PORT=8000Create client/.env.local:
NEXT_PUBLIC_API_URL=http://localhost:8000Quick Deploy (10 minutes): See VERCEL_QUICKSTART.md
Full Documentation: See DEPLOYMENT.md
- Click "Deploy with Vercel" button above
- Set Root Directory to
client⚠️ (Required!) - Add environment variable
NEXT_PUBLIC_API_URL - Deploy!
Important: You MUST set the Root Directory to client or deployment will fail.
track-mate/
├── client/ # Next.js frontend
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── pages/ # Next.js pages
│ │ ├── hooks/ # Custom React hooks
│ │ ├── styles/ # CSS styles
│ │ └── utils/ # Utilities
│ └── package.json
├── server/ # Express.js backend
│ ├── src/
│ │ ├── controllers/ # Route controllers
│ │ ├── models/ # MongoDB models
│ │ ├── routes/ # API routes
│ │ ├── middleware/ # Express middleware
│ │ └── utils/ # Utilities
│ ├── api/ # Vercel serverless handlers
│ └── package.json
├── vercel.json # Vercel configuration
└── package.json # Root package.json
# Development
npm run watch # Run both client and server
npm run client # Run client only (Next.js dev)
npm run server # Run server only (nodemon watch)
# Installation
npm install # Install all dependencies
npm run install-client # Install client dependencies
npm run install-server # Install server dependencies
# Production Build
npm run build # Build client for production
npm run build:client # Build client only
npm run vercel-build # Vercel build command
# Testing
npm test # Run all testsSee API_GUIDE.md for complete API documentation.
See CLAUDE.md for detailed development instructions and architecture.
- Tracking Guide: TRACKING_GUIDE.md
- Webhook Flow: WEBHOOK_FLOW_DIAGRAM.md
- QA Report: QA_REPORT.md
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
ISC
For issues and questions, please open an issue on GitHub.
Built with ❤️ using Next.js and Express.js