honzahovorka / nette-sandbox
Pre-setted minimal Nette Framework project
Installs: 31
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 103
Language:JavaScript
Type:project
pkg:composer/honzahovorka/nette-sandbox
Requires
- php: >= 5.3.7
- dg/adminer-custom: ~1.5
- nette/nette: ~2.2.0
Requires (Dev)
- nette/tester: ~1.0
This package is not auto-updated.
Last update: 2025-10-11 22:29:02 UTC
README
Sandbox is a pre-packaged and pre-configured Nette Framework application that you can use as the skeleton for your new applications. This is fork of Nette srigi-sandbox which is optionated fork of original nette-sandbox.
To get better starting point for my Nette Framework projects, I modified original sandbox to fit my style. Most notable differences are:
-
removed Adminer
I use separate installation of Adminer as local virtualhost.
-
cleanup of uneeded files (
web.config,print.css)Does anybody care about IIS webserver? Printing webpages?
-
removed
App\Presenters,App\Modelnamespaces (everything is inAppnamespace)Since there is a subword
PresenterinApp\SomePresenter, I don't see any sense to have namespace for presenters. MyUserPresenterwill not definitely have name collision with myUserModelorUserFormsince there is that subwordPresenter,Model,Formin the name of my classes. -
renamed
HomepagePresentertoDefaultPresenterDefault entry point in sandbox should have more general name.
-
more configuration directives by default
Example of configuring of presenters.
-
more complete
.gitignorefile -
lots of code cleanup
Removed obvious comments from code, better
use(namespace) conventions in code, moved CSS styles to.cssfiles. -
layout system using
@wrapper.latteUsing Nette's template-inheritance we can define layout for each presenter. There is nice example -
DefaultPresenteruse 2-columns layout,SignPresenteruse 1-colum layout. -
rewrite of signup form template to use fully manual rendering
also moved this template to more suitable place
-
gulpjs dev-stack
Stack for
SASSstylesheets, two main processes - developement (with livereload) & build. -
Flunorette database layer.
Installing
The best way to install srigi-sandbox is by using Composer. If you don't have Composer yet, download
it following the instructions. Then use command:
composer create-project srigi/nette-sandbox myapp
cd myapp
Make directories temp and log writable. Navigate your browser
to the www directory and you will see a welcome page. PHP 5.4 allows
you run php -S localhost:8888 -t www to start the web server and
then visit http://localhost:8888 in your browser.
It is CRITICAL that whole app, log and temp directories are NOT accessible
directly via a web browser! See security warning.
Devstack
hexicz-sandbox use gulpjs as a minimal dev-stack to support you during development. To fully embrace advantages of dev-stack you must install needed tools & packages. Nodejs is main requirement. See installation instruction on how to install nodejs on your machine.
Then install dev-stack:
npm install -g gulp bower
npm install (in root of your project)
bower install
Run devstack:
gulp
Now you can use livereload for automatic refresh of your browser when you change files of your project.
Your .js files will be automatically linted, you can see code-style errors on the console.
Build your project
gulp build
This command will optimize frontend parts of your project & create build directory with builded project.
License
- Nette: New BSD License or GPL 2.0 or 3.0 (http://nette.org/license)
- jQuery: MIT License (https://jquery.org/license)
- Adminer: Apache License 2.0 or GPL 2 (http://www.adminer.org)
- Sandbox: The Unlicense (http://unlicense.org)