An open API service indexing awesome lists of open source software.

https://github.com/amirhaytham/odds-fe

On-Demand Delivery Service (ODDS)
https://github.com/amirhaytham/odds-fe

fe frontend react reactjs

Last synced: 2 months ago
JSON representation

On-Demand Delivery Service (ODDS)

Awesome Lists containing this project

README

          

# ๐Ÿšš On Demand Delivery Service
[![React](https://img.shields.io/badge/React-18.0.0-blue.svg)](https://reactjs.org/)
[![Tailwind CSS](https://img.shields.io/badge/Tailwind_CSS-3.0-38B2AC.svg)](https://tailwindcss.com/)
[![i18next](https://img.shields.io/badge/i18next-21.8-green.svg)](https://www.i18next.com/)
[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/AmirHaytham/ODDS-FE/graphs/commit-activity)
[![GitHub issues](https://img.shields.io/github/issues/AmirHaytham/ODDS-FE)](https://github.com/AmirHaytham/ODDS-FE/issues)
[![GitHub pull requests](https://img.shields.io/github/issues-pr/AmirHaytham/ODDS-FE)](https://github.com/AmirHaytham/ODDS-FE/pulls)
[![Build Status](https://img.shields.io/github/workflow/status/AmirHaytham/ODDS-FE/CI)](https://github.com/AmirHaytham/ODDS-FE/tree/master/.github/workflows)
[![Code Style](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://prettier.io/)

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](https://github.com/AmirHaytham/ODDS-FE/blob/master/screenshots/Screenshot%20(76).png)
- Real-time statistics and driver monitoring
- Quick access to key management features

### Admin Dashboard
![Admin Dashboard](https://github.com/AmirHaytham/ODDS-FE/blob/master/screenshots/Screenshot%20(82).png)
- Real-time statistics and driver monitoring
- Quick access to key management features

### Driver Portal
![Driver App](https://github.com/AmirHaytham/ODDS-FE/blob/master/screenshots/Screenshot%20(87).png)
- Active delivery tracking
- Earnings overview and status controls

### Driver Dashboard
![User App](https://github.com/AmirHaytham/ODDS-FE/blob/master/screenshots/Screenshot%20(86).png)
- Tracking derveries and earnings and payments

### Multi-language Support
![RTL Support](https://github.com/AmirHaytham/ODDS-FE/blob/master/screenshots/Screenshot%20(77).png)
- 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:
```bash
git clone https://github.com/AmirHaytham/ODDS-FE.git
```

2. Install dependencies:
```bash
npm install
# or
yarn install
```

3. Create environment variables:
```bash
cp .env.example .env
```

4. Start the development server:
```bash
npm start
# or
yarn start
```

## ๐Ÿ“ Environment Variables

```env
REACT_APP_API_URL=your_api_url
REACT_APP_GOOGLE_MAPS_KEY=your_google_maps_key
```

## ๐Ÿงช Testing

Run the test suite:
```bash
npm test
# or
yarn test
```

## ๐Ÿ— Building for Production

```bash
npm run build
# or
yarn build
```
## ๐Ÿงช Test Accounts

Use these credentials to test different user roles:

### Admin Account
```
Email: admin@odds.com
Password: admin123
```

### Driver Account
```
Email: driver@odds.com
Password: driver123
```

### User Account
```
Email: user@odds.com
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](LICENSE) file for details.