A comprehensive travel and tourism management system for Sri Lankan tourism with advanced mapping and security features.
Siyoga Travel System is a full-stack web application designed for trip planning, booking, and management for tourists, drivers, and administrators in Sri Lanka. Features real-time mapping, secure payment processing, and comprehensive user management.
- React 19.0.0 - Modern UI library with hooks and context
- Vite 6.3.1 - Fast build tool and development server
- Tailwind CSS 4.1.4 - Utility-first CSS framework
- React Router DOM 7.5.1 - Client-side routing
- Axios 1.8.4 - HTTP client for API communication
- Chart.js 4.4.9 - Data visualization and analytics
- jsPDF 3.0.1 - PDF generation and reporting
- Node.js 14+ - JavaScript runtime environment
- Express.js 4.21.2 - Web application framework
- Microsoft SQL Server - Primary relational database
- mssql 10.0.4 & tedious 18.6.1 - SQL Server connectivity
- JWT (jsonwebtoken 9.0.2) - Secure authentication tokens
- bcryptjs 2.4.3 - Password hashing and security
- Stripe 14.25.0 - Payment processing platform
- Nodemailer 6.10.1 - Email service integration
- Winston 3.11.0 - Advanced logging system
- Helmet 7.0.0 - Security middleware
- Express Rate Limit 7.1.1 - API rate limiting
- Google Maps API - Interactive mapping and route planning
- Distance Matrix API - Real-time distance and duration calculations
- Geocoding API - Address to coordinates conversion
- Places API - Location search and autocomplete
- Route Optimization - Multi-destination trip planning
- Real-time Location Tracking - Live driver and trip tracking
Microsoft SQL Server with optimized schema design:
- Users - Authentication and profile data
- Tourists - Tourist profiles and preferences
- Drivers - Driver profiles and verification status
- Vehicles - Vehicle specifications and images
- Destinations - Sri Lankan tourist destinations
- BookingRequests - Trip booking with status tracking
- DriverNotifications - Real-time notification system
- Distances - Pre-calculated distance matrix for optimization
- Users β Tourists/Drivers (One-to-One with CASCADE DELETE)
- BookingRequests β Users (Many-to-One via tourist_id)
- DriverNotifications β BookingRequests & Drivers (Many-to-One)
BookingRequests.tourist_id references Users.user_id directly, not Tourists.tourist_id.
- JWT Token-based Authentication - Secure session management
- bcrypt Password Hashing - Industry-standard password security
- Role-based Access Control - Tourist, Driver, Admin permissions
- Email Verification - Account activation security
- Rate Limiting - Prevent API abuse and DDoS attacks
- Input Validation - Comprehensive request sanitization
- CORS Configuration - Controlled cross-origin access
- Helmet.js Security Headers - XSS, CSRF protection
- SQL Injection Prevention - Parameterized queries
- Secure File Upload - File type validation and storage
- Audit Logging - Comprehensive security event tracking
- Environment Variables - Secure configuration management
- HTTPS Enforcement - Encrypted data transmission
- Node.js 14+ - JavaScript runtime
- Microsoft SQL Server - Database server
- Git - Version control
- npm - Package manager
-
Clone the repository
git clone <repository-url> cd siyoga-travel-system
-
Install dependencies
npm install
-
Configure environment variables Create a
.envfile in the root directory:# Server Configuration PORT=9876 NODE_ENV=development # Database Configuration DB_HOST=localhost DB_USER=your_db_user DB_PASSWORD=your_db_password DB_NAME=TripBookingSystem # Authentication JWT_SECRET=your_super_secure_jwt_secret_key_here JWT_EXPIRE=7d # Email Configuration EMAIL_USER=your_email@gmail.com EMAIL_PASS=your_email_app_password EMAIL_FROM=noreply@siyogatravels.com # Payment Configuration STRIPE_SECRET_KEY=sk_test_your_stripe_secret_key STRIPE_PUBLISHABLE_KEY=pk_test_your_stripe_publishable_key # File Upload Configuration UPLOAD_PATH=./uploads MAX_FILE_SIZE=5242880 # Security Configuration BCRYPT_ROUNDS=12 RATE_LIMIT_WINDOW=15 RATE_LIMIT_MAX=100
-
Set up the database
# Create SQL Server database # Run the complete schema from Files/NewDB.sql # Execute any pending migrations from database/migrations/
-
Start the servers
# Backend (Development mode) npm run dev # Frontend cd frontend npm install npm run dev
π Backend:
http://localhost:9876/api| Frontend:http://localhost:5173
Backend Tests:
# Run all backend tests
npm test
# Run specific test file
npm test -- src/tests/controllers/authController.test.js
# Run tests with coverage
npm run test:coverageFrontend Tests:
cd frontend
# Run unit tests
npm test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage
npm run test:coverageEnd-to-End Tests:
cd frontend
# Open Cypress test runner
npm run cypress:open
# Run Cypress tests headlessly
npm run cypress:run- β Unit Tests - Components, services, and utility functions
- β Integration Tests - API endpoints and database operations
- β End-to-End Tests - Complete user workflows
- β Security Tests - Authentication and authorization
- β Performance Tests - API response times and load testing
Frontend Build:
cd frontend
npm run build
# Output will be in the dist/ directoryBackend Production:
# Set environment to production
export NODE_ENV=production
# Start production server
npm start# Production Environment Variables
NODE_ENV=production
PORT=80
DB_HOST=your_production_db_host
DB_NAME=TripBookingSystem_Prod
JWT_SECRET=your_production_jwt_secret
STRIPE_SECRET_KEY=sk_live_your_live_stripe_key
EMAIL_USER=your_production_email- Set up production database
- Configure SSL certificates
- Set up email service (SendGrid, AWS SES, etc.)
- Configure Stripe live keys
- Set up file storage (AWS S3, Azure Blob, etc.)
- Configure monitoring and logging
- Set up backup procedures
- Configure CDN for static assets
This project is licensed under the ISC License.
- Developer: H.K.P.D.Wickramasinghe
- Framework: Built with React, Node.js, and Express
- Database: Microsoft SQL Server
- Payment: Stripe payment processing
- Hosting: Designed for cloud deployment
- Community: Thanks to all open-source contributors
- Languages: JavaScript, SQL, CSS
- Total Files: 200+ source files
- Database Tables: 15+ core tables
- API Endpoints: 50+ REST endpoints
- Test Coverage: 80%+ code coverage
- Performance: <200ms average API response time
π Version: 1.0.0 π Last Updated: 2024 β‘ Node.js Version: 14+ ποΈ Database: Microsoft SQL Server π Status: Production Ready











