Project Overview
The Erie, PA - Center of the Universe platform (erie-pa-centeroftheuniverse.com) required more than just a standard template layout—it demanded a high-performance, interactive local directory combined with engaging, community-driven storytelling.

As the lead designer and developer on this project, I engineered custom front-end components and serverless data integrations tailored to showcase Erie’s local businesses while keeping content updates effortless.
Code Spotlight 1: Dynamic Directory & Vercel API Integration
One of the core features of the platform is the interactive local establishments directory. Instead of hard-coding dozens of individual business cards, I built a custom vanilla JavaScript integration that fetches live CMS data from a Vercel backend endpoint (https://erie-backend.vercel.app/api/local) and dynamically constructs a responsive, filterable CSS grid.
Full Directory Grid View

Active Category Filtering (“Shopping”) & Floating Scroll-to-Top Button
When a user clicks any category pill—such as Shopping—the script dynamically toggles the active button state and filters the DOM cards instantaneously without a page reload, while a custom keyframe-animated ↑ Top button floats in the bottom corner once the user scrolls down:

Core Implementation: Vercel Data Ingestion & Dynamic Grid Building
Instead of maintaining a static frontend markup file, this script parses raw server text data on the fly and maps it cleanly into responsive grid cards:
// 1. Fetch Live CMS Data from Vercel Backendasync function loadDirectoryData() { const grid = document.getElementById('directoryGrid'); const endpoint = 'https://erie-backend.vercel.app/api/local';
try { const response = await fetch(endpoint); const data = await response.text(); buildGrid(data, grid); } catch (error) { grid.innerHTML = '<p class="loading-text">Error loading directory data. Please try again later.</p>'; console.error('Error fetching Vercel CMS data:', error); }}
// 2. Parse Rows and Build Grid Elementsfunction buildGrid(data, grid) { const rows = data.split('\n'); let htmlContent = '';
for (let i = 1; i < rows.length; i++) { const row = rows[i].trim(); if (!row) continue;
const cols = row.split('\t'); if (cols.length >= 5) { const [name, desc, img, link, category] = [cols[0], cols[1], cols[2], cols[3], cols[4].trim().toLowerCase()];
htmlContent += ` <a href="${link}" class="grid-card ${category}"> <div class="image-wrapper"><img src="${img}" alt="${name}"></div> <div class="card-content"> <h3>${name}</h3> <p>${desc}</p> </div> </a> `; } } grid.innerHTML = htmlContent;}
loadDirectoryData();Instant DOM Category Filtering Logic
This lightweight filter handler manages active button styling and class toggling instantly across the card grid with zero external library overhead:
function filterCategory(category, btnElement) { const cards = document.getElementsByClassName("grid-card"); const btns = document.getElementsByClassName("filter-btn");
// Reset active button states for (let j = 0; j < btns.length; j++) { btns[j].classList.remove("active"); } btnElement.classList.add("active");
// Toggle visibility classes on cards for (let i = 0; i < cards.length; i++) { cards[i].classList.remove("hide-item"); if (category !== 'all' && !cards[i].classList.contains(category)) { cards[i].classList.add("hide-item"); } }}Code Spotlight 2: Smart “Context-Aware” Back Navigation
To enhance the user experience on individual establishment spotlight pages (such as E. Lane Boutique) and keep visitors within the site ecosystem, I engineered a context-aware ← Back button.

Instead of a static link that could trap users who arrived directly from Google Search, this vanilla JavaScript snippet checks document.referrer. If the visitor navigated from inside erie-pa-centeroftheuniverse.com, it returns them to their exact previous scroll and filter state via window.history.back(). If they arrived from an external link, it routes them cleanly to the homepage.
function smartBack() { // Check if the user came from an internal page on the domain if (document.referrer.includes("erie-pa-centeroftheuniverse.com")) { window.history.back(); } else { // Fallback to homepage if arrived via direct search/external link window.location.href = "https://www.erie-pa-centeroftheuniverse.com/"; }}Results & Impact
By combining custom front-end engineering with clean brand positioning, the platform delivers fast directory filtering, intuitive navigation, and an easily maintainable data pipeline that scales alongside community growth.
Have a custom web development or engineering project that needs a high-performance solution? Get in touch with Kat Noodle Designs.
Client Reviews & Feedback
Leave a review below using GitHub, or submit directly via our quick client form!


