Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/koeinoue/laravel_vite_template
Laravel9, Vue3, Vite, Docker, PHPUnit...
https://github.com/koeinoue/laravel_vite_template
docker laravel php vite vue
Last synced: about 1 month ago
JSON representation
Laravel9, Vue3, Vite, Docker, PHPUnit...
- Host: GitHub
- URL: https://github.com/koeinoue/laravel_vite_template
- Owner: KoeInoue
- Created: 2022-03-31T08:24:11.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-04-08T12:03:49.000Z (over 2 years ago)
- Last Synced: 2023-03-22T12:46:03.642Z (over 1 year ago)
- Topics: docker, laravel, php, vite, vue
- Language: PHP
- Homepage:
- Size: 3.49 MB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# About Laravel template
- Localized Japan
- Dockerized
- for AWS ECS & ECR
- SPA for user page
- AdminLTE for admin page## Quick Start
Clone this project
`$ cd laravel_ecs_template`
`$ make build` // This means docker compose build --no-cache --force-rm
`$ make up` // docker compose up -d
`$ cp .env.example .env`
`$ make php`
`# composer install`
`# php artisan key:generate`
`# npm install`
`# npm run dev` // Start Vite server### Docker multi-stage build
#### For local
- php8.1-fpm (node16)
- nginx
- mariadb
- phpmyadmin
- mailhog#### For production
- php8.1-fpm
- nginx## Backend
### Authentication
- Laravel Sanctum
→ To assume mobile service as well. Because it requires browser-independent authentication#### Repository Pattern Architecture
- Model
→ Define DB object and attribute.
- Controller
→ Receive requests, use Service, pass data to View or return json response.
- Request
→ Validation
- Service
→ Business logic. Receive requests from Controller and use Repository interface
- Repository Interface
→ Call repository. Only used for Service.
- Repository
→ Execute SQL Query. Only called from Repository interface.## Frontend
- Typescript ES6
- Vue3
- Vue Composition API
- Vue Router4
- Vuex 4
- Laravel Vite## Formatting
- phpcs
- Eslint
- PrettierTo fix codes
`$ make npm-fix`
`$ make comoser-fixer`## Coding rule
- Define return type and argument type.
```php
public function doSomething(string text) : string {
// Do something
}
```- Camel case variables
```php
$camelCase = 'not_snake_case';
```