import React, { useState, useEffect } from 'react'; import { Search, Truck, Package, BarChart2, Users, Shield, Menu, X, ChevronRight, LogIn, MapPin, Calendar, DollarSign, Clock, Filter, User, Bell, Settings, LogOut, Home, Clipboard, TrendingUp, Phone, Mail, ExternalLink, FileText, HelpCircle, BookOpen, Download, Award, CheckCircle, Zap, Database, PieChart, LifeBuoy, MessageCircle, Video, Info } from 'lucide-react'; export default function TruckersEdgeWebsite() { // Navigation and UI state const [isMenuOpen, setIsMenuOpen] = useState(false); const [activeTab, setActiveTab] = useState('search'); const [isLoggedIn, setIsLoggedIn] = useState(false); const [showLoginModal, setShowLoginModal] = useState(false); const [showSignupModal, setShowSignupModal] = useState(false); const [showFilters, setShowFilters] = useState(false); const [notifications, setNotifications] = useState([ { id: 1, message: "New loads matching your criteria", read: false }, { id: 2, message: "Rate alert: Rates increased on your route", read: false }, { id: 3, message: "Payment received from broker XYZ", read: true } ]); const [showNotifications, setShowNotifications] = useState(false); // Form state const [searchTerm, setSearchTerm] = useState(''); const [originLocation, setOriginLocation] = useState(''); const [destinationLocation, setDestinationLocation] = useState(''); const [loadType, setLoadType] = useState(''); const [radius, setRadius] = useState(50); const [minRate, setMinRate] = useState(''); const [dateRange, setDateRange] = useState(''); const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const [name, setName] = useState(''); const [company, setCompany] = useState(''); const [phone, setPhone] = useState(''); const [rememberMe, setRememberMe] = useState(false); // Search results state const [searchResults, setSearchResults] = useState([]); const [isSearching, setIsSearching] = useState(false); const [hasSearched, setHasSearched] = useState(false); // Solutions tab state const [activeSolutionTab, setActiveSolutionTab] = useState('loadBoard'); // Resources tab state const [activeResourceTab, setActiveResourceTab] = useState('blog'); // Support tab state const [supportQuestion, setSupportQuestion] = useState(''); const [supportEmail, setSupportEmail] = useState(''); const [supportMessage, setSupportMessage] = useState(''); // Mock data for loads const mockLoads = [ { id: 1, origin: "Chicago, IL", destination: "Indianapolis, IN", distance: 184, rate: 850, ratePerMile: 4.62, loadType: "van", weight: 22000, pickupDate: "2023-11-15", company: "ABC Logistics", contact: "555-123-4567", details: "Dry goods, no touch freight" }, { id: 2, origin: "Atlanta, GA", destination: "Charlotte, NC", distance: 245, rate: 1100, ratePerMile: 4.49, loadType: "reefer", weight: 28000, pickupDate: "2023-11-16", company: "Fresh Foods Transport", contact: "555-987-6543", details: "Refrigerated goods, maintain at 34°F" }, { id: 3, origin: "Dallas, TX", destination: "Houston, TX", distance: 239, rate: 950, ratePerMile: 3.97, loadType: "flatbed", weight: 32000, pickupDate: "2023-11-15", company: "Texas Haulers Inc", contact: "555-222-3333", details: "Construction materials, tarping required" }, { id: 4, origin: "Los Angeles, CA", destination: "Phoenix, AZ", distance: 373, rate: 1650, ratePerMile: 4.42, loadType: "van", weight: 18000, pickupDate: "2023-11-17", company: "West Coast Shipping", contact: "555-444-5555", details: "Electronics, high value freight" }, { id: 5, origin: "Seattle, WA", destination: "Portland, OR", distance: 174, rate: 780, ratePerMile: 4.48, loadType: "van", weight: 15000, pickupDate: "2023-11-16", company: "Northwest Carriers", contact: "555-777-8888", details: "General merchandise" }, { id: 6, origin: "Miami, FL", destination: "Orlando, FL", distance: 236, rate: 920, ratePerMile: 3.90, loadType: "reefer", weight: 24000, pickupDate: "2023-11-18", company: "Florida Freight", contact: "555-999-0000", details: "Perishable goods, temperature controlled" }, { id: 7, origin: "Denver, CO", destination: "Salt Lake City, UT", distance: 371, rate: 1580, ratePerMile: 4.26, loadType: "flatbed", weight: 35000, pickupDate: "2023-11-17", company: "Mountain Movers", contact: "555-111-2222", details: "Steel beams, chains required" }, { id: 8, origin: "New York, NY", destination: "Boston, MA", distance: 215, rate: 1050, ratePerMile: 4.88, loadType: "van", weight: 17000, pickupDate: "2023-11-15", company: "East Coast Express", contact: "555-333-4444", details: "Retail goods, liftgate required" } ]; // Dashboard data const recentLoads = [ { id: 101, origin: "Memphis, TN", destination: "Nashville, TN", date: "11/12/23", status: "Delivered", amount: "$750" }, { id: 102, origin: "Chicago, IL", destination: "Detroit, MI", date: "11/10/23", status: "In Transit", amount: "$920" }, { id: 103, origin: "Atlanta, GA", destination: "Jacksonville, FL", date: "11/08/23", status: "Delivered", amount: "$1,100" } ]; const upcomingLoads = [ { id: 201, origin: "Phoenix, AZ", destination: "Las Vegas, NV", date: "11/16/23", time: "08:00 AM", broker: "Southwest Logistics" }, { id: 202, origin: "Seattle, WA", destination: "Spokane, WA", date: "11/18/23", time: "10:30 AM", broker: "Northwest Carriers" } ]; // Blog posts for Resources tab const blogPosts = [ { id: 1, title: "5 Ways to Maximize Your Profits as an Owner-Operator", excerpt: "Learn the top strategies successful owner-operators use to increase their bottom line in today's competitive market.", date: "November 10, 2023", author: "Michael Johnson", category: "Business Tips", image: "https://images.unsplash.com/photo-1601584115197-04ecc0da31d7?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" }, { id: 2, title: "Understanding the New Hours of Service Regulations", excerpt: "A comprehensive breakdown of the latest HOS changes and how they affect your operations and compliance requirements.", date: "November 5, 2023", author: "Sarah Williams", category: "Regulations", image: "https://images.unsplash.com/photo-1516733968668-dbdce39c4651?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" }, { id: 3, title: "Fuel Efficiency: Small Changes That Make a Big Difference", excerpt: "Discover practical tips to reduce fuel consumption and increase your margins without major investments.", date: "October 28, 2023", author: "David Martinez", category: "Operations", image: "https://images.unsplash.com/photo-1563016115-85d3a955f092?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" } ]; // Market updates for Resources tab const marketUpdates = [ { id: 1, title: "Q4 Freight Market Outlook", excerpt: "Analysis of current trends and predictions for the freight market through the end of the year and into 2024.", date: "November 12, 2023" }, { id: 2, title: "Regional Rate Analysis: Midwest", excerpt: "Detailed breakdown of rate trends in the Midwest region with forecasts for the coming months.", date: "November 8, 2023" }, { id: 3, title: "Impact of Recent Fuel Price Changes", excerpt: "How the latest shifts in fuel prices are affecting carrier margins and strategies to adapt.", date: "November 3, 2023" } ]; // Webinars for Resources tab const webinars = [ { id: 1, title: "Maximizing TruckersEdge Tools for Better Loads", date: "November 20, 2023", time: "2:00 PM EST", presenter: "John Smith, Senior Product Specialist", status: "upcoming" }, { id: 2, title: "Tax Planning Strategies for Owner-Operators", date: "November 15, 2023", time: "1:00 PM EST", presenter: "Lisa Johnson, CPA", status: "upcoming" }, { id: 3, title: "Navigating ELD Compliance in 2024", date: "October 25, 2023", time: "3:00 PM EST", presenter: "Mark Williams, Compliance Expert", status: "recorded", recordingUrl: "#" } ]; // FAQs for Support tab const faqs = [ { id: 1, question: "How do I find the best-paying loads?", answer: "To find the best-paying loads, use our advanced search filters to set minimum rates and sort results by rate per mile. You can also save preferred lanes and set up alerts for high-paying loads that match your criteria." }, { id: 2, question: "What information do I need to sign up?", answer: "To create an account, you'll need your name, email address, phone number, and company information. For full access to load board features, you'll also need to provide your MC number and proof of insurance." }, { id: 3, question: "How do broker credit checks work?", answer: "Our broker credit check feature allows you to verify a broker's payment history and credit score before accepting a load. Simply click the 'Check Credit' button on any load listing to see the broker's days-to-pay average and credit rating." }, { id: 4, question: "Can I access TruckersEdge on my mobile device?", answer: "Yes, TruckersEdge is fully mobile-responsive and can be accessed on any smartphone or tablet. We also offer a dedicated mobile app for iOS and Android with additional features like push notifications for new loads." }, { id: 5, question: "How do I cancel or change my subscription?", answer: "You can manage your subscription from your account settings page. To change your plan or cancel your subscription, go to Settings > Subscription and select the appropriate option. Changes will take effect at the end of your current billing cycle." } ]; // Handle search submission const handleSearch = (e) => { e.preventDefault(); setIsSearching(true); setHasSearched(true); // Simulate API call with timeout setTimeout(() => { // Filter mock data based on search criteria let results = [...mockLoads]; if (originLocation) { results = results.filter(load => load.origin.toLowerCase().includes(originLocation.toLowerCase()) ); } if (destinationLocation) { results = results.filter(load => load.destination.toLowerCase().includes(destinationLocation.toLowerCase()) ); } if (loadType) { results = results.filter(load => load.loadType === loadType); } if (minRate) { results = results.filter(load => load.rate >= parseInt(minRate)); } setSearchResults(results); setIsSearching(false); // Save search to API saveSearchToAPI(originLocation, destinationLocation, loadType); }, 1000); }; // Simulate API calls const saveSearchToAPI = async (origin, destination, type) => { try { const response = await fetch(`https://www.sitebrew.ai/api/LVavgi/searches`, { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ document: { origin, destination, type, timestamp: new Date().toISOString() } }), }); console.log('Search saved successfully'); } catch (error) { console.error('Error saving search:', error); } }; const handleLogin = (e) => { e.preventDefault(); // Simulate login process setIsLoggedIn(true); setShowLoginModal(false); // Clear form setEmail(''); setPassword(''); }; const handleSignup = (e) => { e.preventDefault(); // Simulate signup process setIsLoggedIn(true); setShowSignupModal(false); // Clear form setName(''); setEmail(''); setCompany(''); setPhone(''); setPassword(''); }; const handleLogout = () => { setIsLoggedIn(false); setActiveTab('search'); }; const toggleMenu = () => { setIsMenuOpen(!isMenuOpen); }; const handleSupportSubmit = (e) => { e.preventDefault(); // Simulate form submission alert("Thank you for your message. Our support team will contact you shortly."); setSupportQuestion(''); setSupportEmail(''); setSupportMessage(''); }; // Format currency const formatCurrency = (amount) => { return new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD', minimumFractionDigits: 0 }).format(amount); }; // Format date const formatDate = (dateString) => { const options = { year: 'numeric', month: 'short', day: 'numeric' }; return new Date(dateString).toLocaleDateString('en-US', options); }; return (
{/* Header */}
TruckersEdge
{/* Desktop Navigation */}
{isLoggedIn ? (
{showNotifications && (

Notifications

{notifications.length > 0 ? ( notifications.map(notification => (

{notification.message}

2 hours ago

)) ) : (

No notifications

)}
)}
) : ( <> )}
{/* Mobile menu button */}
{/* Mobile Navigation */} {isMenuOpen && ( )}
{/* Main Content */}
{/* Load Board Tab */} {activeTab === 'search' && ( <> {/* Hero Section (only show if not logged in and no search results) */} {!isLoggedIn && !hasSearched && (

Find Loads and Grow Your Business

Access thousands of loads daily and streamline your trucking operations with TruckersEdge.

Truck on highway
)} {/* Load Search Section */}

Find Available Loads

setOriginLocation(e.target.value)} />
setDestinationLocation(e.target.value)} />
{isLoggedIn && ( )}
{showFilters && (
setMinRate(e.target.value)} />
)}
{/* Search Results */} {hasSearched && (

{searchResults.length} Loads Found

Sort by:
{isSearching ? (

Searching for loads...

) : searchResults.length === 0 ? (

No loads found

Try adjusting your search criteria or expanding your search area.

) : (
{searchResults.map((load) => ( ))}
Route Type Distance Rate $/Mile Pickup Company
{load.origin}
{load.destination}
{load.loadType.charAt(0).toUpperCase() + load.loadType.slice(1)} {load.distance} mi {formatCurrency(load.rate)} ${load.ratePerMile.toFixed(2)} {formatDate(load.pickupDate)} {load.company}
)}
)}
{/* Features Section (only show if not logged in and no search results) */} {!isLoggedIn && !hasSearched && (

Why Choose TruckersEdge

Largest Load Board

Access over 500,000 loads daily from thousands of trusted brokers and shippers nationwide.

Rate Analysis

Make informed decisions with real-time rate data and historical pricing trends.

Load Tracking

Streamline operations with real-time load tracking and automated status updates.

Broker Credit Checks

Verify broker reliability with instant credit checks and payment history.

Fleet Management

Manage your entire fleet with our comprehensive tools for dispatching and reporting.

24/7 Support

Get help when you need it with our dedicated customer support team available around the clock.

)} )} {/* Dashboard Tab */} {activeTab === 'dashboard' && (

Driver Dashboard

Welcome back, John! Here's an overview of your activity.

{/* Stats Overview */}

Total Earnings (MTD)

$12,450

+8.2% from last month

Miles Driven (MTD)

3,245

+12.5% from last month

Loads Delivered

18

+5.3% from last month

Average Rate/Mile

$3.84

+2.1% from last month
{/* Recent and Upcoming Loads */}

Recent Loads

{recentLoads.map((load) => ( ))}
ID Route Date Status Amount
#{load.id} {load.origin} → {load.destination} {load.date} {load.status} {load.amount}

Upcoming Pickups

{upcomingLoads.map((load) => (
{load.origin}
{load.destination}
{load.date}
{load.time}
Broker: {load.broker}
))}
)} {/* Solutions Tab */} {activeTab === 'solutions' && (

Our Solutions

Comprehensive tools designed to help carriers and brokers streamline operations and maximize profits.

{/* Solutions Navigation */}
{/* Load Board Solution */} {activeSolutionTab === 'loadBoard' && (
Load Board Interface

Industry's Leading Load Board

Access over 500,000 loads daily from thousands of trusted brokers and shippers nationwide. Our advanced search tools help you find the perfect loads for your business.

Advanced Search Filters

Filter loads by location, equipment type, rate, and more to find exactly what you need.

Real-time Notifications

Get instant alerts when new loads matching your criteria are posted.

Broker Credit Checks

Verify broker reliability with instant credit checks and payment history.

Map-based Search

Visualize available loads on an interactive map to plan efficient routes.

)} {/* Rate Tools Solution */} {activeSolutionTab === 'rateTools' && (
Rate Analysis Dashboard

Comprehensive Rate Analysis

Make informed decisions with real-time rate data and historical pricing trends. Our rate tools help you negotiate better rates and maximize your profits.

Lane Rate Analysis

View current and historical rates for specific lanes to identify the most profitable routes.

Market Trends

Track rate trends by region, equipment type, and season to anticipate market changes.

Rate Calculator

Calculate profitability with our comprehensive rate calculator that factors in fuel, mileage, and other expenses.

Custom Reports

Generate detailed reports on your rate performance and market position.

)} {/* Fleet Management Solution */} {activeSolutionTab === 'fleetManagement' && (
Fleet Management Dashboard

Powerful Fleet Management

Manage your entire fleet with our comprehensive tools for dispatching, tracking, and reporting. Streamline operations and increase efficiency across your business.

Driver Management

Track driver availability, performance, and compliance from a single dashboard.

Load Assignment

Easily assign loads to drivers and track delivery status in real-time.

Document Management

Store and manage all your important documents, from BOLs to proof of delivery.

Performance Analytics

Track key performance indicators for your fleet and identify areas for improvement.

)} {/* Broker Tools Solution */} {activeSolutionTab === 'brokerTools' && (
Broker Dashboard

Specialized Broker Solutions

Streamline your brokerage operations with tools designed specifically for freight brokers. Post loads, find carriers, and manage your business more efficiently.

Carrier Search

Find qualified carriers based on equipment type, location, and safety ratings.

Load Posting

Post loads to our marketplace and reach thousands of qualified carriers instantly.

Carrier Verification

Verify carrier credentials, insurance, and safety records before booking.

Contract Management

Generate, send, and track carrier agreements and rate confirmations.

)}
)} {/* Pricing Tab */} {activeTab === 'pricing' && (

Simple, Transparent Pricing

Choose the plan that fits your business needs. All plans include our core features with no hidden fees.

Basic

$39/month

  • Access to load board
  • Basic rate tools
  • 10 broker credit checks/month
  • Email support
  • Load tracking
  • Fleet management
  • API integration
Most Popular

Professional

$79/month

  • Everything in Basic
  • Advanced rate analysis
  • Unlimited broker credit checks
  • Load tracking
  • Phone & email support
  • Fleet management
  • API integration

Enterprise

$149/month

  • Everything in Professional
  • Fleet management tools
  • API integration
  • Custom reporting
  • Dedicated account manager
  • Priority support
  • Custom onboarding
{/* FAQ Section */}

Frequently Asked Questions

Can I change plans later?

Yes, you can upgrade or downgrade your plan at any time. Changes will take effect at the start of your next billing cycle.

Is there a contract or commitment?

No, all our plans are month-to-month with no long-term contracts. You can cancel anytime.

Do you offer discounts for annual payments?

Yes, we offer a 15% discount when you pay annually for any of our plans.

What payment methods do you accept?

We accept all major credit cards, ACH transfers, and PayPal.

{/* CTA Section */}

Ready to get started?

Join thousands of carriers who trust TruckersEdge to find better loads and increase their profits.

)} {/* Resources Tab */} {activeTab === 'resources' && (

Resources

Stay informed with the latest industry insights, tips, and updates to help your business thrive.

{/* Resources Navigation */}
{/* Blog Content */} {activeResourceTab === 'blog' && (
{blogPosts.map(post => (
{post.title}
{post.category} {post.date}

{post.title}

{post.excerpt}

By {post.author} Read More
))}
)} {/* Market Updates Content */} {activeResourceTab === 'marketUpdates' && (

Market Updates

Stay informed with the latest trends and insights from the freight market.

{marketUpdates.map(update => (

{update.title}

{update.date}

{update.excerpt}

Read Full Update
))}

Get Weekly Market Updates

Delivered straight to your inbox every Monday.

)} {/* Webinars Content */} {activeResourceTab === 'webinars' && (

Upcoming Webinars

Register for our live webinars to learn from industry experts and improve your business.

{webinars.filter(w => w.status === 'upcoming').map(webinar => (

{webinar.title}

{webinar.date} {webinar.time}

Presenter: {webinar.presenter}

))}

Recorded Webinars

Watch our past webinars on-demand at your convenience.

{webinars.filter(w => w.status === 'recorded').map(webinar => (

{webinar.title}

Originally aired: {webinar.date}

Presenter: {webinar.presenter}

))}
)} {/* Downloads Content */} {activeResourceTab === 'downloads' && (

2023 Freight Market Outlook

Comprehensive analysis of market trends, rate forecasts, and industry predictions for the coming year.

Download PDF

Owner-Operator Success Guide

Essential tips and strategies for owner-operators to maximize profitability and grow their business.

Download PDF

ELD Compliance Checklist

Step-by-step guide to ensure your fleet is fully compliant with the latest ELD regulations.

Download PDF

Fuel Efficiency Best Practices

Practical strategies to reduce fuel consumption and increase your margins in today's high-cost environment.

Download PDF
)}
)} {/* Support Tab */} {activeTab === 'support' && (

Support Center

We're here to help you get the most out of TruckersEdge. Find answers to common questions or contact our support team.

Help Center

Browse our knowledge base for answers to common questions and step-by-step guides.

Live Chat

Chat with our support team in real-time for immediate assistance with your questions.

Call Us

Speak directly with our customer support team for personalized assistance.

1-800-555-1234

Frequently Asked Questions

{faqs.map(faq => (

{faq.question}

{faq.answer}

))}

Contact Support

Fill out the form below and our team will get back to you as soon as possible.

setSupportQuestion(e.target.value)} required />
setSupportEmail(e.target.value)} required />
)} {/* CTA Section (only show if not logged in) */} {!isLoggedIn && !hasSearched && activeTab === 'search' && (

Ready to Grow Your Trucking Business?

Join thousands of carriers who trust TruckersEdge to find better loads and increase their profits.

)}
{/* Footer */}