How sahityabiswas/job_nexus works
Purpose and Entry Points
JOB NEXUS is a career recommendation system that stores jobs, skills, and courses in Neo4j, then recommends jobs from a user skill profile. Runtime entry points are the FastAPI service in src/api.py, the standard ingestion command in src/ingest_simple.py, and a scalable Spark ingestion alternative in src/ingest_spark.py. The browser SPA is static/index.html.
API and SPA Boundary
src/api.py serves the SPA and exposes REST endpoints for skill search/normalization, filter metadata, recommendations, and graph data. static/index.html owns interactive profile entry, filtering, recommendation display, graph visualization, sharing, and PDF export. The frontend communicates only through the FastAPI API boundary; matching and graph queries remain server-side.
Recommendation Pipeline
src/recommender.py is the ranking engine. It accepts normalized user skills plus proficiency and filtering/sort inputs, retrieves job requirements from Neo4j, and combines graph-overlap information with TF-IDF/cosine similarity. Its outputs include match scores and matched/missing skill breakdowns used by the recommendation UI and learning simulation.
Skill Canonicalization
src/normalize.py centralizes alias mapping and canonical skill lookup. Both ingestion and request-time profile handling should pass through this layer so variants such as misspellings or alternate spellings resolve to one Skill node identity. This is a key consistency boundary between raw external records/user input and the graph schema.
Graph Persistence and Query Layer
src/db_neo4j.py manages the Neo4j driver/connection pool and isolates AuraDB credentials and database access from API, matching, and ingestion code. The graph’s architectural entities are Job, Skill, and Course, connected by REQUIRES and TEACHES relationships. Neo4j supports both recommendation retrieval and the graph payload rendered in the client.
Ingestion Paths
src/ingest_simple.py is the local/default loader, likely consuming repository seed datasets such as data/courses.csv and data/users.csv before creating normalized nodes and relationships. src/ingest_spark.py is the distributed path: it fetches public job/course data, partitions processing with Spark, performs NLP normalization, and writes graph partitions concurrently to Neo4j. spaCy is a material dependency for skill extraction/normalization.
Runtime and Deployment
The backend is Python/FastAPI with scikit-learn vector matching, spaCy NLP, and Neo4j AuraDB as the external graph service. requirements.txt defines Python runtime dependencies. Render deployment is represented by Procfile and render.yaml; connection configuration is supplied through environment variables or the template in config.example.json.
Main entry points: api.py FastAPI Service · db_neo4j.py Neo4j Access Layer · ingest_simple.py Local Loader · ingest_spark.py Spark Loader
Components 18
Browser Client
- Career SPA · Profile entry, filters, results, graph view, sharing, and PDF export.
static/index.html
Python Backend
- FastAPI Service · Serves the SPA and keeps matching and graph queries server-side.
src/api.py - Skill Canonicalizer · Maps aliases and variants to canonical skill identities.
src/normalize.py - Ranking Engine · Combines graph overlap with TF-IDF/cosine ranking and filters.
src/recommender.py - Vector Matching
Ingestion Paths
- Local Loader · Default loader for normalized graph records.
src/ingest_simple.py - Spark Loader · Partitions public data processing and writes graph partitions concurrently.
src/ingest_spark.py - Course Seed Data
data/courses.csv - User Seed Data
data/users.csv - Public Job & Course Data
- spaCy NLP · Extracts and normalizes skills in the distributed path.
Graph Persistence
- Neo4j Access Layer · Owns driver pooling, credentials isolation, and database access.
src/db_neo4j.py - Neo4j AuraDB · Stores Job, Skill, and Course nodes with REQUIRES and TEACHES relationships.
- Career Knowledge Graph · Job REQUIRES Skill; Course TEACHES Skill.
Runtime & Deployment
- Python Dependencies · Defines FastAPI, Neo4j, spaCy, and scikit-learn dependencies.
requirements.txt - Render Deployment
render.yaml - Service Process
Procfile - Connection Config Template · Environment variables or this template supply connection settings.
config.example.json
Connections 20
- Career SPA → FastAPI Service: REST requests
- FastAPI Service → Skill Canonicalizer: normalize profile skills
- FastAPI Service → Ranking Engine: recommendations
- FastAPI Service → Neo4j Access Layer: graph payload and metadata
- Ranking Engine → Vector Matching: TF-IDF and cosine similarity
- Ranking Engine → Neo4j Access Layer: retrieve requirements
- Local Loader → Course Seed Data: loads
- Local Loader → User Seed Data: loads
- Local Loader → Skill Canonicalizer: canonicalizes skills
- Local Loader → Neo4j Access Layer: writes graph
- Spark Loader → Public Job & Course Data: fetches
- Spark Loader → spaCy NLP: skill extraction
- Spark Loader → Skill Canonicalizer: canonicalizes skills
- Spark Loader → Neo4j Access Layer: concurrent partition writes
- Neo4j Access Layer → Neo4j AuraDB: driver queries
- Neo4j AuraDB → Career Knowledge Graph: persists
- Python Dependencies → FastAPI Service: runtime dependencies
- Render Deployment → Service Process: launches
- Service Process → FastAPI Service: runs service
- Connection Config Template → Neo4j Access Layer: connection settings