Skip to content

Commit 6a31c96

Browse files
committed
init
1 parent 7c6bbfe commit 6a31c96

File tree

157 files changed

+24291
-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.

157 files changed

+24291
-0
lines changed

.editorconfig

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2
16+
17+
[docker-compose.yml]
18+
indent_size = 4

.env.example

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
APP_NAME=Laravel
2+
APP_ENV=local
3+
APP_KEY=
4+
APP_DEBUG=true
5+
APP_URL=http://localhost
6+
7+
APP_LOCALE=en
8+
APP_FALLBACK_LOCALE=en
9+
APP_FAKER_LOCALE=en_US
10+
11+
APP_MAINTENANCE_DRIVER=file
12+
# APP_MAINTENANCE_STORE=database
13+
14+
PHP_CLI_SERVER_WORKERS=4
15+
16+
BCRYPT_ROUNDS=12
17+
18+
LOG_CHANNEL=stack
19+
LOG_STACK=single
20+
LOG_DEPRECATIONS_CHANNEL=null
21+
LOG_LEVEL=debug
22+
23+
DB_CONNECTION=sqlite
24+
# DB_HOST=127.0.0.1
25+
# DB_PORT=3306
26+
# DB_DATABASE=laravel
27+
# DB_USERNAME=root
28+
# DB_PASSWORD=
29+
30+
SESSION_DRIVER=database
31+
SESSION_LIFETIME=120
32+
SESSION_ENCRYPT=false
33+
SESSION_PATH=/
34+
SESSION_DOMAIN=null
35+
36+
BROADCAST_CONNECTION=log
37+
FILESYSTEM_DISK=local
38+
QUEUE_CONNECTION=database
39+
40+
CACHE_STORE=database
41+
# CACHE_PREFIX=
42+
43+
MEMCACHED_HOST=127.0.0.1
44+
45+
REDIS_CLIENT=phpredis
46+
REDIS_HOST=127.0.0.1
47+
REDIS_PASSWORD=null
48+
REDIS_PORT=6379
49+
50+
MAIL_MAILER=log
51+
MAIL_SCHEME=null
52+
MAIL_HOST=127.0.0.1
53+
MAIL_PORT=2525
54+
MAIL_USERNAME=null
55+
MAIL_PASSWORD=null
56+
MAIL_FROM_ADDRESS="[email protected]"
57+
MAIL_FROM_NAME="${APP_NAME}"
58+
59+
AWS_ACCESS_KEY_ID=
60+
AWS_SECRET_ACCESS_KEY=
61+
AWS_DEFAULT_REGION=us-east-1
62+
AWS_BUCKET=
63+
AWS_USE_PATH_STYLE_ENDPOINT=false
64+
65+
VITE_APP_NAME="${APP_NAME}"

.gitattributes

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
* text=auto eol=lf
2+
3+
*.blade.php diff=html
4+
*.css diff=css
5+
*.html diff=html
6+
*.md diff=markdown
7+
*.php diff=php
8+
9+
CHANGELOG.md export-ignore
10+
README.md export-ignore

.github/workflows/lint.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: linter
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- main
8+
pull_request:
9+
branches:
10+
- develop
11+
- main
12+
13+
permissions:
14+
contents: write
15+
16+
jobs:
17+
quality:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Setup PHP
23+
uses: shivammathur/setup-php@v2
24+
with:
25+
php-version: '8.4'
26+
27+
- name: Install Dependencies
28+
run: |
29+
composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
30+
npm install
31+
32+
- name: Run Pint
33+
run: vendor/bin/pint
34+
35+
- name: Format Frontend
36+
run: npm run format
37+
38+
- name: Lint Frontend
39+
run: npm run lint
40+
41+
# - name: Commit Changes
42+
# uses: stefanzweifel/git-auto-commit-action@v5
43+
# with:
44+
# commit_message: fix code style
45+
# commit_options: '--no-verify'

.github/workflows/tests.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- main
8+
pull_request:
9+
branches:
10+
- develop
11+
- main
12+
13+
jobs:
14+
ci:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Setup PHP
22+
uses: shivammathur/setup-php@v2
23+
with:
24+
php-version: 8.4
25+
tools: composer:v2
26+
coverage: xdebug
27+
28+
- name: Setup Node
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: '22'
32+
cache: 'npm'
33+
34+
- name: Install Node Dependencies
35+
run: npm ci
36+
37+
- name: Build Assets
38+
run: npm run build
39+
40+
- name: Create SQLite Database
41+
run: touch database/database.sqlite
42+
43+
- name: Install Dependencies
44+
run: composer install --no-interaction --prefer-dist --optimize-autoloader
45+
46+
- name: Copy Environment File
47+
run: cp .env.example .env
48+
49+
- name: Generate Application Key
50+
run: php artisan key:generate
51+
52+
- name: Tests
53+
run: ./vendor/bin/phpunit

.gitignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/.phpunit.cache
2+
/node_modules
3+
/public/build
4+
/public/hot
5+
/public/storage
6+
/storage/*.key
7+
/storage/pail
8+
/vendor
9+
.env
10+
.env.backup
11+
.env.production
12+
.phpactor.json
13+
.phpunit.result.cache
14+
Homestead.json
15+
Homestead.yaml
16+
npm-debug.log
17+
yarn-error.log
18+
/auth.json
19+
/.fleet
20+
/.idea
21+
/.nova
22+
/.vscode
23+
/.zed

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
resources/js/components/ui/*

.prettierrc

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"singleAttributePerLine": false,
5+
"htmlWhitespaceSensitivity": "css",
6+
"printWidth": 150,
7+
"plugins": ["prettier-plugin-organize-imports", "prettier-plugin-tailwindcss"],
8+
"tailwindFunctions": ["clsx", "cn"],
9+
"tabWidth": 4,
10+
"overrides": [
11+
{
12+
"files": "**/*.yml",
13+
"options": {
14+
"tabWidth": 2
15+
}
16+
}
17+
]
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?php
2+
3+
namespace App\Http\Controllers\Auth;
4+
5+
use App\Http\Controllers\Controller;
6+
use App\Http\Requests\Auth\LoginRequest;
7+
use Illuminate\Http\RedirectResponse;
8+
use Illuminate\Http\Request;
9+
use Illuminate\Support\Facades\Auth;
10+
use Illuminate\Support\Facades\Route;
11+
use Inertia\Inertia;
12+
use Inertia\Response;
13+
14+
class AuthenticatedSessionController extends Controller
15+
{
16+
/**
17+
* Show the login page.
18+
*/
19+
public function create(Request $request): Response
20+
{
21+
return Inertia::render('auth/login', [
22+
'canResetPassword' => Route::has('password.request'),
23+
'status' => $request->session()->get('status'),
24+
]);
25+
}
26+
27+
/**
28+
* Handle an incoming authentication request.
29+
*/
30+
public function store(LoginRequest $request): RedirectResponse
31+
{
32+
$request->authenticate();
33+
34+
$request->session()->regenerate();
35+
36+
return redirect()->intended(route('dashboard', absolute: false));
37+
}
38+
39+
/**
40+
* Destroy an authenticated session.
41+
*/
42+
public function destroy(Request $request): RedirectResponse
43+
{
44+
Auth::guard('web')->logout();
45+
46+
$request->session()->invalidate();
47+
$request->session()->regenerateToken();
48+
49+
return redirect('/');
50+
}
51+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
3+
namespace App\Http\Controllers\Auth;
4+
5+
use App\Http\Controllers\Controller;
6+
use Illuminate\Http\RedirectResponse;
7+
use Illuminate\Http\Request;
8+
use Illuminate\Support\Facades\Auth;
9+
use Illuminate\Validation\ValidationException;
10+
use Inertia\Inertia;
11+
use Inertia\Response;
12+
13+
class ConfirmablePasswordController extends Controller
14+
{
15+
/**
16+
* Show the confirm password page.
17+
*/
18+
public function show(): Response
19+
{
20+
return Inertia::render('auth/confirm-password');
21+
}
22+
23+
/**
24+
* Confirm the user's password.
25+
*/
26+
public function store(Request $request): RedirectResponse
27+
{
28+
if (! Auth::guard('web')->validate([
29+
'email' => $request->user()->email,
30+
'password' => $request->password,
31+
])) {
32+
throw ValidationException::withMessages([
33+
'password' => __('auth.password'),
34+
]);
35+
}
36+
37+
$request->session()->put('auth.password_confirmed_at', time());
38+
39+
return redirect()->intended(route('dashboard', absolute: false));
40+
}
41+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
namespace App\Http\Controllers\Auth;
4+
5+
use App\Http\Controllers\Controller;
6+
use Illuminate\Http\RedirectResponse;
7+
use Illuminate\Http\Request;
8+
9+
class EmailVerificationNotificationController extends Controller
10+
{
11+
/**
12+
* Send a new email verification notification.
13+
*/
14+
public function store(Request $request): RedirectResponse
15+
{
16+
if ($request->user()->hasVerifiedEmail()) {
17+
return redirect()->intended(route('dashboard', absolute: false));
18+
}
19+
20+
$request->user()->sendEmailVerificationNotification();
21+
22+
return back()->with('status', 'verification-link-sent');
23+
}
24+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
namespace App\Http\Controllers\Auth;
4+
5+
use App\Http\Controllers\Controller;
6+
use Illuminate\Http\RedirectResponse;
7+
use Illuminate\Http\Request;
8+
use Inertia\Inertia;
9+
use Inertia\Response;
10+
11+
class EmailVerificationPromptController extends Controller
12+
{
13+
/**
14+
* Show the email verification prompt page.
15+
*/
16+
public function __invoke(Request $request): Response|RedirectResponse
17+
{
18+
return $request->user()->hasVerifiedEmail()
19+
? redirect()->intended(route('dashboard', absolute: false))
20+
: Inertia::render('auth/verify-email', ['status' => $request->session()->get('status')]);
21+
}
22+
}

0 commit comments

Comments
 (0)