# dctxv/ict30017-digital-career-hub architecture

> Architecture diagram of the GitHub repository dctxv/ict30017-digital-career-hub, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dctxv/ict30017-digital-career-hub
- Repository: https://github.com/dctxv/ict30017-digital-career-hub

## Overview

1. **Repository shape**
   - This repo is organized as a small multi-service Node.js system for a “Digital Career Hub.”
   - The meaningful runtime code is split into two backend services: `server/` and `ai-service/`.
   - `client/` exists as a placeholder, but there is no tracked frontend implementation in this snapshot.

2. **Primary product boundary**
   - The system’s main workflow is resume review for students/job seekers.
   - The backend appears to handle resume upload, text extraction, sanitization, and orchestration.
   - AI-based evaluation is isolated into a separate service so the core app and the AI logic can evolve independently.

3. **User-facing backend: `server/`**
   - `server/src/app.js` is the main application entrypoint, likely bootstrapping the API server.
   - `server/src/routes/resume.js` defines the resume-related API surface.
   - `server/src/middleware/upload.js` suggests the server accepts file uploads as part of the resume flow.
   - The presence of `controllers/`, `models/`, `services/`, and `jobs/` indicates a layered structure, even though most of those folders are currently empty placeholders.

4. **Resume ingestion pipeline**
   - The server-side pipeline likely follows this sequence:
     - receive a resume file through the upload middleware,
     - parse the document with `server/src/utils/fileParser.js`,
     - clean or normalize extracted text with `server/src/utils/sanitise.js`,
     - forward the processed content to the AI review layer.
   - This separation shows a clear boundary between file handling and AI evaluation.

5. **AI subsystem: `ai-service/`**
   - `ai-service/index.js` is the service entrypoint for the AI component.
   - `src/services/resumeReviewer.js` is the core domain service, likely responsible for turning resume text into structured feedback.
   - `src/utils/aiClient.js` is an abstraction around the underlying AI provider or model call.
   - `src/schemas/resumeSchema.js` suggests request/response validation or shape enforcement for the AI contract.

6. **Contract between services**
   - The architecture implies a clean interface between the main server and the AI service: the server prepares resume content, and the AI service returns structured review output.
   - Keeping parsing/sanitization in `server/` and review logic in `ai-service/` reduces coupling and makes the AI layer independently testable.

7. **Validation and safety boundaries**
   - `resumeSchema.js` indicates the AI service expects a defined input shape instead of raw, unstructured payloads.
   - `sanitise.js` on the server side suggests the project intentionally normalizes or cleans extracted text before it reaches the review logic.
   - That combination is important for reliability because resume files can vary widely in formatting and content quality.

8. **Testing**
   - `ai-service/tests/testResumeReviewer.js` shows the AI review logic has dedicated tests.
   - The `custom/` folder contains multiple `sample_resume*.txt` files, which are likely test fixtures or prompt-evaluation examples.
   - This points to a strong focus on iterative AI behavior testing rather than only traditional API testing.

9. **Reference documents and evaluation assets**
   - `docs/database/` contains PDF and DOCX resumes plus a job market database archive.
   - These files look like development/test artifacts for parser validation and AI prompt tuning.
   - `docs/darius_notes/ai_prompting_engineering.md` further suggests the team used prompt engineering notes as part of the AI workflow.

10. **Deployment/runtime picture**
    - Both `server/` and `ai-service/` are Node.js applications with their own `package.json` and lockfiles.
    - That means the architecture is likely two deployable services rather than one monolith.
    - The repo does not show infrastructure code, so the runtime topology is inferred from service boundaries rather than explicit deployment manifests.

11. **What is not present yet**
    - The `client/` folder is empty in the tree, so the UI layer is not part of the visible architecture here.
    - Several backend folders are scaffolds only, which suggests the repository is either mid-development or intentionally structured ahead of implementation.

12. **Diagram takeaway**
    - For an architecture diagram, draw:
      - a user-facing web/client boundary,
      - a Node.js API server handling upload, parsing, and sanitization,
      - a separate AI review service handling validation, model access, and resume scoring/feedback,
      - supporting test fixtures/docs feeding development and validation.
    - The key design idea is the split between “resume ingestion” and “AI evaluation.”

Main entry points: [`ai-service/src/services/resumeReviewer.js`](https://github.com/dctxv/ict30017-digital-career-hub/blob/main/ai-service/src/services/resumeReviewer.js) (Reviewer), [`server/src/routes/resume.js`](https://github.com/dctxv/ict30017-digital-career-hub/blob/main/server/src/routes/resume.js) (Resume API), [`ai-service/index.js`](https://github.com/dctxv/ict30017-digital-career-hub/blob/main/ai-service/index.js) (AI Service), [`server/src/utils/fileParser.js`](https://github.com/dctxv/ict30017-digital-career-hub/blob/main/server/src/utils/fileParser.js) (File Parser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_group_client["Client"]
  node_client_placeholder["Client<br/>placeholder frontend"]
end

subgraph group_group_server["API Server"]
  node_server_app(("API App<br/>node entrypoint<br/>[app.js]"))
  node_resume_route["Resume API<br/>route layer<br/>[resume.js]"]
  node_upload_middleware["Upload Middleware<br/>file upload<br/>[upload.js]"]
  node_file_parser["File Parser<br/>document parser<br/>[fileParser.js]"]
  node_sanitiser["Sanitiser<br/>text normaliser<br/>[sanitise.js]"]
  node_server_services["Server Services<br/>service scaffold"]
  node_server_models["Server Models<br/>model scaffold"]
  node_server_jobs["Server Jobs<br/>job scaffold"]
end

subgraph group_group_ai["AI Service"]
  node_ai_entry(("AI Service<br/>service entrypoint<br/>[index.js]"))
  node_resume_schema["Resume Schema<br/>contract schema<br/>[resumeSchema.js]"]
  node_resume_reviewer["Reviewer<br/>domain service<br/>[resumeReviewer.js]"]
  node_ai_client["AI Client<br/>provider adapter<br/>[aiClient.js]"]
  node_ai_tests["Reviewer Tests<br/>test suite"]
end

subgraph group_group_validation["Validation Assets"]
  node_sample_resumes["Sample Resumes<br/>test fixtures"]
  node_resume_docs[("Resume Corpus<br/>reference data")]
  node_prompt_notes["Prompt Notes<br/>design notes"]
end

node_client_placeholder -.->|"calls API"| node_server_app
node_server_app -->|"mounts"| node_resume_route
node_resume_route -->|"accepts files"| node_upload_middleware
node_upload_middleware -->|"parses"| node_file_parser
node_file_parser -->|"normalises"| node_sanitiser
node_sanitiser -->|"submits review"| node_ai_entry
node_ai_entry -->|"validates contract"| node_resume_schema
node_ai_entry -->|"routes to core"| node_resume_reviewer
node_resume_reviewer -->|"calls model"| node_ai_client
node_resume_reviewer -->|"uses schema"| node_resume_schema
node_ai_tests -->|"verifies"| node_resume_reviewer
node_sample_resumes -.->|"feeds fixtures"| node_ai_tests
node_resume_docs -.->|"validates parsing"| node_file_parser
node_prompt_notes -.->|"guides prompts"| node_resume_reviewer
node_server_services -.->|"future boundary"| node_resume_route
node_server_models -.->|"future boundary"| node_resume_route
node_server_jobs -.->|"future boundary"| node_resume_route

click node_client_placeholder "https://github.com/dctxv/ict30017-digital-career-hub/tree/main/client"
click node_server_app "https://github.com/dctxv/ict30017-digital-career-hub/blob/main/server/src/app.js"
click node_resume_route "https://github.com/dctxv/ict30017-digital-career-hub/blob/main/server/src/routes/resume.js"
click node_upload_middleware "https://github.com/dctxv/ict30017-digital-career-hub/blob/main/server/src/middleware/upload.js"
click node_file_parser "https://github.com/dctxv/ict30017-digital-career-hub/blob/main/server/src/utils/fileParser.js"
click node_sanitiser "https://github.com/dctxv/ict30017-digital-career-hub/blob/main/server/src/utils/sanitise.js"
click node_server_services "https://github.com/dctxv/ict30017-digital-career-hub/tree/main/server/src/services"
click node_server_models "https://github.com/dctxv/ict30017-digital-career-hub/tree/main/server/src/models"
click node_server_jobs "https://github.com/dctxv/ict30017-digital-career-hub/tree/main/server/src/jobs"
click node_ai_entry "https://github.com/dctxv/ict30017-digital-career-hub/blob/main/ai-service/index.js"
click node_resume_schema "https://github.com/dctxv/ict30017-digital-career-hub/blob/main/ai-service/src/schemas/resumeSchema.js"
click node_resume_reviewer "https://github.com/dctxv/ict30017-digital-career-hub/blob/main/ai-service/src/services/resumeReviewer.js"
click node_ai_client "https://github.com/dctxv/ict30017-digital-career-hub/blob/main/ai-service/src/utils/aiClient.js"
click node_ai_tests "https://github.com/dctxv/ict30017-digital-career-hub/blob/main/ai-service/tests/testResumeReviewer.js"
click node_sample_resumes "https://github.com/dctxv/ict30017-digital-career-hub/tree/main/ai-service/custom"
click node_resume_docs "https://github.com/dctxv/ict30017-digital-career-hub/tree/main/docs/database"
click node_prompt_notes "https://github.com/dctxv/ict30017-digital-career-hub/blob/main/docs/darius_notes/ai_prompting_engineering.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_client_placeholder toneBlue
class node_server_app,node_resume_route,node_upload_middleware,node_file_parser,node_sanitiser,node_server_services,node_server_models,node_server_jobs toneAmber
class node_ai_entry,node_resume_schema,node_resume_reviewer,node_ai_client,node_ai_tests toneMint
class node_sample_resumes,node_resume_docs,node_prompt_notes toneRose
```

## Components

### Client

Placeholder frontend boundary

- [Client](https://github.com/dctxv/ict30017-digital-career-hub/tree/main/client): placeholder frontend · Empty UI scaffold in this snapshot · `client`

### API Server

Resume ingestion and orchestration

- [API App](https://github.com/dctxv/ict30017-digital-career-hub/blob/main/server/src/app.js): node entrypoint · Bootstraps the main backend service · `server/src/app.js`
- [Resume API](https://github.com/dctxv/ict30017-digital-career-hub/blob/main/server/src/routes/resume.js): route layer · Resume-related HTTP endpoints · `server/src/routes/resume.js`
- [Upload Middleware](https://github.com/dctxv/ict30017-digital-career-hub/blob/main/server/src/middleware/upload.js): file upload · Handles incoming resume files · `server/src/middleware/upload.js`
- [File Parser](https://github.com/dctxv/ict30017-digital-career-hub/blob/main/server/src/utils/fileParser.js): document parser · Extracts text from uploaded resumes · `server/src/utils/fileParser.js`
- [Sanitiser](https://github.com/dctxv/ict30017-digital-career-hub/blob/main/server/src/utils/sanitise.js): text normaliser · Cleans and normalises extracted resume text · `server/src/utils/sanitise.js`
- [Server Services](https://github.com/dctxv/ict30017-digital-career-hub/tree/main/server/src/services): service scaffold · Placeholder for future server-side business services · `server/src/services`
- [Server Models](https://github.com/dctxv/ict30017-digital-career-hub/tree/main/server/src/models): model scaffold · Placeholder for future domain models · `server/src/models`
- [Server Jobs](https://github.com/dctxv/ict30017-digital-career-hub/tree/main/server/src/jobs): job scaffold · Placeholder for background jobs and async work · `server/src/jobs`

### AI Service

Resume review and model access

- [AI Service](https://github.com/dctxv/ict30017-digital-career-hub/blob/main/ai-service/index.js): service entrypoint · Separately deployable resume review service · `ai-service/index.js`
- [Resume Schema](https://github.com/dctxv/ict30017-digital-career-hub/blob/main/ai-service/src/schemas/resumeSchema.js): contract schema · Defines the AI service input/output shape · `ai-service/src/schemas/resumeSchema.js`
- [Reviewer](https://github.com/dctxv/ict30017-digital-career-hub/blob/main/ai-service/src/services/resumeReviewer.js): domain service · Generates structured resume feedback · `ai-service/src/services/resumeReviewer.js`
- [AI Client](https://github.com/dctxv/ict30017-digital-career-hub/blob/main/ai-service/src/utils/aiClient.js): provider adapter · Wraps the underlying model or API call · `ai-service/src/utils/aiClient.js`
- [Reviewer Tests](https://github.com/dctxv/ict30017-digital-career-hub/blob/main/ai-service/tests/testResumeReviewer.js): test suite · Dedicated tests for resume review behavior · `ai-service/tests/testResumeReviewer.js`

### Validation Assets

Fixtures, tests, and reference materials

- [Sample Resumes](https://github.com/dctxv/ict30017-digital-career-hub/tree/main/ai-service/custom): test fixtures · Prompt-evaluation and parser samples · `ai-service/custom`
- [Resume Corpus](https://github.com/dctxv/ict30017-digital-career-hub/tree/main/docs/database): reference data · PDF and DOCX resumes plus job market archive · `docs/database`
- [Prompt Notes](https://github.com/dctxv/ict30017-digital-career-hub/blob/main/docs/darius_notes/ai_prompting_engineering.md): design notes · AI prompting and engineering notes · `docs/darius_notes/ai_prompting_engineering.md`

## Connections

- Client → API App: calls API · Client boundary would interact with the backend
- API App → Resume API: mounts · App wires the resume API routes
- Resume API → Upload Middleware: accepts files · Resume endpoints use upload handling
- Upload Middleware → File Parser: parses · Uploaded resume files are converted to text
- File Parser → Sanitiser: normalises · Extracted text is cleaned before review
- Sanitiser → AI Service: submits review · Prepared resume content is sent to the AI service
- AI Service → Resume Schema: validates contract · AI service enforces request/response shape
- AI Service → Reviewer: routes to core · Service entry delegates to the reviewer
- Reviewer → AI Client: calls model · Reviewer uses the AI provider adapter
- Reviewer → Resume Schema: uses schema · Reviewer follows the defined contract
- Reviewer Tests → Reviewer: verifies · Tests exercise reviewer behavior
- Sample Resumes → Reviewer Tests: feeds fixtures · Sample text files support evaluation runs
- Resume Corpus → File Parser: validates parsing · Reference documents are useful for parser checks
- Prompt Notes → Reviewer: guides prompts · Notes inform review logic and prompt design
- Server Services → Resume API: future boundary · Reserved for server business logic
- Server Models → Resume API: future boundary · Reserved for persistence/domain models
- Server Jobs → Resume API: future boundary · Reserved for async processing
