Skip to content

Instantly share code, notes, and snippets.

@lukemorton
Last active December 18, 2015 04:49
Show Gist options
  • Save lukemorton/5728494 to your computer and use it in GitHub Desktop.
Save lukemorton/5728494 to your computer and use it in GitHub Desktop.
This is how I would lay out a PHP application from scratch
/
  config/
    development/
      mongo.php
    production/
      features.php
      mongo.php
    staging/
      features.php
      mongo.php
    testing/
      mongo.php
    features.php
    mongo.php

  public/
    index.php

  src/
    Core/
      Interaction/
        Controller/
          PageController.php
      Application.php
      DependencyContainer.php
    Forum/
      Interaction/
        Controller/
          ForumController.php
      Data/
        Mapper/
          ForumMongoMapper.php
        Model/
          IndexModel.php
          ThreadModel.php
          MessageModel.php
        Action/
          CreateThreadAction.php
          CreateMessageAction.php
      View/
        Model/
          IndexModel.php
          ThreadModel.php
          MessageModel.php

  templates/
    forum/
      index.mustache
      thread.mustache
      message.mustache
    layout.mustache

  vendor/
    HTTP/Routing
    TemplateEngine
    Logging
    DependencyContainer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment