# sriraghavi22/careercatalyst architecture

> Architecture diagram of the GitHub repository sriraghavi22/careercatalyst, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sriraghavi22/careercatalyst
- Repository: https://github.com/sriraghavi22/careercatalyst

## Overview

##### Entities (Collections)
From your folder “backend copy/models” you have four core entities:
- Individual
- Institution
- Organization
- Job

##### Attributes for Each Entity
(Use your actual Mongoose schema definitions to fill in exact fields—these are example placeholders.)

- Individual
– _id (ObjectId, PK)
– fullName: String
– email: String
– passwordHash: String
– resumeUrl: String
– createdAt, updatedAt

- Institution
– _id (ObjectId, PK)
– name: String
– address: String
– contactEmail: String
– createdAt, updatedAt

- Organization
– _id (ObjectId, PK)
– name: String
– description: String
– contactEmail: String
– createdAt, updatedAt

- Job
– _id (ObjectId, PK)
– title: String
– description: String
– requirements: [String]
– postedDate: Date
– institutionId: ObjectId (FK → Institution)
– createdByOrgId: ObjectId (FK → Organization)
– createdAt, updatedAt

##### Relationships and Cardinalities
- Institution 1–N Job
– One Institution can post many Jobs.
- Organization 1–N Job
– One Organization can create many Jobs.
- Institution 1–N Individual (optional)
- Many-to-Many (Individual ↔ Job) via “matches”
– Your resume_job_matcher.py implies you store match results:
- matchCollection
– individualId: ObjectId (FK → Individual)
– jobId: ObjectId (FK → Job)
– matchScore: Number

##### Final Steps
- Inspect each *.js model file to capture any extra fields or indexes.
- Timestamps or embedded sub-documents if present (e.g., resume parsed data).
- Collections logically: group “User” collections on one side, “Job” collections on the other.
- Review and refine with the team to ensure it matches the actual database.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Collections"
        direction TB
        Institution["Institution<br/>_id (PK)<br/>name<br/>address<br/>contactEmail"]:::primary
        Organization["Organization<br/>_id (PK)<br/>name<br/>description<br/>contactEmail"]:::primary
        Individual["Individual<br/>_id (PK)<br/>fullName<br/>email<br/>passwordHash<br/>resumeUrl"]:::primary
        Job["Job<br/>_id (PK)<br/>title<br/>description<br/>requirements<br/>postedDate<br/>institutionId (FK)<br/>createdByOrgId (FK)"]:::primary
        Match["Match<br/>individualId (FK)<br/>jobId (FK)<br/>matchScore"]:::secondary
    end

    Institution -->|"1 to N"| Job
    Organization -->|"1 to N"| Job
    Institution -->|"1 to N (optional)"| Individual
    Individual -->|"1 to M"| Match
    Job -->|"1 to M"| Match

    click Institution "https://github.com/sriraghavi22/careercatalyst/blob/main/backend copy/models/Institution.js"
    click Organization "https://github.com/sriraghavi22/careercatalyst/blob/main/backend copy/models/Organization.js"
    click Individual "https://github.com/sriraghavi22/careercatalyst/blob/main/backend copy/models/Individual.js"
    click Job "https://github.com/sriraghavi22/careercatalyst/blob/main/backend copy/models/Job.js"
    click Match "https://github.com/sriraghavi22/careercatalyst/blob/main/backend copy/resume_job_matcher.py"

    classDef primary fill:#add8e6,stroke:#000,stroke-width:1px;
    classDef secondary fill:#90ee90,stroke:#000,stroke-width:1px;
```
