# abdulazeem-10/research-opportunity-portal-nestjs architecture

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

- Interactive diagram: https://gitdiagram.com/abdulazeem-10/research-opportunity-portal-nestjs
- Repository: https://github.com/abdulazeem-10/research-opportunity-portal-nestjs

## Overview

The portal lets university staff create, browse, search/filter, inspect, edit, close, and delete research opportunities. The primary path is the React dashboard and its forms or actions, through the API client and REST controller, into the opportunity service and MongoDB; results refresh the dashboard. The graph preserves the documented CRUD, filtering, validation, persistence, and UI-state capabilities. Source excerpts establish the main frontend and backend calls; README statements support the frontend-to-API boundary and database capability where wiring was not excerpted.

Main entry points: [`frontend/src/App.tsx`](https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/frontend/src/App.tsx) (Dashboard), [`backend/src/opportunities/opportunities.controller.ts`](https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/backend/src/opportunities/opportunities.controller.ts) (Opportunity routes), [`backend/src/app.module.ts`](https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/backend/src/app.module.ts) (App module), [`frontend/src/services/api.ts`](https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/frontend/src/services/api.ts) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Portal UI"]
  node_dashboard["Dashboard<br/>[App.tsx]"]
  node_listing["Opportunity cards"]
  node_details["Details modal"]
  node_form["Create/edit form"]
  node_delete["Delete confirmation"]
  node_client["API client<br/>[api.ts]"]
  node_types["Opportunity types<br/>[opportunity.ts]"]
end

subgraph group_api["REST API"]
  node_controller["Opportunity routes"]
  node_idpipe["ObjectId parsing"]
end

subgraph group_domain["Opportunity Domain"]
  node_validation["Request DTOs"]
  node_service["Opportunity service"]
  node_schema["Opportunity schema"]
  node_status["Status enum"]
end

subgraph group_runtime["Server Runtime"]
  node_bootstrap["Nest bootstrap<br/>[main.ts]"]
  node_appmodule["App module<br/>[app.module.ts]"]
  node_dbconfig["Database config<br/>[database.config.ts]"]
  node_logger["Request logger"]
  node_exception["HTTP exception filter"]
end

node_user(("Portal user"))
node_http(("HTTP API"))
node_mongo[("MongoDB")]

node_user -->|"uses"| node_dashboard
node_dashboard -->|"renders"| node_listing
node_dashboard -->|"renders"| node_details
node_dashboard -->|"renders"| node_form
node_dashboard -->|"renders"| node_delete
node_dashboard -->|"calls"| node_client
node_dashboard -->|"filters listings"| node_listing
node_form -->|"submits data"| node_dashboard
node_dashboard -->|"refreshes after changes"| node_client
node_client -->|"sends requests"| node_http
node_http -->|"routes requests"| node_controller
node_controller -->|"binds request DTOs"| node_validation
node_controller -->|"parses IDs"| node_idpipe
node_controller -->|"calls"| node_service
node_service -->|"reads and writes"| node_mongo
node_service -->|"uses model"| node_schema
node_validation -->|"validates status"| node_status
node_bootstrap -->|"starts application"| node_appmodule
node_appmodule -->|"configures database"| node_dbconfig
node_appmodule -->|"registers middleware"| node_logger
node_bootstrap -->|"registers filter"| node_exception
node_appmodule -->|"loads feature module"| node_controller
node_dbconfig -->|"configures connection"| node_mongo
node_dashboard -->|"uses types"| node_types
node_client -->|"uses types"| node_types

click node_dashboard "https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/frontend/src/App.tsx"
click node_listing "https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/frontend/src/components/OpportunityCard.tsx"
click node_details "https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/frontend/src/components/OpportunityDetailsModal.tsx"
click node_form "https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/frontend/src/components/OpportunityFormModal.tsx"
click node_delete "https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/frontend/src/components/DeleteConfirmModal.tsx"
click node_client "https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/frontend/src/services/api.ts"
click node_types "https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/frontend/src/types/opportunity.ts"
click node_controller "https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/backend/src/opportunities/opportunities.controller.ts"
click node_validation "https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/tree/main/backend/src/opportunities/dto"
click node_idpipe "https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/backend/src/common/pipes/parse-object-id.pipe.ts"
click node_service "https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/backend/src/opportunities/opportunities.service.ts"
click node_schema "https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/backend/src/opportunities/schemas/opportunity.schema.ts"
click node_status "https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/backend/src/opportunities/enums/opportunity-status.enum.ts"
click node_bootstrap "https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/backend/src/main.ts"
click node_appmodule "https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/backend/src/app.module.ts"
click node_dbconfig "https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/backend/src/config/database.config.ts"
click node_logger "https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/backend/src/common/middleware/logger.middleware.ts"
click node_exception "https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/backend/src/common/filters/http-exception.filter.ts"

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_dashboard,node_listing,node_details,node_form,node_delete,node_client,node_types,node_user toneBlue
class node_controller,node_idpipe,node_mongo toneAmber
class node_validation,node_service,node_schema,node_status,node_http toneMint
class node_bootstrap,node_appmodule,node_dbconfig,node_logger,node_exception toneRose
```

## Components

### Portal UI

- [Dashboard](https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Opportunity cards](https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/frontend/src/components/OpportunityCard.tsx): `frontend/src/components/OpportunityCard.tsx`
- [Details modal](https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/frontend/src/components/OpportunityDetailsModal.tsx): `frontend/src/components/OpportunityDetailsModal.tsx`
- [Create/edit form](https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/frontend/src/components/OpportunityFormModal.tsx): `frontend/src/components/OpportunityFormModal.tsx`
- [Delete confirmation](https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/frontend/src/components/DeleteConfirmModal.tsx): `frontend/src/components/DeleteConfirmModal.tsx`
- [API client](https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/frontend/src/services/api.ts): `frontend/src/services/api.ts`
- [Opportunity types](https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/frontend/src/types/opportunity.ts): `frontend/src/types/opportunity.ts`

### REST API

- [Opportunity routes](https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/backend/src/opportunities/opportunities.controller.ts): `backend/src/opportunities/opportunities.controller.ts`
- [ObjectId parsing](https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/backend/src/common/pipes/parse-object-id.pipe.ts): `backend/src/common/pipes/parse-object-id.pipe.ts`

### Opportunity Domain

- [Request DTOs](https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/tree/main/backend/src/opportunities/dto): `backend/src/opportunities/dto`
- [Opportunity service](https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/backend/src/opportunities/opportunities.service.ts): `backend/src/opportunities/opportunities.service.ts`
- [Opportunity schema](https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/backend/src/opportunities/schemas/opportunity.schema.ts): `backend/src/opportunities/schemas/opportunity.schema.ts`
- [Status enum](https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/backend/src/opportunities/enums/opportunity-status.enum.ts): `backend/src/opportunities/enums/opportunity-status.enum.ts`

### Server Runtime

- [Nest bootstrap](https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/backend/src/main.ts): `backend/src/main.ts`
- [App module](https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/backend/src/app.module.ts): `backend/src/app.module.ts`
- [Database config](https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/backend/src/config/database.config.ts): `backend/src/config/database.config.ts`
- [Request logger](https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/backend/src/common/middleware/logger.middleware.ts): `backend/src/common/middleware/logger.middleware.ts`
- [HTTP exception filter](https://github.com/abdulazeem-10/research-opportunity-portal-nestjs/blob/main/backend/src/common/filters/http-exception.filter.ts): `backend/src/common/filters/http-exception.filter.ts`

### Other components

- **Portal user**
- **HTTP API**
- **MongoDB**

## Connections

- Portal user → Dashboard: uses (evidence: `README.md`)
- Dashboard → Opportunity cards: renders (evidence: `frontend/src/App.tsx`)
- Dashboard → Details modal: renders (evidence: `frontend/src/App.tsx`)
- Dashboard → Create/edit form: renders (evidence: `frontend/src/App.tsx`)
- Dashboard → Delete confirmation: renders (evidence: `frontend/src/App.tsx`)
- Dashboard → API client: calls (evidence: `frontend/src/App.tsx`)
- Dashboard → Opportunity cards: filters listings (evidence: `frontend/src/App.tsx`)
- Create/edit form → Dashboard: submits data (evidence: `frontend/src/App.tsx`)
- Dashboard → API client: refreshes after changes (evidence: `frontend/src/App.tsx`)
- API client → HTTP API: sends requests (evidence: `README.md`)
- HTTP API → Opportunity routes: routes requests (evidence: `README.md`)
- Opportunity routes → Request DTOs: binds request DTOs (evidence: `backend/src/opportunities/opportunities.controller.ts`)
- Opportunity routes → ObjectId parsing: parses IDs (evidence: `backend/src/opportunities/opportunities.controller.ts`)
- Opportunity routes → Opportunity service: calls (evidence: `backend/src/opportunities/opportunities.controller.ts`)
- Opportunity service → MongoDB: reads and writes (evidence: `backend/src/opportunities/opportunities.service.ts`)
- Opportunity service → Opportunity schema: uses model (evidence: `backend/src/opportunities/opportunities.service.ts`)
- Request DTOs → Status enum: validates status (evidence: `backend/src/opportunities/dto/create-opportunity.dto.ts`)
- Nest bootstrap → App module: starts application (evidence: `backend/src/main.ts`)
- App module → Database config: configures database (evidence: `backend/src/app.module.ts`)
- App module → Request logger: registers middleware (evidence: `backend/src/app.module.ts`)
- Nest bootstrap → HTTP exception filter: registers filter (evidence: `backend/src/main.ts`)
- App module → Opportunity routes: loads feature module (evidence: `backend/src/app.module.ts`)
- Database config → MongoDB: configures connection (evidence: `README.md`)
- Dashboard → Opportunity types: uses types (evidence: `frontend/src/App.tsx`)
- API client → Opportunity types: uses types (evidence: `frontend/src/services/api.ts`)
