martyd420 / nette-starter
Nette Starter
Installs: 33
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
pkg:composer/martyd420/nette-starter
Requires
- php: >= 8.2
- contributte/console: ^0.11.0
- contributte/event-dispatcher: ^0.9.1
- contributte/translation: ^2.0
- latte/latte: ^3.1
- nette/application: ^3.2.3
- nette/assets: ^1.0.0
- nette/bootstrap: ^3.2.6
- nette/caching: ^3.2
- nette/database: ^3.2
- nette/di: ^3.2
- nette/forms: ^3.2
- nette/http: ^3.3
- nette/mail: ^4.0
- nette/robot-loader: ^4.0
- nette/security: ^3.2
- nette/utils: ^4.1
- nettrine/dbal: ^0.10.3
- nettrine/extra: ^0.2.0
- nettrine/fixtures: ^0.9.0
- nettrine/migrations: ^0.10.1
- nettrine/orm: ^0.10.1
- orisai/tracy-pets: ^1.0
- tracy/tracy: ^2.10
- ublaboo/datagrid: ^7.1
Requires (Dev)
- fakerphp/faker: ^1.24
- friendsofphp/php-cs-fixer: ^3.92
- nette/tester: ^2.5
- phpstan/phpstan-doctrine: ^2.0
- phpstan/phpstan-nette: ^2.0
- symfony/thanks: ^1
This package is auto-updated.
Last update: 2026-01-20 19:31:43 UTC
README
A web application skeleton built with Nette Framework, Nettrine (Doctrine ORM for Nette), and Vite, featuring ready-to-use user login/registration, translations via contributte/translation and contributte/datagrid. This project comes pre-configured with Bootstrap 5 and Tabler for a responsive administration UI.
Features
- Stack: Nette 3.2, PHP 8.2+, Vite (HMR + auto reload for Latte templates).
- ORM: Doctrine 2 via Nettrine.
- Auth: Pre-configured user registration, login, and basic management example
- Admin UI: Tabler Admin Dashboard (Bootstrap 5) with a responsive layout.
- DataGrid: Powerful datagrid via ublaboo/datagrid and @contributte/datagrid.
- AJAX: AJAX support via Naja.
- Translations: Multi-language support using contributte/translation.
- Assets: Nette assets support with Vite.
- Tools: PHP-CS-Fixer for code style, PHPStan for static analysis, Nette Tester for testing, and Tracy for debugging.
- CLI: Console support via contributte/console.
- Icons: Bootstrap Icons (CDN).
- Forms: Custom
BootstrapRendererandBootstrapHorizontalRendererfor easy Bootstrap 5 form rendering in administration.
Project Structure
private/app: PHP application logic (Presenters, Models, Services).Model: Doctrine entities, repositories, and facades.Presentation: Latte templates and Nette presenters.
private/config: Configuration files (NEON).private/lang: Translation files.private/assets: Frontend source files (JS, CSS).web: Public directory (entry point, compiled assets).tests: Unit and integration tests.
Prerequisites
- PHP >= 8.2
- Node.js >= 20 (v22 recommended)
- MySQL or MariaDB database
Installation
-
Install via Composer
composer create-project martyd420/nette-starter my-project cd my-project -
Install Frontend dependencies
nvm use 22 npm install
-
Database Configuration
Default configuration requires a local mysql/mariadb database
nsdb(user:nettestarter, pass:nettestarter123). Use these credentials or override them inprivate/config/local.neon. Default database credentials are intended for local development only. Seeprivate/config/local.neon.examplefor reference. -
Initialize Database
Run the following command to create the schema and load default fixtures (admin user):
composer db:reset
-
Build Assets For production build:
npm run build
Development
1. Start Frontend Server (Vite)
This will start the Vite development server (usually on port 5173) with Hot Module Replacement (HMR).
npm run dev
2. Start Backend Server
You can use the built-in PHP server or your preferred web server (Apache/Nginx/Docker). To use the built-in PHP server:
php -S localhost:8000 -t web
Access the application at: http://localhost:8000
3. Database Management
For further database changes during development, you can use Doctrine migrations or schema-tool via console:
# Generate migration php private/cli/console.php migrations:diff # Apply migrations php private/cli/console.php migrations:migrate
Default Credentials
The composer db:reset command creates a default administrator account - development only credentials:
- Email:
starter@pcdr.cz - Password:
123456
Available Commands
Composer Scripts
Defined in composer.json:
composer db:reset: Destructive! Drops the database schema, clears cache, creates new schema, and loads fixtures.composer cs:check: Checks code style with PHP-CS-Fixer (dry-run).composer cs:fix: Automatically fixes code style with PHP-CS-Fixer.composer phpstan: Runs static analysis onprivate/app.composer tester: Runs unit/integration tests.php private/cli/console.php: Access to various Doctrine and system commands.
NPM Scripts
Defined in package.json:
npm run dev: Starts the Vite development server.npm run build: Builds frontend assets for production (web/assets/).



