# alexandreriff/reilti-web-app architecture

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

- Interactive diagram: https://gitdiagram.com/alexandreriff/reilti-web-app
- Repository: https://github.com/alexandreriff/reilti-web-app

## Overview

REILTI is a Laravel educational-resource repository: users authenticate, browse and manage teaching resources, and can share them with learning platforms through LTI. Resource creation validates metadata and uploads, then the service stores files and resource records; file retrieval is dispatched by media type. The map also shows authorization and the documented LTIAAS integration. Relationships are limited to controller/service calls, route references, and file handling visible in excerpts or the source index; the LTI-to-provider connection is documented but its implementation details were not sampled.

Main entry points: [`routes/web.php`](https://github.com/alexandreriff/reilti-web-app/blob/master/routes/web.php) (Web routes), [`app/Http/Controllers/Resource/ResourceController.php`](https://github.com/alexandreriff/reilti-web-app/blob/master/app/Http/Controllers/Resource/ResourceController.php) (Resource endpoints), [`app/Services/ResourceService.php`](https://github.com/alexandreriff/reilti-web-app/blob/master/app/Services/ResourceService.php) (Resource operations), [`app/Http/Controllers/Lti/LtiController.php`](https://github.com/alexandreriff/reilti-web-app/blob/master/app/Http/Controllers/Lti/LtiController.php) (LTI endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and authorization"]
  node_web_routes["Web routes<br/>[web.php]"]
  node_auth["Authentication<br/>[AuthController.php]"]
  node_user_model["User accounts<br/>[User.php]"]
  node_authorization["Resource authorization<br/>[ResourcePolicy.php]"]
  node_auth_provider["Gate configuration"]
end

subgraph group_catalog["Resource catalog"]
  node_resource_controller["Resource endpoints"]
  node_resource_views["Catalog screens"]
  node_resource_requests["Resource validation"]
  node_resource_service["Resource operations"]
  node_resource_model["Resource metadata<br/>[Resource.php]"]
  node_metadata_models["Catalog metadata<br/>[TechArea.php]"]
  node_database[("PostgreSQL")]
end

subgraph group_files["Resource files"]
  node_file_controller["File endpoints"]
  node_file_service["File delivery"]
  node_file_factory["Media dispatch"]
  node_file_handlers["Media handlers"]
  node_file_storage[("File storage<br/>[ResourceFile.php]")]
end

subgraph group_interop["LTI interoperability"]
  node_lti_controller["LTI endpoints<br/>[LtiController.php]"]
  node_lti_service["LTI service<br/>[LtiService.php]"]
end

node_user(("User"))
node_ltiaas{{"LTIAAS"}}

node_user -->|"requests"| node_web_routes
node_web_routes -->|"routes to"| node_auth
node_web_routes -->|"routes to"| node_resource_controller
node_web_routes -->|"routes to"| node_file_controller
node_web_routes -->|"routes to"| node_lti_controller
node_auth -->|"creates accounts"| node_user_model
node_auth_provider -->|"registers policy"| node_authorization
node_resource_controller -->|"delegates operations"| node_resource_service
node_resource_controller -->|"validates input"| node_resource_requests
node_resource_controller -->|"renders screens"| node_resource_views
node_resource_service -->|"queries and saves"| node_resource_model
node_resource_service -->|"updates metadata"| node_metadata_models
node_resource_model -.->|"persists records"| node_database
node_resource_service -->|"dispatches media"| node_file_factory
node_file_controller -->|"delegates delivery"| node_file_service
node_file_service -->|"selects handler"| node_file_factory
node_file_factory -->|"creates handler"| node_file_handlers
node_file_handlers -->|"reads and writes"| node_file_storage
node_lti_controller -->|"delegates LTI"| node_lti_service
node_lti_controller -->|"requests resource files"| node_file_service
node_lti_service -.->|"shares via LTI"| node_ltiaas

click node_web_routes "https://github.com/alexandreriff/reilti-web-app/blob/master/routes/web.php"
click node_auth "https://github.com/alexandreriff/reilti-web-app/blob/master/app/Http/Controllers/Auth/AuthController.php"
click node_user_model "https://github.com/alexandreriff/reilti-web-app/blob/master/app/Models/User.php"
click node_authorization "https://github.com/alexandreriff/reilti-web-app/blob/master/app/Policies/ResourcePolicy.php"
click node_auth_provider "https://github.com/alexandreriff/reilti-web-app/blob/master/app/Providers/AuthServiceProvider.php"
click node_resource_controller "https://github.com/alexandreriff/reilti-web-app/blob/master/app/Http/Controllers/Resource/ResourceController.php"
click node_resource_views "https://github.com/alexandreriff/reilti-web-app/tree/master/resources/views/resource"
click node_resource_requests "https://github.com/alexandreriff/reilti-web-app/tree/master/app/Http/Requests"
click node_resource_service "https://github.com/alexandreriff/reilti-web-app/blob/master/app/Services/ResourceService.php"
click node_resource_model "https://github.com/alexandreriff/reilti-web-app/blob/master/app/Models/Resource.php"
click node_metadata_models "https://github.com/alexandreriff/reilti-web-app/blob/master/app/Models/TechArea.php"
click node_file_controller "https://github.com/alexandreriff/reilti-web-app/blob/master/app/Http/Controllers/ResourceFile/ResourceFileController.php"
click node_file_service "https://github.com/alexandreriff/reilti-web-app/blob/master/app/Services/ResourceFileService.php"
click node_file_factory "https://github.com/alexandreriff/reilti-web-app/blob/master/app/Factories/ResourceFile/ResourceFileFactory.php"
click node_file_handlers "https://github.com/alexandreriff/reilti-web-app/tree/master/app/Factories/ResourceFile"
click node_file_storage "https://github.com/alexandreriff/reilti-web-app/blob/master/app/Factories/ResourceFile/ResourceFile.php"
click node_lti_controller "https://github.com/alexandreriff/reilti-web-app/blob/master/app/Http/Controllers/Lti/LtiController.php"
click node_lti_service "https://github.com/alexandreriff/reilti-web-app/blob/master/app/Services/LtiService.php"

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_web_routes,node_auth,node_user_model,node_authorization,node_auth_provider,node_user toneBlue
class node_resource_controller,node_resource_views,node_resource_requests,node_resource_service,node_resource_model,node_metadata_models,node_database toneAmber
class node_file_controller,node_file_service,node_file_factory,node_file_handlers,node_file_storage toneMint
class node_lti_controller,node_lti_service toneRose
class node_ltiaas toneIndigo
```

## Components

### Access and authorization

- [Web routes](https://github.com/alexandreriff/reilti-web-app/blob/master/routes/web.php): `routes/web.php`
- [Authentication](https://github.com/alexandreriff/reilti-web-app/blob/master/app/Http/Controllers/Auth/AuthController.php): `app/Http/Controllers/Auth/AuthController.php`
- [User accounts](https://github.com/alexandreriff/reilti-web-app/blob/master/app/Models/User.php): `app/Models/User.php`
- [Resource authorization](https://github.com/alexandreriff/reilti-web-app/blob/master/app/Policies/ResourcePolicy.php): `app/Policies/ResourcePolicy.php`
- [Gate configuration](https://github.com/alexandreriff/reilti-web-app/blob/master/app/Providers/AuthServiceProvider.php): `app/Providers/AuthServiceProvider.php`

### Resource catalog

- [Resource endpoints](https://github.com/alexandreriff/reilti-web-app/blob/master/app/Http/Controllers/Resource/ResourceController.php): `app/Http/Controllers/Resource/ResourceController.php`
- [Catalog screens](https://github.com/alexandreriff/reilti-web-app/tree/master/resources/views/resource): `resources/views/resource`
- [Resource validation](https://github.com/alexandreriff/reilti-web-app/tree/master/app/Http/Requests): `app/Http/Requests`
- [Resource operations](https://github.com/alexandreriff/reilti-web-app/blob/master/app/Services/ResourceService.php): `app/Services/ResourceService.php`
- [Resource metadata](https://github.com/alexandreriff/reilti-web-app/blob/master/app/Models/Resource.php): `app/Models/Resource.php`
- [Catalog metadata](https://github.com/alexandreriff/reilti-web-app/blob/master/app/Models/TechArea.php): `app/Models/TechArea.php`
- **PostgreSQL**

### Resource files

- [File endpoints](https://github.com/alexandreriff/reilti-web-app/blob/master/app/Http/Controllers/ResourceFile/ResourceFileController.php): `app/Http/Controllers/ResourceFile/ResourceFileController.php`
- [File delivery](https://github.com/alexandreriff/reilti-web-app/blob/master/app/Services/ResourceFileService.php): `app/Services/ResourceFileService.php`
- [Media dispatch](https://github.com/alexandreriff/reilti-web-app/blob/master/app/Factories/ResourceFile/ResourceFileFactory.php): `app/Factories/ResourceFile/ResourceFileFactory.php`
- [Media handlers](https://github.com/alexandreriff/reilti-web-app/tree/master/app/Factories/ResourceFile): `app/Factories/ResourceFile`
- [File storage](https://github.com/alexandreriff/reilti-web-app/blob/master/app/Factories/ResourceFile/ResourceFile.php): `app/Factories/ResourceFile/ResourceFile.php`

### LTI interoperability

- [LTI endpoints](https://github.com/alexandreriff/reilti-web-app/blob/master/app/Http/Controllers/Lti/LtiController.php): `app/Http/Controllers/Lti/LtiController.php`
- [LTI service](https://github.com/alexandreriff/reilti-web-app/blob/master/app/Services/LtiService.php): `app/Services/LtiService.php`

### Other components

- **User**
- **LTIAAS**

## Connections

- User → Web routes: requests (evidence: `routes/web.php`)
- Web routes → Authentication: routes to (evidence: `routes/web.php`)
- Web routes → Resource endpoints: routes to (evidence: `routes/web.php`)
- Web routes → File endpoints: routes to (evidence: `routes/web.php`)
- Web routes → LTI endpoints: routes to (evidence: `routes/web.php`)
- Authentication → User accounts: creates accounts (evidence: `app/Http/Controllers/Auth/AuthController.php`)
- Gate configuration → Resource authorization: registers policy (evidence: `app/Providers/AuthServiceProvider.php`)
- Resource endpoints → Resource operations: delegates operations (evidence: `app/Http/Controllers/Resource/ResourceController.php`)
- Resource endpoints → Resource validation: validates input (evidence: `app/Http/Controllers/Resource/ResourceController.php`)
- Resource endpoints → Catalog screens: renders screens (evidence: `app/Http/Controllers/Resource/ResourceController.php`)
- Resource operations → Resource metadata: queries and saves (evidence: `app/Services/ResourceService.php`)
- Resource operations → Catalog metadata: updates metadata (evidence: `app/Services/ResourceService.php`)
- Resource metadata → PostgreSQL: persists records
- Resource operations → Media dispatch: dispatches media (evidence: `app/Services/ResourceService.php`)
- File endpoints → File delivery: delegates delivery (evidence: `app/Http/Controllers/ResourceFile/ResourceFileController.php`)
- File delivery → Media dispatch: selects handler (evidence: `app/Services/ResourceFileService.php`)
- Media dispatch → Media handlers: creates handler (evidence: `app/Factories/ResourceFile/ResourceFileFactory.php`)
- Media handlers → File storage: reads and writes (evidence: `app/Factories/ResourceFile/ResourceFile.php`)
- LTI endpoints → LTI service: delegates LTI (evidence: `app/Http/Controllers/Lti/LtiController.php`)
- LTI endpoints → File delivery: requests resource files (evidence: `app/Http/Controllers/Lti/LtiController.php`)
- LTI service → LTIAAS: shares via LTI
