Directory Structure

Table of contents

Loading...

Introduction

The directory structures of the slim-example-project, slim-api-starter and the slim-starter are based on Standard PHP Package Skeleton.

Directory Structure

The project architecture is being refactored. See the reddit discussion.
Work in progress branch: vs-architecture-refactoring.

├── config                   # contains configuration files
├── public
│   ├── assets               # images, videos, stylesheets, scripts, fonts, audio files
├── resources
│   ├── migrations           # database migrations
│   ├── schema               # database table creation schema
│   ├── seeds                # database seed data
│   └── translations         # translation files
├── src
│   ├── Core # general stuff that is not tied to a specific module 
│   │   ├── Application # top layer, contains middlewares, error handler, responder
│   │   │   ├── Middleware 
│   │   │   └── Responder
│   │   ├── Domain # includes business logic utilities and exceptions
│   │   │   ├── Exception
│   │   │   └── Utility
│   │   └── Infrastructure # contains query factory and infrastructure utilities
│   │       ├── Factory
│   │       └── Utility
│   └── Module
│       └── {ModuleX}
│           ├── {Feature}
│           │   ├── Application
│           │   ├── Domain
│           │   └── Infrastructure
│           └── Data # DTOs
├── templates                # layout and template files for each module 
└── tests
    ├── Fixture              # database content to be added as preparation in test db for integration tests
    ├── TestCase             # contains modules with unit and integration tests
    │   ├── {ModuleX}        
    │   │   └── {Feature}    # test cases for the feature (also contains its provider)
    └── Trait                # utility traits (test setup, database connection, helpers)
^