A comprehensive AI-powered safety monitoring and incident management system for the tourism sector, providing real-time dashboards, tourist tracking, AI analytics, and blockchain-secured logging.
-
GitHub Repository: https://github.com/piyushkumar0707/sih-dashboard-test-1/raw/refs/heads/main/WhatsApp%20Video%202025-10-06%20at%2015.54.43.mp4
Travira is a sophisticated tourism safety management platform designed to protect tourists through real-time monitoring, automated incident response, and secure data management. The system integrates cutting-edge technologies including AI analytics, blockchain security, geo-fencing, and digital identity management to create a comprehensive safety ecosystem.
- Multi-Role Authentication: Admin, Officer, Tourist roles with JWT-based security
- Role-Based Access Control: Granular permissions for different user types
- User Profile Management: Comprehensive user profiles with safety-relevant information
- Account Approval Workflow: Automated approval process for officers
- Live KPI Monitoring: Active tourists, incidents, safety scores, officers on duty
- Interactive Charts: Real-time data visualization with trends and analytics
- System Health Monitoring: Service status and uptime tracking
- Quick Actions: Streamlined access to common administrative tasks
- Real-Time GPS Tracking: Continuous location monitoring with interactive maps
- AI-Powered Safety Scoring: Intelligent risk assessment algorithms
- Geo-fencing Technology: Virtual boundaries with automated alerts
- Risk Assessment: Predictive analytics for proactive safety measures
- Emergency Alerts: Multi-channel notification system
- Automated E-FIR Generation: Instant First Information Report creation
- Incident Tracking: Complete lifecycle management from creation to resolution
- Multi-Channel Alerts: SMS, email, and push notifications
- Evidence Collection: Automatic compilation of incident-related data
- Response Coordination: Inter-department collaboration tools
- Predictive Safety Analytics: Machine learning for threat prediction
- Anomaly Detection: Unusual pattern recognition and alerts
- Safety Trend Analysis: Historical data analysis and insights
- Risk Visualization: Heat maps and risk indicators
- Performance Metrics: AI accuracy and system performance tracking
- Immutable Logging: Tamper-proof incident and activity records
- Audit Trails: Complete tracking of all system activities
- Data Integrity: Blockchain-secured evidence and documentation
- Smart Contracts: Automated processes with Hardhat integration
- Mobile-First Design: Optimized for field officers and mobile use
- Offline Capability: Limited functionality without internet connection
- Push Notifications: Real-time alerts and updates
- App-Like Experience: Installable on mobile devices
TOURISM-1/
βββ frontend/ # React SPA with PWA features
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ pages/ # Main application pages
β β βββ contexts/ # React context providers
β β βββ api.js # API integration layer
β β βββ App.js # Main application component
β βββ public/ # Static assets and PWA manifest
β βββ package.json # Frontend dependencies
βββ backend/ # Node.js/Express API server
β βββ models/ # MongoDB data models
β βββ index.js # Main server file with all endpoints
β βββ seed.js # Database seeding script
βββ AI_services/ # Python FastAPI microservices
β βββ case_report/ # AI-powered report generation
β βββ safety_score/ # AI safety scoring algorithm
βββ Blockchain/ # Hardhat blockchain integration
β βββ hardhat.config.js # Blockchain configuration
βββ Documentation/ # Project documentation
- Framework: React 19.1.1 with Create React App
- Routing: React Router DOM 7.8.2
- Styling: Tailwind CSS 3.3.3 with responsive design
- Icons: Heroicons 2.2.0 for consistent iconography
- Maps: Leaflet 1.9.4 with React-Leaflet 5.0.0
- HTTP Client: Axios 1.11.0 for API communication
- PWA: Service Worker with offline capabilities
- State Management: React Context API
- UI Components: Custom component library
- Runtime: Node.js 18+ with Express.js 5.1.0
- Database: MongoDB with Mongoose ODM 8.18.0
- Authentication: JSON Web Tokens (JWT) 9.0.2
- Security: bcrypt 6.0.0 for password hashing
- CORS: Configured for cross-origin requests
- API Architecture: RESTful APIs with role-based access
- Framework: Python 3.10+ with FastAPI
- Server: Uvicorn ASGI server
- PDF Generation: FPDF for report generation
- Machine Learning: Custom algorithms for safety scoring
- Predictive Analytics: Pattern recognition and anomaly detection
- Framework: Hardhat for Ethereum development
- Smart Contracts: Solidity-based contract deployment
- Network: Local development with testnet support
- Security: End-to-end encryption and secure logging
- Build System: Webpack with code splitting
- CSS Framework: Tailwind CSS with PostCSS
- Testing: Jest and React Testing Library
- Linting: ESLint with React configuration
- Version Control: Git with comprehensive .gitignore
- Node.js: Version 18.0 or higher
- Python: Version 3.10 or higher
- MongoDB: Local installation or MongoDB Atlas account
- Git: For version control
git clone https://github.com/piyushkumar0707/sih-dashboard-test-1.git
cd sih-dashboard-test-1
# Navigate to backend directory
cd backend
# Install Node.js dependencies
npm install
# Seed the database with demo users
node seed.js
# Start the backend server
npm start
# Server runs on http://localhost:5000
# Navigate to frontend directory (from project root)
cd frontend
# Install frontend dependencies
npm install
# Start the React development server
npm start
# Application opens at http://localhost:3000
# Setup Case Report Service
cd AI_services/case_report
pip install -r requirements.txt
python main.py
# Service runs on http://localhost:8001
# Setup Safety Score Service (in new terminal)
cd ../safety_score
pip install -r requirements.txt
python main.py
# Service runs on http://localhost:8002
cd Blockchain
npm install
npx hardhat test
Create a .env
file in the backend directory:
# Database Configuration
MONGODB_URI=mongodb://localhost:27017/travira
# JWT Security
JWT_SECRET=your-secret-key-here
# API Configuration
PORT=5000
NODE_ENV=development
# AI Services URLs
SAFETY_SCORE_SERVICE_URL=http://localhost:8002
CASE_REPORT_SERVICE_URL=http://localhost:8001
Create a .env
file in the frontend directory:
# API Configuration
REACT_APP_API_BASE_URL=http://localhost:5000
# Map Configuration
REACT_APP_MAPBOX_TOKEN=your-mapbox-token-here
# PWA Configuration
REACT_APP_VERSION=1.0.0
Use these pre-configured accounts for testing:
| Role | Username | Password | Access Level | |---------|----------|------------||--------------| | Admin | admin | admin123 | Full system access | | Officer | officer1 | officer123 | Operational access | | Tourist | tourist1 | tourist123 | Limited access |
- KPI Cards: Active tourists, incidents, safety scores, officers
- Recent Incidents: Real-time incident feed with status tracking
- System Health: Service monitoring and uptime statistics
- Quick Actions: Common administrative tasks
- User Directory: Complete user listing with roles and status
- Role Management: Admin tools for user role assignment
- Account Approval: Workflow for officer account verification
- Activity Monitoring: User login and activity tracking
- Interactive Map: Real-time tourist location tracking
- Safety Scores: AI-powered risk assessment display
- Geo-fence Management: Virtual boundary configuration
- Alert Configuration: Custom alert rules and thresholds
- Incident Dashboard: Complete incident lifecycle management
- E-FIR Generation: Automated report creation
- Status Tracking: Progress monitoring and updates
- Evidence Management: Document and media handling
- Safety Metrics: AI-powered analytics and insights
- Trend Analysis: Historical data visualization
- Anomaly Alerts: Unusual pattern detection
- Predictive Models: Risk forecasting and prevention
- Transaction History: Immutable activity logs
- Audit Trails: Complete system accountability
- Data Integrity: Verification and validation tools
- Smart Contract Monitoring: Contract execution tracking
- Service Monitoring: Real-time service status
- Performance Metrics: Response times and uptime
- Alert Configuration: System health notifications
- Maintenance Scheduling: Planned downtime management
- Custom Reports: AI-powered report generation
- Data Export: CSV and PDF export capabilities
- Scheduled Reports: Automated report delivery
- Report Templates: Pre-configured report formats
- Header: Navigation bar with user profile and notifications
- Sidebar: Collapsible navigation with role-based menu items
- Layout: Responsive grid system with mobile optimization
- StatCard: KPI display with trend indicators
- DataTable: Sortable and filterable data grids
- Charts: Interactive charts using Chart.js integration
- Maps: Leaflet-based interactive mapping
- AuthForm: Login and registration forms
- FilterPanel: Advanced filtering and search
- DatePicker: Date and time selection components
- FileUpload: Drag-and-drop file handling
- Notifications: Toast notifications for user feedback
- Loading: Skeleton screens and loading indicators
- Modals: Confirmation dialogs and detail views
- Alerts: System alerts and warnings
POST /api/login
- User authenticationPOST /api/register
- User registration
GET /api/dashboard/stats
- Dashboard KPIsGET /api/health
- System health status
GET /api/users
- List all users (Admin only)PUT /api/users/:id
- Update user role/statusDELETE /api/users/:id
- Delete user
GET /api/tourists
- List all tourists with locationsGET /api/tourists/:id
- Get specific tourist detailsPUT /api/tourists/:id/safety-score
- Update safety score
GET /api/incidents
- List incidents with filteringPOST /api/incidents
- Create new incidentPUT /api/incidents/:id
- Update incident status
POST /api/ai/safety-score
- Calculate safety scorePOST /api/ai/generate-report
- Generate incident reportGET /api/ai/metrics
- AI performance metricsGET /api/ai/trends
- Safety trend analysisGET /api/ai/alerts
- AI-generated alerts
- JWT Token Security: Secure token-based authentication
- Role-Based Access: Granular permission system
- Session Management: Automatic token refresh and expiration
- Multi-Factor Authentication: Enhanced security for admin accounts
- Password Encryption: bcrypt hashing for secure storage
- API Security: CORS configuration and request validation
- Input Sanitization: Protection against injection attacks
- Audit Logging: Complete activity tracking
- Data Anonymization: Tourist data protection
- GDPR Compliance: Privacy regulation adherence
- Secure Communication: HTTPS enforcement
- Regular Security Audits: Vulnerability assessments
# Start all services
npm run dev # Frontend development server
npm run backend # Backend API server
npm run ai:case # Case report AI service
npm run ai:safety # Safety score AI service
# Build and deploy with Docker Compose
docker-compose up -d
# Build frontend for production
cd frontend
npm run build
# Deploy to static hosting (Netlify, Vercel, etc.)
# Configure backend on cloud platform (AWS, Azure, GCP)
- Response Times: API endpoint performance tracking
- System Uptime: Service availability monitoring
- User Activity: Login patterns and usage statistics
- AI Accuracy: Model performance and accuracy metrics
- Tourist Safety Trends: Historical safety data analysis
- Incident Patterns: Recurring issue identification
- Resource Utilization: Officer deployment optimization
- Risk Assessment: Predictive analytics for prevention
We welcome contributions from the community! Please follow these guidelines:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Follow the existing code style and conventions
- Write tests for new functionality
- Submit a pull request with detailed description
- React Components: Use functional components with hooks
- API Design: Follow RESTful conventions
- Code Style: ESLint configuration for consistency
- Documentation: Update README and code comments
- Use GitHub Issues for bug reports
- Provide detailed reproduction steps
- Include system information and error logs
- Suggest potential solutions when possible
This project is licensed under the MIT License - see the LICENSE file for details.
- Tourism Department: For providing requirements and feedback
- Law Enforcement Agencies: For collaboration and insights
- AI Research Community: For algorithms and best practices
- Open Source Libraries: For enabling rapid development
- Project Repository: GitHub Issues
- Email: 121piyush466mits@gmail.com
- Documentation: Comprehensive guides in
/docs
directory - Community: Join discussions in repository discussions section
- β Core dashboard functionality
- β User authentication and management
- β Basic incident tracking
- β AI safety scoring integration
- π Advanced AI analytics and reporting
- π Mobile app for tourists
- π IoT sensor integration
- π Multi-language support
- π Drone surveillance integration
- π Facial recognition capabilities
- π Weather API integration
- π Social media monitoring
Β© 2025 Travira Team | Built with β€οΈ for Tourist Safety
Making tourism safer through technology and innovation