{"id":50523708,"url":"https://github.com/icliberen/travel-planner-system","last_synced_at":"2026-06-03T06:30:56.121Z","repository":{"id":357087098,"uuid":"1235316917","full_name":"icliberen/travel-planner-system","owner":"icliberen","description":"A simple travel planner system that shows weather in cities and uses software design patterns with java ","archived":false,"fork":false,"pushed_at":"2026-05-30T14:45:28.000Z","size":170,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-30T16:16:18.145Z","etag":null,"topics":["design","gui","java","patterns","singleton","software","software-design-patterns","weather"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/icliberen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-11T07:57:33.000Z","updated_at":"2026-05-30T14:45:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/icliberen/travel-planner-system","commit_stats":null,"previous_names":["icliberen/travel-planner-system"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/icliberen/travel-planner-system","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icliberen%2Ftravel-planner-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icliberen%2Ftravel-planner-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icliberen%2Ftravel-planner-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icliberen%2Ftravel-planner-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/icliberen","download_url":"https://codeload.github.com/icliberen/travel-planner-system/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icliberen%2Ftravel-planner-system/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33852289,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["design","gui","java","patterns","singleton","software","software-design-patterns","weather"],"created_at":"2026-06-03T06:30:51.908Z","updated_at":"2026-06-03T06:30:56.109Z","avatar_url":"https://github.com/icliberen.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Travel Planner System\n\nA Java Swing desktop application that demonstrates five Gang of Four (GoF) design patterns in a real-world travel planning scenario. The system lets users browse Turkish cities, sort and filter them by weather, and build visit plans with dynamic budget and time calculations — all while live weather updates drive automatic chart refreshes.\n\n## Features\n\n- **City browser** — View 12 Turkish cities with population, area, temperature, and weather data.\n- **Sorting** — Sort cities by name, population, or area via a drop-down selector.\n- **Weather filtering** — Filter the city list to show only sunny, cloudy, rainy, or snowy cities.\n- **Activity planner** — Select a city and check activities (museum, shopping mall, park, city center) to calculate total budget and duration.\n- **Live weather updates** — A background thread randomizes city weather every 3 seconds.\n- **Charts** — A temperature bar chart and a weather distribution pie chart update automatically with every weather change.\n\n## Design Patterns\n\n| Pattern | Key Classes | Purpose |\n| --- | --- | --- |\n| **Singleton** | `CityRepository` | Loads `data/cities.json` once and provides a single shared city list. |\n| **Strategy** | `CitySortStrategy`, `SortByNameStrategy`, `SortByPopulationStrategy`, `SortByAreaStrategy`, `CitySortContext` | Lets the GUI switch sorting algorithms at runtime. |\n| **Iterator** | `CityIterator`, `WeatherCityIterator`, `SunnyCityIterator`, `CloudyCityIterator`, `RainyCityIterator`, `SnowyCityIterator`, `WeatherFilteredCityCollection` | Traverses only cities that match the selected weather condition. |\n| **Observer** | `WeatherSubject`, `WeatherObserver`, `WeatherReportProvider`, `TemperatureBarChartPanel`, `WeatherPieChartPanel`, `TravelPlannerFrame` | Publishes weather changes and refreshes all subscribed GUI components. |\n| **Decorator** | `VisitableCity`, `BasicCityPlan`, `ActivityDecorator`, `MuseumVisit`, `ShoppingMallVisit`, `ParkVisit`, `CityCenterVisit` | Wraps a base city plan with optional activities, each adding cost and time. |\n\n## Project Structure\n\n```\n├── data/\n│   └── cities.json                  # Sample city data (12 Turkish cities)\n├── src/main/java/com/travelplanner/\n│   ├── Main.java                    # Application entry point\n│   ├── model/\n│   │   ├── City.java                # City data model\n│   │   └── WeatherState.java        # Weather enum (SUNNY, CLOUDY, RAINY, SNOWY)\n│   ├── repository/\n│   │   └── CityRepository.java      # Singleton — loads and holds city data\n│   ├── sorting/\n│   │   ├── CitySortStrategy.java    # Strategy interface\n│   │   ├── SortByNameStrategy.java\n│   │   ├── SortByPopulationStrategy.java\n│   │   ├── SortByAreaStrategy.java\n│   │   └── CitySortContext.java      # Strategy context\n│   ├── iterator/\n│   │   ├── CityIterator.java        # Iterator interface\n│   │   ├── WeatherCityIterator.java # Abstract base iterator\n│   │   ├── SunnyCityIterator.java\n│   │   ├── CloudyCityIterator.java\n│   │   ├── RainyCityIterator.java\n│   │   ├── SnowyCityIterator.java\n│   │   └── WeatherFilteredCityCollection.java\n│   ├── observer/\n│   │   ├── WeatherSubject.java      # Subject interface\n│   │   ├── WeatherObserver.java     # Observer interface\n│   │   └── WeatherReportProvider.java # Concrete subject\n│   ├── decorator/\n│   │   ├── VisitableCity.java       # Component interface\n│   │   ├── BasicCityPlan.java       # Concrete component\n│   │   ├── ActivityDecorator.java   # Abstract decorator\n│   │   ├── MuseumVisit.java\n│   │   ├── ShoppingMallVisit.java\n│   │   ├── ParkVisit.java\n│   │   └── CityCenterVisit.java\n│   └── ui/\n│       ├── TravelPlannerFrame.java  # Main GUI (also an Observer)\n│       ├── TemperatureBarChartPanel.java\n│       └── WeatherPieChartPanel.java\n└── uml/\n    ├── travel-planner-uml.mmd      # Mermaid class diagram source\n    ├── travel-planner-uml.svg       # Exported SVG\n    └── travel-planner-uml.pdf       # Exported PDF\n```\n\n## Requirements\n\n- **JDK 21** (or any recent JDK/JRE with Swing support)\n\n## How to Build and Run\n\n```bash\n# Compile\nmkdir -p build/classes\njavac -d build/classes $(find src -name \"*.java\")\n\n# Copy resources\ncp -r data build/classes/\n\n# Run\njava -cp build/classes com.travelplanner.Main\n```\n\n## How to Use\n\n1. **Sort cities** — Use the *Sorting criteria* dropdown to order the city list by name, population, or area.\n2. **Filter by weather** — Use the *Weather filter* dropdown to display only cities with a specific weather condition.\n3. **Select a city** — Click a city in the *All Cities* list.\n4. **Plan activities** — Check one or more activities in the *City Activity Planner* panel to see the total budget and duration.\n5. **Watch live updates** — The weather provider updates city weather randomly every 3 seconds; the bar chart and pie chart refresh automatically.\n\n## UML Class Diagram\n\nThe Mermaid source is located at `uml/travel-planner-uml.mmd`. You can view or re-export it using [Mermaid Live Editor](https://mermaid.live/) or any Mermaid-compatible tool.\n\nPre-exported versions are also included:\n\n- `uml/travel-planner-uml.svg`\n- `uml/travel-planner-uml.pdf`\n\n## License\n\nThis project is licensed under the MIT License — see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficliberen%2Ftravel-planner-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficliberen%2Ftravel-planner-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficliberen%2Ftravel-planner-system/lists"}