A comprehensive React-based travel application that allows users to track visited cities, manage travel itineraries, and explore world destinations with interactive maps and detailed location information.
WorldWise is a feature-rich travel platform that provides:
- Interactive world map for city exploration
- Travel history and visited cities tracking
- City and country information management
- User authentication and profile management
- Responsive design with lazy loading
- Context-based state management
- Interactive Map: Explore cities using React Leaflet integration
- City Management: Add, view, and manage visited cities
- Country Information: Browse countries and their cities
- User Authentication: Secure login and registration system
- Travel History: Track and manage your travel experiences
- Responsive Design: Optimized for desktop, tablet, and mobile
- Lazy Loading: Efficient code splitting for better performance
- Frontend: React 19.0.0
- Routing: React Router DOM 7.6.0
- Maps: React Leaflet & Leaflet
- State Management: React Context API
- Build Tool: Vite 6.1.0
- Data: JSON Server for city data
- Styling: CSS modules for component styling
- Development: ESLint for code quality
- Node.js (version 18 or higher)
- npm or yarn
- Clone the repository
- Navigate to the project directory:
cd Websites/WorldWise/main - Install dependencies:
npm install
- Start the development server:
npm run dev
- (Optional) Start the JSON server for city data:
npm run server
- Open your browser and visit
http://localhost:5173
npm run dev- Start development servernpm run build- Build for productionnpm run lint- Run ESLintnpm run preview- Preview production buildnpm run server- Start JSON server for city data
src/
├── components/ # React components
│ ├── AppNav.jsx # Application navigation
│ ├── BackButton.jsx # Navigation back button
│ ├── Button.jsx # Reusable button component
│ ├── City.jsx # City details component
│ ├── CityItem.jsx # Individual city item
│ ├── CityList.jsx # List of cities
│ ├── CountryItem.jsx # Individual country item
│ ├── CountryList.jsx # List of countries
│ ├── Form.jsx # City addition form
│ ├── Logo.jsx # Application logo
│ ├── Map.jsx # Interactive map component
│ ├── Message.jsx # Message display component
│ ├── PageNav.jsx # Page navigation
│ ├── Sidebar.jsx # Sidebar component
│ ├── Spinner.jsx # Loading spinner
│ ├── SpinnerFullPage.jsx # Full-page loading
│ └── User.jsx # User profile component
├── contexts/ # React Context
│ ├── CitiesContext.jsx # Cities state management
│ └── FakeAuthContext.jsx # Authentication context
├── hooks/ # Custom hooks
│ ├── useGeolocation.js # Geolocation hook
│ └── useUrlPosition.js # URL position hook
├── pages/ # Page components
│ ├── AppLayout.jsx # Main application layout
│ ├── Homepage.jsx # Homepage
│ ├── Login.jsx # Login page
│ ├── PageNotFound.jsx # 404 page
│ ├── Pricing.jsx # Pricing page
│ ├── Product.jsx # Product page
│ └── ProtectedRoute.jsx # Route protection
├── index.css # Global styles
└── main.jsx # Application entry point
- World map with city markers
- Click to add new cities
- Geolocation support
- Custom map controls
- Add new cities with details
- View city information
- Track visited cities
- City search and filtering
- Browse countries
- View country details
- City listings by country
- Country statistics
- User registration and login
- Profile management
- Travel history tracking
- Protected routes
- Manages city data and state
- Handles city operations (add, delete, update)
- Provides city-related functions
- Manages loading and error states
- Handles user authentication
- Manages user session
- Provides login/logout functionality
- Protects routes and components
- Handles browser geolocation
- Provides current position
- Manages geolocation errors
- Position tracking functionality
- Extracts position from URL parameters
- Handles URL-based navigation
- Position validation
- URL state management
/- Homepage/login- User authentication/pricing- Pricing information/product- Product details/app- Main application (protected)/app/cities- City list/app/cities/:id- City details/app/countries- Country list/app/form- Add city form
The application uses JSON Server for:
- City data storage
- Country information
- User data management
- API endpoints
The application uses CSS Modules for:
- Component-specific styling
- Responsive design
- Interactive elements
- Loading states
- Map styling
- Lazy Loading: Code splitting for better performance
- Suspense: Loading states for async components
- Context Optimization: Efficient state management
- Image Optimization: Optimized map tiles and images
This is a comprehensive travel application demonstrating:
- React Context for state management
- React Router for navigation
- Interactive maps integration
- Custom hooks development
- Component composition
- Responsive design principles
- Authentication and authorization
This project is for educational purposes.