{"id":27902803,"url":"https://github.com/shubhs27/worldwise","last_synced_at":"2026-04-29T23:06:45.773Z","repository":{"id":291297582,"uuid":"977210340","full_name":"shubhs27/WorldWise","owner":"shubhs27","description":"A feature-rich travel tracking application that allows users to mark cities they've visited on a world map.","archived":false,"fork":false,"pushed_at":"2025-05-04T10:01:53.000Z","size":2761,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-04T04:20:29.367Z","etag":null,"topics":["context-api","css-modules","jonas-schmedtmann-course","react","react-router"],"latest_commit_sha":null,"homepage":"https://worldwise-shubhanan.netlify.app/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shubhs27.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-03T17:13:04.000Z","updated_at":"2025-05-04T10:01:56.000Z","dependencies_parsed_at":"2025-05-03T18:25:05.524Z","dependency_job_id":"75532925-8f3e-4a19-ba2b-4b00189ade18","html_url":"https://github.com/shubhs27/WorldWise","commit_stats":null,"previous_names":["shubhs27/worldwise"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shubhs27/WorldWise","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shubhs27%2FWorldWise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shubhs27%2FWorldWise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shubhs27%2FWorldWise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shubhs27%2FWorldWise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shubhs27","download_url":"https://codeload.github.com/shubhs27/WorldWise/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shubhs27%2FWorldWise/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265863793,"owners_count":23840888,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["context-api","css-modules","jonas-schmedtmann-course","react","react-router"],"created_at":"2025-05-05T21:38:28.967Z","updated_at":"2026-04-29T23:06:45.739Z","avatar_url":"https://github.com/shubhs27.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WorldWise\n\nA modern React application that helps users track and visualize their global travels, built with React, Context API, React Router, and CSS Modules.\n\n![WorldWise App](public/screenshot.png)\n\n## Overview\n\nWorldWise is a feature-rich travel tracking application that allows users to mark cities they've visited on a world map. Users can add new cities, view details about visited locations, and organize their travels by country. The application features a clean, responsive UI with an interactive map.\n\n## Features\n\n- **User Authentication**: Secure login to access personal travel data\n- **Interactive Map**: Visualize visited cities on a world map\n- **City Management**: Add new cities to your travel history\n- **City Details**: View information about each visited location\n- **Country Filtering**: Organize and view cities by country\n- **Protected Routes**: Secure access to user data\n- **Responsive Design**: Optimized for both desktop and mobile devices\n- **Performance Optimized**: Uses code splitting and lazy loading\n\n## Project Structure\n\nThe project follows a component-based architecture:\n\n```\nworldwise/\n├── data/              # JSON data files\n│   └── cities.json    # Cities data for JSON server\n├── public/            # Static assets\n├── src/\n│   ├── components/    # Reusable UI components\n│   │   ├── Button.jsx     # Button component\n│   │   ├── CityList.jsx   # List of cities\n│   │   ├── CountryList.jsx# List of countries\n│   │   ├── City.jsx       # City details component\n│   │   ├── Form.jsx       # Add new city form\n│   │   ├── Map.jsx        # Interactive Leaflet map\n│   │   ├── User.jsx       # User profile component\n│   │   └── ...\n│   ├── contexts/      # React Context providers\n│   │   ├── CitiesContext.jsx  # Cities data management\n│   │   └── FakeAuthContext.jsx# Authentication management\n│   ├── hooks/         # Custom React hooks\n│   ├── pages/         # Page components\n│   │   ├── AppLayout.jsx  # Main application layout\n│   │   ├── Homepage.jsx   # Landing page\n│   │   ├── Login.jsx      # Login page\n│   │   └── ...\n│   └── App.jsx        # Main application component\n└── package.json       # Project dependencies and scripts\n```\n\n### Key Components\n\n- **AppLayout**: Main layout wrapper with sidebar, map, and user info\n- **CityList**: Displays all cities the user has visited\n- **Map**: Interactive map showing visited locations\n- **City**: Shows detailed information about a selected city\n- **Form**: Interface for adding new cities to the travel history\n- **ProtectedRoute**: Higher-order component that secures app routes\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js (v16.0.0 or higher)\n- npm or yarn\n\n### Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/shubhs27/WorldWise.git\n   cd worldwise\n   ```\n\n2. Install dependencies:\n\n   ```bash\n   npm install\n   # or\n   yarn\n   ```\n\n3. Start the development server:\n\n   ```bash\n   npm run dev\n   # or\n   yarn dev\n   ```\n\n4. Start the JSON server (required for adding and managing cities):\n\n   ```bash\n   npm run server\n   # or\n   yarn server\n   ```\n\n   This will start the JSON server watching the `data/cities.json` file on port 8000 with a 500ms delay to simulate real-world API conditions.\n\n5. Open your browser and navigate to `http://localhost:5173` (or the port shown in your terminal)\n\n\u003e **Important**: The JSON server must be running for the application to function properly. All city management features (adding, viewing, and deleting cities) require this backend service.\n\n### Building for Production\n\n```bash\nnpm run build\n# or\nyarn build\n```\n\nThe build output will be placed in the `dist` directory and can be served using the Vite preview command:\n\n```bash\nnpm run preview\n# or\nyarn preview\n```\n\n\u003e **Note**: For production deployment, you'll need to set up a proper backend server or service to replace the JSON server used during development.\n\n## Technologies Used\n\n- **React**: UI library\n- **React Router**: Navigation and routing\n- **Context API**: State management\n- **CSS Modules**: Component-scoped styling\n- **Lazy Loading**: Performance optimization technique\n- **Vite**: Build tool and development server\n\n## API Integration\n\nThe application communicates with a local REST API:\n\n- API base URL: `http://localhost:8000`\n- Endpoints:\n  - GET `/cities`: Retrieve all visited cities\n  - GET `/cities/:id`: Get details for a specific city\n  - POST `/cities`: Add a new city\n  - DELETE `/cities/:id`: Remove a city from the history\n\n## Context Structure\n\nThe application state is managed through React Context:\n\n- **CitiesContext**: Manages the cities data with the following state:\n\n  - `cities`: Array of all visited cities\n  - `currentCity`: Currently selected city details\n  - `isLoading`: Loading state indicator\n  - `error`: Error state message\n\n- **AuthContext**: Handles user authentication with:\n  - `user`: Current user information\n  - `isAuthenticated`: Authentication status\n  - `login`: Login function\n  - `logout`: Logout function\n\n## Authentication\n\nFor demonstration purposes, the app uses a fake authentication system with the following credentials:\n\n- Email: shubhanan@example.com\n- Password: qwerty\n\n## Performance Optimization\n\nThe application utilizes code splitting and lazy loading for improved performance:\n\n- Main pages are lazy-loaded using React's `lazy` and `Suspense`\n- The bundle size is significantly reduced (from ~508KB to ~350KB)\n\n## Future Enhancements\n\n- Implement persistent storage with a real backend\n- Add user registration functionality\n- Enable note-taking for each city\n- Add date tracking for visits\n- Support for uploading travel photos\n- Trip planning features\n- Social sharing capabilities\n\n## Acknowledgments\n\n- This project is part of Jonas Schmedtmann's Udemy course - The Ultimate React Course 2025\n- All assets and UI components are inspired by the course material.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshubhs27%2Fworldwise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshubhs27%2Fworldwise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshubhs27%2Fworldwise/lists"}