# tanvirahamedfoysal/academicportal architecture

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

- Interactive diagram: https://gitdiagram.com/tanvirahamedfoysal/academicportal
- Repository: https://github.com/tanvirahamedfoysal/academicportal

## Overview

This is an academic/research portal with a public-facing site and role-based workspaces for administrators, moderators, and students. A central workflow is signing in, entering the appropriate workspace, and managing or browsing shared research resources; the sampled repository code confirms document listing, upload, and deletion through the API, database, and Cloudinary. The tree also shows article, profile, collaborator, student, portfolio, and contact capabilities. Their source is represented, but wiring beyond the sampled authentication and repository flows is left unspecified.

Main entry points: [`Backend/app/api/v1/repository.py`](https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/api/v1/repository.py) (Repository API), [`Frontend/src/app/api/auth`](https://github.com/tanvirahamedfoysal/academicportal/tree/main/Frontend/src/app/api/auth) (Auth proxy routes), [`Backend/app/api/v1/auth.py`](https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/api/v1/auth.py) (Authentication API), [`Backend/app/main.py`](https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/main.py) (API application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web portal"]
  node_publicsite["Public site<br/>[page.tsx]"]
  node_authpages["Sign in and register"]
  node_dashboards["Role workspaces"]
  node_publicarticles["Article browsing"]
  node_repomanager["Repository manager"]
end

subgraph group_auth["Identity"]
  node_authproxy["Auth proxy routes"]
  node_authservice["Auth service<br/>[auth.service.ts]"]
  node_authstate["Auth state<br/>[auth.store.ts]"]
  node_authapi["Authentication API<br/>[auth.py]"]
end

subgraph group_research["Research content"]
  node_articles["Article API<br/>[articles.py]"]
  node_repositoryui["Repository query hook<br/>[useRepository.ts]"]
  node_repositoryapi["Repository API<br/>[repository.py]"]
  node_assetstore[("Asset records<br/>[database.py]")]
end

subgraph group_community["People and outreach"]
  node_profile["Profiles<br/>[profile.py]"]
  node_collaborators["Collaborators<br/>[collaborators.py]"]
  node_students["Student directory<br/>[students.py]"]
  node_contact["Contact messages<br/>[contact.py]"]
  node_portfolio["Portfolio and media<br/>[portfolio.py]"]
  node_moderators["Moderator management<br/>[moderators.py]"]
end

subgraph group_backend["Backend platform"]
  node_app["API application<br/>[main.py]"]
  node_database[("Database session<br/>[database.py]")]
  node_authhelpers["Access validation<br/>[helper.py]"]
end

node_visitor(("Portal user"))
node_cloudinary["Cloudinary"]

node_visitor -->|"browses"| node_publicsite
node_visitor -->|"signs in"| node_authpages
node_visitor -->|"uses workspace"| node_dashboards
node_visitor -->|"browses or manages"| node_repomanager
node_authpages -->|"submits credentials"| node_authproxy
node_authproxy -->|"forwards request"| node_authapi
node_authapi -->|"returns identity"| node_authstate
node_authservice -->|"posts login"| node_authproxy
node_repomanager -->|"loads, uploads, deletes"| node_repositoryapi
node_repositoryui -->|"requests documents"| node_repositoryapi
node_repositoryapi -->|"validates access"| node_authhelpers
node_repositoryapi -->|"queries and updates"| node_database
node_repositoryapi -->|"uploads or removes assets"| node_cloudinary
node_repositoryapi -->|"tracks asset records"| node_assetstore
node_app -->|"serves API routes"| node_authapi
node_app -->|"serves API routes"| node_repositoryapi

click node_publicsite "https://github.com/tanvirahamedfoysal/academicportal/blob/main/Frontend/src/app/page.tsx"
click node_authpages "https://github.com/tanvirahamedfoysal/academicportal/tree/main/Frontend/src/app/auth"
click node_dashboards "https://github.com/tanvirahamedfoysal/academicportal/tree/main/Frontend/src/app/admin"
click node_publicarticles "https://github.com/tanvirahamedfoysal/academicportal/tree/main/Frontend/src/app/articles"
click node_repomanager "https://github.com/tanvirahamedfoysal/academicportal/blob/main/Frontend/src/components/dashboard/RepositoryManager.tsx"
click node_authproxy "https://github.com/tanvirahamedfoysal/academicportal/tree/main/Frontend/src/app/api/auth"
click node_authservice "https://github.com/tanvirahamedfoysal/academicportal/blob/main/Frontend/src/services/auth.service.ts"
click node_authstate "https://github.com/tanvirahamedfoysal/academicportal/blob/main/Frontend/src/store/auth.store.ts"
click node_authapi "https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/api/v1/auth.py"
click node_articles "https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/api/v1/articles.py"
click node_repositoryui "https://github.com/tanvirahamedfoysal/academicportal/blob/main/Frontend/src/hooks/useRepository.ts"
click node_repositoryapi "https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/api/v1/repository.py"
click node_assetstore "https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/db/database.py"
click node_profile "https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/api/v1/profile.py"
click node_collaborators "https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/api/v1/collaborators.py"
click node_students "https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/api/v1/students.py"
click node_contact "https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/api/v1/contact.py"
click node_portfolio "https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/api/v1/portfolio.py"
click node_moderators "https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/api/v1/moderators.py"
click node_app "https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/main.py"
click node_database "https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/db/database.py"
click node_authhelpers "https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/utility/auth/helper.py"

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_publicsite,node_authpages,node_dashboards,node_publicarticles,node_repomanager,node_visitor toneBlue
class node_authproxy,node_authservice,node_authstate,node_authapi toneAmber
class node_articles,node_repositoryui,node_repositoryapi,node_assetstore toneMint
class node_profile,node_collaborators,node_students,node_contact,node_portfolio,node_moderators toneRose
class node_app,node_database,node_authhelpers,node_cloudinary toneIndigo
```

## Components

### Web portal

- [Public site](https://github.com/tanvirahamedfoysal/academicportal/blob/main/Frontend/src/app/page.tsx): `Frontend/src/app/page.tsx`
- [Sign in and register](https://github.com/tanvirahamedfoysal/academicportal/tree/main/Frontend/src/app/auth): `Frontend/src/app/auth`
- [Role workspaces](https://github.com/tanvirahamedfoysal/academicportal/tree/main/Frontend/src/app/admin): `Frontend/src/app/admin`
- [Article browsing](https://github.com/tanvirahamedfoysal/academicportal/tree/main/Frontend/src/app/articles): `Frontend/src/app/articles`
- [Repository manager](https://github.com/tanvirahamedfoysal/academicportal/blob/main/Frontend/src/components/dashboard/RepositoryManager.tsx): `Frontend/src/components/dashboard/RepositoryManager.tsx`

### Identity

- [Auth proxy routes](https://github.com/tanvirahamedfoysal/academicportal/tree/main/Frontend/src/app/api/auth): `Frontend/src/app/api/auth`
- [Auth service](https://github.com/tanvirahamedfoysal/academicportal/blob/main/Frontend/src/services/auth.service.ts): `Frontend/src/services/auth.service.ts`
- [Auth state](https://github.com/tanvirahamedfoysal/academicportal/blob/main/Frontend/src/store/auth.store.ts): `Frontend/src/store/auth.store.ts`
- [Authentication API](https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/api/v1/auth.py): `Backend/app/api/v1/auth.py`

### Research content

- [Article API](https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/api/v1/articles.py): `Backend/app/api/v1/articles.py`
- [Repository query hook](https://github.com/tanvirahamedfoysal/academicportal/blob/main/Frontend/src/hooks/useRepository.ts): `Frontend/src/hooks/useRepository.ts`
- [Repository API](https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/api/v1/repository.py): `Backend/app/api/v1/repository.py`
- [Asset records](https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/db/database.py): `Backend/app/db/database.py`

### People and outreach

- [Profiles](https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/api/v1/profile.py): `Backend/app/api/v1/profile.py`
- [Collaborators](https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/api/v1/collaborators.py): `Backend/app/api/v1/collaborators.py`
- [Student directory](https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/api/v1/students.py): `Backend/app/api/v1/students.py`
- [Contact messages](https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/api/v1/contact.py): `Backend/app/api/v1/contact.py`
- [Portfolio and media](https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/api/v1/portfolio.py): `Backend/app/api/v1/portfolio.py`
- [Moderator management](https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/api/v1/moderators.py): `Backend/app/api/v1/moderators.py`

### Backend platform

- [API application](https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/main.py): `Backend/app/main.py`
- [Database session](https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/db/database.py): `Backend/app/db/database.py`
- [Access validation](https://github.com/tanvirahamedfoysal/academicportal/blob/main/Backend/app/utility/auth/helper.py): `Backend/app/utility/auth/helper.py`

### Other components

- **Portal user**
- **Cloudinary**

## Connections

- Portal user → Public site: browses
- Portal user → Sign in and register: signs in
- Portal user → Role workspaces: uses workspace
- Portal user → Repository manager: browses or manages
- Sign in and register → Auth proxy routes: submits credentials
- Auth proxy routes → Authentication API: forwards request
- Authentication API → Auth state: returns identity
- Auth service → Auth proxy routes: posts login
- Repository manager → Repository API: loads, uploads, deletes
- Repository query hook → Repository API: requests documents
- Repository API → Access validation: validates access
- Repository API → Database session: queries and updates
- Repository API → Cloudinary: uploads or removes assets
- Repository API → Asset records: tracks asset records
- API application → Authentication API: serves API routes
- API application → Repository API: serves API routes
