Skip to content

WailanTirajoh/lara-nuxt

Repository files navigation

lara-nuxt

image Monorepo fullstack apps build with Laravel API & Nuxt 3 FE

Requirement

  1. docker + docker compose

Installation

1. Git Clone

git clone https://github.com/WailanTirajoh/lara-nuxt.git
cd lara-nuxt

2. Build Docker Images

# Build docker
docker compose up -d

3. Setup API

# Get into php container shell
docker compose exec php sh

# Setup
cp .env.example .env
composer install
php artisan key:generate

# DB Seed
php artisan migrate --seed

# Permission
chown www-data:www-data -R storage

# Storage Link
php artisan storage:link

# Quit from php sh
exit

By following this CLI steps, we can open http://api.localhost on browser to see API up and running.

4. Setup FE for development

cd cms
cp .env.example .env
bun install
bun run dev -o

And then open localhost:3000 for development, for production we have image running at http://cms.localhost

Login

  • open CMS UI at localhost:3000 or http://cms.localhost
  • login credentials (Look at api AppSeeder.php)
email: [email protected]
password: wailan

API Tests

docker compose exec php php artisan test --coverage --testsuite=Feature

# OR with php unit

docker compose exec php vendor/bin/phpunit --coverage-html reports/ --testsuite Feature

Lint Fix

docker compose exec php vendor/bin/pint

phpmyadmin

open http://phpmyadmin.localhost

# Login Credentials
username: homestead
password: secret

Entity Relationship Diagram

image

UI Preview

image image image