# abhigyansr/interndiary architecture

> Architecture diagram of the GitHub repository abhigyansr/interndiary, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abhigyansr/interndiary
- Repository: https://github.com/abhigyansr/interndiary

## Overview

Intern Diary is a React/Express placement-preparation app. Students browse opportunities, track applications, plan preparation, share interview experiences, and read personalized news; admins manage postings and interview moderation. The graph follows the documented React-to-REST workflow and the sampled server routes, controllers, and news-ingestion calls. Some page internals and runtime modules were not sampled, so their implementation-level connections are omitted.

Main entry points: [`server/server.js`](https://github.com/abhigyansr/interndiary/blob/main/server/server.js) (Express API), [`server/utils/newsIngestion.js`](https://github.com/abhigyansr/interndiary/blob/main/server/utils/newsIngestion.js) (News Ingestion), [`server/controllers/jobController.js`](https://github.com/abhigyansr/interndiary/blob/main/server/controllers/jobController.js) (Opportunity Management), [`client/src/services/api.js`](https://github.com/abhigyansr/interndiary/blob/main/client/src/services/api.js) (API Client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Student and Admin UI"]
  node_app["React App Routes<br/>[App.js]"]
  node_authui["Auth Context<br/>[AuthContext.js]"]
  node_pages["Product Pages"]
  node_adminpage["Admin Dashboard<br/>[adminDashboard.jsx]"]
  node_apiui["API Client<br/>[api.js]"]
end

subgraph group_api["API and Domain Workflows"]
  node_express["Express API<br/>[server.js]"]
  node_auth["Accounts and Reset<br/>[authController.js]"]
  node_jobs["Opportunity Management<br/>[jobController.js]"]
  node_applications["Application Tracker<br/>[appController.js]"]
  node_tasks["Preparation Planner<br/>[taskController.js]"]
  node_interviews["Interview Experiences"]
  node_users["Profile and Preferences<br/>[userController.js]"]
  node_pdfextract["Job PDF Extraction<br/>[llmHandler.js]"]
  node_files["PDF Storage<br/>[fileStorage.js]"]
  node_newsapi["News API<br/>[newsController.js]"]
end

subgraph group_news["News Curation"]
  node_newsjob["News Refresh Trigger<br/>[newsCron.js]"]
  node_ingest["News Ingestion<br/>[newsIngestion.js]"]
  node_scraper["Feed and Article Fetching<br/>[newsScraper.js]"]
  node_rss["RSS Feed Sources<br/>[rssFeeds.js]"]
  node_llm["Gemini Enrichment<br/>[llmHandler.js]"]
end

subgraph group_data["Persistent Data"]
  node_mongo[("MongoDB")]
  node_userstore[("User Records<br/>[User.js]")]
  node_opportunity[("Opportunity Records<br/>[Opportunity.js]")]
  node_applicationstore[("Application Records<br/>[Application.js]")]
  node_taskstore[("Task Records<br/>[Task.js]")]
  node_interviewstore[("Interview Records<br/>[Interview.js]")]
  node_newsstore[("News Records<br/>[News.js]")]
  node_filestore[("Stored PDFs<br/>[StoredFile.js]")]
end

node_visitor(("Student or Admin"))

node_visitor -->|"uses"| node_app
node_app -->|"routes to"| node_pages
node_app -->|"provides auth"| node_authui
node_pages -.->|"requests data"| node_apiui
node_authui -->|"calls"| node_apiui
node_adminpage -.->|"manages content"| node_apiui
node_apiui -->|"sends REST requests"| node_express
node_express -->|"mounts auth routes"| node_auth
node_express -->|"mounts jobs routes"| node_jobs
node_express -->|"mounts application routes"| node_applications
node_express -->|"mounts task routes"| node_tasks
node_express -->|"mounts interview routes"| node_interviews
node_express -->|"mounts user routes"| node_users
node_express -->|"mounts news routes"| node_newsapi
node_jobs -->|"extracts PDF fields"| node_pdfextract
node_jobs -->|"stores uploaded PDF"| node_files
node_express -->|"stores resumes"| node_files
node_express -->|"starts refresh schedule"| node_newsjob
node_newsjob -->|"refreshes news"| node_ingest
node_newsapi -->|"triggers refresh"| node_ingest
node_ingest -->|"loads feeds"| node_rss
node_ingest -->|"fetches articles"| node_scraper
node_ingest -->|"enriches articles"| node_llm
node_auth -->|"reads and writes"| node_userstore
node_jobs -->|"reads and writes"| node_opportunity
node_applications -->|"reads and writes"| node_applicationstore
node_tasks -.->|"reads and writes"| node_taskstore
node_interviews -->|"reads and writes"| node_interviewstore
node_users -->|"reads and writes"| node_userstore
node_newsapi -->|"reads and writes"| node_newsstore
node_ingest -->|"checks and inserts"| node_newsstore
node_files -->|"stores file bytes"| node_filestore
node_express -->|"connects"| node_mongo

click node_app "https://github.com/abhigyansr/interndiary/blob/main/client/src/App.js"
click node_authui "https://github.com/abhigyansr/interndiary/blob/main/client/src/context/AuthContext.js"
click node_pages "https://github.com/abhigyansr/interndiary/tree/main/client/src/pages"
click node_adminpage "https://github.com/abhigyansr/interndiary/blob/main/client/src/pages/adminDashboard.jsx"
click node_apiui "https://github.com/abhigyansr/interndiary/blob/main/client/src/services/api.js"
click node_express "https://github.com/abhigyansr/interndiary/blob/main/server/server.js"
click node_auth "https://github.com/abhigyansr/interndiary/blob/main/server/controllers/authController.js"
click node_jobs "https://github.com/abhigyansr/interndiary/blob/main/server/controllers/jobController.js"
click node_applications "https://github.com/abhigyansr/interndiary/blob/main/server/controllers/appController.js"
click node_tasks "https://github.com/abhigyansr/interndiary/blob/main/server/controllers/taskController.js"
click node_interviews "https://github.com/abhigyansr/interndiary/blob/main/server/controllers/interviewController.js"
click node_users "https://github.com/abhigyansr/interndiary/blob/main/server/controllers/userController.js"
click node_pdfextract "https://github.com/abhigyansr/interndiary/blob/main/server/utils/llmHandler.js"
click node_files "https://github.com/abhigyansr/interndiary/blob/main/server/utils/fileStorage.js"
click node_newsapi "https://github.com/abhigyansr/interndiary/blob/main/server/controllers/newsController.js"
click node_newsjob "https://github.com/abhigyansr/interndiary/blob/main/server/utils/newsCron.js"
click node_ingest "https://github.com/abhigyansr/interndiary/blob/main/server/utils/newsIngestion.js"
click node_scraper "https://github.com/abhigyansr/interndiary/blob/main/server/utils/newsScraper.js"
click node_rss "https://github.com/abhigyansr/interndiary/blob/main/server/utils/rssFeeds.js"
click node_llm "https://github.com/abhigyansr/interndiary/blob/main/server/utils/llmHandler.js"
click node_userstore "https://github.com/abhigyansr/interndiary/blob/main/server/models/User.js"
click node_opportunity "https://github.com/abhigyansr/interndiary/blob/main/server/models/Opportunity.js"
click node_applicationstore "https://github.com/abhigyansr/interndiary/blob/main/server/models/Application.js"
click node_taskstore "https://github.com/abhigyansr/interndiary/blob/main/server/models/Task.js"
click node_interviewstore "https://github.com/abhigyansr/interndiary/blob/main/server/models/Interview.js"
click node_newsstore "https://github.com/abhigyansr/interndiary/blob/main/server/models/News.js"
click node_filestore "https://github.com/abhigyansr/interndiary/blob/main/server/models/StoredFile.js"

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_app,node_authui,node_pages,node_adminpage,node_apiui toneBlue
class node_express,node_auth,node_jobs,node_applications,node_tasks,node_interviews,node_users,node_pdfextract,node_files,node_newsapi toneAmber
class node_newsjob,node_ingest,node_scraper,node_rss,node_llm toneMint
class node_mongo,node_userstore,node_opportunity,node_applicationstore,node_taskstore,node_interviewstore,node_newsstore,node_filestore toneRose
class node_visitor toneIndigo
```

## Components

### Student and Admin UI

- [React App Routes](https://github.com/abhigyansr/interndiary/blob/main/client/src/App.js): `client/src/App.js`
- [Auth Context](https://github.com/abhigyansr/interndiary/blob/main/client/src/context/AuthContext.js): `client/src/context/AuthContext.js`
- [Product Pages](https://github.com/abhigyansr/interndiary/tree/main/client/src/pages): `client/src/pages`
- [Admin Dashboard](https://github.com/abhigyansr/interndiary/blob/main/client/src/pages/adminDashboard.jsx): `client/src/pages/adminDashboard.jsx`
- [API Client](https://github.com/abhigyansr/interndiary/blob/main/client/src/services/api.js): `client/src/services/api.js`

### API and Domain Workflows

- [Express API](https://github.com/abhigyansr/interndiary/blob/main/server/server.js): `server/server.js`
- [Accounts and Reset](https://github.com/abhigyansr/interndiary/blob/main/server/controllers/authController.js): `server/controllers/authController.js`
- [Opportunity Management](https://github.com/abhigyansr/interndiary/blob/main/server/controllers/jobController.js): `server/controllers/jobController.js`
- [Application Tracker](https://github.com/abhigyansr/interndiary/blob/main/server/controllers/appController.js): `server/controllers/appController.js`
- [Preparation Planner](https://github.com/abhigyansr/interndiary/blob/main/server/controllers/taskController.js): `server/controllers/taskController.js`
- [Interview Experiences](https://github.com/abhigyansr/interndiary/blob/main/server/controllers/interviewController.js): `server/controllers/interviewController.js`
- [Profile and Preferences](https://github.com/abhigyansr/interndiary/blob/main/server/controllers/userController.js): `server/controllers/userController.js`
- [Job PDF Extraction](https://github.com/abhigyansr/interndiary/blob/main/server/utils/llmHandler.js): `server/utils/llmHandler.js`
- [PDF Storage](https://github.com/abhigyansr/interndiary/blob/main/server/utils/fileStorage.js): `server/utils/fileStorage.js`
- [News API](https://github.com/abhigyansr/interndiary/blob/main/server/controllers/newsController.js): `server/controllers/newsController.js`

### News Curation

- [News Refresh Trigger](https://github.com/abhigyansr/interndiary/blob/main/server/utils/newsCron.js): `server/utils/newsCron.js`
- [News Ingestion](https://github.com/abhigyansr/interndiary/blob/main/server/utils/newsIngestion.js): `server/utils/newsIngestion.js`
- [Feed and Article Fetching](https://github.com/abhigyansr/interndiary/blob/main/server/utils/newsScraper.js): `server/utils/newsScraper.js`
- [RSS Feed Sources](https://github.com/abhigyansr/interndiary/blob/main/server/utils/rssFeeds.js): `server/utils/rssFeeds.js`
- [Gemini Enrichment](https://github.com/abhigyansr/interndiary/blob/main/server/utils/llmHandler.js): `server/utils/llmHandler.js`

### Persistent Data

- **MongoDB**
- [User Records](https://github.com/abhigyansr/interndiary/blob/main/server/models/User.js): `server/models/User.js`
- [Opportunity Records](https://github.com/abhigyansr/interndiary/blob/main/server/models/Opportunity.js): `server/models/Opportunity.js`
- [Application Records](https://github.com/abhigyansr/interndiary/blob/main/server/models/Application.js): `server/models/Application.js`
- [Task Records](https://github.com/abhigyansr/interndiary/blob/main/server/models/Task.js): `server/models/Task.js`
- [Interview Records](https://github.com/abhigyansr/interndiary/blob/main/server/models/Interview.js): `server/models/Interview.js`
- [News Records](https://github.com/abhigyansr/interndiary/blob/main/server/models/News.js): `server/models/News.js`
- [Stored PDFs](https://github.com/abhigyansr/interndiary/blob/main/server/models/StoredFile.js): `server/models/StoredFile.js`

### Other components

- **Student or Admin**

## Connections

- Student or Admin → React App Routes: uses (evidence: `client/src/App.js`)
- React App Routes → Product Pages: routes to (evidence: `client/src/App.js`)
- React App Routes → Auth Context: provides auth (evidence: `client/src/App.js`)
- Product Pages → API Client: requests data (evidence: `client/src/pages/application.jsx`)
- Auth Context → API Client: calls (evidence: `client/src/context/AuthContext.js`)
- Admin Dashboard → API Client: manages content
- API Client → Express API: sends REST requests (evidence: `README.md`)
- Express API → Accounts and Reset: mounts auth routes (evidence: `server/server.js`)
- Express API → Opportunity Management: mounts jobs routes (evidence: `server/server.js`)
- Express API → Application Tracker: mounts application routes (evidence: `server/server.js`)
- Express API → Preparation Planner: mounts task routes (evidence: `server/server.js`)
- Express API → Interview Experiences: mounts interview routes (evidence: `server/server.js`)
- Express API → Profile and Preferences: mounts user routes (evidence: `server/server.js`)
- Express API → News API: mounts news routes (evidence: `server/server.js`)
- Opportunity Management → Job PDF Extraction: extracts PDF fields (evidence: `server/routes/jobRoutes.js`)
- Opportunity Management → PDF Storage: stores uploaded PDF (evidence: `server/routes/jobRoutes.js`)
- Express API → PDF Storage: stores resumes (evidence: `server/server.js`)
- Express API → News Refresh Trigger: starts refresh schedule (evidence: `server/server.js`)
- News Refresh Trigger → News Ingestion: refreshes news (evidence: `server/utils/newsCron.js`)
- News API → News Ingestion: triggers refresh (evidence: `server/controllers/newsController.js`)
- News Ingestion → RSS Feed Sources: loads feeds (evidence: `server/utils/newsIngestion.js`)
- News Ingestion → Feed and Article Fetching: fetches articles (evidence: `server/utils/newsIngestion.js`)
- News Ingestion → Gemini Enrichment: enriches articles (evidence: `server/utils/newsIngestion.js`)
- Accounts and Reset → User Records: reads and writes (evidence: `server/controllers/authController.js`)
- Opportunity Management → Opportunity Records: reads and writes (evidence: `server/controllers/jobController.js`)
- Application Tracker → Application Records: reads and writes (evidence: `server/controllers/appController.js`)
- Preparation Planner → Task Records: reads and writes
- Interview Experiences → Interview Records: reads and writes (evidence: `server/controllers/interviewController.js`)
- Profile and Preferences → User Records: reads and writes (evidence: `server/controllers/userController.js`)
- News API → News Records: reads and writes (evidence: `server/controllers/newsController.js`)
- News Ingestion → News Records: checks and inserts (evidence: `server/utils/newsIngestion.js`)
- PDF Storage → Stored PDFs: stores file bytes (evidence: `server/utils/fileStorage.js`)
- Express API → MongoDB: connects (evidence: `server/server.js`)
