Skip to content

platformatic/watt-next-laravel

Repository files navigation

Watt Next Laravel

A full-stack application combining Next.js frontend with Symfony backend, orchestrated using Platformatic's Watt framework.

Project Structure

This project consists of three main services:

  • web/my-app - Next.js frontend application with React 19 and Tailwind CSS
  • web/laravel - Laravel backend powered by Platformatic PHP
  • web/composer - Platformatic Composer service acting as the main orchestrator

Prerequisites

This .env file is required for the project to run (you can copy it with cp .env.sample .env):

PLT_SERVER_HOSTNAME=127.0.0.1
PORT=3000
PLT_SERVER_LOGGER_LEVEL=info
PLT_MANAGEMENT_API=true
PLT_COMPOSER_TYPESCRIPT=false
PLT_COMPOSER_EXAMPLE_ORIGIN=http://127.0.0.1:3043
PLT_SYMFONY_TYPESCRIPT=false

Installation

Install dependencies for all workspaces:

npm install

Development

Start the development environment:

npm run dev

This will start all services in development mode with hot reload enabled.

Production

Build all services:

npm run build

Start in production mode:

npm start

Services

Frontend (Next.js)

  • Location: web/my-app/
  • Framework: Next.js 15.3.2 with React 19
  • Styling: Tailwind CSS v4
  • TypeScript: Fully typed

Backend (Laravel)

  • Location: web/laravel/
  • Runtime: Platformatic PHP
  • Content: Standard Laravel installation

Composer

  • Location: web/composer/
  • Purpose: Service orchestration and API composition
  • Framework: Platformatic Composer

Configuration

The project is configured through:

  • watt.json - Main Watt runtime configuration
  • Individual platformatic.json files in each service directory
  • package.json workspaces configuration

Scripts

  • npm run dev - Start development environment
  • npm run build - Build all services
  • npm start - Start production environment

Architecture

This application follows a microservices architecture where:

  1. The Composer service acts as the main entry point
  2. Next.js provides the frontend experience
  3. Laravel serves as the content management system
  4. All services are orchestrated through Platformatic Watt

License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.

About

A demo of Laravel running via the @platformatic/php stackable.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published