This is a React TypeScript application built with Vite that provides a shipping tracking interface. The application has been modified to use mock data instead of external APIs, making it perfect for portfolio demonstration and Vercel deployment.
- Mock Authentication: Login system with predefined credentials
- Package Tracking: Search and track shipments using AWB numbers
- Responsive Design: Mobile-first design with Tailwind CSS
- Timeline View: Detailed shipment timeline with scan history
- Error Handling: Comprehensive error states and validation
- Offline Detection: Network status awareness
Before running the project, ensure you have:
- Clone the repository:
git clone <repository-url>
cd shippex-assessment- Install dependencies:
npm installnpm run devThe application will be available at http://localhost:5173
npm run build
npm run preview- Username:
test@shippex.com - Password:
testy123@
210173066689- Complete shipment with full timeline123456789012- Shipment in processing
- Removed proxy server configuration from
vite.config.ts - Replaced axios API calls with mock data service
- Created comprehensive mock data matching original API structure
- Location:
src/services/mockApi.ts - Features:
- Mock login authentication
- Mock shipment tracking data
- Realistic shipping timeline data
- Error simulation for invalid AWBs
- Added
vercel.jsonconfiguration - Updated
package.jsonfor production - SPA routing configuration for client-side routing
src/
├── components/ # Reusable UI components
├── pages/ # Page components
│ ├── auth/ # Authentication pages
│ └── tracking/ # Tracking functionality
├── routes/ # Routing configuration
├── services/ # Mock API service
├── assets/ # Static assets
└── utils/ # Utility functions
This project is configured for easy deployment on Vercel:
- Push to GitHub repository
- Connect to Vercel
- Deploy automatically
The vercel.json configuration ensures proper SPA routing.
- Login Flow: Test with provided credentials
- Valid Tracking: Use test AWB numbers
- Invalid Tracking: Try random 12-digit numbers
- Responsive Design: Test on different screen sizes
- Error States: Test network offline simulation
- GitHub Integration: GitHub repository links available on homepage, login, and tracking pages
The application includes GitHub repository links in multiple locations:
- Homepage: Prominent button to "View README" (default landing page)
- Login Page: Link below the sign-in form
- Tracking Page: Header link for easy access
The homepage is now the default landing page and dynamically shows either "Sign In to Track Shipments" or "Go to Tracking" based on the user's login status.
Important: Update the GitHub URL in src/constants/index.ts with your actual repository URL:
GITHUB_REPO_URL: "https://github.com/your-username/shippex-assessment";- React 18 with TypeScript
- Vite for build tooling
- Tailwind CSS for styling
- React Router for navigation
- React Cookie for session management
- Mock Data Service replacing external APIs
Note: This is a portfolio demonstration project with mock data. All API calls have been replaced with local mock services for reliable demonstration purposes.