This barebones chat application serves to demonstrate how Symfony UX Turbo can be used to make server-rendered applications more dynamic without resorting to custom JavaScript code.
Developed for my talk at the Symfony User Group Aveiro.
Disclaimer: The code doesn't always adhere to best practices, in favor of keeping the code as simple as possible.
- PHP 8.0 (with SQLite drivers)
- Node + Yarn
- Symfony CLI (with TLS support for the local web server)
- Install dependencies:
composer install
&yarn
- Create the database with the matching schema:
bin/console doctrine:schema:update --force
- Run
make start
to start the dev server and Webpack Encore. - Open up
https://127.0.0.1:8000/rooms
to get started!
NOTE: It has to be
https://127.0.0.1:8000
. Anything else (evenlocalhost:8000
) will result in CORS errors when attempting to connect to the Mercure Hub.
Turbo Frames are given red borders while Turbo Streams are given blue borders to better identify them.