Skip to content

AmirHaytham/ODDS-FE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

61637f5 Β· Nov 19, 2024

History

10 Commits
Nov 19, 2024
Nov 19, 2024
Nov 19, 2024
Nov 19, 2024
Nov 19, 2024
Nov 19, 2024
Nov 19, 2024
Nov 19, 2024
Nov 19, 2024
Nov 19, 2024
Nov 19, 2024
Nov 19, 2024

Repository files navigation

🚚 On Demand Delivery Service

React Tailwind CSS i18next License PRs Welcome Maintenance GitHub issues GitHub pull requests Build Status Code Style

A comprehensive delivery management solution designed to streamline logistics operations and enhance customer experience. This platform connects businesses, drivers, and customers in a seamless ecosystem for efficient delivery services.

πŸ“Έ Screenshots

Homepage

Homepage

  • Real-time statistics and driver monitoring
  • Quick access to key management features

Admin Dashboard

Admin Dashboard

  • Real-time statistics and driver monitoring
  • Quick access to key management features

Driver Portal

Driver App

  • Active delivery tracking
  • Earnings overview and status controls

Driver Dashboard

User App

  • Tracking derveries and earnings and payments

Multi-language Support

RTL Support

  • Arabic interface with RTL support
  • Seamless language switching

πŸ’Ό Business Overview

For Businesses

  • Reduce operational costs through efficient route optimization
  • Real-time tracking and analytics for better decision making
  • Automated dispatch system to minimize manual intervention
  • Customizable promotion system to drive customer engagement
  • Comprehensive reporting for business insights
  • Driver performance monitoring and management

For Drivers

  • Flexible working hours with easy status management
  • Clear earnings visibility and performance metrics
  • Optimized route suggestions for efficient deliveries
  • Built-in navigation and delivery instructions
  • Simple order acceptance and completion workflow
  • Performance-based incentive tracking

For Customers

  • Real-time order tracking and status updates
  • Multiple payment options for convenience
  • Delivery time estimates based on real-time conditions
  • Order history and reordering capabilities
  • Rating and feedback system
  • Special offers and promotional discounts

πŸš€ Features

Authentication & Authorization

  • Multi-role authentication (Admin, Driver, User)
  • Protected routes based on user roles
  • Mock authentication system for development
  • Persistent login state using localStorage
  • Role-based redirections
  • Registration with validation

Admin Features

  • Comprehensive admin dashboard
  • Real-time statistics overview
  • Driver management system
  • Promotion code management
  • Driver status monitoring (Online/Busy/Offline)
  • Quick action navigation

Driver Features

  • Driver-specific dashboard
  • Online/Offline status toggle
  • Current delivery tracking
  • Earnings overview
  • Delivery history
  • Navigation integration
  • Rating system display

User Features

  • User dashboard
  • Order tracking
  • Order history
  • Profile management
  • Real-time order status

Internationalization

  • Dual language support (English & Arabic)
  • RTL/LTR layout support
  • Language persistence
  • Dynamic content translation
  • Number and currency formatting

UI/UX Features

  • Responsive design with Tailwind CSS
  • Loading states and spinners
  • Error handling and messages
  • Form validation
  • Breadcrumb navigation
  • Card-based layouts
  • Status indicators
  • Interactive buttons
  • Clean and modern design

πŸ›  Tech Stack

Core

  • React 18
  • React Router v6 (with protected routes)
  • Tailwind CSS for styling
  • i18next for internationalization

State Management

  • React Context API for:
    • Authentication state
    • User preferences
    • Language settings
  • localStorage for persistence
  • Custom hooks for shared logic

Development Tools

  • Create React App
  • ESLint
  • Prettier
  • React Developer Tools

πŸ“‚ Project Structure

delivery-platform-frontend/
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ favicon.ico
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ logo192.png
β”‚   β”œβ”€β”€ logo512.png
β”‚   β”œβ”€β”€ manifest.json
β”‚   └── robots.txt
β”‚
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ common/
β”‚   β”‚   β”‚   β”œβ”€β”€ buttons/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Button.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ IconButton.jsx
β”‚   β”‚   β”‚   β”‚   └── ToggleButton.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ forms/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Input.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Select.jsx
β”‚   β”‚   β”‚   β”‚   └── Checkbox.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ layout/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Card.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Container.jsx
β”‚   β”‚   β”‚   β”‚   └── Grid.jsx
β”‚   β”‚   β”‚   └── ui/
β”‚   β”‚   β”‚       β”œβ”€β”€ Badge.jsx
β”‚   β”‚   β”‚       β”œβ”€β”€ Spinner.jsx
β”‚   β”‚   β”‚       └── Alert.jsx
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ admin/
β”‚   β”‚   β”‚   β”œβ”€β”€ dashboard/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ StatisticsCard.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ DriversList.jsx
β”‚   β”‚   β”‚   β”‚   └── RevenueChart.jsx
β”‚   β”‚   β”‚   └── management/
β”‚   β”‚   β”‚       β”œβ”€β”€ DriverManagement.jsx
β”‚   β”‚   β”‚       └── PromoCodeManager.jsx
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ driver/
β”‚   β”‚   β”‚   β”œβ”€β”€ dashboard/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ DeliveryMap.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ EarningsCard.jsx
β”‚   β”‚   β”‚   β”‚   └── StatusToggle.jsx
β”‚   β”‚   β”‚   └── delivery/
β”‚   β”‚   β”‚       β”œβ”€β”€ DeliveryDetails.jsx
β”‚   β”‚   β”‚       └── NavigationCard.jsx
β”‚   β”‚   β”‚
β”‚   β”‚   └── user/
β”‚   β”‚       β”œβ”€β”€ orders/
β”‚   β”‚       β”‚   β”œβ”€β”€ OrderCard.jsx
β”‚   β”‚       β”‚   β”œβ”€β”€ OrderHistory.jsx
β”‚   β”‚       β”‚   └── TrackingMap.jsx
β”‚   β”‚       └── profile/
β”‚   β”‚           β”œβ”€β”€ ProfileCard.jsx
β”‚   β”‚           └── AddressBook.jsx
β”‚   β”‚
β”‚   β”œβ”€β”€ context/
β”‚   β”‚   └── AuthContext.jsx
β”‚   β”‚
β”‚   β”œβ”€β”€ data/
β”‚   β”‚   └── testAccounts.js
β”‚   β”‚
β”‚   β”œβ”€β”€ locales/
β”‚   β”‚   β”œβ”€β”€ en.json
β”‚   β”‚   └── ar.json
β”‚   β”‚
β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”œβ”€β”€ admin/
β”‚   β”‚   β”‚   β”œβ”€β”€ Dashboard.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ DriversManagement/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ DriversList.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ DriverDetails.jsx
β”‚   β”‚   β”‚   β”‚   └── AddDriver.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Orders/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ OrdersList.jsx
β”‚   β”‚   β”‚   β”‚   └── OrderDetails.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Promotions/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ PromotionsList.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ CreatePromotion.jsx
β”‚   β”‚   β”‚   β”‚   └── EditPromotion.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Settings/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ GeneralSettings.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ SecuritySettings.jsx
β”‚   β”‚   β”‚   β”‚   └── NotificationSettings.jsx
β”‚   β”‚   β”‚   └── Reports/
β”‚   β”‚   β”‚       β”œβ”€β”€ FinancialReports.jsx
β”‚   β”‚   β”‚       β”œβ”€β”€ DriverReports.jsx
β”‚   β”‚   β”‚       └── OrderReports.jsx
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ driver/
β”‚   β”‚   β”‚   β”œβ”€β”€ Dashboard.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ActiveDelivery.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ DeliveryHistory.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Earnings/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ EarningsSummary.jsx
β”‚   β”‚   β”‚   β”‚   └── PaymentHistory.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Profile/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ PersonalInfo.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ VehicleInfo.jsx
β”‚   β”‚   β”‚   β”‚   └── Documents.jsx
β”‚   β”‚   β”‚   └── Settings/
β”‚   β”‚   β”‚       β”œβ”€β”€ AccountSettings.jsx
β”‚   β”‚   β”‚       └── PreferenceSettings.jsx
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ user/
β”‚   β”‚   β”‚   β”œβ”€β”€ Dashboard.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ HomePage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Orders/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ PlaceOrder.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ OrderTracking.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ OrderHistory.jsx
β”‚   β”‚   β”‚   β”‚   └── OrderDetails.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Profile/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ PersonalInfo.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AddressBook.jsx
β”‚   β”‚   β”‚   β”‚   └── PaymentMethods.jsx
β”‚   β”‚   β”‚   └── Settings/
β”‚   β”‚   β”‚       β”œβ”€β”€ AccountSettings.jsx
β”‚   β”‚   β”‚       β”œβ”€β”€ NotificationPreferences.jsx
β”‚   β”‚   β”‚       └── SecuritySettings.jsx
β”‚   β”‚   β”‚
β”‚   β”œβ”€β”€ auth/
β”‚   β”‚   β”‚   β”œβ”€β”€ Login.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Register.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ForgotPassword.jsx
β”‚   β”‚   β”‚   └── ResetPassword.jsx
β”‚   β”‚   β”‚
β”‚   β”‚   └── common/
β”‚   β”‚       β”œβ”€β”€ NotFound.jsx
β”‚   β”‚       β”œβ”€β”€ ServerError.jsx
β”‚   β”‚       └── Maintenance.jsx
β”‚   β”‚
β”‚   β”œβ”€β”€ App.css
β”‚   β”œβ”€β”€ App.test.js
β”‚   β”œβ”€β”€ index.css
β”‚   β”œβ”€β”€ index.js
β”‚   β”œβ”€β”€ logo.svg
β”‚   β”œβ”€β”€ reportWebVitals.js
β”‚   └── setupTests.js
β”‚
β”œβ”€β”€ .gitignore
β”œβ”€β”€ README.md
β”œβ”€β”€ tailwind.config.js
└── webpack.config.js

πŸš€ Getting Started

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn

Installation

  1. Clone the repository:
git clone https://github.com/AmirHaytham/ODDS-FE.git
  1. Install dependencies:
npm install
# or
yarn install
  1. Create environment variables:
cp .env.example .env
  1. Start the development server:
npm start
# or
yarn start

πŸ“ Environment Variables

REACT_APP_API_URL=your_api_url
REACT_APP_GOOGLE_MAPS_KEY=your_google_maps_key

πŸ§ͺ Testing

Run the test suite:

npm test
# or
yarn test

πŸ— Building for Production

npm run build
# or
yarn build

πŸ§ͺ Test Accounts

Use these credentials to test different user roles:

Admin Account

Email: [email protected]
Password: admin123

Driver Account

Email: [email protected]
Password: driver123

User Account

Email: [email protected]
Password: user123

Note: These accounts are for testing purposes only. In production, please use secure credentials.

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

On-Demand Delivery Service (ODDS)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages