Skip to content

1.2 Creating new project

vitalyiegorov edited this page Jan 3, 2015 · 3 revisions

#Generic project structure

Default project structure:

  • /contrib/ - Folder where bash scripts is located
  • /tests/ - Tests
  • /app/ - Web-application folder
  • /www/ - Web-server public folder
  • /src/ - Web-application modules folder
  • /vendor/ - Composer vendors folder
  • .gitignore - .gitignore
  • .travis.yml - Travis-CI configuration for testing
  • phpunit.php - PHPUnit bootstrap file
  • phpunit.xml - PHPUnit configuration file
  • composer.json - Composer configuration file - all project dependencies

##Web server folder /www/ This is the main path which will be accessible by your web-server, in should follow this structure:

  • app - Web-application code
  • img - Images root
  • css - CSS root
  • js - JavaScript root
  • .htaccess - Server configuration, if you use Apache
  • index.php - Web-application init script
  • favico.ico - Web-application small browser image

###Application folder /app/ This folder is generic application path for creating simple web-applications and has following structure:

  • controller - Module controllers
  • model - Module models
  • view - Module views

If you want to quickly create SamsonPHP project with latest structure you can use SamsonPHP/Application template, it the point to start

Clone this wiki locally