A comprehensive real-time tourist safety platform combining AI-powered geo-fencing, blockchain-based digital identity, and emergency response systems to ensure tourist safety across India.
This platform provides end-to-end tourist safety management with real-time location tracking, intelligent geo-fence alerts, emergency SOS capabilities, and a centralized police command center. Built for Smart India Hackathon, it addresses critical tourist safety challenges through modern technology.
Frontend: https://smart-tourist-safety-monitoring-one.vercel.app
Backend API: https://smart-tourist-safety-monitoring-ch2m.onrender.com
The application is fully deployed and ready to use! Access the live platform to explore tourist safety features, geo-fencing, emergency response, and more.
- Ethereum Sepolia-based tourist ID registration
- Smart contract-powered identity verification
- QR code generation for instant verification
- PDF tourist ID card with email delivery
- Immutable identity records on blockchain
- Real-time location tracking with Socket.io
- Dynamic safety zones (safe, medium-risk, high-risk, restricted)
- Automatic alert generation on zone entry
- Safety score calculation based on location
- Time-based zone restrictions
- Polygon and radius-based geo-fence support
- One-click SOS button with GPS coordinates
- Automatic SMS alerts via Twilio to emergency contacts
- Real-time notifications to police dashboard
- Location history tracking
- Alert severity classification (low, medium, high, critical)
- Incident report management
- Real-time tourist location monitoring
- Live geo-fence alert dashboard
- Tourist status tracking (safe, warning, SOS)
- Alert acknowledgment system
- Incident report management
- Historical alert analytics
- 16+ curated destinations across India
- Northeast India special destinations (Tawang, Gangtok, Kohima, etc.)
- Hotel listings and details
- Professional tour guide directory
- Guide inquiry and booking system
- Destination reviews and ratings
- English, Hindi, Kannada, Bengali, Tamil, Telugu
- i18next-powered internationalization
- Language selector component
- Localized UI elements
- Offline functionality
- Install as mobile app
- Push notifications
- Service worker caching
- Map tile caching for offline use
- Framework: React 18 with Vite
- Styling: Tailwind CSS 4
- State Management: Zustand
- Routing: React Router DOM v7
- Maps: Leaflet & React Leaflet
- Blockchain: ethers.js v6
- Real-time: Socket.io Client
- Animations: Framer Motion
- i18n: react-i18next
- UI Components: Lucide React icons
- PDF Generation: jsPDF, html2canvas
- QR Codes: qrcode.react
- Runtime: Node.js with Express 5
- Database: MongoDB with Mongoose
- Authentication: JWT (jsonwebtoken)
- Real-time: Socket.io
- File Upload: Multer, Cloudinary
- Email: Nodemailer
- SMS: Twilio
- Geo-spatial: @turf/turf, @turf/boolean-point-in-polygon
- PDF Generation: PDFKit
- Smart Contracts: Solidity 0.8.28
- Development: Hardhat
- Network: Ethereum Sepolia Testnet
- Provider: Infura
- Deployment: Vercel
- Version Control: Git
- Environment: dotenv
├── client/ # Frontend React application
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ │ ├── Navbar.jsx
│ │ │ ├── GeofenceAlert.jsx
│ │ │ ├── LanguageSelector.jsx
│ │ │ └── ...
│ │ ├── pages/ # Route pages
│ │ │ ├── LoginPage.jsx
│ │ │ ├── DashboardPage.jsx
│ │ │ ├── PoliceDashboard.jsx
│ │ │ ├── GeoFenceAdmin.jsx
│ │ │ ├── MyLocationPage.jsx
│ │ │ ├── NorthEastDestinations.jsx
│ │ │ └── ...
│ │ ├── contexts/ # React contexts
│ │ │ ├── SocketContext.jsx
│ │ │ └── usenamcontext.jsx
│ │ ├── hooks/ # Custom React hooks
│ │ │ └── useLocationTracking.js
│ │ ├── store/ # Zustand stores
│ │ │ ├── userStore.js
│ │ │ ├── tourGuideStore.js
│ │ │ └── conversionStore.js
│ │ ├── data/ # Static data
│ │ │ ├── destinations.json
│ │ │ └── issues.json
│ │ ├── contracts/ # Solidity smart contracts
│ │ ├── utils/ # Utility functions
│ │ ├── i18n.js # Internationalization config
│ │ └── main.jsx # App entry point
│ ├── hardhat.config.cjs # Hardhat blockchain config
│ ├── vite.config.js # Vite build config
│ └── package.json
│
├── server/ # Backend Node.js application
│ ├── controllers/ # Business logic
│ │ ├── user.controller.js
│ │ ├── tourGuide.controller.js
│ │ └── conversion.controller.js
│ ├── models/ # MongoDB schemas
│ │ ├── User.js
│ │ ├── GeoFence.js
│ │ ├── AlertHistory.js
│ │ ├── TourGuide.js
│ │ ├── IncidentReport.js
│ │ ├── ContactMessage.js
│ │ └── ...
│ ├── routes/ # API routes
│ │ ├── user.router.js
│ │ ├── geoFence.route.js
│ │ ├── tourGuide.route.js
│ │ ├── sendSms.js
│ │ └── ...
│ ├── middleware/ # Express middleware
│ │ ├── authMiddleware.js
│ │ ├── fecthuser.js
│ │ └── upload.js
│ ├── utils/ # Utility functions
│ │ ├── geoFenceUtils.js
│ │ ├── seedGeoFences.js
│ │ ├── apiResponse.js
│ │ └── asyncHandler.js
│ ├── config/ # Configuration
│ │ └── cloudinary.js
│ ├── index.js # Server entry point
│ ├── db.js # Database connection
│ └── package.json
│
└── README.md
- Node.js (v18 or higher)
- MongoDB (local or Atlas)
- Ethereum wallet with Sepolia testnet ETH
- Infura API key
- Twilio account (for SMS)
- Cloudinary account (for image uploads)
Client (.env in client/)
VITE_API_URL=http://localhost:5000
VITE_SOCKET_URL=http://localhost:5000
VITE_CONTRACT_ADDRESS=your_deployed_contract_address
INFURA_API_KEY=your_infura_api_key
PRIVATE_KEY=your_ethereum_private_keyServer (.env in server/)
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
CLIENT_URL=http://localhost:5173
# Twilio
TWILIO_ACCOUNT_SID=your_twilio_sid
TWILIO_AUTH_TOKEN=your_twilio_token
TWILIO_PHONE_NUMBER=your_twilio_phone
# Cloudinary
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
# Email
EMAIL_USER=your_email
EMAIL_PASS=your_email_password- Clone the repository
git clone <repository-url>
cd smart-tourist-safety- Install client dependencies
cd client
npm install- Install server dependencies
cd ../server
npm install- Deploy Smart Contract (Optional - if not already deployed)
cd ../client
npx hardhat compile
npx hardhat run script/deploy.js --network sepolia- Seed Geo-fences (Optional)
cd ../server
npm run seed:geofences- Start the development servers
Terminal 1 (Backend):
cd server
npm run devTerminal 2 (Frontend):
cd client
npm run dev- Access the application
- Frontend (local): http://localhost:5173
- Backend API (local): http://localhost:5000
- Frontend (live): https://smart-tourist-safety-monitoring-one.vercel.app
- Backend API (live): https://smart-tourist-safety-monitoring-ch2m.onrender.com
- Register with blockchain-based digital ID
- Download PDF tourist ID card
- Login to access dashboard
- View real-time safety status
- Explore destinations, hotels, and tour guides
- Use emergency SOS button when needed
- Track location history
- Access police dashboard at
/police - Monitor all tourists in real-time
- View geo-fence alerts
- Acknowledge and respond to incidents
- Access alert history and analytics
- Manage geo-fence zones at
/geofence-admin
- Register as tour guide at
/tourguide - Create professional profile
- Receive tourist inquiries
- Manage bookings
POST /api/v2/auth/register- Register new userPOST /api/v2/auth/login- User loginGET /api/v2/auth/current- Get current user
POST /api/v7/geofence/create- Create geo-fenceGET /api/v7/geofence/all- Get all geo-fencesPOST /api/v7/geofence/check-location- Check locationGET /api/v7/geofence/alerts/all- Get all alertsGET /api/v7/geofence/alerts/my-history- Get user alerts
POST /api/v3/sendalert- Send emergency SMS
POST /api/v5/tourguide/register- Register guideGET /api/v5/tourguide/all- Get all guidesPOST /api/v9/guide-inquiry- Submit inquiry
POST /api/v1/pdfwork/generate- Generate tourist ID PDF
- JWT-based authentication
- Blockchain identity verification
- Encrypted password storage
- CORS protection
- Input validation and sanitization
- Secure file upload handling
- Environment variable protection
The platform features 16 major destinations including:
- Taj Mahal, Agra
- Kerala Backwaters
- Goa Beaches
- Rajasthan Palaces
- Varanasi Ghats
- Himalayas, Himachal Pradesh
- Amritsar Golden Temple
- Mumbai Gateway of India
- Northeast India: Tawang, Gangtok, Kohima, Loktak Lake, Aizawl, Agartala
- Live location tracking via Socket.io
- Instant geo-fence alerts
- Real-time police dashboard updates
- Push notifications for emergencies
- Live tourist status monitoring
The application is currently deployed and running:
- Frontend (Vercel): https://smart-tourist-safety-monitoring-one.vercel.app
- Backend (Render): https://smart-tourist-safety-monitoring-ch2m.onrender.com
- Database: MongoDB Atlas (configured and running)
- Frontend: Deploy to Vercel
- Backend: Deploy to Render or Railway
- Database: MongoDB Atlas
We've created comprehensive deployment documentation:
- QUICK_START.md - Fast deployment in 3 steps (~10 minutes)
- DEPLOYMENT_GUIDE.md - Complete step-by-step guide
- PRE_DEPLOYMENT_CHECKLIST.md - Pre-deployment verification
- DEPLOYMENT_ARCHITECTURE.md - System architecture overview
- TROUBLESHOOTING.md - Common issues and solutions
- DEPLOYMENT_SUMMARY.md - Quick overview
- ✅ React Router configured for Vercel (
client/vercel.json) - ✅ CORS configured for production
- ✅ Environment variables documented
- ✅ Build commands optimized
- ✅ Socket.io ready for production
Start here: Read QUICK_START.md to deploy in ~15 minutes!
This project was built for Smart India Hackathon. For contributions or improvements, please follow standard Git workflow practices.
This project is part of Smart India Hackathon submission.
Built by a dedicated team for Smart India Hackathon to enhance tourist safety across India.
For issues or questions, please use the in-app support feature or contact the development team.
Built with ❤️ for Smart India Hackathon