webapp-skeleton
webapp-skeleton copied to clipboard
🎁 Web application project skeleton based on Nette Framework (@nette), Doctrine (@nettrine) and Contributte (@contributte) libraries by @f3l1x.
Website 🚀 contributte.org | Contact 👨🏻💻 f3l1x.io | Twitter 🐦 @contributte
Goal
Main goal is to provide best prepared starter-kit project for Nette developers.
Focused on:
- latest PHP 8.0
nette/*packages- Doctrine ORM via
nettrine/* - Symfony components via
contributte/* - codestyle checking via CodeSniffer and
ninjify/* - static analysing via phpstan
- unit / integration tests via Nette Tester and
ninjify/*
Demo
https://examples.contributte.org/webapp-skeleton/
Installation
To install latest version of contributte/webapp-skeleton use Composer.
composer create-project -s dev contributte/webapp-skeleton acme
Install using docker
-
At first, use composer to install this project.
composer create-project -s dev contributte/webapp-skeleton -
After that, you have to setup Postgres >= 10 database. You can start it manually or use docker image
dockette/postgres:12.docker run -it -p 5432:5432 -e POSTGRES_PASSWORD=webapp -e POSTGRES_USER=webapp dockette/postgres:12Or use make task,
make docker-postgres. -
Custom configuration file is located at
config/local.neon. Edit it if you want.Default configuration should look like:
# Host Config parameters: # Database database: host: localhost dbname: webapp user: webapp password: webapp -
Ok database is now running and application is configured to connect to it. Let's create initial data.
Run
NETTE_DEBUG=1 bin/console migrations:migrateto create tables. RunNETTE_DEBUG=1 bin/console doctrine:fixtures:load --appendto create first user(s).Or via task
make build. -
Start your devstack or use PHP local development server.
You can start PHP server by running
php -S localhost:8000 -t wwwor use prepared make taskmake dev. -
Open http://localhost and enjoy!
Take a look at:
- http://localhost:8000.
- http://localhost:8000/admin ([email protected] / admin)
Install using docker-compose
-
At first, use composer to install this project.
composer create-project -s dev contributte/webapp-project -
Modify
config/local.neonand set host todatabaseDefault configuration should look like this:
# Host Config parameters: # Database database: host: database dbname: webapp user: webapp password: webapp -
Run
docker-compose up -
Open http://localhost and enjoy!
Take a look at:
- http://localhost.
- http://localhost/admin ([email protected] / admin)
Features
Here is a list of all features you can find in this project.
- PHP 8.0+
- :package: Packages
- Nette 3+
- Contributte
- Nettrine
- :deciduous_tree: Structure
appconfig- configuration filesenv- prod/dev/test environmentsapp- application configsext- extensions configslocal.neon- local runtime configlocal.neon.dist- template for local config
domain- business logic and domain specific classesmodel- application backbonemodules- Front/Admin module, presenters and componentsresources- static content for mails and othersui- UI components and base classesbootstrap.php- Nette entrypoint
bin- console entrypoint (bin/console)db- database filesfixtures- PHP fixturesmigrations- migrations files
docs- documentationvarlog- runtime and error logstmp- tmp files and cache
tests- test engine and unit/integration testsvendor- composer's folderwww- public content
- :exclamation: Tracy
- Cool error 500 page
Notable changes
$uservariable in templates is renamed to$_user
Composer packages
Take a detailed look :eyes: at each single package.
- contributte/bootstrap
- contributte/application
- contributte/di
- contributte/cache
- contributte/http
- contributte/forms
- contributte/latte
- contributte/mail
- contributte/security
- contributte/utils
- contributte/tracy
- contributte/console
- contributte/webapp-skeleton
- contributte/event-dispatcher
- contributte/event-dispatcher-extra
- contributte/neonizer
- contributte/mailing
- contributte/monolog
Nettrine
- nettrine/orm
- nettrine/dbal
- nettrine/annotations
- nettrine/cache
- nettrine/migrations
- nettrine/fixtures
- nettrine/extensions
Dev
Screenshots

[email protected] / admin

Development
See how to contribute to this package.
This package is currently maintaining by these authors.
Consider to support contributte development team. Also thank you for using this project.