Laranext is an open-source monorepo project that combines the power of Laravel as an API backend and Next.js as a frontend, providing a robust foundation for modern web applications.
- Monorepo Structure: Efficiently manage both backend and frontend in a single repository
- Laravel API: Leverage Laravel's powerful features for building robust APIs
- Next.js Frontend: Create performant and SEO-friendly frontend applications
- TypeScript Support: Enjoy type safety and improved developer experience
- Turborepo: Optimize your workflow with Turborepo's build system
- Backend: Laravel (PHP)
- Frontend: Next.js (React & TypeScript)
- Build System: Turborepo
- Package Manager: pnpm
- PHP 8.1+
- Node.js 18+
- pnpm
- Composer
-
Navigate to the API directory:
cd apps/api
-
Install PHP dependencies:
composer install
-
Copy the
.env.example
file to.env
and configure your environment variables:cp .env.example .env
-
Generate an application key:
php artisan key:generate
-
Run database migrations:
php artisan migrate
-
Start the Laravel development server:
php artisan serve
-
Navigate to the web directory:
cd apps/web
-
Install Node.js dependencies:
pnpm install
-
Copy the
.env.example
file to.env.local
and configure your environment variables:cp .env.example .env.local
-
Start the Next.js development server:
pnpm dev
To develop all apps and packages, run the following command from the root directory:
pnpm dev
To build all apps and packages, run the following command from the root directory:
pnpm build
We welcome contributions to Laranext! Please read our contributing guidelines (link to CONTRIBUTING.md) before submitting pull requests.
Laranext is open-source software licensed under the MIT license.
This project is built using Turborepo, an amazing build system for JavaScript and TypeScript monorepos. We're grateful for the tools and libraries that make Laranext possible.
Laranext: Empowering developers to build scalable, full-stack web applications with Laravel and Next.js in a monorepo architecture.