A comprehensive logistics tracking platform for "The Smart Exporters" built with React, Supabase, and modern web technologies. This platform enables efficient parcel management, real-time tracking, and seamless communication between all stakeholders in the logistics chain.
- Box & Sack Registration: Register and label boxes and sacks with unique tracking IDs
- QR Code Generation: Automatic QR/barcode generation for easy scanning and tracking
- Status Tracking: Real-time status updates with timestamps and GPS location
- Professional Timeline: Beautiful delivery timeline matching industry standards
- PDF Label Generation: Downloadable, printable labels with company branding
- Role-Based Access Control: Admin, Warehouse Staff, and Customer roles
- Dual Authentication: Supabase Auth with fallback to custom authentication
- User Permissions: Different features and data access based on roles
- Session Management: Secure login/logout with proper session handling
- WhatsApp Integration: Multilingual notifications (English, French, Yoruba, Spanish)
- Email Alerts: Status updates and delivery notifications
- In-App Messaging: Real-time chat between customers and support
- File Sharing: Upload and share images in conversations
- Map Integration: Visual parcel tracking with Leaflet/Google Maps
- Timeline View: Detailed delivery progress with expandable stages
- Customer Portal: Self-service tracking with QR codes or phone numbers
- Analytics Dashboard: Real-time system statistics and performance metrics
- International Shipping Analytics: Specialized analytics for international shipments
- Company Branding: Upload logos and customize appearance
- Legal Pages: Terms of Service and Privacy Policy management
- PDF Labels: Generate printable labels with company branding
- CSV Export: Export data for external analysis
- Modern UI/UX: Beautiful, professional interface with improved aesthetics
- React 18 - Modern UI framework with hooks
- Vite - Fast build tool and development server
- TailwindCSS - Utility-first CSS framework
- React Router DOM - Client-side routing
- React Hook Form - Form management and validation
- Lucide React - Beautiful icon library
- React Hot Toast - User-friendly notifications
- Supabase - Backend-as-a-Service
- PostgreSQL Database with advanced queries
- Real-time subscriptions
- Authentication with role management
- File storage for images and documents
- Row Level Security (RLS) policies
- Twilio - WhatsApp messaging integration
- Nodemailer - Email notifications
- Leaflet/Google Maps - Map integration
- JSPDF & HTML2Canvas - PDF generation
- jsQR - QR code scanning and generation
- Node.js 16+
- npm or yarn
- Supabase account
- Twilio account (for WhatsApp)
- SMTP service (for emails)
git clone https://github.com/martinktay/qr-code-tracker.git
cd qr-code-trackernpm installCreate a .env.local file in the root directory:
# Supabase Configuration
VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
# Twilio Configuration (for WhatsApp)
TWILIO_ACCOUNT_SID=your_twilio_account_sid
TWILIO_AUTH_TOKEN=your_twilio_auth_token
TWILIO_PHONE_NUMBER=your_twilio_whatsapp_number
# SMTP Configuration (for Email)
SMTP_HOST=your_smtp_host
SMTP_PORT=587
SMTP_USER=your_smtp_username
SMTP_PASS=your_smtp_password- Create a new Supabase project at supabase.com
- Run the SQL schema in
supabase_schema.sqlorcomplete_schema_fixed.sql - Execute
setup_test_users.sqlfor test data and user accounts - Apply RLS policies for security
npm run devVisit http://localhost:3001 (or the port shown in terminal) to see the application.
- customers - Customer information with contact details
- boxes - Box parcels with dimensions, weight, and content
- sacks - Sack parcels with weight and content details
- scan_history - Tracking updates with location, photos, and timestamps
- user_accounts - User roles and permissions management
- company_settings - Branding and notification settings
- messages - In-app messaging system
- Enum Types:
parcel_status,user_role,message_language - Row Level Security: Secure data access based on user roles
- Real-time Subscriptions: Live updates across the application
- File Storage: Photos and documents with secure access
- Advanced Analytics: Complex queries for business intelligence
- Dashboard: System overview with real-time statistics
- User Management: Create and manage user accounts
- Analytics: View comprehensive system analytics and reports
- Settings: Configure company branding and notifications
- International Shipping: Specialized analytics for international operations
- Operations Dashboard: Focused on daily operations
- Parcel Registration: Register new boxes and sacks
- Scan & Log: Update parcel status with location and photos
- QR Code Generation: Create and print tracking labels
- Detailed Analytics: Warehouse-specific performance metrics
- Customer Portal: Self-service tracking interface
- Parcel Tracking: Track parcels via QR code or phone number
- Timeline View: Detailed delivery progress
- Communication: Chat with support team
- Notifications: Receive status updates via WhatsApp/Email
- Customer Portal (
/portal) - Self-service tracking - Terms of Service (
/terms) - Legal information - Privacy Policy (
/privacy) - Data protection
- Dashboard (
/dashboard) - Role-based overview with real-time data - Register Box (
/register-box) - Create new boxes with QR codes - Register Sack (
/register-sack) - Create new sacks with QR codes - Scan & Log (
/scan-and-log) - Update parcel status with location - Map Tracker (
/map-tracker) - Visual tracking interface - Parcel Timeline (
/parcel-timeline/:id) - Detailed tracking history - Admin Panel (
/admin-panel) - System management - Debug Page (
/debug) - Development and troubleshooting
- Create project at supabase.com
- Copy project URL and anon key to environment variables
- Run database schema from SQL files
- Configure RLS policies for security
- Set up storage buckets for file uploads
- Primary: Supabase Auth for production use
- Fallback: Custom authentication for testing and development
- Role Management: Automatic role assignment from user_accounts table
- Session Handling: Secure login/logout with proper state management
- Create account at twilio.com
- Get WhatsApp-enabled phone number
- Copy Account SID and Auth Token
- Configure webhook endpoints for notifications
- Netlify: Connect GitHub repository for automatic deployment
- Vercel: Import project and configure environment variables
- Custom Server: Build with
npm run buildand deploy static files
- β Fixed JSX syntax errors in Dashboard component
- β Improved authentication flow with proper role setting
- β Enhanced session management and logout functionality
- β Added comprehensive debugging for troubleshooting
- β Updated domain from smarttrack.com to smartexporters.com
- β Improved application aesthetics with modern design
- β Enhanced icon usage with Lucide React
- β Added debug information panels for development
- β Fixed SQL schema issues and constraints
- β Improved error handling in authentication
- β Enhanced real-time data fetching
- β Added proper user role management
- 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@smartexporters.com
- π± WhatsApp: +1234567890
- π Issues: GitHub Issues
- Complete communication features between users
- Implement Help section with usage guides
- Add comprehensive Terms of Service and Privacy Policy
- Enhance mobile responsiveness
- Mobile app (React Native)
- Advanced analytics dashboard
- Multi-language support
- API documentation
- Performance optimizations
- Automated testing suite
- CI/CD pipeline
After running setup_test_users.sql, you can test with:
Admin User:
- Email:
admin@smartexporters.com - Password:
admin123
Warehouse Staff:
- Email:
warehouse@smartexporters.com - Password:
warehouse123
Customer:
- Email:
customer@smartexporters.com - Password:
customer123
- Authentication: Test login/logout for all user roles
- Dashboard: Verify role-specific dashboards render correctly
- QR Code: Test QR code generation and scanning
- Parcel Registration: Create new boxes and sacks
- Tracking: Update parcel status and view timeline
Built with β€οΈ for The Smart Exporters
Last Updated: January 2025