There are multiple ways to start with a Phaser3 project. You can start from scratch or you use one of the many boilerplates out there. I recommend that you to start from scratch at least once. So you know the basics. But starting with a boilerplate can speed up your project setup. You should also consider creating your own, which fits exactly your needs.
Start from scratch
At first grab the latest release from GitHub https://github.com/photonstorm/phaser/releases. Secondly create the following folder structure to organize your files and save the Phaser files into the
Phaser-Project-Name |- js | |- phaser.js //full phaser.js, including sourc code comments | |- phaser.min.js //minified phaser.js for release | |- app.js //entry for your game |- assets //put all mp3, jpeg, png, svg... here |- index.html //entry point for the browser
At last, you need to populate the
index.html with a basic html5 schema and include
js/app.js with a script tag.
Now you are ready to go to start scripting within the app.js.
In general all boilerplates for Phaser 3 use Webpack, because Phaser 3 is build with Webpack. Using Webpack with your boilerplate enables you to easily create custom builds of Phaser, because Webpack can build Phaser along with your project from the source code.
The first to mention here is from the maker of Phaser itself github.com/photonstorm/phaser3-project-template. At the time writing this, it is a minimal boilerplate which only supports live reloading, when changes at the source code are detected. Therefore, it is optimal for small projects and quick test games.
The second is a full example including a mario like game github.com/nkholski/phaser3-es6-webpack. This supports ES6 transpilation to ES5 and provides two differen configurations, one for development with live reload and one for release with minimization and optimizations. It also features a general file structure for your projects to start with.
The plan for the future is a central boilerplate, with support of the community and the Phaser developers. Take a look at the development forum phaser-3-boilerplates-starters-list-discussion-and-features to inform you about the current status. But for now, it is only work in progress and nothing fixed.