The alumni directory gives every GradGather user a searchable, filterable view of the alumni network. Users can type any combination of name, graduation year, degree programme, or professional field into a single search bar and immediately see matching alumni cards rendered on the page — no page reload required. The filtering logic runs entirely client-side in JavaScript, keeping the interaction fast and snappy.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/meenalsingh0/GradGather/llms.txt
Use this file to discover all available pages before exploring further.
Accessing the Directory
The directory is served from a single Express route that renders thedirectory.hbs template:
| Method | Path | Description |
|---|---|---|
| GET | /directory | Alumni directory with search & filter |
Directory Data Structure
The current implementation embeds a staticalumniData array directly inside directory.hbs. Each object in the array contains four fields:
| Field | Type | Description |
|---|---|---|
name | String | Alumni’s full name |
year | Number | Graduation year |
degree | String | Degree programme (e.g., Btech Computer Science) |
field | String | Current professional field or job title |
Search and Filtering
The filter bar at the top of the directory page accepts a single text input (#searchInput). Clicking the Search button triggers the filterAlumni() function, which performs a case-insensitive substring match across all four alumni fields:
"2018" to find alumni who graduated in 2018, or type "devops" to find alumni working in DevOps — the same input box handles all four fields simultaneously.
Rendering Alumni Cards
WhenfilterAlumni() produces a result set, it passes the filtered array to loadAlumni(data). This function clears the #alumniList container and rebuilds it from scratch, creating one div.alumni DOM element per matching record:
window.onload calls loadAlumni(alumniData) with the full unfiltered dataset, so all alumni are visible before the user types anything.