jahudka / nittro-project
Installs: 26
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 12
Type:project
Requires
- php: ^7.1
- kdyby/console: ^2.7.0
- kdyby/doctrine: ^3.2.1
- kdyby/events: ^3.1.0
- latte/latte: ^2.4.6
- nette/application: ^2.4.9
- nette/bootstrap: ^2.4.5
- nette/di: ^2.4.10
- nette/finder: ^2.4.1
- nette/forms: ^2.4.6
- nette/robot-loader: ^2.4.3
- nette/security: ^2.4.2
- nette/utils: ^2.4.8
- nittro/nette-bridges: ^2.0.14
- symfony/console: ^3.3.10
- tracy/tracy: ^2.4.10
- dev-master
- v1.1.0
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- dev-dependabot/npm_and_yarn/qs-6.5.3
- dev-dependabot/npm_and_yarn/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/copy-props-2.0.5
- dev-dependabot/npm_and_yarn/ajv-6.12.6
- dev-dependabot/composer/latte/latte-2.10.6
- dev-dependabot/npm_and_yarn/postcss-7.0.36
- dev-dependabot/npm_and_yarn/browserslist-4.16.6
- dev-dependabot/npm_and_yarn/hosted-git-info-2.8.9
- dev-dependabot/npm_and_yarn/y18n-3.2.2
- dev-dependabot/composer/nette/application-2.4.16
- dev-dependabot/npm_and_yarn/jquery-3.5.0
- dev-dependabot/npm_and_yarn/acorn-5.7.4
This package is auto-updated.
Last update: 2024-12-07 21:43:53 UTC
README
This is a simple skeleton for a Nette project with Nittro via Gulp, Doctrine via Kdyby and a basic admin template based on Bootstrap v4. PHP 7.1 is required.
Installation
composer create-project jahudka/nittro-project myproject cd myproject .ci/build cp etc/config.local.dist etc/config.local.neon $EDITOR etc/config.local.neon bin/console orm:schema-tool:create
Application layout
- Configuration is stored in
./etc
. - Executable console tool is at
./bin/console
. - All application sources are under
./src
, which is a PSR-4 namespace root for theApp
namespace; autoloading in this namespace is provided by Composer. - All caches and logs, as well as sessions, are under
./var
.
Doctrine
- Entities reside in
./src/Entity
. - A default entity exists for user identity, users can be managed
using the console tool's
user:*
family of commands.
Components
- There is an abstract base class
App\UI\BaseControl
which adds thesetView(string $view)
,getView()
andrender()
methods; components extending this class will be rendered using a latte template located at<component directory>/templates/<view>.latte
. - As a convenience, all interfaces with a single method called
create
defined in either the common./src/Components
or the per-moduleComponents
directories are automatically registered in the DI container (unless a service implementing the interface already exists).
Assets
- All assets are managed and compiled using Gulp.
- As a convention, assets specific to each module are in the
module's
assets
subdirectory while (potentially) common assets are in the./src/assets
directory. - There are many available Gulp tasks to build all the individual
assets, as well as a couple of watch tasks to make life easier
during development. They are named according to the following
convention:
You can think of the task names as a list of tags separated by a colon. Thetask := [ watch ] [:] [ public|admin ] [:] [ js|css|fonts ]
watch
tag doesn't work with thefonts
tag, but otherwise all combinations are allowed. Omitting any tag except thewatch
tag is the same as if you specified all the permutations of the tag, e.g.watch:js
is the same aswatch:public:js watch:admin:js
andpublic
is the same aspublic:js public:css public:fonts
. - The default task builds everything.
- Nittro components are enabled at the beginning of the gulpfile using configuration flags of the builder instances; additional libraries from other vendors as well as your custom code can be specified there as well. Reading the source of the gulpfile should make everything clear.
- All non-minified javascripts are minified, all LESS styles are compiled and all non-minified styles are minified.
- Bootstrap for Nittro is generated automatically.
Console
- There are a number of useful Doctrine-related commands defined
by the
kdyby/doctrine
package - those are available as usual. - There are also a couple of commands for user management as mentioned previously.
- As a convenience, all classes in the common
./src/Commands
or the per-moduleCommands
directories that extend Symfony'sCommand
class are automatically registered in the DI container and tagged with thekdyby.console.command
tag (unless a service of the same type already exists).