Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nette Playground

A minimalist web playground for the Nette framework: a single closure route, a Latte extension stub, Tracy debugger and PHPStan level 8 — nothing else.

Requirements

  • PHP >= 8.2
  • Composer 2

Getting started

composer install
composer start

The dev server runs at http://localhost:11000 (PHP built-in server, docroot www/).

Layout

Path Purpose
www/index.php Front controller: bootstrap → Application::run()
app/Bootstrap.php Web bootstrap via Nette\Bootstrap\Configurator
app/Core/RouterFactory.php Routes: / handled by a closure
app/Presentation/Accessory/LatteExtension.php Empty Latte extension stub
config/common.neon Application, database, Latte and assets configuration
config/services.neon DI wiring: router factory + class search
temp/, log/ Runtime dirs (DI container, Tracy logs), self-ignored by git

Routing

/ is a closure route: Nette wraps it in the built-in Nette:Micro presenter. Closure handlers must return a Nette\Application\Responses\Response instance (e.g. TextResponse) — not echo.

Unmatched routes produce HTTP 404: Tracy BlueScreen renders the error in debug mode, the framework's built-in Nette:Error4xx / Nette:Error5xx presenters in production.

Configuration

config/common.neon ships with:

  • database — SQLite in-memory DSN placeholder;
  • latte — strict parsing and the registered LatteExtension;
  • assets — assets directory mapping (Vite option commented out);
  • di.export — hides parameters and tags in the Tracy container panel.

config/services.neon registers the router factory and auto-discovers *Facade, *Factory, *Repository, *Service classes in app/.

The DI container is regenerated automatically in temp/ whenever config files change.

Quality gate

PHPStan level 8 (phpstan.neon, paths: app, www), nette/phpstan-rules autoloaded via phpstan/extension-installer:

php vendor/bin/phpstan analyse

Keep it green.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages