zorba created page: application structure authored by Sonia Zorba's avatar Sonia Zorba
# Application structure
## Main directories and files
* **auth**: contains pages for performing authentication using all the supported protocols
* oauth2: pages perform redirect requests to Google, Facebook or LinkedIn login pages and manage the access tokens
* saml2: extracts Shibboleth authentication data from PHP `$_SERVER` variable
* x509: extracts X.509 parsed data from PHP `$_SERVER` variable
* **classes**: core application PHP classes (data model, business logic and persistence)
* **css/js/img**: CSS stylesheets, JavaScript files, images
* **include**: various PHP pages that needs to be included into other pages:
* init.php: performs some initialization operations (loading dependencies, registering autoloading for RAP classes, loading configuration, defining some global variables)
* front-controller.php: Front Controller using FlightPHP framework dedicated to process web pages routing and rendering
* gui-backend.php: REST backend for interacting with JavaScript using AJAX calls
* web pages fragments (header, footer, panels, ...)
* rest-web-service.php: page using the FlightPHP framework to setup a REST web service used to call RAP from external applications.
* **views**: views template to be displayed using the Flight Framework
* **sql**: SQL scripts for database setup
## Architecture
![rap-architecture](/uploads/c06b6a70ecc71624a11f7edf2442f386/rap-architecture.jpg)