TrackSure is an food supply chain tracking system that ensures enhanced safety and efficiency throughout the food distribution process. This application provides an intuitive interface for different stakeholders in the supply chain.
- Real-time Tracking: Monitor shipments with IoT sensors tracking temperature, humidity, and location
- Enhanced Food Safety: Ensure compliance with food safety regulations and receive instant alerts
- Data-Driven Insights: Advanced analytics for supply chain performance optimization
- Multi-Role Support: Dedicated interfaces for Admin, Consumer, Seller, and Transporter roles
- Responsive Design: Modern, mobile-friendly UI built with React and Tailwind CSS
- Real-time Notifications: Toast notifications for Alerts
- Frontend Framework: React 18 with TypeScript
- Build Tool: Vite
- Styling: Tailwind CSS with shadcn/ui components
- Routing: React Router DOM v7
- State Management: React Context API
- Authentication: Firebase Auth
- Maps: React Leaflet for location tracking
- Charts: Recharts for data visualization
- UI Components: Radix UI primitives with shadcn/ui
frontend/
βββ src/
β βββ components/ # Reusable UI components
β β βββ common/ # Common components (Header, Theme Provider)
β β βββ ui/ # shadcn/ui components
β βββ pages/ # Page components
β β βββ Admin/ # Admin dashboard pages
β β βββ Consumer/ # Consumer interface pages
β β βββ Home/ # Landing, Sign In, Sign Up pages
β β βββ Seller/ # Seller dashboard pages
β β βββ Transporter/ # Transporter interface pages
β βββ routes/ # Route configurations
β βββ context/ # React Context providers
β βββ hooks/ # Custom React hooks
β βββ services/ # API services
β βββ schemas/ # Schemas
β βββ config/ # Configuration files
β βββ enums/ # TypeScript enums
β βββ lib/ # Utility libraries
β βββ assets/ # Static assets
βββ public/ # Public assets
βββ package.json # Project dependencies
- Node.js (v18 or higher)
- npm or yarn package manager
- Firebase project with authentication enabled
-
Clone the repository
git clone https://github.com/TheNoMadDevs/TrackSure.git cd TrackSure/frontend -
Install dependencies
npm install
-
Set up environment variables
Copy the sample environment file and configure your Firebase settings:
cp sample.env .env
Update
.envwith your Firebase configuration:VITE_FIREBASE_API_KEY=your_api_key VITE_FIREBASE_AUTH_DOMAIN=your_auth_domain VITE_FIREBASE_PROJECT_ID=your_project_id VITE_FIREBASE_STORAGE_BUCKET=your_storage_bucket VITE_FIREBASE_MESSAGING_SENDER_ID=your_messaging_sender_id VITE_FIREBASE_APP_ID=your_app_id
-
Start the development server
npm run dev
The application will be available at http://localhost:5173
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production build locallynpm run lint- Run ESLint
The application supports four distinct user roles:
- Admin: System administration and oversight
- Consumer: End-users tracking their food purchases
- Seller: Food vendors and retailers
- Transporter: Logistics and shipping providers
Each role has protected routes and dedicated interfaces tailored to their specific needs.
The application uses shadcn/ui components built on top of Radix UI primitives, providing:
- Consistent design system
- Accessibility compliance
- Customizable theming
- Responsive components
The project uses Tailwind CSS with custom configuration in tailwind.config.ts for:
- Custom color schemes
- Typography settings
TypeScript configuration is set up with:
- Strict mode enabled
- Path aliases configured
- Modern ES modules support
npm run buildThis creates an optimized production build in the dist/ directory.
Ensure all environment variables are properly configured for your production environment before deployment.
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request





