How skill-sync-mnnit/skillsync-ai works
1. Overall shape
SkillSync AI is a three-service application with a clear split between user-facing UI, business API, and AI/vector services. The main runtime pieces are:
- frontend: React/Vite SPA
- backend: Node.js/Express API for core product logic
- ai-service: Python/FastAPI service for embeddings, semantic search, moderation, and ranking
- workers: Python batch job runner for scheduled embedding sync
2. Frontend boundary
The React app is the presentation layer only. It contains route-level pages, shared UI components, layout shells, context providers, and client-side stores. Pages such as login, profile, jobs, search, messages, and dashboard talk to backend APIs through the service layer in frontend/src/services. Real-time chat state is handled with a socket hook and a chat store, so the UI depends on both HTTP and websocket-style interactions.
3. Backend boundary
The Node.js backend is the system of record for application workflows that are not pure AI: authentication, profiles, jobs, notifications, chat, connections/networking, projects, and internal maintenance endpoints. Its structure is layered:
- routes expose REST endpoints
- controllers translate requests into use cases
- services hold business logic
- repositories isolate persistence access
- models define MongoDB documents
This separation is important for diagramming because most product flows terminate in backend services, not directly in AI service calls.
4. AI service boundary
The Python FastAPI service is dedicated to machine-assisted features. Its routers expose separate endpoints for:
- embed: generating and managing resume/job embeddings
- search: semantic similarity search over vectors
- moderate: AI moderation of content
- analytics: skill/trend analytics
Under the routers, service modules implement embedding generation, Pinecone access, ranking, moderation, and explanation logic. This service is intentionally distinct from the Node backend so the vector/LLM stack can evolve independently.
5. Core data stores and external services
Several external systems materially shape the architecture:
- MongoDB Atlas stores users, profiles, jobs, notifications, conversations, connections, and other application entities
- Pinecone stores vector embeddings for semantic discovery
- Upstash Redis supports caching/queue-like behavior and state coordination
- Cloudinary stores uploaded resume PDFs
- Gemini + text-embedding-004 provide language model and embedding generation
- Gmail SMTP/Nodemailer handles OTP and email notifications
These are not interchangeable details; they define the persistence and AI boundaries of the system.
6. Primary product flows
The most important end-to-end flows are:
- registration/login/OTP: frontend → backend auth services → MongoDB + email
- resume upload/profile update: frontend → backend profile services → Cloudinary + MongoDB
- embedding generation: backend/internal trigger or worker → ai-service → Pinecone
- semantic search: frontend search page → backend search controller or internal proxy → ai-service search/ranking → MongoDB/Pinecone results
- job posting and moderation: backend jobs services → ai-service moderation → job publish/store
- job matching notifications: backend jobs/notification services consume matching logic and notify users
7. Jobs and notifications subsystem
Jobs are a major domain area in the backend. The jobs controllers/services and notifications engine implement posting, applications, expiration, and user alerts. The architecture suggests moderation is part of job publishing, and matching logic likely relies on profile/job skill data. Notifications are a separate subsystem rather than inline with jobs, which makes it easier to diagram event-driven or service-triggered alerts.
8. Search and talent discovery
Search is split across the backend and AI service. The backend exposes search routes/services for request handling and authorization, while the AI service performs semantic retrieval and ranking using Pinecone and embeddings. This means search is not simple database lookup; the architecture depends on vector similarity plus ranking/explanation layers for result quality.
9. Chat and networking
Messaging and connections are first-class backend subsystems. The backend models include chat rooms, chat messages, conversations, and connections, and the frontend has dedicated pages and socket integration. This indicates a mixed real-time and persisted conversation model, with MongoDB as the durable store and a socket service for live updates.
10. Internal/admin-style integration points
There are internal backend routes and middleware around secret verification and embedding status updates. These endpoints are meant for service-to-service or worker-driven operations rather than end-user interaction. In a diagram, they should be shown as private control-plane paths between the backend, workers, and AI service.
11. Batch processing
The workers/batch_embed.py script and backend job files imply scheduled offline processing, especially for embeddings and scraped content. This is distinct from request/response traffic: workers likely pull pending items, call the AI service, and update backend state or Pinecone records. The architecture therefore includes both synchronous APIs and asynchronous batch jobs.
12. Repository structure and engineering boundaries
The repo is organized by deployable unit, not just by feature:
- frontend for browser UI
- backend for application APIs and persistence
- ai-service for ML/vector capabilities
- workers for scheduled automation
Supporting files like Docker Compose, GitHub Actions, and test suites reinforce that these units are intended to run independently but integrate through HTTP, MongoDB, Pinecone, Redis, and Cloudinary.
13. Security and access control
Access control is centralized in the backend through JWT/token verification, role checks, ban checks, and internal-secret verification. The readme also makes clear the platform is invite-only and email-domain restricted. For an architecture diagram, this means authentication/authorization is not just a UI concern; it is enforced in backend middleware and service logic.
14. Testing and operational seams
The presence of unit and integration tests across backend and AI service, plus scripts for validating embedding/Pinecone behavior, shows that the system has strong seams around service boundaries. Those seams map well to architecture boxes: UI tests around frontend state, API tests around backend routes/services, and model/vector tests around the AI layer.
Main entry points: src/services Domain Services · ai-service/services Vector Services · routes API Routes · routers AI Routers
Components 20
Frontend
React/Vite presentation layer and client state.
- SPA Shell · Main browser app with layouts, route pages, context, and client stores.
frontend/src - UI Services · Browser service layer plus socket hook for backend and realtime chat integration.
frontend/src/services - Route Pages · Login, profile, jobs, search, messages, dashboard, and settings views.
frontend/src/pages - Chat State · Socket hook and chat store coordinating live messaging UI.
frontend/src/hooks
Backend
Node/Express application API and domain logic.
- API Routes · REST entrypoints for auth, profile, jobs, search, chat, networking, and internal control paths.
backend/src/routes - Controllers · Translate HTTP requests into domain use cases and service calls.
backend/src/controllers - Domain Services · Auth, profile, jobs, search, notifications, and socket coordination.
backend/src/services - Repositories · Data access boundary for users, chat, connections, projects, and profiles.
backend/src/repositories - Mongo Models · Core persisted entities such as users, jobs, conversations, notifications, and projects.
backend/src/models - Job Runners · Moderation, expiry, scraper, and embedding-control jobs.
backend/src/jobs
AI Service
FastAPI vector and moderation service.
- AI Routers · Embed, search, moderate, and analytics endpoints.
ai-service/routers - Vector Services · Embedding generation, ranking, moderation, explanation, and analytics logic.
ai-service/services - Vector Store Access · Repository layer for vector persistence and retrieval.
ai-service/services/pinecone_repo.py
Workers
Offline batch automation.
- Batch Embed · Offline embedding sync and other scheduled automation.
workers/batch_embed.py
External Systems
Persistent stores and third-party services.
- MongoDB Atlas · System of record for application entities and workflows.
- Pinecone · Stores embeddings for semantic search and matching.
- Redis · Supports caching and coordination across backend workflows.
- Cloudinary · Stores uploaded resume PDFs and related assets.
- Gmail SMTP · Sends OTP and notification email through Nodemailer/SMTP.
- Gemini API · Language and embedding generation provider used by AI services.
Connections 22
- SPA Shell → Route Pages: renders · Route-level views are composed inside the SPA shell.
- SPA Shell → UI Services: uses · Pages call browser services for backend communication.
- SPA Shell → Chat State: uses · Messaging UI depends on realtime chat state and sockets.
- UI Services → API Routes: HTTP · Frontend service layer calls the backend API.
- Chat State → API Routes: realtime/API · Chat state syncs with backend messaging endpoints.
- API Routes → Controllers: dispatches · Routes forward requests to controller handlers.
- Controllers → Domain Services: invokes · Controllers delegate workflow logic to services.
- Domain Services → Repositories: reads/writes · Services use repositories for persistence access.
- Repositories → Mongo Models: maps · Repositories operate over MongoDB models and documents.
- Mongo Models → MongoDB Atlas: persisted in · Primary application data is stored in MongoDB Atlas.
- Domain Services → Cloudinary: uploads · Profile/resume flows store files in Cloudinary.
- Domain Services → Gmail SMTP: sends · Auth and notification flows deliver OTPs and emails.
- Domain Services → Redis: coordinates · Backend uses Redis for cache and coordination.
- Domain Services → AI Routers: calls · Search, moderation, and embedding-related flows reach the AI service.
- Job Runners → AI Routers: triggers · Async jobs invoke AI endpoints for moderation and embeddings.
- Batch Embed → AI Routers: syncs embeddings · Scheduled worker drives offline embedding updates.
- AI Routers → Vector Services: delegates · Routers hand off to vector and ML service modules.
- Vector Services → Vector Store Access: uses · AI logic reads and writes vector data through the repository.
- Vector Services → Pinecone: stores/searches · Semantic retrieval runs against Pinecone.
- Vector Services → Gemini API: generates · LLM and embedding provider powers ranking, explanations, and embeddings.
- Job Runners → Domain Services: uses · Jobs reuse domain services for moderation and expiry workflows.
- API Routes → Mongo Models: admin/internal · Internal endpoints expose status and embedding-control paths.