# abdulrahmanqht/vpaa-gate architecture

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

- Interactive diagram: https://gitdiagram.com/abdulrahmanqht/vpaa-gate
- Repository: https://github.com/abdulrahmanqht/vpaa-gate

## Overview

1. **Overall shape**
   - This is an **ASP.NET MVC application on .NET Framework 4.8** organized as a classic **N-layer solution**:
     - **VPAA.Web** = presentation/UI
     - **VPAA.Logic** = business services
     - **VPAA.DataAccess** = Oracle/Dapper persistence
     - **VPAA.Model** = entities, DTOs, and shared contracts
   - The system is centered on **college/university program management** data rather than a generic CRUD app.

2. **Primary runtime boundary**
   - The main runtime entry point is **VPAA.Web**, an MVC web app with controllers, Razor views, static assets, and client scripts.
   - Requests flow from **controllers** to **services** to **repositories**, then back up through **view models** and Razor templates.
   - The app depends on an **Oracle database** as its only persisted data store.

3. **Web/UI layer**
   - `VPAA.Web/Controllers` contains the user-facing boundaries: `College`, `Department`, `Program`, `University`, `User`, `Notifications`, `Search`, `Language`, `Shared`, and `BaseController`.
   - The UI is built from **Razor views and many partials**, especially for program details and dashboards, which suggests a page composed from reusable data sections.
   - `Content` and `Scripts` hold the front-end assets; Bootstrap, jQuery, validation, and small shared scripts support tables, charts, tabs, and language switching.

4. **Business logic layer**
   - `VPAA.Logic/Services` holds the orchestration layer for the main domains:
     - `CollegeService`
     - `DepartmentService`
     - `ProgramService`
     - `UniversityService`
     - `UserService`
     - `NotificationsService`
   - These services are the main place where application rules, aggregation, and shaping of data for dashboards/details happen before UI rendering.

5. **Data access layer**
   - `VPAA.DataAccess/Repositories` implements persistence per domain: `CollegeRepository`, `DepartmentRepository`, `FacultyRepository`, `ProgramRepository`, `UserRepository`, and `NotificationsRepository`.
   - The repository layer uses **Dapper** for direct SQL access, so the architecture is repository-based but not ORM-heavy in the Entity Framework sense.
   - `OracleDbContext` and `EnvConfig` are responsible for database connectivity and configuration loading.

6. **Configuration and secret handling**
   - Database credentials are **not stored in web.config connection strings**.
   - Runtime DB settings come from a separate **`.env.config` file** that supplies Oracle username, password, and source/service name.
   - This creates a clear boundary between application code and environment-specific secrets.

7. **Domain model layer**
   - `VPAA.Model/Entities` defines the core business objects: `College`, `Department`, `Program`, `Notifications`, `AppUsers`, and related program-planning entities like `StudyPlan`, `ExitPoint`, `ProgramDevelopmentPlan`, `ProgramSubspecialization`, and `FacultyRankEntry`.
   - `VPAA.Model/DTO` contains purpose-built transfer shapes for composite views and summaries, such as:
     - `NotificationWithUserStatus`
     - `CollegeStructureDTO`
     - `DepartmentPrograms`
     - `ProgramCategoryStudentCount`
     - `UserRoleWithEntityDTO`
   - This separation indicates the app avoids sending raw entities directly to the UI for more complex screens.

8. **View model layer**
   - `VPAA.Web/ViewModels` is distinct from domain DTOs and is used to adapt data specifically for Razor views.
   - There are dedicated view model folders for colleges, departments, programs, notifications, university dashboards, and user management.
   - This is important for architecture diagrams because the UI does not bind directly to repositories; it consumes shaped view models produced by the service/controller path.

9. **Composed dashboard/detail screens**
   - Several screens are assembled from many partials rather than monolithic pages.
   - Program details, shared dashboards, department panels, and indicators are split into subviews like accreditation, admission, indicators, graduation, performance, status, and development plan.
   - That means the rendering boundary is “page shell + partial fragments,” with data often fetched in aggregated form from the service layer.

10. **Cross-cutting helpers**
    - `VPAA.Logic/Helpers` includes:
      - `CacheHelper` for caching-related behavior
      - `DateTimeExtensions` for date formatting/utility logic
      - `LogHelper` for logging support
    - `VPAA.Model/Interfaces/ILoggerService.cs` suggests logging is abstracted through an interface, keeping logging cross-cutting and not tied to controllers/services directly.

11. **Localization and language switching**
    - The web layer includes `Translation.en.json` and `Translation.ar.json`, plus a `LanguageController` and `lang-switcher.js`.
    - This indicates the UI supports at least **English and Arabic**, and language selection is treated as a first-class UI concern.

12. **Database assets and seed data**
    - The `Database/` folder contains insert scripts for colleges, departments, college pathways, and VPAA-related data.
    - These files function as initialization/seed artifacts for the Oracle schema rather than as runtime application components.

13. **External dependencies that matter architecturally**
    - **Oracle Managed Data Access**: database connectivity target.
    - **Dapper**: lightweight SQL mapping and data access approach.
    - **ASP.NET MVC 5 / Razor / Web Optimization**: server-rendered UI stack.
    - **Bootstrap, jQuery, jQuery Validation, log4net**: front-end behavior and logging support.

14. **Architectural summary for a diagram**
    - The clearest diagram is: **Browser → MVC Controllers → Services → Repositories → Oracle DB**, with **ViewModels/DTOs** flowing back upward to Razor views.
    - Supporting branches include **localization**, **logging/caching helpers**, and **client-side scripts/partials** for rich composed screens.
    - The repo is primarily a **single-web-app, layered monolith** with clean separation between presentation, business rules, and persistence.

Main entry points: [`VPAA.Web/Controllers`](https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.Web/Controllers) (Controllers), [`VPAA.Logic/Services`](https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.Logic/Services) (Services), [`VPAA.Web/Views`](https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.Web/Views) (Razor Views), [`VPAA.DataAccess/Repositories`](https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.DataAccess/Repositories) (Repositories)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_group_web["VPAA.Web"]
  node_node_web_app["MVC App<br/>ASP.NET MVC 5 entrypoint<br/>[Global.asax.cs]"]
  node_node_web_controllers["Controllers<br/>request boundaries<br/>[Controllers]"]
  node_node_web_views["Razor Views<br/>server-rendered UI<br/>[Views]"]
  node_node_web_viewmodels["ViewModels<br/>UI adapters<br/>[ViewModels]"]
  node_node_web_scripts["Scripts & CSS<br/>client assets<br/>[Scripts]"]
  node_node_web_localization["Translations<br/>i18n assets"]
end

subgraph group_group_logic["VPAA.Logic"]
  node_node_logic_services["Services<br/>[Services]"]
  node_node_logic_helpers{{"Helpers<br/>cross-cutting support<br/>[Helpers]"}}
end

subgraph group_group_data["VPAA.DataAccess"]
  node_node_data_repos[("Repositories<br/>persistence adapters<br/>[Repositories]")]
  node_node_data_context[("Oracle Context<br/>db connectivity<br/>[OracleDbContext.cs]")]
end

subgraph group_group_model["VPAA.Model"]
  node_node_model_entities["Entities<br/>domain objects<br/>[Entities]"]
  node_node_model_dtos["DTOs<br/>transfer shapes<br/>[DTO]"]
  node_node_model_logger["ILoggerService<br/>logging contract<br/>[ILoggerService.cs]"]
end

subgraph group_group_db["Database"]
  node_node_db_seed["Seed Scripts<br/>oracle seed data<br/>[VPAA.txt]"]
end

node_node_external_oracle[("Oracle DB<br/>persistent store")]

node_node_web_app -->|"routes requests"| node_node_web_controllers
node_node_web_controllers -->|"calls"| node_node_logic_services
node_node_logic_services -->|"uses"| node_node_data_repos
node_node_data_repos -->|"open connections"| node_node_data_context
node_node_data_context -->|"connects to"| node_node_external_oracle
node_node_data_repos -->|"maps"| node_node_model_entities
node_node_logic_services -->|"shapes data"| node_node_model_dtos
node_node_web_controllers -->|"builds"| node_node_web_viewmodels
node_node_web_viewmodels -->|"renders"| node_node_web_views
node_node_model_dtos -->|"adapts to"| node_node_web_viewmodels
node_node_web_views -->|"uses"| node_node_web_scripts
node_node_web_views -->|"localizes"| node_node_web_localization
node_node_web_scripts -->|"switches language"| node_node_web_localization
node_node_logic_services -->|"uses"| node_node_logic_helpers
node_node_logic_helpers -->|"implements via"| node_node_model_logger
node_node_db_seed -.->|"seeds"| node_node_external_oracle
node_node_web_controllers -->|"selects"| node_node_web_localization
node_node_web_controllers -->|"reads domain"| node_node_model_entities
node_node_web_app -->|"depends on"| node_node_logic_services

click node_node_web_app "https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.Web/Global.asax.cs"
click node_node_web_controllers "https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.Web/Controllers"
click node_node_web_views "https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.Web/Views"
click node_node_web_viewmodels "https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.Web/ViewModels"
click node_node_web_scripts "https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.Web/Scripts"
click node_node_web_localization "https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.Web/Content/Translation.en.json"
click node_node_logic_services "https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.Logic/Services"
click node_node_logic_helpers "https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.Logic/Helpers"
click node_node_data_repos "https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.DataAccess/Repositories"
click node_node_data_context "https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.DataAccess/Contexts/OracleDbContext.cs"
click node_node_model_entities "https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.Model/Entities"
click node_node_model_dtos "https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.Model/DTO"
click node_node_model_logger "https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.Model/Interfaces/ILoggerService.cs"
click node_node_db_seed "https://github.com/abdulrahmanqht/vpaa-gate/blob/main/Database/VPAA.txt"

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_node_web_app,node_node_web_controllers,node_node_web_views,node_node_web_viewmodels,node_node_web_scripts,node_node_web_localization toneBlue
class node_node_logic_services,node_node_logic_helpers toneAmber
class node_node_data_repos,node_node_data_context toneMint
class node_node_model_entities,node_node_model_dtos,node_node_model_logger toneRose
class node_node_db_seed toneIndigo
class node_node_external_oracle toneNeutral
```

## Components

### VPAA.Web

ASP.NET MVC presentation layer with controllers, views, view models, scripts, and styles.

- [MVC App](https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.Web/Global.asax.cs): ASP.NET MVC 5 entrypoint · Main web runtime and request boundary for the application. · `VPAA.Web/Global.asax.cs`
- [Controllers](https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.Web/Controllers): request boundaries · User-facing controllers for college, department, program, university, user, notifications, search, language, and shared pages. · `VPAA.Web/Controllers`
- [Razor Views](https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.Web/Views): server-rendered UI · Page templates and partials composing dashboards and program detail screens. · `VPAA.Web/Views`
- [ViewModels](https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.Web/ViewModels): UI adapters · View-specific shapes for colleges, departments, programs, notifications, university dashboards, and users. · `VPAA.Web/ViewModels`
- [Scripts & CSS](https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.Web/Scripts): client assets · Bootstrap, jQuery, validation, shared scripts, localization switcher, and styling assets. · `VPAA.Web/Scripts`
- [Translations](https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.Web/Content/Translation.en.json): i18n assets · English and Arabic translation bundles used by the UI and language controller. · `VPAA.Web/Content/Translation.en.json`

### VPAA.Logic

Business orchestration, helpers, and service boundaries.

- [Services](https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.Logic/Services): business services · Domain orchestration for colleges, departments, programs, university dashboards, users, and notifications. · `VPAA.Logic/Services`
- [Helpers](https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.Logic/Helpers): cross-cutting support · Caching, date utilities, and logging support used by the application layer. · `VPAA.Logic/Helpers`

### VPAA.DataAccess

Oracle persistence implemented with repository-based data access.

- [Repositories](https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.DataAccess/Repositories): persistence adapters · Domain repositories for college, department, faculty, program, user, and notifications data. · `VPAA.DataAccess/Repositories`
- [Oracle Context](https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.DataAccess/Contexts/OracleDbContext.cs): db connectivity · Oracle connection management and environment-based configuration loading. · `VPAA.DataAccess/Contexts/OracleDbContext.cs`

### VPAA.Model

Shared domain entities, DTOs, and interfaces.

- [Entities](https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.Model/Entities): domain objects · Core business entities such as College, Department, Program, Notifications, Users, study plans, exit points, and development plans. · `VPAA.Model/Entities`
- [DTOs](https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.Model/DTO): transfer shapes · Composite and summary contracts for dashboards, user roles, notifications, and program structure views. · `VPAA.Model/DTO`
- [ILoggerService](https://github.com/abdulrahmanqht/vpaa-gate/blob/main/VPAA.Model/Interfaces/ILoggerService.cs): logging contract · Abstraction for logging integration used across layers. · `VPAA.Model/Interfaces/ILoggerService.cs`

### Database

Seed and initialization scripts for Oracle data.

- [Seed Scripts](https://github.com/abdulrahmanqht/vpaa-gate/blob/main/Database/VPAA.txt): oracle seed data · Insert scripts and initialization artifacts for colleges, departments, pathways, and VPAA data. · `Database/VPAA.txt`

### Other components

- **Oracle DB**: persistent store · Primary Oracle database backing the application.

## Connections

- MVC App → Controllers: routes requests · MVC request dispatch enters through controllers.
- Controllers → Services: calls · Controllers delegate orchestration and business rules to services.
- Services → Repositories: uses · Services obtain and persist domain data through repositories.
- Repositories → Oracle Context: open connections · Repositories rely on the Oracle database context and environment configuration.
- Oracle Context → Oracle DB: connects to · Database context targets the Oracle backend.
- Repositories → Entities: maps · Repository queries materialize core entities.
- Services → DTOs: shapes data · Services assemble DTOs for composite screens and summaries.
- Controllers → ViewModels: builds · Controllers adapt service output into view models.
- ViewModels → Razor Views: renders · Razor views consume view models for page rendering.
- DTOs → ViewModels: adapts to · DTOs often feed view models for richer screens.
- Razor Views → Scripts & CSS: uses · Pages rely on shared JavaScript and styling assets.
- Razor Views → Translations: localizes · Views and controllers support English and Arabic content.
- Scripts & CSS → Translations: switches language · Client-side language switching is supported in the browser.
- Services → Helpers: uses · Services use caching, date helpers, and logging support.
- Helpers → ILoggerService: implements via · Logging behavior is abstracted behind a model-level interface.
- Seed Scripts → Oracle DB: seeds · Database scripts initialize the Oracle data store.
- Controllers → Translations: selects · Language controller drives translation selection.
- Controllers → Entities: reads domain · Some controller flows are driven by domain objects and summaries.
- MVC App → Services: depends on · The web runtime depends on the service layer for application behavior.
