File Structure

When you get started using Pagekit, it is important that you know your way around the file structure. As Pagekit has a very clear separation of core code and third party files, this shouldn't be a big deal.

Explanation video

The following video goes through the structure and explains everything you need to know.<iframe class="uk-responsive-width" width="1280" height="720" src="https://www.youtube-nocookie.com/embed/-cH53Hq7F4o" frameborder="0" allowfullscreen></iframe>

Compact overview

For a brief overview, have a look at the following listing.

  1. /app // main system files
  2. assets // system assets
  3. console // console extension files
  4. installer // core Install/Update extension files
  5. modules // core modules files. Each module has its own subfolder
  6. system // core System extension files
  7. vendor // external libraries that are used by Pagekit
  8. /packages // Pagekit packages and 3rd party packages
  9. composer // packager related files
  10. pagekit // Pagekit default packages
  11. blog // default Blog extension
  12. theme-one // the default theme distributed with Pagekit
  13. /storage // site media files. You can change this location in System > Settings
  14. /tmp // temporary files
  15. cache // cache files
  16. logs // log files
  17. packages // temporary package files
  18. sessions // file based user sessions
  19. temp // general temporary files
  20. .htaccess // the Apache configuration file. Make sure it exists if using Apache
  21. CHANGELOG.md // changelog file
  22. config.php // configuration file generated during the installation
  23. pagekit // the CLI entry point
  24. pagekit.db // the database file (only present if using SQLite)

Places to explore

While it always takes some getting used to a new project's structure, you will quickly find your way around the important parts. The essential thing to know is that themes and extensions that you develop always sit in the /packages directory, inside a subfolder with your vendor name.

Additionally, it is a good idea to have a look at the official packages located in /packages/pagekit - for inspiration and a deeper understanding of the Pagekit concepts. Also, check out the modules in /app/modules and /app/system/modules to see examples of what can be done with the module pattern.