A comprehensive guard patrol tracking application with geofencing capabilities, session management, and real-time monitoring.
- Geofenced Patrol Sites: Define patrol locations with customizable radius
- Session Tracking: Track entry/exit times with GPS coordinates
- Offline Support: Continue logging patrols when offline, sync when connected
- Real-time Location: GPS-based location tracking with accuracy metrics
- Shift Management: Track patrol activities during specific shifts
- Data Export: Export patrol logs and session data
- Mobile-Responsive: Optimized for mobile devices and tablets
- Node.js with Express.js
- TypeScript for type safety
- Drizzle ORM with PostgreSQL
- Zod for schema validation
- WebSocket support for real-time features
- React 18 with TypeScript
- Vite for fast development and building
- TailwindCSS for styling
- Radix UI components
- React Query for server state management
- Wouter for routing
- PostgreSQL (via Neon Database)
- Drizzle ORM for database operations
- Session-based patrol tracking
- GPS coordinate storage with precision
- Node.js 18+
- PostgreSQL database (recommended: Neon Database)
- Git
-
Clone the repository
git clone https://github.com/yourusername/GuardTrack.git cd GuardTrack -
Install dependencies
npm install
-
Set up environment variables
export DATABASE_URL="your-postgresql-connection-string"
For Neon Database, the format is:
postgresql://username:password@hostname/database_name?sslmode=require -
Set up the database schema
npm run db:push
-
Initialize default patrol sites (optional)
curl -X POST http://localhost:5000/api/init-sites
Start the development server:
npm run devThis will start both the backend API server and frontend development server on port 5000.
-
Build the application
npm run build
-
Start the production server
npm start
GET /api/patrol-sites- Get all patrol sitesPOST /api/patrol-sites- Create a new patrol sitePOST /api/init-sites- Initialize default sites
GET /api/patrol-sessions- Get patrol sessions with site infoPOST /api/patrol-action- Start/end patrol sessions
GET /api/recent-visits- Get recent patrol visitsGET /api/patrol-logs- Get patrol logs (legacy)
POST /api/sync-logs- Sync offline logs
- Location information with GPS coordinates
- Configurable geofence radius
- Address and name details
- Entry/exit tracking with timestamps
- GPS coordinates for entry/exit points
- Session duration calculation
- Geofence compliance tracking
- Individual patrol events
- Device tracking
- Sync status for offline support
| Variable | Description | Required |
|---|---|---|
DATABASE_URL |
PostgreSQL connection string | Yes |
NODE_ENV |
Environment (development/production) | No |
- Fork the repository
- Create a 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
This project is licensed under the MIT License - see the LICENSE file for details.
For support, please open an issue on GitHub or contact the development team.
Built with ❤️ for security professionals