CrewGraph is an interactive collaboration-network explorer for film and TV crew members. It models Crew, Production, and Credit relationships in MongoDB, exposes graph-oriented API endpoints with Express, and renders an explorable force-directed graph in the browser with Force Graph.
Live app: https://crewgraph.onrender.com/
- Search for crew members and load their collaboration network
- Visualize crew relationships as a draggable, zoomable graph
- Show shared productions for the selected crew member
- Find the shortest collaboration path between two crew members
- Animate and highlight the discovered path in the graph
- Support a mobile-aware UI with collapsible panels
- Node.js
- Express
- MongoDB Atlas
- Mongoose
- Vanilla HTML, CSS, and JavaScript
- Force Graph via CDN
CrewGraph stores normalized source data in three collections:
CrewProductionCredit
The frontend does not receive a full database dump. It loads:
- the crew directory for search
- a selected crew member's collaboration network on demand
- a shortest-path result on demand
The graph you see in the browser is derived from those API responses rather than stored as a static JSON file.
.
├── controllers/
├── models/
├── routes/
├── scripts/
├── utils/
├── app.js
├── server.js
├── index.html
├── style.css
└── script.js
nameroleavatarcreatedAt
titleyeartmdbIdcreatedAt
crewIdproductionIdrole
Basic health check.
Returns the crew directory.
Returns a single crew member and their credits.
Returns collaborators, collaboration counts, and shared productions for a crew member.
Returns a network payload centered on the selected crew member. The current implementation is an ego network built from that crew member's productions and direct collaborators.
Returns the shortest collaboration path between two crew members using Breadth-First Search.
Example response:
{
"degrees": 3,
"path": [
{ "_id": "a", "name": "Avery Vale", "role": "Director" },
{ "_id": "b", "name": "Finley Ellison", "role": "Producer" },
{ "_id": "c", "name": "Jordan Cross", "role": "Editor" },
{ "_id": "d", "name": "Jules Archer", "role": "Composer" }
],
"segments": [
{
"source": "a",
"target": "b",
"sharedCredits": 2,
"production": {
"_id": "p1",
"title": "Dune: Part Two",
"year": 2024,
"tmdbId": 693134
}
}
]
}The seed script currently creates:
- 30 crew members
- 15 productions
- a random set of credits connecting them
Productions are curated real titles with real TMDB IDs. Crew members are fictional.
npm installCreate a .env file in the project root:
MONGODB_URI=mongodb+srv://<username>:<password>@<cluster>.mongodb.net/crewgraph?appName=<app-name>
PORT=3000Notes:
- Include the database name in the path, for example
/crewgraph PORTis only needed locally
npm run seedDevelopment:
npm run devProduction-style local start:
npm startThen open:
http://localhost:3000/
CrewGraph is deployed as a single Render Web Service.
Build command:
npm installStart command:
npm startRequired environment variable:
MONGODB_URI=<your MongoDB Atlas connection string>Notes:
- Render provides
PORTautomatically - MongoDB Atlas must allow Render to connect
- for a quick dev deployment, Atlas network access may need
0.0.0.0/0
- The frontend is served directly by Express
- Force Graph is loaded via CDN from
unpkg - The browser uses
window.location.originin deployment andhttp://localhost:3000when opened fromfile://
This project is designed as a portfolio/demo application, not a production-scale graph platform.
Current tradeoffs:
/crew/:id/networkreturns a direct collaboration ego network, not an arbitrarily deep graph/connection/:crewA/:crewBcurrently rebuilds a collaboration adjacency map in memory per request- the full crew directory is sent to the frontend for search
That is acceptable for the current seeded dataset. If this were scaled up, the next improvements would be:
- indexed credit lookups
- server-side search instead of loading all crew upfront
- frontier-based traversal for shortest path
- cached or precomputed collaboration adjacency
For a tiny fixed dataset, a static JSON file would be simpler. MongoDB is being used here because the project is demonstrating:
- normalized data modeling
- graph derivation from relational-style source data
- graph-oriented API design
- shortest-path traversal over collaboration relationships
CrewGraph is a strong portfolio project because it demonstrates more than CRUD:
- data modeling
- API design
- graph traversal with BFS
- interactive visualization
- deployment and environment management
- product thinking around exploration and usability
ISC