Skip to content

Repository files navigation

SkillGraph

SkillGraph is a developer skill and job relationship explorer demonstrating the practical use of a graph database (CognoDB). Instead of simply viewing flat tables of users and jobs, SkillGraph allows you to visually and programmatically explore the complex relationships between developers, the skills they have, the jobs they are a fit for, and the companies offering those jobs.

Why a Graph Database?

In a traditional relational database (SQL), mapping a developer to matching jobs based on required skills would require multiple expensive JOIN operations across several intersection tables (e.g., Developer -> DeveloperSkills -> Skills <- JobSkills <- Jobs). As the number of relationships grows or the depth of the query increases (multi-hop), the SQL query becomes incredibly complex and slow.

Graph databases like CognoDB treat relationships as first-class citizens.

For example, to find companies offering jobs that match a developer's skills, the traversal is natural and declarative: `Developer → HAS_SKILL → Skill ← REQUIRES ← Job → OFFERED_BY → Company`

Cypher makes this multi-hop traversal trivial and highly performant:

MATCH (d:Developer {id: $developerId})-[:HAS_SKILL]->(s:Skill)<-[:REQUIRES]-(j:Job)-[:OFFERED_BY]->(c:Company)
RETURN c

This query easily traverses the graph without computing expensive cross-products, making it perfect for recommendation engines and relationship explorers.

Tradeoffs: While graph databases excel at highly connected data and deep traversals, they may not be the best choice for simple transactional records (like a ledger), heavy aggregations across disconnected entire datasets, or scenarios where data has zero relationships.

Data Model

graph TD
    D((Developer)) -->|HAS_SKILL| S((Skill))
    D -->|WORKED_AT| C((Company))
    J((Job)) -->|REQUIRES| S
    J -->|OFFERED_BY| C
    C -->|LOCATED_IN| L((Location))
    S -->|RELATED_TO| S
    
    classDef node fill:#1e40af,stroke:#60a5fa,stroke-width:2px,color:white;
    class D,S,J,C,L node;
Loading

Nodes & Properties:

  • Developer (id, name, title, yearsExperience, bio, location)
  • Skill (id, name, category)
  • Job (id, title, description, experienceLevel, employmentType, remote, salaryMin, salaryMax)
  • Company (id, name, industry, description, size)
  • Location (id, city, country)

Architecture

SkillGraph is built using a modern Next.js App Router architecture.

Next.js (App Router, React Server Components)
   ↓
Services (developerService, jobService, etc.)
   ↓
Neo4j Driver (singleton, handles connection pooling)
   ↓
Bolt Protocol (TCP)
   ↓
CognoDB

Setup & Local Development

1. Database Configuration

  1. Create a free CognoDB cloud instance.
  2. Get your connection URI, Username (cognodb), and Password.
  3. Copy .env.example to .env.local and fill in your credentials:
    cp .env.example .env.local

2. Install Dependencies

npm install

3. Seed the Database

This will create realistic dummy data (~40 devs, ~40 skills, ~70 jobs, ~35 companies).

npm run seed

4. Start Development Server

npm run dev

Navigate to http://localhost:3000.

Main Queries Demonstrated

  • Multi-hop Traversal: Finding companies whose job requirements match a specific developer's skills (Query 5).
  • Skill Gap Analysis: Taking a specific Developer and a Job, and calculating the exact MATCHED and MISSING skills via graph set operations (Query 6).
  • Related Skills Exploration: Traversing RELATED_TO edges to find similar technologies (Query 7).
  • Ranking by Overlap: Sorting jobs for a developer based on how many skills they share (Query 4).
  • Global Search: Searching for a keyword across Developers, Skills, Jobs, and Companies using a unified query (Query 8).

Security & Performance

  • All Cypher queries strictly use parameters ($paramName) to prevent injection.
  • Database access is restricted to the server (React Server Components / API Routes).
  • Neo4j Driver instance is cached globally to prevent connection exhaustion.
  • Results are heavily typed in TypeScript for UI safety.

Deployment

This application is fully compatible with Vercel. Ensure you add COGNODB_URI, COGNODB_USERNAME, and COGNODB_PASSWORD to your Vercel Environment Variables before deploying.

Screenshots

Here are a few relevant screens from the application:

Explore Graph

Explore Dashboard

Developer Profile & Skill Gaps

Developer Profile

Visual Graph Traversal

Graph Explorer

Jobs List

Jobs List

About

SkillGraph is a developer skill and job relationship explorer demonstrating the practical use of a graph database (CognoDB). Instead of simply viewing flat tables of users and jobs, SkillGraph allows you to visually and programmatically explore the complex relationships between them.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages