About Camdram Connected

How site works, what it is built with, and why some searches take longer than others.

What It Does

Camdram Connected explores Camdram credits to find links between two people in Cambridge theatre. Each connection is built from shared shows and roles, then displayed as both graph and step-by-step explanation.

Tech Stack

Vanilla JavaScript

Runs search UI, API access, in-memory caches, and pathfinding logic in one client-side app.

vis-network

Draws interactive people-and-show graph with pan, zoom, and node highlighting.

Cloudflare Pages

Hosts site as static assets with no build step.

Pages Function Proxy

Handles `/api/*` requests, adds CORS headers, and caches Camdram responses at edge.

Camdram API

Provides source data for people, productions, and role credits.

Algorithms

Autocomplete

Waits briefly after each burst of typing before searching Camdram. Debouncing cuts duplicate queries while still feeling immediate, and exact selection avoids confusion between similar names.

Rate Limiting

Inserts small delay between outbound requests. Search often needs many person-role and show-role lookups in sequence, so paced requests reduce load spikes and keep behaviour predictable.

Breadth-First Search

Treats graph as person to show to person hops. Shortest-path mode explores layer by layer, so first successful route found is also minimum degree connection.

All-Path Search

Continues collecting routes at same depth instead of stopping at first hit. That reveals multiple valid explanations, but branch count can grow quickly for well-connected people.

Lazy Graph Discovery

Fetches people and show data only when frontier reaches them. App never tries to preload whole theatre network, which keeps initial searches practical.

Caching

Stores fetched people, role lists, and show casts in memory for current session. Repeated searches can reuse known data instead of hitting API again.

Visited-State Tracking

Remembers explored people and shows so search does not loop through repeated collaborations. Important because Cambridge theatre graph is dense and highly interconnected.

Depth Limits

Caps how far search can expand. Quick mode prunes aggressively for responsiveness, while deeper modes spend more requests and processing to uncover longer routes.

Why Search Time Varies

Some people have worked on many productions, which creates much larger search branches. Quick mode stops earlier. Deeper and exhaustive modes explore more graph, so they can reveal more paths but require more API requests and processing.