Starter skeleton for SugarCraft apps
composer create-project sugarcraft/candy-mold my-app โ pour your model into the mold and you've got a working app. Demo Counter Model, PHPUnit wired up, bin/start entry point.
composer require sugarcraft/candy-mold
composer create-project sugarcraft/candy-mold my-app
cd my-app
./bin/start
# Replace src/Counter.php with your own Model and keep editing.
my-app/
โโโ composer.json # requires candy-core + candy-sprinkles
โโโ phpunit.xml
โโโ bin/start # entry point โ runs Program(new Counter())
โโโ src/
โ โโโ Counter.php # demo Model with up/down/quit, styled border
โโโ tests/
โโโ CounterTest.php
composer create-project sugarcraft/candy-mold my-app && cd my-app && ./bin/start.src/Counter.php โ a minimal Model with up/down/quit and a styled border.tests/. Replace, don't reconfigure.bin/start is autoload + Model + Program::run().| Class | Method | Description |
|---|---|---|
| Counter | init() | Initialize model |
| Counter | update(msg) | Handle input message |
| Counter | view() | Render view |
| Program | run() | Start the app |
VHS-recorded GIFs of every example shipped with the app. Regenerated automatically on every push that touches the source.