Modern React application for tracking DSV shipments with professional UI/UX.
API Base URL: https://www.api-integration.eu
- Dual Search Interface: Toggle between Booking ID and TMS ID
- Real-time Tracking: Live shipment status updates
- Professional Design: Clean, responsive, business-focused UI
- Timeline Visualization: Step-by-step tracking events
- Loading States: User-friendly loading indicators
- Error Handling: Graceful error management
- Mobile Responsive: Works on all devices
- React 19: Latest React with hooks
- Vite: Fast build tool and dev server
- Tailwind CSS: Utility-first CSS framework
- Axios: HTTP client for API calls
- ESLint: Code quality and consistency
- Node.js 18 or higher
- npm or yarn
- Running backend server
# Install dependencies
npm install
# Start development server
npm run devnpm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLintfrontend/
├── src/
│ ├── components/ # React components
│ │ └── ShipmentTracker.jsx
│ ├── api/ # API integration
│ │ └── api.js
│ ├── assets/ # Static assets
│ ├── App.jsx # Main App component
│ ├── main.jsx # React entry point
│ └── index.css # Global styles
├── public/ # Public assets
├── index.html # HTML template
├── vite.config.js # Vite configuration
├── tailwind.config.js # Tailwind configuration
└── package.json # Dependencies
Main tracking interface with:
- Search type selector (Booking ID / TMS ID)
- Input field with validation
- Loading states
- Results display
- Error handling
- Professional Color Scheme: Blue and gray corporate colors
- Responsive Grid: Mobile-first responsive design
- Interactive Elements: Hover effects and transitions
- Typography: Clean, readable font hierarchy
- Icons: Intuitive visual indicators
The frontend communicates with the backend through:
// Token management
fetchToken()
// Shipment tracking
fetchShipmentByBookingId(bookingId, accessToken)
fetchShipmentByTmsId(tmsId, accessToken)- Select Search Type: Choose between Booking ID or TMS ID
- Enter Tracking Number: Input your tracking reference
- Track Shipment: Click the track button
- View Results: See shipment status and timeline
- Error Handling: Clear error messages if shipment not found
The application uses Tailwind CSS for:
- Responsive Design: Mobile-first approach
- Component Styling: Utility classes
- Custom Components: Professional business design
- Animations: Smooth transitions and loading states
- Clean white cards on gray background
- Blue accent colors for CTAs
- Green success indicators
- Red error states
- Professional typography
sm: 640px /* Small devices */
md: 768px /* Medium devices */
lg: 1024px /* Large devices */
xl: 1280px /* Extra large devices */// vite.config.js
export default defineConfig({
plugins: [react(), tailwindcss()],
});/* index.css */
@import "tailwindcss";- Component Development: Use React hooks for state management
- Styling: Leverage Tailwind utility classes
- API Calls: Handle loading and error states
- Responsive Design: Test on multiple screen sizes
- Performance: Optimize with React best practices
- Dynamic placeholder text
- Input validation
- Loading indicators
- Clear button functionality
- Professional card layout
- Status indicators
- Timeline visualization
- Responsive grid system
- User-friendly error messages
- Retry functionality
- Clear error states
- Support contact information
/* Professional color palette */
Primary Blue: #2563eb
Success Green: #059669
Error Red: #dc2626
Gray Background: #f9fafb
White Cards: #ffffff- Follow React best practices
- Use Tailwind CSS utilities
- Maintain responsive design
- Add proper prop types
- Test across devices
- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+
Professional React Frontend for DSV Shipment Tracking