File and Folder Structures



ZN Framework has an advanced and easy to understand directory structure. This structure also allows you to categorize your project files more clearly.

 

 

# Root Files and Directories


When you install ZN Framework, you will see the following files and directories in the root directory.

 Projects
 External
 internal
 Settings
 htaccess
 robots.txt
 zeroneed.php
 zerocore

Now let's give information about what the above files and directories are for and about subfiles and directories.

 

 

# Projects


this directory contains the applications you will develop your project. It includes Frontend/ and Backend/ directories by default. Such a directory structure has been designed considering more than one application in your project.

Subdirectories and Files

Frontend
Backend
htaccess

The Frontend/ directory is the default directory where your application will be located. It contains the necessary files and directories for your application development.

Frontend ve Backend

Butchery
Commands
Config
Controllers
Databases
Languages
Libraries
Models
Resources
Routes
Starting
Storage
Views

Butchery

this is the directory where the files of the theme to be integrated into the project will be kept. After the theme is moved to this directory, the theme is automatically integrated into the system with a simple command. Click for detailed usage.

Commands

It is the directory where the commands to be run on the console are made into a script as classes. Each class in this directory can be run from the console with a simple command. Click for detailed usage.

Config

this directory contains the configuration settings files for your application. The database is like a project.

Controllers

this directory contains classes written in OOP style that run files with Html content. The controllers that URIs typed in the address bar will run are included in this section. In other words, it is the section where the codes will be run, checked and directed. Click for detailed usage.

Databases

It is used to design the database and tables you want to create in this directory. Click for detailed usage.

Subdirectories and Files

Actives
Archives

Actives

Database and tables to be used actively.

Archives

The database and tables to be archived that will no longer be used.

Languages

In this directory, if you are going to use multiple languages in your project, it is the section where the words or sentences to be translated according to languages are included.

Subdirectories and Files

en
tr
ml

en

English words are included in this section.

tr

Turkish words are included in this section.

ml

The directory containing the language files created with the ML library. Click for usage.

If you are going to use a different language, you can add a new directory to store the words belonging to that language. Example: es/

Libraries

this is the section where your personal classes will be developed for your application in this directory. In addition to system libraries, you can assign personal or external libraries to this directory and use the classes you want to include. After you move the classes to this directory, you can use them directly without any adjustments.

Models

this directory contains more practical database usage classes that you will create using the database library. Usually this directory is for the use of your queries against the database of your application. Queries should be created in classes. Click for detailed usage.

Subdirectories and Files

Migrations
Visions

Migrations

It is the directory of migration files approved by the migration library.

Visions

It is the directory where the vision files are located.

Resources

this directory contains files such as js, css, image for your application.

Subdirectories and Files

Files
Plugins
Templates
Themes
Uploads

Files

Other files such as Image, Icon are found in this directory.

Plugins

Package files such as .js and .css are included in this directory. Example: bootstrap/

Templates

It contains common template files that you will use on multiple pages.

Themes

js. and theme files such as .css are located in this directory. Example: bluetheme/

Uploads

By default, uploaded files are located in this directory.

Routes

The files that will be used for your route directions are in this directory. Click for detailed usage.

Starting

this directory contains the files to run at the beginning of your application. Usually, codes that will be valid on all pages of the application are written in this section. It can be particularly useful for defining a constant and a function for all pages and controlling user access. Click for detailed usage.

Subdirectories and Files

Autoload
Handload

Autoload

It contains the files you want included automatically.

Handload

It contains the files you want included manually.

Storage

this directory contains directories where files created by some libraries are kept. Files such as database backups and log records are kept.

Subdirectories and Files

Cache
Crontab
DatabaseBackup
Logs

Cache

The files created by the file driver of the Cache library are stored.

Crontab

The debug.log file created by the Crontab library is stored.

DatabaseBackup

Files created by the DBTool::backup() method are stored.

Logs     

Log records are stored in this directory.

Views 

this is the section where the HTML content views of your application will take place in this directory. In other words, the view of your web pages is located in the files created in this directory. These view pages are controlled by the controllers located in the Controllers/ directory. Click for detailed usage.

.htaccess 

this file is used to prevent access to Projects/ directory and subdirectories.

 

 

# External


this directory contains common files that will be valid for all your applications. Thanks to this directory, you can benefit from common use in all of your applications.

Subdirectories and Files

The use of subdirectories and files is exactly the same as under Projects/ directory. However, the files here are valid for the entire system. If 2 of the same files are located both in the application and in this directory, then the file in the application will take precedence.

Commands
Controllers
Languages
Libraries
Models
Resources
Routes
Starting

 

 

# internal


this directory contains common files valid for system and applications. It is not a directory that requires users to intervene, as it concerns the basic structure of the system.

Subdirectories and Files

Sisteme ait kütüphaneler bulunmaktadır.

 

 

# Settings


The settings files that concern the general system are located in this directory.

 

 

# .htaccess


Contains the necessary configuration settings for the framework. If you want, you can add new settings by using the Settings/Htaccess.php settings file.

 

 

# robots.txt


this file contains information about directories and files that cannot be indexed by search engines. You can change the settings using the Settings/Robots.php settings file.

 

 

# zeroneed.php


Directory index page.

 

 

# zerocore


It was created to run commands from the console. With this file, you will be able to run the controller, model, class and function from the console.