How getgrav/grav works
Grav is a file-based CMS and web platform. A web request enters through the front controller, is handled by the Grav runtime and its processors, and produces a rendered response. Its content model includes pages backed by filesystem storage, while configuration and structured data support site setup. Separate product capabilities include Twig and Markdown rendering, plugin/theme extensibility, package management, and scheduled jobs. The README documents the rendering and package-management capabilities; source excerpts show runtime setup and Flex storage, but do not expose the full request-to-render sequence.
Main entry points: Grav.php Grav runtime · FolderStorage.php Folder storage · PageStorage.php Page storage · index.php Front controller
Components 20
Request runtime
- Front controller
index.php - Grav runtime
system/src/Grav/Common/Grav.php - Request processors
system/src/Grav/Common/Processors - Configuration
system/src/Grav/Common/Config/Config.php - Debugger
system/src/Grav/Common/Debugger.php
Content and storage
- Page model
system/src/Grav/Common/Page/Page.php - Page collections
system/src/Grav/Common/Page/Pages.php - Flex data model
system/src/Grav/Framework/Flex/Flex.php - Page storage
system/src/Grav/Common/Flex/Types/Pages/Storage/PageStorage.php - Folder storage
system/src/Grav/Framework/Flex/Storage/FolderStorage.php - Filesystem
system/src/Grav/Framework/Filesystem/Filesystem.php - Structured data
system/src/Grav/Common/Data/Data.php
Rendering
- Markdown engine
system/src/Grav/Common/Markdown/Parsedown.php - Twig templates
system/src/Grav/Common/Twig/Twig.php
Extensions and operations
- Plugin system
system/src/Grav/Common/Plugins.php - Theme system
system/src/Grav/Common/Themes.php - Package manager
system/src/Grav/Common/GPM/GPM.php - Scheduler
system/src/Grav/Common/Scheduler/Scheduler.php
Other components
- Site visitor
- CLI operator
Connections 17
- Site visitor → Front controller: requests
README.md - Front controller → Grav runtime: starts runtime
index.php - Grav runtime → Request processors: registers processors
system/src/Grav/Common/Grav.php - Grav runtime → Configuration: uses configuration
system/src/Grav/Common/Grav.php - Configuration → Structured data: loads data
system/src/Grav/Common/Config/Config.php - Grav runtime → Debugger: uses debugger
system/src/Grav/Common/Config/Config.php - Grav runtime → Page model: references pages
system/src/Grav/Common/Grav.php - Grav runtime → Page collections: references page collections
system/src/Grav/Common/Grav.php - Page storage → Page model: uses page model
system/src/Grav/Common/Flex/Types/Pages/Storage/PageStorage.php - Page storage → Folder storage: extends storage
system/src/Grav/Common/Flex/Types/Pages/Storage/PageStorage.php - Folder storage → Filesystem: uses filesystem
system/src/Grav/Framework/Flex/Storage/FolderStorage.php - Flex data model → Folder storage: uses storage
system/src/Grav/Framework/Flex/Storage/FolderStorage.php - Markdown engine → Twig templates: renders with
README.md - Site visitor → Markdown engine: authors content
README.md - CLI operator → Package manager: manages packages
README.md - Grav runtime → Plugin system: loads plugins
system/src/Grav/Common/Grav.php - Grav runtime → Theme system: loads themes
system/src/Grav/Common/Grav.php