An open API service indexing awesome lists of open source software.

https://github.com/buttasam/nette-react-template

A ready-to-use template for building web apps with Nette, React/Typescript, and Tailwind. Just run it with Docker and start coding.
https://github.com/buttasam/nette-react-template

docker nette react tailwindcss typscript vite

Last synced: 9 months ago
JSON representation

A ready-to-use template for building web apps with Nette, React/Typescript, and Tailwind. Just run it with Docker and start coding.

Awesome Lists containing this project

README

          

# Nette React Template

This project is a ready-to-use starter template using the following technologies:
- Nette + Vite
- React + TypeScript
- Tailwind CSS v4
- MariaDB

It includes a Docker Compose setup designed for local development.
You don’t need to install anything manually β€” just run a few commands and you’re ready to go.

## πŸš€ Quick start

> __Prerequisites:__ Docker + DockerΒ Compose

### Using Docker Compose

1. Start the stack:
```
docker compose up --build -d
```
2. Install PHP dependencies and Node modules
```
docker exec nette_react_template_php sh -c "composer install && npm install"
```
3. Launch the Vite dev server (frontend hot‑reload)
```
docker exec -it nette_react_template_php npm run dev
```

- hit `q` + `enter` to stop dev server

πŸŽ‰ Application is running on http://localhost:8000/.

> __Note:__ Nette uses the dev server only when debug mode is enabled (no action needed it's default setup)

### πŸ—οΈ Prod build

Compile JS/CSS assets
```
docker exec nette_react_template_php npm run build
```

## Project structure

```
β”œβ”€β”€ app/ # application (presenters, templates, components)
β”œβ”€β”€ assets/ # React, Tailwind CSS, and other styles
β”œβ”€β”€ bin/ # scripts for command line
β”œβ”€β”€ config/ # configuration
β”œβ”€β”€ database/ # database seed script
β”œβ”€β”€ log/ # logged messages and errors
β”œβ”€β”€ temp/ # temporary files, cache
β”œβ”€β”€ tests/ # tests
β”œβ”€β”€ vendor/ # libraries installed by Composer
└── www/ # public document root (index.php, built assets)
```

> __Note:__ docker compose up automatically seeds MariaDB on first run using database/init.sql.

> __Docs:__ See the [official Nette directory structure](https://doc.nette.org/en/application/directory-structure#toc-basic-project-structure) documentation for more details.

## Common Commands

### Stop containers
```
docker compose down
```

### Format code
```
docker exec nette_react_template_php composer format
```

### Database access
```
docker exec -it nette_react_template_mysql mysql -uroot -proot
```

or connect via database viewer (disable SSL)

### Remove docker volume with database data
```
docker volume rm nette-react-template_db_data
```