- Laravel's robust library of first-party tools and libraries, such as Forge, Vapor, Nova, Envoyer, and Herd help you take your projects to the next level. Pair them with powerful open source libraries like Cashier, Dusk, Echo, Horizon, Sanctum, Telescope, and more.
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/routes/auth.php b/routes/auth.php
new file mode 100644
index 00000000..6170e3a6
--- /dev/null
+++ b/routes/auth.php
@@ -0,0 +1,59 @@
+group(function () {
+ Route::get('register', [RegisteredUserController::class, 'create'])
+ ->name('register');
+
+// Route::post('register', [RegisteredUserController::class, 'store']);
+
+ Route::get('login', [AuthenticatedSessionController::class, 'create'])
+ ->name('login');
+
+// Route::post('login', [AuthenticatedSessionController::class, 'store']);
+
+// Route::get('forgot-password', [PasswordResetLinkController::class, 'create'])
+// ->name('password.request');
+
+// Route::post('forgot-password', [PasswordResetLinkController::class, 'store'])
+// ->name('password.email');
+
+// Route::get('reset-password/{token}', [NewPasswordController::class, 'create'])
+// ->name('password.reset');
+
+// Route::post('reset-password', [NewPasswordController::class, 'store'])
+// ->name('password.store');
+// });
+
+// Route::middleware('auth')->group(function () {
+// Route::get('verify-email', EmailVerificationPromptController::class)
+// ->name('verification.notice');
+
+// Route::get('verify-email/{id}/{hash}', VerifyEmailController::class)
+// ->middleware(['signed', 'throttle:6,1'])
+// ->name('verification.verify');
+
+// Route::post('email/verification-notification', [EmailVerificationNotificationController::class, 'store'])
+// ->middleware('throttle:6,1')
+// ->name('verification.send');
+
+// Route::get('confirm-password', [ConfirmablePasswordController::class, 'show'])
+// ->name('password.confirm');
+
+// Route::post('confirm-password', [ConfirmablePasswordController::class, 'store']);
+
+// Route::put('password', [PasswordController::class, 'update'])->name('password.update');
+
+// Route::post('logout', [AuthenticatedSessionController::class, 'destroy'])
+// ->name('logout');
+// });
diff --git a/routes/web.php b/routes/web.php
index 86a06c53..a98f77de 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -1,7 +1,27 @@
Route::has('login'),
+ 'canRegister' => Route::has('register'),
+ 'laravelVersion' => Application::VERSION,
+ 'phpVersion' => PHP_VERSION,
+ ]);
});
+
+// Route::get('/dashboard', function () {
+// return Inertia::render('Dashboard');
+// })->middleware(['auth', 'verified'])->name('dashboard');
+
+// Route::middleware('auth')->group(function () {
+// Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
+// Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
+// Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
+// });
+
+require __DIR__.'/auth.php';
diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx
new file mode 100644
index 00000000..36496a28
--- /dev/null
+++ b/src/components/ui/button.tsx
@@ -0,0 +1,56 @@
+import * as React from "react"
+import { Slot } from "@radix-ui/react-slot"
+import { cva, type VariantProps } from "class-variance-authority"
+
+import { cn } from "@/lib/utils"
+
+const buttonVariants = cva(
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
+ {
+ variants: {
+ variant: {
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
+ destructive:
+ "bg-destructive text-destructive-foreground hover:bg-destructive/90",
+ outline:
+ "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
+ secondary:
+ "bg-secondary text-secondary-foreground hover:bg-secondary/80",
+ ghost: "hover:bg-accent hover:text-accent-foreground",
+ link: "text-primary underline-offset-4 hover:underline",
+ },
+ size: {
+ default: "h-10 px-4 py-2",
+ sm: "h-9 rounded-md px-3",
+ lg: "h-11 rounded-md px-8",
+ icon: "h-10 w-10",
+ },
+ },
+ defaultVariants: {
+ variant: "default",
+ size: "default",
+ },
+ }
+)
+
+export interface ButtonProps
+ extends React.ButtonHTMLAttributes,
+ VariantProps {
+ asChild?: boolean
+}
+
+const Button = React.forwardRef(
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
+ const Comp = asChild ? Slot : "button"
+ return (
+
+ )
+ }
+)
+Button.displayName = "Button"
+
+export { Button, buttonVariants }
diff --git a/tailwind.config.js b/tailwind.config.js
index ce0c57fc..65fe410f 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -2,19 +2,70 @@ import defaultTheme from 'tailwindcss/defaultTheme';
/** @type {import('tailwindcss').Config} */
export default {
+ darkMode: ['class'],
content: [
'./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php',
'./storage/framework/views/*.php',
'./resources/**/*.blade.php',
- './resources/**/*.js',
- './resources/**/*.vue',
+ './resources/**/*.ts',
+ './resources/**/*.tsx',
],
theme: {
- extend: {
- fontFamily: {
- sans: ['Figtree', ...defaultTheme.fontFamily.sans],
- },
- },
+ extend: {
+ fontFamily: {
+ sans: [
+ 'Figtree',
+ ...defaultTheme.fontFamily.sans
+ ]
+ },
+ borderRadius: {
+ lg: 'var(--radius)',
+ md: 'calc(var(--radius) - 2px)',
+ sm: 'calc(var(--radius) - 4px)'
+ },
+ colors: {
+ background: 'hsl(var(--background))',
+ foreground: 'hsl(var(--foreground))',
+ card: {
+ DEFAULT: 'hsl(var(--card))',
+ foreground: 'hsl(var(--card-foreground))'
+ },
+ popover: {
+ DEFAULT: 'hsl(var(--popover))',
+ foreground: 'hsl(var(--popover-foreground))'
+ },
+ primary: {
+ DEFAULT: 'hsl(var(--primary))',
+ foreground: 'hsl(var(--primary-foreground))'
+ },
+ secondary: {
+ DEFAULT: 'hsl(var(--secondary))',
+ foreground: 'hsl(var(--secondary-foreground))'
+ },
+ muted: {
+ DEFAULT: 'hsl(var(--muted))',
+ foreground: 'hsl(var(--muted-foreground))'
+ },
+ accent: {
+ DEFAULT: 'hsl(var(--accent))',
+ foreground: 'hsl(var(--accent-foreground))'
+ },
+ destructive: {
+ DEFAULT: 'hsl(var(--destructive))',
+ foreground: 'hsl(var(--destructive-foreground))'
+ },
+ border: 'hsl(var(--border))',
+ input: 'hsl(var(--input))',
+ ring: 'hsl(var(--ring))',
+ chart: {
+ '1': 'hsl(var(--chart-1))',
+ '2': 'hsl(var(--chart-2))',
+ '3': 'hsl(var(--chart-3))',
+ '4': 'hsl(var(--chart-4))',
+ '5': 'hsl(var(--chart-5))'
+ }
+ }
+ }
},
- plugins: [],
-};
+ plugins: [require("tailwindcss-animate")],
+};
\ No newline at end of file
diff --git a/tsconfig.json b/tsconfig.json
new file mode 100644
index 00000000..ed8aa62f
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,115 @@
+{
+ "compilerOptions": {
+ /* Visit https://aka.ms/tsconfig to read more about this file */
+
+ /* Projects */
+ // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
+ // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
+ // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
+ // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
+ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
+ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
+
+ /* Language and Environment */
+ "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
+ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
+ // "jsx": "preserve", /* Specify what JSX code is generated. */
+ // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
+ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
+ // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
+ // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
+ // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
+ // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
+ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
+ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
+ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
+
+ /* Modules */
+ "module": "commonjs", /* Specify what module code is generated. */
+ // "rootDir": "./", /* Specify the root folder within your source files. */
+ // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
+ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
+ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
+ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
+ // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
+ // "types": [], /* Specify type package names to be included without being referenced in a source file. */
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
+ // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
+ // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
+ // "rewriteRelativeImportExtensions": true, /* Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files. */
+ // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
+ // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
+ // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
+ // "noUncheckedSideEffectImports": true, /* Check side effect imports. */
+ // "resolveJsonModule": true, /* Enable importing .json files. */
+ // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
+ // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */
+
+ /* JavaScript Support */
+ // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
+ // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
+ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
+
+ /* Emit */
+ // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
+ // "declarationMap": true, /* Create sourcemaps for d.ts files. */
+ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
+ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
+ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
+ // "noEmit": true, /* Disable emitting files from a compilation. */
+ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
+ // "outDir": "./", /* Specify an output folder for all emitted files. */
+ // "removeComments": true, /* Disable emitting comments. */
+ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
+ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
+ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
+ // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
+ // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
+ // "newLine": "crlf", /* Set the newline character for emitting files. */
+ // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
+ // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
+ // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
+ // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
+ // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
+
+ /* Interop Constraints */
+ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
+ // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
+ // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */
+ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
+ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
+ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
+ "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
+
+ /* Type Checking */
+ "strict": true, /* Enable all strict type-checking options. */
+ // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
+ // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
+ // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
+ // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
+ // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
+ // "strictBuiltinIteratorReturn": true, /* Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. */
+ // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
+ // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
+ // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
+ // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
+ // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
+ // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
+ // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
+ // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
+ // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
+ // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
+ // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
+ // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
+ // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
+
+ /* Completeness */
+ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
+ "skipLibCheck": true, /* Skip type checking all .d.ts files. */
+ "baseUrl": ".",
+ "paths": {
+ "@/*": ["resources/js/*"]
+ }
+ }
+}
diff --git a/vite.config.js b/vite.config.js
index 421b5695..c8d30e23 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -1,5 +1,8 @@
-import { defineConfig } from 'vite';
+import {
+ defineConfig
+} from 'vite';
import laravel from 'laravel-vite-plugin';
+import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [
@@ -7,5 +10,6 @@ export default defineConfig({
input: ['resources/css/app.css', 'resources/js/app.js'],
refresh: true,
}),
+ react(),
],
-});
+});
\ No newline at end of file
From 9388dbaccae6134270567d66474fb5cf2b81d7d8 Mon Sep 17 00:00:00 2001
From: Tony Lea
Date: Mon, 16 Dec 2024 12:01:37 -0500
Subject: [PATCH 002/179] removing src folder
---
src/components/ui/button.tsx | 56 ------------------------------------
1 file changed, 56 deletions(-)
delete mode 100644 src/components/ui/button.tsx
diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx
deleted file mode 100644
index 36496a28..00000000
--- a/src/components/ui/button.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-import * as React from "react"
-import { Slot } from "@radix-ui/react-slot"
-import { cva, type VariantProps } from "class-variance-authority"
-
-import { cn } from "@/lib/utils"
-
-const buttonVariants = cva(
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
- {
- variants: {
- variant: {
- default: "bg-primary text-primary-foreground hover:bg-primary/90",
- destructive:
- "bg-destructive text-destructive-foreground hover:bg-destructive/90",
- outline:
- "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
- secondary:
- "bg-secondary text-secondary-foreground hover:bg-secondary/80",
- ghost: "hover:bg-accent hover:text-accent-foreground",
- link: "text-primary underline-offset-4 hover:underline",
- },
- size: {
- default: "h-10 px-4 py-2",
- sm: "h-9 rounded-md px-3",
- lg: "h-11 rounded-md px-8",
- icon: "h-10 w-10",
- },
- },
- defaultVariants: {
- variant: "default",
- size: "default",
- },
- }
-)
-
-export interface ButtonProps
- extends React.ButtonHTMLAttributes,
- VariantProps {
- asChild?: boolean
-}
-
-const Button = React.forwardRef(
- ({ className, variant, size, asChild = false, ...props }, ref) => {
- const Comp = asChild ? Slot : "button"
- return (
-
- )
- }
-)
-Button.displayName = "Button"
-
-export { Button, buttonVariants }
From 7162422471cefae24edf989eb38c60b2d3011ecd Mon Sep 17 00:00:00 2001
From: Tony Lea
Date: Mon, 16 Dec 2024 17:30:11 -0500
Subject: [PATCH 003/179] Adding Login and Register functionality
---
.../Auth/AuthenticatedSessionController.php | 5 +
.../Auth/RegisteredUserController.php | 8 +-
app/Http/Requests/Auth/LoginRequest.php | 85 ++
app/dashboard/page.tsx | 52 +
app/login/page.tsx | 32 +
package-lock.json | 1089 +++++++++++++++--
package.json | 7 +
resources/css/app.css | 20 +-
resources/js/Components/InputError.tsx | 16 +
resources/js/Components/app-sidebar.tsx | 183 +++
resources/js/Components/nav-main.tsx | 78 ++
resources/js/Components/nav-projects.tsx | 87 ++
resources/js/Components/nav-secondary.tsx | 40 +
resources/js/Components/nav-user.tsx | 123 ++
.../js/Components/sidebar-opt-in-form.tsx | 33 +
resources/js/Components/ui/avatar.tsx | 48 +
resources/js/Components/ui/breadcrumb.tsx | 115 ++
resources/js/Components/ui/card.tsx | 79 ++
resources/js/Components/ui/collapsible.tsx | 9 +
resources/js/Components/ui/dropdown-menu.tsx | 200 +++
resources/js/Components/ui/input.tsx | 22 +
resources/js/Components/ui/label.tsx | 24 +
resources/js/Components/ui/separator.tsx | 29 +
resources/js/Components/ui/sheet.tsx | 140 +++
resources/js/Components/ui/sidebar.tsx | 761 ++++++++++++
resources/js/Components/ui/skeleton.tsx | 15 +
resources/js/Components/ui/tooltip.tsx | 28 +
resources/js/Layouts/AuthLayout.tsx | 45 +
resources/js/Pages/Auth/Login.tsx | 104 +-
resources/js/Pages/Auth/Register.tsx | 117 ++
resources/js/Pages/Dashboard.tsx | 50 +
resources/js/hooks/use-mobile.tsx | 19 +
routes/auth.php | 40 +-
routes/web.php | 6 +-
tailwind.config.js | 10 +
35 files changed, 3583 insertions(+), 136 deletions(-)
create mode 100644 app/Http/Requests/Auth/LoginRequest.php
create mode 100644 app/dashboard/page.tsx
create mode 100644 app/login/page.tsx
create mode 100644 resources/js/Components/InputError.tsx
create mode 100644 resources/js/Components/app-sidebar.tsx
create mode 100644 resources/js/Components/nav-main.tsx
create mode 100644 resources/js/Components/nav-projects.tsx
create mode 100644 resources/js/Components/nav-secondary.tsx
create mode 100644 resources/js/Components/nav-user.tsx
create mode 100644 resources/js/Components/sidebar-opt-in-form.tsx
create mode 100644 resources/js/Components/ui/avatar.tsx
create mode 100644 resources/js/Components/ui/breadcrumb.tsx
create mode 100644 resources/js/Components/ui/card.tsx
create mode 100644 resources/js/Components/ui/collapsible.tsx
create mode 100644 resources/js/Components/ui/dropdown-menu.tsx
create mode 100644 resources/js/Components/ui/input.tsx
create mode 100644 resources/js/Components/ui/label.tsx
create mode 100644 resources/js/Components/ui/separator.tsx
create mode 100644 resources/js/Components/ui/sheet.tsx
create mode 100644 resources/js/Components/ui/sidebar.tsx
create mode 100644 resources/js/Components/ui/skeleton.tsx
create mode 100644 resources/js/Components/ui/tooltip.tsx
create mode 100644 resources/js/Layouts/AuthLayout.tsx
create mode 100644 resources/js/Pages/Auth/Register.tsx
create mode 100644 resources/js/Pages/Dashboard.tsx
create mode 100644 resources/js/hooks/use-mobile.tsx
diff --git a/app/Http/Controllers/Auth/AuthenticatedSessionController.php b/app/Http/Controllers/Auth/AuthenticatedSessionController.php
index d44fe974..6ac35769 100644
--- a/app/Http/Controllers/Auth/AuthenticatedSessionController.php
+++ b/app/Http/Controllers/Auth/AuthenticatedSessionController.php
@@ -4,6 +4,7 @@
use App\Http\Controllers\Controller;
use App\Http\Requests\Auth\LoginRequest;
+use Illuminate\Foundation\Inspiring;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
@@ -18,9 +19,13 @@ class AuthenticatedSessionController extends Controller
*/
public function create(): Response
{
+ [$message, $author] = str(Inspiring::quotes()->random())->explode('-');
+
return Inertia::render('Auth/Login', [
'canResetPassword' => Route::has('password.request'),
'status' => session('status'),
+ 'name' => config('app.name'),
+ 'quote' => ['message' => trim($message), 'author' => trim($author)],
]);
}
diff --git a/app/Http/Controllers/Auth/RegisteredUserController.php b/app/Http/Controllers/Auth/RegisteredUserController.php
index 53a546b1..d0a72dd5 100644
--- a/app/Http/Controllers/Auth/RegisteredUserController.php
+++ b/app/Http/Controllers/Auth/RegisteredUserController.php
@@ -4,6 +4,7 @@
use App\Http\Controllers\Controller;
use App\Models\User;
+use Illuminate\Foundation\Inspiring;
use Illuminate\Auth\Events\Registered;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
@@ -20,7 +21,12 @@ class RegisteredUserController extends Controller
*/
public function create(): Response
{
- return Inertia::render('Auth/Register');
+ [$message, $author] = str(Inspiring::quotes()->random())->explode('-');
+
+ return Inertia::render('Auth/Register', [
+ 'name' => config('app.name'),
+ 'quote' => ['message' => trim($message), 'author' => trim($author)]
+ ]);
}
/**
diff --git a/app/Http/Requests/Auth/LoginRequest.php b/app/Http/Requests/Auth/LoginRequest.php
new file mode 100644
index 00000000..25746424
--- /dev/null
+++ b/app/Http/Requests/Auth/LoginRequest.php
@@ -0,0 +1,85 @@
+|string>
+ */
+ public function rules(): array
+ {
+ return [
+ 'email' => ['required', 'string', 'email'],
+ 'password' => ['required', 'string'],
+ ];
+ }
+
+ /**
+ * Attempt to authenticate the request's credentials.
+ *
+ * @throws \Illuminate\Validation\ValidationException
+ */
+ public function authenticate(): void
+ {
+ $this->ensureIsNotRateLimited();
+
+ if (! Auth::attempt($this->only('email', 'password'), $this->boolean('remember'))) {
+ RateLimiter::hit($this->throttleKey());
+
+ throw ValidationException::withMessages([
+ 'email' => trans('auth.failed'),
+ ]);
+ }
+
+ RateLimiter::clear($this->throttleKey());
+ }
+
+ /**
+ * Ensure the login request is not rate limited.
+ *
+ * @throws \Illuminate\Validation\ValidationException
+ */
+ public function ensureIsNotRateLimited(): void
+ {
+ if (! RateLimiter::tooManyAttempts($this->throttleKey(), 5)) {
+ return;
+ }
+
+ event(new Lockout($this));
+
+ $seconds = RateLimiter::availableIn($this->throttleKey());
+
+ throw ValidationException::withMessages([
+ 'email' => trans('auth.throttle', [
+ 'seconds' => $seconds,
+ 'minutes' => ceil($seconds / 60),
+ ]),
+ ]);
+ }
+
+ /**
+ * Get the rate limiting throttle key for the request.
+ */
+ public function throttleKey(): string
+ {
+ return Str::transliterate(Str::lower($this->string('email')).'|'.$this->ip());
+ }
+}
diff --git a/app/dashboard/page.tsx b/app/dashboard/page.tsx
new file mode 100644
index 00000000..caa88896
--- /dev/null
+++ b/app/dashboard/page.tsx
@@ -0,0 +1,52 @@
+import { AppSidebar } from "@/components/app-sidebar"
+import {
+ Breadcrumb,
+ BreadcrumbItem,
+ BreadcrumbLink,
+ BreadcrumbList,
+ BreadcrumbPage,
+ BreadcrumbSeparator,
+} from "@/components/ui/breadcrumb"
+import { Separator } from "@/components/ui/separator"
+import {
+ SidebarInset,
+ SidebarProvider,
+ SidebarTrigger,
+} from "@/components/ui/sidebar"
+
+export default function Page() {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+ Building Your Application
+
+
+
+
+ Data Fetching
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ )
+}
diff --git a/app/login/page.tsx b/app/login/page.tsx
new file mode 100644
index 00000000..38610a47
--- /dev/null
+++ b/app/login/page.tsx
@@ -0,0 +1,32 @@
+import { GalleryVerticalEnd } from "lucide-react"
+
+import { LoginForm } from "@/components/login-form"
+
+export default function LoginPage() {
+ return (
+