Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
191 commits
Select commit Hold shift + click to select a range
552510c
Adding shadcn, react, and inertia as well as Welcome and Login
Dec 16, 2024
9388dba
removing src folder
Dec 16, 2024
7162422
Adding Login and Register functionality
Dec 16, 2024
64fabed
cleaning up some of the code in the login/register
Dec 16, 2024
1989324
More cleanup and updating filenames
Dec 16, 2024
e672f55
Adding user details in the user menu
Dec 17, 2024
9337843
cleaning up the sidebar and updating menu items
Dec 17, 2024
3c9d9dc
Formatting correctly and code cleanup
Dec 17, 2024
1f3a2fb
Adding install script
Dec 17, 2024
31579ed
Adding update to install
Dec 17, 2024
87d77ae
updating the readme
Dec 17, 2024
33477d7
Adding placeholder logo
Dec 17, 2024
87d85a6
adding updated logo to readme
Dec 17, 2024
9958dee
adding updated logo to readme
Dec 17, 2024
b1f50d5
Adding updates to margin in the inputError component
Dec 17, 2024
bc03365
Adding beginning to profile settings
Dec 18, 2024
7991423
Adding new sections for settings
Dec 18, 2024
9c55858
Adding forgot password and reset password functinality
Dec 18, 2024
1b58bf5
Adding confirm password functionality
Dec 18, 2024
6deff4e
Cleaning up the sidebar menu
Dec 18, 2024
c7aa349
Adding the profile update, password update and delete functionality
Dec 19, 2024
4ecedaf
cleaning up some code and changing the user sidebar nav to be dropdow…
Dec 20, 2024
692de47
changed the orientation of the mobile settings menu
Dec 20, 2024
4824a7b
Adding updates to all the tests
Dec 23, 2024
5205507
Adding tests.yml file
Dec 23, 2024
48e6ad8
Adding the sqlite file in the action
Dec 23, 2024
b74b1ab
Adding encryption key step
Dec 23, 2024
880589b
copying env file
Dec 23, 2024
410c571
Adding node to the test runner and installing deps
Dec 23, 2024
dcf75a0
Checking if case sensitive imports are breaking in the CI
Dec 23, 2024
289ad6d
Adding updated imports
Dec 23, 2024
3fb5d4e
Adding updated imports
Dec 23, 2024
d57093a
Merge pull request #2 from laravel/develop-tests
tnylea Dec 24, 2024
e681a98
Adding code refactor to a few components
Dec 24, 2024
e8754b9
Refactoring the files and cleaning up imports and other areas
Dec 24, 2024
12ce1a9
Adding a pre-commit husky file
Dec 24, 2024
6530024
Adding test to see if husky pre-commit runs
Dec 24, 2024
c6cfcf2
Testing husky run
tnylea Dec 24, 2024
fac5d8e
Testing husky file
tnylea Dec 24, 2024
b5b2caf
Adding pint updates
tnylea Dec 24, 2024
a68c259
Adding PHPstan to the mix
tnylea Dec 24, 2024
f84456f
few more improvements
tnylea Dec 24, 2024
68c059f
Adding update via pint
tnylea Dec 24, 2024
50076b6
updating the name of the tests yml
tnylea Dec 24, 2024
8cd3ba5
Adding updates to the react starter kit
tnylea Dec 24, 2024
c60e989
Adding image to readme
tnylea Dec 24, 2024
20045ce
Adding image to readme
tnylea Dec 24, 2024
65f0561
Adding light and dark mode toggle
tnylea Dec 25, 2024
4190be7
Adding the appearance toggle and updates
tnylea Dec 26, 2024
5a46341
updating dark mode
tnylea Dec 26, 2024
1a4c5e4
comma
taylorotwell Dec 26, 2024
38d7e61
fixing the settings layout mobile nav and removing punctuation at the…
tnylea Dec 27, 2024
3707539
Adding updates to terminology and removing AppearanceDropdown from We…
tnylea Dec 27, 2024
3f1864d
minor grammar fixes
taylorotwell Dec 30, 2024
5d2e1f0
adjustments
taylorotwell Dec 30, 2024
ae31913
adding update to Profile
tnylea Dec 30, 2024
675b7b3
Merge branch 'develop' of https://github.com/laravel/react-starter-ki…
tnylea Dec 30, 2024
04997ab
Updated the breadcrumbs for the Profile, Password, and Appearance pages
tnylea Dec 30, 2024
7c089fc
Adding new dev dependencies for ES lint and prettier configs
tnylea Dec 30, 2024
9253685
Update README.md
tnylea Dec 30, 2024
691a917
wip
taylorotwell Dec 31, 2024
fc8fe49
Adding restructure to routes and removing unneccessary controller
tnylea Jan 2, 2025
c0d0ba0
cleanup
tnylea Jan 2, 2025
c1d0b24
updating password constants
tnylea Jan 2, 2025
d0dfab1
changing js folder/files/references to contain kebab-case
tnylea Jan 2, 2025
0445234
renaming files/folders
tnylea Jan 2, 2025
6138c6c
reverting folder names to rename in gh
tnylea Jan 2, 2025
cb33221
Resolving caps GH issue
tnylea Jan 2, 2025
28f88c8
Adding new js folder back with correct caps
tnylea Jan 2, 2025
b51c516
renaming the js folder and components
tnylea Jan 2, 2025
472a505
renaming Pages folder back
tnylea Jan 2, 2025
00b6f40
returning capital pages dir
tnylea Jan 2, 2025
cff2230
renaming
tnylea Jan 2, 2025
6ece4a4
fixing tests
tnylea Jan 2, 2025
f2be75a
add prefetch
taylorotwell Jan 3, 2025
0e1e3c2
add prefetch
taylorotwell Jan 3, 2025
98188e3
updating readme for the folder structure
tnylea Jan 3, 2025
8f0550d
Merge branch 'develop' of https://github.com/laravel/react-starter-ki…
tnylea Jan 3, 2025
74ec61f
updating the readme
tnylea Jan 3, 2025
779a773
Adding updates to structure
tnylea Jan 3, 2025
427e966
adding some updates based on Joe feedback
tnylea Jan 5, 2025
fa5f1d3
Adding a few more fixes to the React Starter kit
tnylea Jan 6, 2025
6898550
Adding a types folder where we can store types and doing some cleanup
tnylea Jan 6, 2025
7551100
cleaning up the types and adding new user type
tnylea Jan 6, 2025
d5b4bb6
more cleanup
tnylea Jan 6, 2025
41cede6
cleanup
tnylea Jan 6, 2025
825de17
Adding autocomplete values to inputs
tnylea Jan 6, 2025
8ec6493
Adding a few more cleanups and fixes
tnylea Jan 6, 2025
7030a40
Fixing the nav user
tnylea Jan 6, 2025
a895ba3
Updating the active state for the main nav items
tnylea Jan 6, 2025
9a6eafd
cleaning up the profile info page with updated delete appearance
tnylea Jan 6, 2025
a97c32d
Adding dark mode to delete section
tnylea Jan 7, 2025
81c263d
cleaning up and fixing light/dark mode
tnylea Jan 7, 2025
3643027
Adding pint and analyse back
tnylea Jan 7, 2025
52ba226
fixing syntax
tnylea Jan 7, 2025
40dc52b
removing unneccessary console log
tnylea Jan 7, 2025
e641190
updates and improvements
tnylea Jan 10, 2025
3a4396d
Adding updates and organization
tnylea Jan 10, 2025
faddd36
Adding linter and prettierrc file
tnylea Jan 10, 2025
e23052f
Adding ziggy global definition
tnylea Jan 10, 2025
2f3bc66
removing ziggy static generated routes
tnylea Jan 10, 2025
4005e4c
Adding ssr command and ssr file
tnylea Jan 10, 2025
9bceaa8
Adding additional folder in the readme
tnylea Jan 13, 2025
c4f7f3f
removing unneccessary lines and casing
tnylea Jan 13, 2025
7f3cf06
Adding updated appearance styles
tnylea Jan 13, 2025
60f37b9
cleaning up layouts, re-structuring components/pages
tnylea Jan 15, 2025
384e600
renaming heading component
tnylea Jan 15, 2025
3f7c23f
Adding linted files and restructure
tnylea Jan 15, 2025
8b05f94
Re-organizing the settings layout
tnylea Jan 15, 2025
2b73cc5
making design updates
tnylea Jan 15, 2025
efa0b23
adding updated layout
tnylea Jan 15, 2025
9539d99
Adding updated layout comments
tnylea Jan 15, 2025
998ceb3
fixing the forgot password import
tnylea Jan 15, 2025
76a9406
Adding latest updates to react design
tnylea Jan 16, 2025
cbd66dc
Adding design/copy/feedback updates
tnylea Jan 16, 2025
11287f5
Adding new app-header layout along with restructure
tnylea Jan 17, 2025
1c5273e
Cleaning up the component names and better organizing the components
tnylea Jan 22, 2025
00d9fbe
cleanup
tnylea Jan 22, 2025
ce76f2b
cleaning up and removing all red squiggles and problems
tnylea Jan 22, 2025
8789630
Adding updates to dark styles in the header
tnylea Jan 22, 2025
ddfdf32
Adding the breadcrumbs update
tnylea Jan 23, 2025
19bc2a9
updating the name in the composer json
tnylea Jan 27, 2025
104a291
Changing stability to dev
tnylea Jan 27, 2025
3e5f9d1
fixing typescript warning/errors
tnylea Jan 28, 2025
89d5d6c
change class to className
avosalmon Jan 30, 2025
e8faa14
Merge pull request #3 from laravel/fix-class
taylorotwell Jan 30, 2025
785e454
fixing the navigation in the user dropdown
tnylea Jan 30, 2025
a74019b
renaming the format and prettier scripts
tnylea Jan 30, 2025
a8c186b
Changing the names in NPM
tnylea Jan 30, 2025
7b6c92b
Adding a few more ui updates
tnylea Jan 31, 2025
8dfea01
Add vite env type declaration (#4)
avosalmon Jan 31, 2025
b79a216
Update README.md
iamdavidhill Feb 1, 2025
682ad5e
update layout
taylorotwell Feb 3, 2025
76bc6c5
Gitignore bootstrap/ssr
avosalmon Feb 5, 2025
d5882af
Add ESLint config file
avosalmon Feb 5, 2025
eabc060
Fix ESLint errors
avosalmon Feb 5, 2025
3ec1eb4
Format
avosalmon Feb 5, 2025
4106212
Merge pull request #5 from laravel/eslint
tnylea Feb 5, 2025
d1fa1ef
Adding code quality workflow
tnylea Feb 5, 2025
4559f31
removing husky
tnylea Feb 5, 2025
5084921
Upgrade actions to the latest version
avosalmon Feb 6, 2025
dc63f8a
Use cn function
avosalmon Feb 6, 2025
410bacd
Fix TS errors
avosalmon Feb 6, 2025
c73cb14
Format
avosalmon Feb 6, 2025
cad7ad2
fixing the password reset logic and adding php stan config
tnylea Feb 6, 2025
216d87e
Adding lint commits through the CI
tnylea Feb 6, 2025
6214a7f
Fixing the linting
tnylea Feb 6, 2025
0b12c4b
Merge branch 'develop' into github-actions
tnylea Feb 6, 2025
5e01767
Adding updates to the verifed email controller to get tests passing
tnylea Feb 6, 2025
d4dd34c
Adding priveleges for CI to commit back to the branch
tnylea Feb 6, 2025
9e5d32b
Adding CI functionality to write commit
tnylea Feb 6, 2025
4b379f5
adding permissions to get CI to auto-commit
tnylea Feb 6, 2025
0d5e162
fixing the lint yaml
tnylea Feb 6, 2025
1739369
renaming the linter yml file name
tnylea Feb 6, 2025
1333eff
getting linter to run again
tnylea Feb 6, 2025
a2391d2
Merge pull request #6 from laravel/github-actions
tnylea Feb 6, 2025
2e45120
Adding updates to the readme
tnylea Feb 6, 2025
efbedcc
adding remember me checkbox
tnylea Feb 10, 2025
ec9c13e
update workflows
taylorotwell Feb 10, 2025
04a0201
Formatting (#7)
taylorotwell Feb 10, 2025
2b3dfaa
formatting
taylorotwell Feb 10, 2025
79152f2
remove install script
taylorotwell Feb 10, 2025
74b2235
sort gitignore
taylorotwell Feb 10, 2025
165c3b1
formatting tests
taylorotwell Feb 10, 2025
7a5df60
wip
taylorotwell Feb 10, 2025
745fa92
update attributes
taylorotwell Feb 10, 2025
7d4d309
fix tab order
taylorotwell Feb 10, 2025
e1698d7
formatting
taylorotwell Feb 10, 2025
3474e8c
formatting
taylorotwell Feb 10, 2025
22c891e
wip
taylorotwell Feb 10, 2025
8e6fee4
pint
taylorotwell Feb 10, 2025
dee79ce
wip
taylorotwell Feb 10, 2025
cb71546
wip
taylorotwell Feb 10, 2025
f116ce3
updating the linter to have write permission (#8)
tnylea Feb 11, 2025
d6ef25b
wip
taylorotwell Feb 11, 2025
5735754
Adding new branch with PHP unit instead of pest
tnylea Feb 11, 2025
305bbe3
Merge branch 'develop' into usePHPUNIT
tnylea Feb 11, 2025
6a6e9eb
fix code style
tnylea Feb 11, 2025
bb47625
adding correct syntax for phpunit
tnylea Feb 11, 2025
f6ba4aa
Merge branch 'usePHPUNIT' of https://github.com/laravel/react-starter…
tnylea Feb 11, 2025
5ac048e
Merge pull request #9 from laravel/usePHPUNIT
tnylea Feb 11, 2025
ff4b909
wip
taylorotwell Feb 12, 2025
9f19416
wip
taylorotwell Feb 12, 2025
c9c50fd
fonts
taylorotwell Feb 12, 2025
c123f36
Adding some prettier updates
tnylea Feb 13, 2025
f5da753
Adding some prettier updates (#10)
tnylea Feb 13, 2025
75f6139
Adding fix for click issue
tnylea Feb 13, 2025
545a1e7
Adding update to click issue
tnylea Feb 13, 2025
ae661c9
fix code style
tnylea Feb 13, 2025
7c9790b
Merge pull request #11 from laravel/fixingClickIssue
tnylea Feb 13, 2025
ee07aab
wip
taylorotwell Feb 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
*.md diff=markdown
*.php diff=php

/.github export-ignore
CHANGELOG.md export-ignore
.styleci.yml export-ignore
README.md export-ignore
49 changes: 49 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: linter

on:
push:
branches:
- develop
- main
pull_request:
branches:
- develop
- main

permissions:
contents: write

jobs:
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'

- name: Install Dependencies
run: |
composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
npm install

- name: Run Pint
run: vendor/bin/pint

- name: Frontend Format Check
run: npm run format

- name: Frontend Lint
run: npm run lint

- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: fix code style
commit_options: '--no-verify'

# We need to run PHPStan after commiting changes as it does not auto-fix errors...
- name: PHPStan
run: ./vendor/bin/phpstan
53 changes: 53 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: tests

on:
push:
branches:
- develop
- main
pull_request:
branches:
- develop
- main

jobs:
ci:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
tools: composer:v2
coverage: xdebug

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'

- name: Install Node Dependencies
run: npm ci

- name: Build Assets
run: npm run build

- name: Create SQLite Database
run: touch database/database.sqlite

- name: Install Dependencies
run: composer install --no-interaction --prefer-dist --optimize-autoloader

- name: Copy Environment File
run: cp .env.example .env

- name: Generate Application Key
run: php artisan key:generate

- name: Tests
run: ./vendor/bin/phpunit
24 changes: 13 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
.DS_Store
.env
.env.backup
.env.production
.phpactor.json
.phpunit.result.cache
/.fleet
/.idea
/.nova
/.phpunit.cache
/.vscode
/.zed
/bootstrap/ssr
/node_modules
/public/build
/public/hot
/public/storage
/storage/*.key
/storage/pail
/vendor
.env
.env.backup
.env.production
.phpactor.json
.phpunit.result.cache
auth.json
Homestead.json
Homestead.yaml
auth.json
npm-debug.log
yarn-error.log
/.fleet
/.idea
/.nova
/.vscode
/.zed
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resources/js/components/ui/*
18 changes: 18 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"semi": true,
"singleQuote": true,
"singleAttributePerLine": false,
"htmlWhitespaceSensitivity": "css",
"printWidth": 150,
"plugins": ["prettier-plugin-organize-imports", "prettier-plugin-tailwindcss"],
"tailwindFunctions": ["clsx", "cn"],
"tabWidth": 4,
"overrides": [
{
"files": "**/*.yml",
"options": {
"tabWidth": 2
}
}
]
}
166 changes: 124 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,148 @@
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400" alt="Laravel Logo"></a></p>
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://cdn.devdojo.com/assets/svg/laravel-react-logo.svg" width="300" alt="Laravel Logo"></a></p>

<p align="center">
<a href="https://github.com/laravel/framework/actions"><img src="https://github.com/laravel/framework/workflows/tests/badge.svg" alt="Build Status"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
<a href="https://github.com/laravel/react-starter-kit/actions/workflows/tests.yml"><img src="https://github.com/laravel/react-starter-kit/workflows/tests/badge.svg" alt="Test Status"></a>
<a href="https://github.com/laravel/react-starter-kit/actions/workflows/lint.yml"><img src="https://github.com/laravel/react-starter-kit/actions/workflows/lint.yml/badge.svg" alt="Lint Status"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
</p>

## About Laravel
<img src="https://cdn.devdojo.com/images/december2024/screenshot.png" />

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
## Introduction

- [Simple, fast routing engine](https://laravel.com/docs/routing).
- [Powerful dependency injection container](https://laravel.com/docs/container).
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
- [Robust background job processing](https://laravel.com/docs/queues).
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
Welcome to the <a href="https://laravel.com" target="_blank">Laravel</a> React</a> Starter Kit. This starter kit utilizes <a href="https://inertiajs.com/" target="_blank">Intertia v2</a>, <a href="https://tailwindcss.com/" target="_blank">Tailwind CSS</a>,V3 (soon to be V4), <a href="https://reactjs.dev" target="_blank">React 19</a>, and <a href="https://ui.shadcn.com/" target="_blank">ShadCN UI</a>.

Laravel is accessible, powerful, and provides tools required for large, robust applications.
## Installation

## Learning Laravel
To install the React Starter Kit, run the following command:

Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
```
git clone https://github.com/laravel/react-starter-kit.git
cd react-starter-kit
git checkout develop
chmod +x install.sh && ./install.sh
```

You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch.
This shell file will run the following commands, which you may wish to run manually:

If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
1. cp .env.example .env
2. composer install
3. php artisan key:generate
4. php artisan migrate
5. npm install
6. npm run dev

## Laravel Sponsors
## Features

We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the [Laravel Partners program](https://partners.laravel.com).
This Starter Kit includes the following features:

### Premium Partners
- **User Authentication** (login, register, password reset, email verify, and password confirmation)
- **Dashboard Page** (Auth Protected User Dashboard Page)
- **Settings Page** (Profile Update/Delete, Password Update, Appearance)

- **[Vehikl](https://vehikl.com/)**
- **[Tighten Co.](https://tighten.co)**
- **[WebReinvent](https://webreinvent.com/)**
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
- **[64 Robots](https://64robots.com)**
- **[Curotec](https://www.curotec.com/services/technologies/laravel/)**
- **[Cyber-Duck](https://cyber-duck.co.uk)**
- **[DevSquad](https://devsquad.com/hire-laravel-developers)**
- **[Jump24](https://jump24.co.uk)**
- **[Redberry](https://redberry.international/laravel/)**
- **[Active Logic](https://activelogic.com)**
- **[byte5](https://byte5.de)**
- **[OP.GG](https://op.gg)**
## Front-end App Structure

## Contributing
The majority of the front-end code is located in the `resources/js` folder. In this folder we'll be using **kebab-case** throughout. You may wish to change this to any other convention if you perfer. Below is an example of how this folder is structured:

Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
**Folders**

## Code of Conduct
```
resources/js/
├── components/ # Reusable React components
├── hooks/ # Custom React hooks
├── layouts/ # Application layouts
├── lib/ # Utility functions and configurations
├── pages/ # Page components
└── types/ # Typescript definitions and interfaces
```

In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
**Components**

## Security Vulnerabilities
```
components/
└── appearance-tabs.tsx
└── navigation-menu.tsx
```

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
**Hooks/Utilities**

## License
```
hooks/
└── use-auth.tsx
└── use-mobile.tsx
```

The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
### Components

In the components folder is where all your React components will live. Inside this folder you'll also notice a sub-folder called `ui`. This is where you'll find all the ShadCN UI components. More documentation about this below.

### Pages

Most of your application pages will live in this folder. Here you will find the Page templates for Log in, Register, Dashboard, etc. These pages are rendered via Inertia. Here's an example, located inside of `routes/web.php`, of how the dashboard page is rendered:

```php
Route::get('/dashboard', function () {
return Inertia::render('dashboard');
})->middleware(['auth', 'verified'])->name('dashboard');
```

This code will load the `resources/js/pages/dashboard.tsx` file.

### Layouts

All your pages will utilize a layout as the structure for each page. These layout files are located in the `resources/js/layouts` folder. Currently, there will be two layouts. An `app` layout and an `auth` layout.

1. **app-layout** - This layout will be used for all authenticated users.
2. **auth\auth-base** - This is the main layout for your authentication pages, more info below.

### Authentication Layouts

The Authentication layouts are used specifically for all the Authentication views. You'll notice that there are a few different layouts in the `resources/js/layouts/auth` folder. This is because we provide you with three layouts to choose from.

#### AuthSimpleLayout.tsx

A clean and simple layout for your authentication pages.

![Simple Auth Layout Screenshot](https://cdn.devdojo.com/images/december2024/simple-layout.png)

#### AuthCardLayout.tsx

A layout with a slightly darker background and with the auth form inside a card.

![Simple Auth Layout Screenshot](https://cdn.devdojo.com/images/december2024/card-layout.png)

#### SplitLayout.tsx

A split view authentication layout screen

![Simple Auth Layout Screenshot](https://cdn.devdojo.com/images/december2024/split-layout.png)

---

To change the Layout you would like to use, simply change the Layout file that is imported in either the `resources/js/layouts/auth-layout.tsx` or `resources/js/layouts/app-layout.tsx`. As an example, to use the `AuthSplitLayout.tsx`, the first line of `resources/js/layouts/auth-layout.tsx` would be modified to look like the following:

```tsx
import AuthLayoutTemplate from '@/layouts/auth/auth-split-layout';
```

---

## ShadCN UI

All the ShadCN components will be installed inside of the `resources/js/components/ui` folder.

When you install a UI component, such as the button component:

```bash
npx shadcn@latest add button
```

You'll now have a button component in your `resources/js/components/ui` folder. You can then use the button component inside of any page.

```tsx
import { Button } from '@/components/ui/button';

export default function Home() {
return <Button>Button</Button>;
}
```
Loading