Ketroute Framework creates the following folder structure of the Model-View-Controller (MVC) architecture by default. Understanding the file system structure is like learning the blueprint of Ketroute Framework architecture. Each directory has a purpose, and mastering each directoryâs role played within your application can turn a beginner into an advanced developer in no time!
Purpose: Facilitates the integration with external systems for all outbound requests.
Usage: This directory contains the code necessary for making API calls, establishing connections with external services, and handling other outbound communications. Each integration typically has its subdirectory or files detailing the specific implementation.
Example: adapters/service-provider/service-provider.interface.php might handle all interactions with a payment processing service.
Purpose: Acts as a repository for reusable components that serve as the building blocks of the application.
Note: As the application evolves, this directory is expected to change frequently. It includes various modules, widgets, and other reusable code snippets that can be used across different parts of the application.
Example: components/application/context/modules/module.php could be a reusable user profile component. More details of the component layout structure is explained in the Ketroute Framework guideline
Purpose: Manages the customization of the menu builder and home panel.
Note: Controllers handle user input, process it, and interact with models to update views accordingly. This directory contains the logic for controlling various aspects of the application's behaviour and UI.
Example: controllers/homepage-context.php or controllers/menubuilder-context.php might handle dynamic generation of the navigation menu based on user roles.
Purpose: Secure storage for images used in email bodies.
Usage: Ensures that images embedded in email communications are stored securely and are easily accessible when emails are rendered.
Example: inline-images/logo.png might be used as a company logo in email templates.
Purpose: Stores default UI layouts, email templates, and other custom layouts.
Usage: This directory is essential for defining the visual structure of the application and its emails. It includes templates that dictate the overall appearance and arrangement of UI elements.
Example: layouts/email.tpl might define the general structure of the web application's pages.
Purpose: Secure storage for email attachments.
Usage: Each email sent by the application has its attachments securely stored in this directory, ensuring they are accessible when needed.
Example: mbox/invoice_1234.pdf might be an attachment sent with an email confirmation.
Purpose: Repository for SQL alteration statements.
Usage: Used by full-stack developers to manage database schema changes during development and design phases. It includes all SQL scripts required to modify the database structure.
Example: sql/20230608_add_users_table.sql might contain SQL statements for creating a new users table.
Purpose: Houses customizations for the application's interface.
Usage: Allows for the creation of different themes to cater to various contexts or branding requirements of the system.
Purpose: Manages third-party integration.
Usage: This directory is used for integrating SDKs and other external interfaces, particularly for tasks like completing e-commerce transactions.
Example:web-interfaces/service-provider/classes/ServiceProviderWebInterface.js could handle interactions with some e-commerce API.
Purpose: Temporary storage for files during workflows.
Usage: Stores files that are uploaded and used temporarily during a step-by-step process or workflow.
Purpose: Stores application configuration files.
Usage: Contains system default settings, database connection details, and paths to important storage locations.
Example: configurations/database-details-cloud.php might hold the configuration for connecting to the database.
Purpose: Directory for JavaScript files and external libraries.
Usage: Includes all JavaScript code, including custom scripts and third-party libraries necessary for the application's functionality.
Example: js/jquery/app.js might be the main JavaScript file for the application.
Purpose: Repository for log files.
Usage: Logs are categorized by type such as database, general error, network, system, and application. This helps in debugging and monitoring application health.
Purpose: Stores metadata for system workflows.
Usage: Manages metadata information about processes and states within the application.
Purpose: Master storage for all uploaded fields.
Usage: Acts as the central repository for all files uploaded by users or the application, configured in components as file system storage media.
Example: storage/component-name/profilePic123.jpg might store a user's profile picture.
Purpose: Temporary storage for files.
Usage: Used for files that needs temporary storage during processes or operations.
Example: tmp/filedata.tmp might store temporary session data.
Purpose: Core framework directory.
Usage: Contains the core libraries and should be relocated to a secure path on a production server during system setup for enhanced security. For the application environment that implements decentralized approaches, the library file should be located where all micro services and/or subsystems can have direct access for the purpose of reuse, optimizing resource usage and performance.
Here is an example of a full structure. In this example we are using portal and intranet as our context and employee as our component for the purpose of demostration.
NOTE: All directories that are marked as red must be in a location that is not accessible by the web.
##info- adapters
------ integration-provider
------------- service-provider.interface.php
- assets
------------- css
--------------------- animate.css
------------- js
--------------------- *.*
------------- images
--------------------- *.*
- cache
------------- *.*
- components
------------- empoyee
--------------------- application
------------------------------ intranet
-------------------------------------- css
---------------------------------------------- style.css
-------------------------------------- js
---------------------------------------------- script.js
-------------------------------------- modules
---------------------------------------------- list.php
---------------------------------------------- add.php
---------------------------------------------- edit.php
---------------------------------------------- delete.php
-------------------------------------- templates
---------------------------------------------- list.tpl
---------------------------------------------- add.tpl
---------------------------------------------- edit.tpl
---------------------------------------------- delete.tpl
-------------------------------------- confugurations.php
------------------------------ portal
-------------------------------------- css
---------------------------------------------- style.css
-------------------------------------- js
---------------------------------------------- script.js
-------------------------------------- modules
---------------------------------------------- list.php
---------------------------------------------- add.php
---------------------------------------------- edit.php
---------------------------------------------- delete.php
-------------------------------------- templates
---------------------------------------------- list.tpl
---------------------------------------------- add.tpl
---------------------------------------------- edit.tpl
---------------------------------------------- delete.tpl
-------------------------------------- confugurations.php
--------------------- classes
------------------------------ EmployeeManager.php
--------------------- cronjobs
------------------------------ cron
-------------------------------------- modules
---------------------------------------------- birthday-notification.php
--------------------- images
------------------------------ employee-list.svg
------------------------------ employee-add.svg
--------------------- languages
------------------------------ en.xml
--------------------- routine-helper
------------------------------ process-name1.php
------------------------------ process-name2.php
--------------------- webservices
------------------------------ EmployeeService.getProfile.php
------------------------------ EmployeeService.updateProfile.php
- configurations
------------- lang-overwrite
--------------------- en.xml
------------- process-overwrite
--------------------- dialing-codes.php
------------- database-details-cloud.php
------------- storage-paths.php
------------- system-cloud.php
- controllers
------------- homepanel-portal.php
------------- homepanel-panel.php
- inline-images
------------- *.*
- layouts
------------- application.tpl
------------- email.tpl
------------- email-custom.tpl
- logs
------------- database.log
------------- security.log
------------- component.log
------------- network.log
------------- email.log
------------- system.log
------------- general.log
- mbox
------------- key-name-key1.ea
------------- key-name-key2.ea
- metadata
------------- rendering
--------------------- field.php
- sql
------------- YYYYMMDD-changename.sql
- storage
------------- employee
--------------------- employee1-filekey-profile-picture.png
--------------------- employee2-filekey-profile-picture.jpg
- themes
------------- cloud
--------------------- portal
------------------------------ css
--------------------------------------- index.css
------------------------------ js
--------------------------------------- script.js
------------------------------ ico
--------------------------------------- favicon.ico
--------------------------------------- favicon.jpg
--------------------------------------- favicon.png
------------------------------ images
--------------------------------------- email.logo.png
--------------------------------------- document-logo.jpg
--------------------------------------- logo.svg
--------------------------------------- logo.png
--------------------------------------- logo.jpg
------------------------------ layout.tpl
------------------------------ application.tpl
--------------------- intranet
------------------------------ css
--------------------------------------- index.css
------------------------------ js
--------------------------------------- script.js
------------------------------ ico
--------------------------------------- favicon.ico
--------------------------------------- favicon.jpg
--------------------------------------- favicon.png
------------------------------ images
--------------------------------------- email.logo.png
--------------------------------------- document-logo.jpg
--------------------------------------- logo.svg
--------------------------------------- logo.png
--------------------------------------- logo.jpg
------------------------------ layout.tpl
------------------------------ application.tpl
--------------------- images
------------------------------ email-logo.png
------------------------------ email-logo.jpg
------------------------------ document-logo.jpg
- queue
------------- filekey.component-name
- web-interfaces
------------- provider-name
--------------------- classes
------------------------------ ProviderNameWebInterface.php
--------------------- modules
------------------------------ process.php
------------------------------ start.php
--------------------- templates
------------------------------ start.tpl
- .htaccess
- index.php
- robots.txt
info##
Your download is here.