Contributte Webapp-skeleton
Website 🚀 contributte.org | Contact 👨🏻💻 f3l1x.io | Twitter 🐦 @contributte
# Goal
Main goal is to provide best prepared starter-kit project for Nette developers.
Focused on:
- PHP 8.1+
nette/*
packages- Doctrine ORM via
nettrine/*
- Symfony components via
contributte/*
- codestyle checking via CodeSniffer and
contributte/qa
- static analysing via phpstan and
contributte/phpstan
- unit / integration tests via Nette Tester and
contributte/tester
# Demo
https://examples.contributte.org/webapp-skeleton/ (opens new window)
# Installation
To install latest version of contributte/webapp-skeleton
use Composer (opens new window).
composer create-project -s dev contributte/webapp-skeleton acme
# Install using docker (opens new window)
At first, use composer to install this project.
composer create-project -s dev contributte/webapp-skeleton
1After 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:12
1Or 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
1
2
3
4
5
6
7
8Ok database is now running and application is configured to connect to it. Let's create initial data.
Run
NETTE_DEBUG=1 bin/console migrations:migrate
to create tables. RunNETTE_DEBUG=1 bin/console doctrine:fixtures:load --append
to 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 www
or use prepared make taskmake dev
.Open http://localhost (opens new window) and enjoy!
Take a look at:
# Install using docker-compose (opens new window)
At first, use composer to install this project.
composer create-project -s dev contributte/webapp-project
1Modify
config/local.neon
and set host todatabase
Default configuration should look like this:
# Host Config parameters: # Database database: host: database dbname: webapp user: webapp password: webapp
1
2
3
4
5
6
7
8Run
docker-compose up
Open http://localhost (opens new window) and enjoy!
Take a look at:
# Features
Here is a list of all features you can find in this project.
- PHP 8.0+
- 📦 Packages
- Nette 3+
- Contributte
- Nettrine
- 🌳 Structure
app
config
- 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
- documentationvar
log
- runtime and error logstmp
- tmp files and cache
tests
- test engine and unit/integration testsvendor
- composer's folderwww
- public content
- ❗️ Tracy
- Cool error 500 page
# Notable changes
$user
variable in templates is renamed (opens new window) to$_user
# Composer packages
Take a detailed look 👀 at each single package.
- contributte/bootstrap (opens new window)
- contributte/application (opens new window)
- contributte/di (opens new window)
- contributte/cache (opens new window)
- contributte/http (opens new window)
- contributte/forms (opens new window)
- contributte/latte (opens new window)
- contributte/mail (opens new window)
- contributte/security (opens new window)
- contributte/utils (opens new window)
- contributte/tracy (opens new window)
- contributte/console (opens new window)
- contributte/webapp-skeleton (opens new window)
- contributte/event-dispatcher (opens new window)
- contributte/event-dispatcher-extra (opens new window)
- contributte/neonizer (opens new window)
- contributte/mailing (opens new window)
- contributte/monolog (opens new window)
Doctrine
- contributte/doctrine-orm (opens new window)
- contributte/doctrine-dbal (opens new window)
- contributte/doctrine-annotations (opens new window)
- contributte/doctrine-cache (opens new window)
- contributte/doctrine-migrations (opens new window)
- contributte/doctrine-fixtures (opens new window)
Dev
- contributte/dev (opens new window)
- ninjify/qa (opens new window)
- ninjify/nunjuck (opens new window)
- phpstan/phpstan (opens new window)
- mockery/mockery (opens new window)
- nelmio/alice (opens new window)
# Screenshots
admin@admin.cz / admin
# Development
See how to contribute (opens new window) to this package.
This package is currently maintaining by these authors.
Consider to support (opens new window) contributte development team. Also thank you for using this project.