A student innovation project that helps anyone find their way around the University of Technology, Jamaica's Papine Campus — no prior knowledge needed.
This web app lets you type where you are and where you want to go. It then shows you:
- Step-by-step text directions
- A map with your route drawn on it — source building highlighted red, destination in blue, path in yellow
- Photos of the destination building
The system is built in three layers that talk to each other:
treeDataStruct.js— Stores every building and room in a tree structure. This is how the app understands "Room 1A37 is on the Ground Floor of SOE."graphDatabase.js— Stores every building and walkway as a node on a map graph. Connections between nodes represent actual paths you can walk.campusMapRenderer.js— Knows the exact pixel coordinates of every building outline on the campus map image.
validateInput.js— Checks that what you typed actually exists before doing anything else.findRequiredNode.js— Figures out whether your input is a building or room.FindPath.js— Uses Dijkstra's Algorithm with a Min-Heap to find the shortest walking route between two buildings.suggestLocation.js— Powers the autocomplete dropdown using fuzzy search (Fuse.js). Suggests buildings and rooms only.getBuildingPictures.js— Looks up the right photos for the destination building.
displayTextDirections.js— Writes out the step-by-step directions based on your source and destination.displayMapWithPath.js— Draws the route line and highlights your buildings on the campus map canvas.displayCarousel.js— Shows building photos with prev/next navigation.createOutputSection.js— Builds the results area in the HTML when you submit.
project/
├── index.html # The single page
├── styles.css # All styling
├── app.js # Main controller — wires everything together
│
├── storage/
│ ├── treeDataStruct.js # Building → Room tree
│ ├── graphDatabase.js # Campus walkway graph
│ └── campusMapRenderer.js # Map drawing logic
│
├── processing/
│ ├── validateInput.js
│ ├── findRequiredNode.js
│ ├── FindPath.js # Dijkstra's shortest path
│ ├── suggestLocation.js # Fuzzy autocomplete
│ ├── getBuildingPictures.js
│ └── createOutputSection.js
│
├── output/
│ ├── displayTextDirections.js
│ ├── displayMapWithPath.js
│ ├── displayCarousel.js
│ └── displayPicture.js
│
└── assets/
├── UTECH_MAP.webp # The base campus map image
└── buildings/ # Building photos
No build tools needed. This is plain HTML, CSS, and ES Modules.
- Clone or download the project
- Serve it from a local web server (required for ES Modules to work)
# Using Python python -m http.server 8000 # Using Node.js npx serve .
- Open
http://localhost:8000in your browser
Note: Opening
index.htmldirectly as a file (file://) will not work because browsers block ES Module imports from the local filesystem.
- Add the image to
assets/buildings/<Building_Name>/ - Register it in
getBuildingPictures.jsunder the matching building name key
- Create a
GraphNodeingraphDatabase.js - Connect it to nearby walkway nodes using
addBidirectionalNeighbor() - Add its pixel outline to
campusMapRenderer.js - Add its rooms to
treeDataStruct.js
| Decision | Why |
|---|---|
| Dijkstra's + Min-Heap | Fastest shortest path for a sparse campus graph |
| Tree for rooms | Natural fit — rooms live inside buildings |
| Graph for walkways | Allows any-to-any pathfinding across the campus |
| Canvas for map | Lets us draw paths and colour buildings on the image |
| ES Modules (no bundler) | Keeps the project simple with no build step needed |
v3.0 — A UTech Student Innovation Project
"Thy word is a lamp unto my feet, and a light unto my path" — Psalm 119:105


