CLI Project Templates
Module: Daf CLI Templates
Source folder: Daf/ProjectsTemplates
API Template (webapi)
Generates a minimal API project with ApplicationEx, ApiControllers/WeatherController.php, and vendor bootstrap.
Default behavior includes route prefix api and sample forecast endpoint.
Run: daf create webapi then daf watch.
Web Application Template (webapp)
Generates MVC-style starter with controllers and views, including Home/Counter/FetchData-style setup through sample controllers and page components.
Includes examples for form binding (AutoConstruct), placeholder usage, and routed controllers.
Run: daf create webapp then daf watch.
Clean Web Application Template (cleanwebapp)
Generates a minimal base with ApplicationEx, imports shell, and vendor bootstrap only.
Recommended for teams that want to scaffold architecture from scratch and add features incrementally via daf generate.
Run: daf create cleanwebapp, add first route/page, then daf watch.
Suggested Starting Flow
- Create project with the closest template.
- Run
daf watchand verify baseline. - Generate missing building blocks (
controller,model,component,dbset). - Add dependencies with
daf downloadas needed.