Skip to content

Zihad550/go-journy-frontend

Repository files navigation

Go Journy πŸš—

A modern, full-featured ride-sharing platform built with React, TypeScript, and cutting-edge web technologies. Go Journy connects riders with drivers through an intuitive interface featuring real-time ride matching, driver selection, and comprehensive trip management.

πŸš€ Live Demo

Check out the live application at https://go-journy.vercel.app

🌟 Features

Core Functionality

  • Smart Ride Matching: Advanced algorithm connects riders with available drivers
  • Driver Interest System: Drivers can express interest in ride requests
  • Rider Choice: Riders select preferred drivers from interested candidates
  • Real-time Updates: Live synchronization of ride status and driver availability
  • Multi-role Support: Tailored experiences for Riders, Drivers, and Administrators

User Experience

  • Responsive Design: Seamless experience across desktop, tablet, and mobile devices
  • Interactive Maps: Leaflet-powered location services with real-time tracking
  • Smart Forms: React Hook Form with Zod validation for frictionless data entry
  • Toast Notifications: Immediate feedback for all user actions
  • Theme Support: Light/dark mode with system preference detection

Security & Reliability

  • JWT Authentication: Secure token-based authentication system
  • Role-based Access Control: Granular permissions for different user types
  • Error Handling: Comprehensive error recovery with user-friendly messages
  • Input Validation: Server-side and client-side validation with Zod schemas
  • Rate Limiting: Built-in protection against abuse

πŸ› οΈ Tech Stack

Frontend Framework

  • React 19.1.1 - Latest React with concurrent features
  • TypeScript 5.9.2 - Full type safety and enhanced developer experience
  • Vite 7.1.6 - Lightning-fast build tool and development server

State Management & Data

  • Redux Toolkit - Predictable state management with RTK Query
  • React Router v7.9.1 - Declarative routing with data loading
  • Axios - HTTP client with interceptors for API communication

UI/UX

  • Tailwind CSS v4.1.13 - Utility-first CSS framework
  • Radix UI - Accessible, unstyled component primitives
  • Shadcn/ui - Beautiful, customizable components
  • Lucide React - Consistent icon library
  • GSAP - Professional-grade animations
  • Leaflet - Interactive maps and geolocation

Development Tools

  • ESLint - Code linting with TypeScript support
  • PNPM - Efficient package manager with workspace support

πŸ“¦ Installation & Setup

Prerequisites

Quick Start

# Clone the repository
git clone https://github.com/Zihad550/go-journy-frontend.git
cd go-journy-frontend

# Install dependencies
pnpm install

# Start development server
pnpm dev

# Build for production
pnpm build

Environment Variables

Create a .env file in the root directory:

VITE_API_BASE_URL=http://localhost:5000/api
VITE_APP_EMAILJS_KEY=
VITE_APP_EMAILJS_SERVICE_ID=
VITE_APP_EMAILJS_TEMPLATE_ID=
VITE_APP_RIDE_REFETCH=
VITE_MAPBOX_ACCESS_TOKEN=

πŸ—οΈ Project Structure

go-journy-frontend/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/          # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ modules/        # Feature-specific components
β”‚   β”‚   β”œβ”€β”€ ui/            # Base UI components (shadcn/ui)
β”‚   β”‚   └── layout/        # Layout components
β”‚   β”œβ”€β”€ pages/             # Route components
β”‚   β”œβ”€β”€ redux/             # Redux store and slices
β”‚   β”œβ”€β”€ hooks/             # Custom React hooks
β”‚   β”œβ”€β”€ utils/             # Utility functions
β”‚   β”œβ”€β”€ types/             # TypeScript type definitions
β”‚   β”œβ”€β”€ constants/         # Application constants
β”‚   β”œβ”€β”€ config/            # Application configuration
β”‚   β”œβ”€β”€ contexts/          # React contexts
β”‚   β”œβ”€β”€ lib/               # Core libraries and utilities
β”‚   β”œβ”€β”€ providers/         # Context providers
β”‚   └── routes/            # Route configurations
β”œβ”€β”€ public/                # Static assets
└── API_DOCUMENTATION.md   # API documentation

πŸš€ Key Components

Driver Interest Workflow

  • DriverHeroContent: Interface for drivers to browse and express interest in rides
  • InterestedDrivers: Rider interface for selecting from interested drivers
  • RideDetails: Comprehensive ride information display
  • Real-time State Management: Automatic UI updates using Redux Toolkit

Authentication System

  • Login/Register: Secure authentication with role detection
  • Protected Routes: Role-based access control
  • Profile Management: User profile updates with validation
  • Password Recovery: Secure password reset flow

Dashboard Interfaces

  • Rider Dashboard: Ride history, active rides, and request management
  • Driver Dashboard: Earnings, availability management, and ride requests
  • Admin Dashboard: Analytics, user management, and system controls

πŸ”§ API Integration

The application integrates with the Go Journy backend API featuring:

  • RESTful Endpoints: Comprehensive CRUD operations
  • JWT Authentication: Secure token-based access
  • Role-based Permissions: Granular access control
  • Real-time Updates: WebSocket support for live data
  • Error Handling: Consistent error response format

See API Documentation for detailed endpoint information.

πŸ§ͺ Testing

Testing framework not yet configured. To add testing in the future:

  • Install Vitest and React Testing Library
  • Configure test scripts in package.json
  • Add test files alongside components
  • Set up test coverage reporting

πŸ“± Mobile Responsiveness

The application is built with a mobile-first approach:

  • Responsive Grid System: Adaptive layouts for all screen sizes
  • Touch-friendly Interface: Optimized for mobile interaction
  • Progressive Web App: Installable on mobile devices
  • Offline Support: Service worker for basic offline functionality

πŸ”’ Security Best Practices

  • Input Sanitization: All user inputs are validated and sanitized
  • HTTPS Enforcement: Secure communication with backend
  • CORS Configuration: Proper cross-origin resource sharing
  • Rate Limiting: Protection against abuse and DDoS
  • Secure Storage: Sensitive data encrypted in localStorage

🌍 Internationalization

  • Multi-language Support: i18n ready architecture
  • RTL Support: Right-to-left language compatibility
  • Currency/Date Formatting: Locale-aware formatting
  • Timezone Support: Automatic timezone detection and conversion

πŸ“ˆ Performance Optimization

  • Code Splitting: Lazy loading for optimal bundle sizes
  • Image Optimization: Responsive images with WebP support
  • Caching Strategy: Aggressive caching with cache invalidation
  • Bundle Analysis: Webpack bundle analyzer integration
  • Performance Monitoring: Core Web Vitals tracking

🀝 Contributing

We welcome contributions! Here's how to get started:

Development Workflow

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

Code Style

  • Follow the existing code style and conventions
  • Run pnpm lint before committing
  • Ensure TypeScript compilation passes with pnpm exec tsc --noEmit

πŸ“„ License

This project is licensed under the MIT License.

πŸ†˜ Support

πŸ™ Acknowledgments

  • React community for the amazing ecosystem
  • Radix UI team for accessible component primitives
  • Tailwind CSS team for the utility-first approach
  • All contributors who have helped shape this project

Go Journy - Connecting riders and drivers, one journey at a time. πŸš—βœ¨

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages