02. Getting Started - hostbrook/videna GitHub Wiki

Directory Structure

/App/
    /Controllers/
    /Models/
    /Views/
    /configs/
    /lang/
/logs/
/public/
/src/
/vendor/

The App/ Directory

The App directory contains the core code of your application. Generally, files from only App and public folders you can change when developing application.

The App/Controllers/ Directory

The Controllers directory contains your controllers to create application logic. You can organize internal folders structure by your needs. More about that read in the section 'Controllers'

The App/Models/ Directory

The Models directory contains your models to work with database. You can organize internal folders structure by your needs. More about that read in the section 'Database'

The App/Views/ Directory

The Views directory contains your views: page, mail layouts and templates. Some folder suggestions/examples are provided in demo application:

  • /Views/app/ - views for web application requests (JS fetch, AJAX, etc.)
  • /Views/inc/ - templates that included in multiple views
  • /Views/mail/ - templates for mails But you can organize internal folders structure in different menier, by your needs. More about that read in the section 'Views'

The App/configs/ Directory

The configs directory contains configuration files to set your work enviroment. More about that read in the section 'Configure work environment'

The App/lang/ Directory

The lang directory contains language files to create multi-language applications. More about how to create a multi-language website read in the section 'Localization'.

The logs/ Directory

The logs directory contains application log files.

The public/ Directory

The public directory contains the index.php file, which is the entry point for all requests entering your application and configures autoloading. This directory also houses your assets such as images, JavaScript, and CSS.

The src/ Directory

The src directory contains your raw, un-compiled assets such as LESS, CSS or JavaScript, etc.

The vendor/ Directory

The vendor directory contains your Composer dependencies.

Files in root directory

Files in the root directory are required for control of your Composer, Webpack and Git dependencies.

Workflow

Step 1. Install framework

Install framework via Composer. Videna framework comes with pre-cooked demo site that gives your impression about base functionality which you can easily modify and extend. More about that read in the section 'Installation'

Step 2. Configure work environment

Right after installation you need to configure your application. All configuration files (environment, application variables, database and mail settings, etc.) you can find in the folder \App\configs\. More about that read in the section 'Configure work environment'

Step 3. Run and test demo application

Now you are able to run and test the demo application. Check to be sure:

  • All pages open without error.
  • Titles and Descriptions are correct for every page.
  • Database connection is correct and you can log in to the Dashboard using your social account.
  • Languages switched correctly.
  • No records in the application log file.

Step 4. Modifying demo application to match your needs

  • create new views: HTML page layouts and templates
  • add logic to the application using controllers and models

Step 5. Upload your application at the hosting

We recommend uploading your application to web hosting via GitHub. It can help you easily update your website in the future. Also, whenever framework core updates occur, you can easily apply them via Composer with one simple command.