Skip to content

Commit 5cbbe43

Browse files
committed
preparing v1.x
0 parents  commit 5cbbe43

File tree

173 files changed

+25627
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+25627
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
3+
echo "⏰ Scheduling tasks!"
4+
php /var/www/html/artisan schedule:work &
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[xdebug]
2+
xdebug.force_display_errors=1
3+
xdebug.cli_color=0
4+
xdebug.scream=0
5+
xdebug.show_exception_trace=1
6+
xdebug.mode=coverage
7+
xdebug.discover_client_host=false
8+
xdebug.client_host=
9+
xdebug.idekey=
10+
xdebug.start_with_request=no
11+
xdebug.log_level=0
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[xdebug]
2+
xdebug.force_display_errors=1
3+
xdebug.cli_color=1
4+
xdebug.scream=0
5+
xdebug.show_exception_trace=1
6+
xdebug.mode=debug,develop
7+
xdebug.discover_client_host=true
8+
xdebug.client_host=host.docker.internal
9+
xdebug.idekey=larabase
10+
xdebug.start_with_request=trigger
11+
xdebug.log_level=0

.docker/database/.gitkeep

Whitespace-only changes.

.dockerignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
*
2+
!/app
3+
!/artisan
4+
!/bootstrap
5+
!/config
6+
!/database
7+
!/public
8+
!/resources
9+
!/routes
10+
!/storage
11+
!composer.*
12+
!/vendor
13+
!/.env
14+
!/*.js
15+
!/.docker

.docs/100-INSTALLATION.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Installation
2+
3+
4+
## Pre-requisites
5+
[Docker](https://docs.docker.com/engine/install/) (_recommended_) or [php 8.4](https://www.php.net/releases/8.4/en.php) installed locally.
6+
7+
> **ℹ️** How do I quickly install php8.4 on my local? Install [Herd](https://herd.laravel.com). It's easy!
8+
9+
> **⚠️** If you're not planning to use Docker, please make sure to configure [xdebug](https://herd.laravel.com/docs/macos/debugging/xdebug) for code coverage.
10+
11+
## Create project
12+
13+
### Github
14+
Click on the "use this template" button. Clone the created repository on your local.
15+
16+
### GitLab or other
17+
Download source code from the [release](https://github.com/laralaunch/the-boilerplate/releases/).
18+
19+
## Spin-up
20+
21+
### Docker (Recommended)
22+
23+
Run (First time, it will take a couple of minutes as it will build `dev` image from `Dockerfile`):
24+
```
25+
docker compose up -d
26+
```
27+
28+
Inside the application container, run below commands one by one:
29+
```
30+
composer install
31+
cp .env.example .env
32+
php artisan key:generate
33+
touch database/database.sqlite
34+
php artisan migrate
35+
```
36+
37+
Done! Visit http://localhost:8765
38+
39+
### Locally
40+
41+
> Make sure php 8.4 is installed and Xdebug is configured
42+
43+
Run below commands one by one:
44+
```
45+
composer install
46+
cp .env.example .env
47+
php artisan key:generate
48+
touch database/database.sqlite
49+
php artisan migrate
50+
php artisan serve
51+
```

.docs/200-DEVELOPMENT.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Development
2+
3+
- Always stick to the [defaults](https://laravel.com/docs/11.x) whenever possible.
4+
- Do not try to [over-engineer](https://www.codesimplicity.com/post/what-is-overengineering).
5+
- Refer below best practices or similar resources.
6+
- [benjamincrozat/best-practices](https://benjamincrozat.com/laravel-best-practices)
7+
- [alexeymezenin/laravel-best-practices](https://github.com/alexeymezenin/laravel-best-practices?tab=readme-ov-file#contents)

.docs/300-TESTING.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Reviewing changes locally
2+
3+
Run all CI checks locally (lint, static analysis, rector, tests - architecture, unit & feature tests)
4+
```
5+
composer ci
6+
```
7+
8+
Fix possible CI checks locally (Fixes rector & linting issues automatically)
9+
```
10+
composer ci.fix
11+
```
12+
13+
---
14+
15+
Check linting issues:
16+
```
17+
composer lint
18+
```
19+
20+
Fix linting issues:
21+
```
22+
composer lint.fix
23+
```
24+
25+
Check rector issues:
26+
```
27+
composer rector
28+
```
29+
30+
Fix rector issues:
31+
```
32+
composer rector.fix
33+
```
34+
35+
Check static analysis:
36+
```
37+
composer stan
38+
```
39+
40+
Run architecture tests:
41+
```
42+
composer test.arch
43+
```
44+
45+
Run unit tests:
46+
```
47+
composer test.unit
48+
```
49+
50+
Run feature tests:
51+
```
52+
composer test.feature
53+
```

.docs/400-DEPLOYMENT.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# CI/CD
2+
3+
## Continuous Integration (CI)
4+
5+
This boilerplate includes a built-in [GitHub CI workflow](../docs/../.github/workflows/100-ci.yml) with essential checks. Feel free to modify it as your application grows.
6+
7+
### Included Checks:
8+
- `composer lint`: Ensures consistent code style across your project.
9+
- `composer rector`: Keeps your codebase up to date with the latest best practices.
10+
- `composer test.arch`: Performs architecture validation.
11+
- `composer test.unit`: Runs unit tests.
12+
- `composer test.feature`: Executes feature tests, ensuring at least 90% test coverage.
13+
14+
## Continuous Deployment (CD)
15+
16+
### Containerized Deployment:
17+
If you wish to use containerized deployment, a pre-configured [Dockerfile](./../Dockerfile) is provided, utilizing the [serversideup/docker-php](https://serversideup.net/open-source/docker-php/) image.
18+
19+
By default, the deploy job pushes the image to an AWS ECR repository. If you're using an AWS compute service that supports container images (e.g., AppRunner, Lambda, or EKS), deployment should work out of the box once you configure the following GitHub secrets and variables:
20+
21+
- `AWS_ACCESS_KEY_ID` _(secret)_
22+
- `AWS_SECRET_ACCESS_KEY` _(secret)_
23+
- `AWS_ECR_REGISTRY` _(secret)_
24+
- `AWS_ECR_REPOSITORY` _(variable)_
25+
- `AWS_REGION` _(variable)_
26+
27+
If you prefer a non-AWS containerized deployment, simply modify the `.github/workflows/200-cd.yml` file as needed.

.docs/assets/banner.png

23.5 KB
Loading

0 commit comments

Comments
 (0)