Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/krislette/navijeff

A desktop application utilizing A* algorithm for showing the most efficient jeepney routes within Northern Metro Manila, made with JavaFX.
https://github.com/krislette/navijeff

astar javafx maps-api routing

Last synced: about 2 months ago
JSON representation

A desktop application utilizing A* algorithm for showing the most efficient jeepney routes within Northern Metro Manila, made with JavaFX.

Awesome Lists containing this project

README

        





Logo

NaviJeff



Your Commuting Buddy


Explore the paper »




View Demo
·
Report Bug
·
Request Feature



Demo

## About The Project

> NaviJeff is aimed at commuters residing within and outside Northern Metro Manila.
> It seeks to improve the current jeepney routing system for Northern Metro Manila,
> especially focusing on optimizing travel costs and even travel time when hopping
> from city to city.

### Table Of Contents



  1. About The Project



  2. Application Snapshots


  3. Folder Structure


  4. Installation



  5. Run


  6. Contributors


  7. License

### Features
- Landing page with user input
- Routing page with user input and routing display
- Map page for showing fourteen jeepney stations
- Pretty and user-friendly UI and UX
- Map auto pan and map zoom in/out
- Sattelite view
- Dark mode
- Functional routing system using A* algorithm

### Technologies Used
NaviJeff uses a number of technologies to work properly:
- [NetBeans IDE](https://netbeans.apache.org/front/main/index.html)
- [JSON Jar](https://jar-download.com/artifacts/org.json/json/20210307/source-code)
- [Scene Builder](https://gluonhq.com/products/scene-builder/)
- [Java FX](https://openjfx.io/)
- [Maps Javascript API](https://developers.google.com/maps)

## Application Snapshots

### Landing Page
![Landing Page](https://github.com/krislette/jeepney-navigation/assets/143507354/b8b6898c-2fc9-42f2-9d4b-457a0d87c95f)

### Routing Page
![Routing Page](https://github.com/krislette/jeepney-navigation/assets/143507354/5b4801a1-dc70-4858-a9bd-8711dc9ac2aa)

### Maps Page
![Maps Page](https://github.com/krislette/jeepney-navigation/assets/143507354/afb17d59-981a-4ab6-9796-f05a99cd3afd)

### Satellite View
![Satellite View](https://github.com/krislette/jeepney-navigation/assets/143507354/2efad7e4-c888-44aa-9769-e7ef28212c13)

### Dark Mode
![Dark Mode](https://github.com/krislette/jeepney-navigation/assets/143507354/5987158b-e745-49f1-858a-0e02cf8a9db6)

## Folder Structure

src
├── algorithm # Folder containing A* algorithm
│ ├──── AStar.java # A* algorithm code
│ ├──── Edge.java # Edge configuration
│ └──── Node.java # Node configuration
├── backend # Folder for API-related operations
│ ├──── config.js # API
│ ├──── geopositions.json # Data for nodes and edges
│ ├──── map.html # Show map
│ └──── script.js # Map-related operations
├── frontend # Folder for UI and UX
│ ├──── Controller.java # Program logic
│ ├──── GetRoute.fxml # Routing page UI
│ ├──── LandingPage.fxml # Home page UI
│ ├──── Main.java # Program entry point
│ ├──── MapPage.fxml # Map page UI
│ └──── style.css # For additional styling
├── images # All styling images used in the app
└── places # All place images used in the app
README.md

## Installation

### Prerequisites
- Ensure you have **Git** installed on your local machine. If not, download and install.
- Ensure you have **NetBeans IDE** on your local machine. If not, download and install.

### Cloning the repository using cmd
Cloning using `cmd` is not recommended, as NetBeans IDE has a built-in GUI for cloning.

Show Instructions

1. Fork this repository.

2. Open your terminal by typing `cmd` on your search bar.

3. Navigate to the directory where you want to clone the repository using the `cd` command:

```bash
cd path/to/desired/directory
```

4. Clone the repository:

```bash
git clone https://github.com/YOUR_USERNAME/YOUR_REPOSITORY_NAME.git
```

### Cloning the repository using NetBeans
This is the recommended way of cloning this repository.

Show Instructions

1. Fork this repository.

3. Open NetBeans IDE.

4. Go to `Team` > `Remote` > `Clone`.

5. On the `Repository URL`, enter the url of your forked repository.

```bash
https://github.com/YOUR_USERNAME/YOUR_REPOSITORY_NAME.git
```

4. Click `Next >` and tick the checkbox `main` that will apear.

5. Click `Finish`.

### Open the Project
Opening the project on your local machine depends on how you forked this repository.

Show Instructions

- If you used the `cmd` to clone your forked repository, open NetBeans and click `Open Project`. From there, find the directory of your forked repository and open it.

- If you used `NetBeans` to clone your forked repository, simply click `Open Project` on the dialog that will appear after cloning.

> After opening the project, you should see all the files listed on
> the [Folder Structure](#Folder-Structure), but without the `config.js` file.

### Configure API Key
An **API key** is the most important part of this application, so make sure that you have it, from Google. To know more about getting your own API key, you can check this [video](https://youtu.be/hsNlz7-abd0?si=G-JMXV_MzokUXIEL). You can also contact the [developers](#contributors) to borrow the API key that they have used. After getting your own API key, you can proceed with the instructions.

Show Instructions

1. Create a `config.js` file under the backend folder.

2. Type the code below on the `config.js` file you just created. Make sure to replace `YOUR_API_KEY_HERE` with your actual **API key**.

```javascript
const GOOGLE_MAPS_API_KEY = "YOUR_API_KEY_HERE";
```

### JavaFX Integration
To run the application, you should have **JavaFX** installed within your system. To know more about JavaFX installation, check this [video](https://www.youtube.com/watch?v=Iun8wEtn4Zs&t=1s).

Show Instructions

1. Once you have JavaFX installed and configured on your NetBeans IDE, go to the project, right-click and click `Properties`.

2. A dialog box will appear, click `Libraries` and then click the `+` button on the right of `Classpath`.

3. Click `Add Library`, a dialog box will appear again, and navigate through your available libraries. From there, find the **JavaFX library** you created by following this [video](https://www.youtube.com/watch?v=Iun8wEtn4Zs&t=1s).

4. After finding the **JavaFX library** you have installed, click `Add Library`. You should now see the JavaFX library under your `Classpath`.

5. Before clicking `OK`, click the `Java Platform` dropdown on top, and select the **JDK FX** that you have installed by following the [video](https://www.youtube.com/watch?v=Iun8wEtn4Zs&t=1s). After selecting the correct platform, you can now click `OK` to finalize and save the changes.

### JSON Jar Integration
JSON Jar is an essential component of this application. It is crucial for Java to accurately read our `geopositions.json` file.

Show Instructions

1. Go to your project, right-click and click `Properties`.

2. A dialog box will appear, click `Libraries` and then click the `+` button on the right of `Classpath`.

3. Open the project from the directory dialog that will appear, and find the `json-20210307.jar` file that is included when you forked this repository.

4. Click the jar file and click `Open`. You should now see the `json-20210307.jar` file under your `Classpath`, and then click `OK`.

### Scene Builder Integration (Optional)
If you want to modify the .fxml files (UI), you should have a [Scene Builder](https://gluonhq.com/products/scene-builder/) installed.

Show Instructions

1. To add **Scene Builder** to your IDE, click `Tools` on the menu bar of your NetBeans IDE.

2. Click `Options`, a dialog box will appear. From there click `Java`.

3. Under the `Scene Builder Home` dropdown menu click `Browse` and navigate to your Scene Builder installed folder.

4. Click `OK` and tick the checkbox below the dropdown menu.

5. Click `Apply` on the bottom of the dialog box, and then click `OK` to close the dialog box.

## Run
To run the program, right-click the project name on your NetBeans IDE and click `Clean and Build`. Afterwards, just right-click the project name again and then click `Run`.

## Contributors
**We would like to thank the following contributors for their support and contributions to this project:**






Acelle

Created the routing paths, JSON data, map page backend, drawing markers, fetching the API key, creating README, and finishing touches.








David

Created the algorithm, javascript-java interaction, routing page backend, fixing program logic, and finalizing the map.








John Lloyd

Created the wireframes, landing page UI, and collating frontend resources from other frontend developers.








Sophia

Created the initial wireframes that were adapted to the application, router page UI, and map page UI.








Rijan

Created the landing page UI, logos and design components, and added ideas for the application flow.



## License
Distributed under the [MIT](https://choosealicense.com/licenses/mit/) License. See [LICENSE](LICENSE) for more information.

[Back to top]