laravel-react-boilerplate

🌙 Laravel(PHP)の学習用サンプルアプリケーションです。Laravelを初めて学習してみたい方、Dockerを利用したLaravelの開発環境を構築したい方、ECサイトを学習してみたい方、管理画面も作成(マルチログイン)を作成したい方、Stripeを利用した決算処理を作成してみたい方、ソーシャルログインを作成してみたい方、オブジェクトストレージへの画像アップロードを作成してみたい方、フロントエンドをReactで作成してみたい方にオススメです。

MIT License

Stars
22
Committers
2

laravel-react-boilerplate

Laravel React.js

  • Laravel
  • DockerLaravel
  • EC
  • Stripe
  • React.js

  • Apache 2.4.46WebApacheSSL
  • MySQL 8DBMySQL
  • phpMyAdminMySQL
  • MailHog SMTP
  • Minio S3
  • Redis DB

  • Laravel 11
  • React 18
  • Typescript
  • Adminlte 3
  • Bootstrap 4

Demo

React

https://laraec.isystk.com/

  • /
  • Stripe
  • Google
graph LR

  classDef default fill: #fff,stroke: #333,stroke-width: 1px;
  style funcA fill: #fff,stroke: #333,stroke-width: 1px;
  style funcB fill: #fff,stroke: #333,stroke-width: 1px;
  style funcC fill: #fff,stroke: #333,stroke-width: 1px;
  style funcD fill: #fff,stroke: #333,stroke-width: 1px;
  style header fill: #fff,stroke: #333,stroke-width: 1px;

  TOP-->--ID/-->
  TOP-->
  -->
  -->

  subgraph funcA []
    -->
  end

  subgraph funcB []
    -->---->
  end

  subgraph funcC []
    ---->
  end

  subgraph funcD []
    -->
  end

  subgraph header []
    
    
    
  end

Bootstrap

https://laraec.isystk.com/admin/

  • /
  • CSV
  • PDF

  • CSV
  • S3

dockerdocker-compose (WindowsWSLDocker Desktop for Windows) Github CodeSpace Docker

WSLWindows

https://docs.microsoft.com/ja-jp/windows/wsl/install

WSLUbuntu

# 
# Enterroot root

# 
$ apt update

# 
$ apt -y install language-pack-ja
$ update-locale LANG=ja_JP.UTF8
$ apt -y install manpages-ja manpages-ja-dev

Docker Desktop for Windows Windows

https://docs.docker.com/docker-for-windows/install/

OK
docker --version

WSL2Docker for Windows Windows

Docker Desktop Setting
ResourcesEnable integration with my default WSL distroWSL Docker 
ResourcesWSL INTEGRATION "Ubuntu" ON

# WSL DockerDocker Compose
$ apt install docker
$ apt install docker-compose

WSLDocker

MySQL Client

# MySQLOK

# Windows
$ apt install mysql-client

# Mac
$ brew install mysql-client

.
 docker Daemon
   
    apache Web
       conf.d (apache)
       logs apache
    mysql DB
       conf.d (mysql)
       initdb.d mysqlDDL
       logs mysql
    php PHP-FRM
       logs php
    phpmyadmin DB
    s3 

 app
    Console ()
    Domain
       Entities
       Repositories
    Enums ()
    Exceptions ()
    Http 
    Providers
    Services
    Utils
 bootstrap
 config
 database
 public
 resources
    lang
    assets
       adminJavaScriptSASS
       frontTypeScript,SASS
    layouts
    mails
    vendor
 routes
 storage
 tests
 composer.json
 dc.sh Docker

Docker

Usage:
  dc.sh [command] [<options>]

Options:
  stats|st                 Docker
  init                     Docker
  start                    Daemon
  stop                     Daemon
  apache restart           Apache
  mysql login              MySQL
  mysql export <PAHT>      MySQLdump
  mysql import <PAHT>      MySQLdump
  php login                PHP-FPM
  --version, -v     
  --help, -h        

phpMyAdmin

DockerURL

http://localhost:8888/

mailhog

DockerURL

http://localhost:8025/

minio

S3 DockerURL

http://localhost:9001

# 
$ ./dc.sh init

# Docker
$ ./dc.sh start

# PHP(5)

# MySQL
$ ./dc.sh mysql login

minio

ID/laraec.isystk.com Manage Access Policy Public

Username Password
access_key secret_key
# PHPcomposer  artisan 
$ ./dc.sh php login

# .env
> cp .env.example .env

# 
> composer update

# encryption key
> php artisan key:generate

# 
> php artisan migrate:fresh --seed

# 
> chmod 777 -R bootstrap/cache
> chmod 777 -R storage
> chmod 777 -R resources/excel

# S3Minio minio
> php artisan s3upload

# Larastan 
> ./vendor/bin/phpstan analyse --memory-limit=1G

# PHPUnit 
> ./vendor/bin/phpunit tests
# PHP
$ ./dc.sh php login

# 
$ yarn && yarn run dev

# Job
$ php artisan queue:listen --timeout=0;
# 
$ open https://localhost/

# 
$ open https://localhost/admin/

# CSV
$ ./dc.sh php login
$ php artisan stockcsv

# 
$ ./dc.sh stop

Laravel11 Laravel11
Laravel11 Laravel11

Licence

MIT

Author

isystk