TripSecure is a comprehensive safety platform designed to keep travelers secure during their journeys. The application provides real-time monitoring, smart alerts, priority member management, and community-driven safety features.
- Real-time Location Tracking - Advanced GPS monitoring with geofencing
- Smart Alert System - Instant notifications for risky areas and emergencies
- Priority Members - Connect with up to 3 priority members for safety monitoring
- Risk Area Detection - Automatic alerts when entering high-risk zones
- Emergency Response - Direct integration with police and travel departments
- Dark/Light Mode - Beautiful theme switching with smooth transitions
- Page Transitions - Elegant book-opening animations between pages
- Responsive Design - Works seamlessly on all devices
- Modern UI - Clean, intuitive interface with accessibility in mind
- SQL Server Support - Full database integration with local SQL Server
- Real-time Sync - Live data synchronization across all devices
- Secure Storage - Encrypted data storage with privacy protection
- Node.js 18+
- SQL Server 2019+ (Local or Azure)
- npm or yarn package manager
-
Clone the repository
git clone <repository-url> cd TripSecure
-
Install dependencies
npm install
-
Set up SQL Server Database
# Run the database schema sqlcmd -S localhost -i database_schema.sql
-
Configure Database Connection Update the database configuration in
src/lib/database.ts
:await databaseService.connect({ server: 'localhost', database: 'TripSecure', username: 'your_username', password: 'your_password', port: 1433, encrypt: false });
-
Start the development server
npm run dev
-
Open your browser Navigate to
http://localhost:5173
src/
βββ components/ # React components
β βββ auth/ # Authentication forms
β βββ dashboard/ # Dashboard components
β βββ layout/ # Layout components (Header, Sidebar)
β βββ map/ # Map and location components
β βββ trips/ # Trip planning components
β βββ community/ # Community features
β βββ ui/ # Reusable UI components
βββ lib/ # Core utilities
β βββ auth.ts # Authentication service
β βββ database.ts # Database service
β βββ store.ts # State management
β βββ theme.tsx # Theme context
β βββ websocket.ts # WebSocket service
βββ types/ # TypeScript type definitions
βββ App.tsx # Main application component
TripSecure includes a comprehensive theme system with:
- Automatic Theme Detection - Respects system preferences
- Manual Theme Switching - Toggle between light and dark modes
- Persistent Storage - Remembers user preference
- Smooth Transitions - Animated theme changes
import { useTheme } from './lib/theme';
function MyComponent() {
const { theme, toggleTheme, setTheme } = useTheme();
return (
<button onClick={toggleTheme}>
Current theme: {theme}
</button>
);
}
The Priority Members system allows users to:
- Add up to 3 priority members who can access location data
- Default members include Police and Travel Department
- Location access control for each member
- Real-time notifications when entering risk areas
const handleAddMember = async (member: PriorityMember) => {
await databaseService.createPriorityMember({
...member,
userId: currentUser.id
});
};
The Risk Area Alert System provides:
- Geofenced risk areas with configurable radius
- Automatic detection when users enter risk zones
- Priority member notifications for immediate response
- Alert acknowledgment system
const riskArea = {
name: 'High Crime Area',
location: { latitude: 40.7128, longitude: -74.0060 },
radius: 500, // meters
riskLevel: 'high',
alertMessage: 'You have entered a high-risk area. Stay alert!'
};
The application uses SQL Server with the following key tables:
- users - User accounts and profiles
- priority_members - Priority member relationships
- risk_areas - Geofenced risk zones
- risk_area_alerts - Alert history and acknowledgments
- trips - Trip planning and tracking
- safety_alerts - Safety incident reports
- community_feedback - Community safety ratings
TripSecure features beautiful page transitions:
- Book-opening animation for main content
- Slide transitions for navigation
- Fade effects for modal dialogs
- Smooth scrolling and micro-interactions
import { PageTransition } from './components/PageTransition';
function MyPage() {
return (
<PageTransition>
<div>Your page content</div>
</PageTransition>
);
}
Create a .env
file in the root directory:
VITE_DATABASE_SERVER=localhost
VITE_DATABASE_NAME=TripSecure
VITE_DATABASE_USERNAME=your_username
VITE_DATABASE_PASSWORD=your_password
VITE_MAPBOX_TOKEN=your_mapbox_token
Update src/lib/database.ts
with your SQL Server credentials:
const config = {
server: process.env.VITE_DATABASE_SERVER || 'localhost',
database: process.env.VITE_DATABASE_NAME || 'TripSecure',
username: process.env.VITE_DATABASE_USERNAME || 'sa',
password: process.env.VITE_DATABASE_PASSWORD || 'YourPassword123!',
port: 1433,
encrypt: false
};
npm run build
- Create an Azure SQL Database
- Update connection string
- Deploy to Azure App Service
- Configure environment variables
- Set up RDS SQL Server instance
- Configure security groups
- Deploy using AWS Amplify or EC2
- Update database configuration
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add 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 and questions:
- π§ Email: support@tripsecure.com
- π± Phone: +1-800-TRIP-SECURE
- π¬ Discord: TripSecure Community
- π Documentation: docs.tripsecure.com
- Framer Motion for smooth animations
- Tailwind CSS for beautiful styling
- React for the amazing framework
- SQL Server for robust data storage
- Mapbox for location services
Made with β€οΈ for safer travels