Directory Structure

Here is the Directory Structure used in Namaskar:

- data/
  - var/ [folder for logs, tmp files]
  - sites/
    - site1/
      - public/
        - index.php
          - media/
    - site2/
      - public/
        - index.php
          - media/
- namaskar/
  - core/ [Core files for the Framework]
  - src/ [This folder contains application-specific components]
    - Controllers/ [application controllers that manage actions and responses to requests]
      - HomeController.php
      - AdminController.php
      - ...
    - Services/ [application's services, which encapsulate business logic and reusable functionality.]
      - SomeService.php
      - ...
 - templates/ [template files used to generate the application views.]
    - bootstrap5/ [the defaut template]
      - index.html
      - navbar.html
      - ...
    - ...

The Namaskar file structure

The file structure of a Namaskar project follows a standard organization that promotes modularity. Here's an overview of the main directories:

  1. data: This directory houses the various configuration files for Namaskar. The var folder contains cache files, logs, and other temporary files generated by the application during runtime. Key subdirectories include sites/, logs/, and sessions/.

  2. The directory data/sites contains the different websites. Each site has its own configuration files in data/sites/PROJECT
    The public part of all websites are in data/sites/PROJECT/public/.
    The web server's document root typically points to this directory.
    Inside that folder, you will find:

- index.php : the front controller that receives all HTTP requests and routes them to the application.
- the asset folder for static assets (CSS, JavaScript, images, etc.)
- the media directory for all content, images, videos, mp3...

Then we have the namaskar folder which contains :

  1. core: this directory houses all the Namaskar classes. Inside, there is also vendor folder which houses third-party libraries.
  2. src: This is where the application's source code resides. The primary PHP code, including controllers, models, services, and other classes specific to your application, are located in this directory.
  3. templates: Contains the templates used for rendering views in the application.