├── .editorconfig ├── .env.example ├── .gitattributes ├── .gitignore ├── README.md ├── app ├── Actions │ ├── Fortify │ │ ├── CreateNewUser.php │ │ ├── PasswordValidationRules.php │ │ ├── ResetUserPassword.php │ │ ├── UpdateUserPassword.php │ │ └── UpdateUserProfileInformation.php │ └── Jetstream │ │ └── DeleteUser.php ├── Console │ └── Kernel.php ├── Exceptions │ └── Handler.php ├── Http │ ├── Controllers │ │ ├── AboutUsController.php │ │ ├── BlogController.php │ │ ├── ContainerController.php │ │ ├── Controller.php │ │ ├── FacebookSocialiteController.php │ │ ├── GoogleSocialiteController.php │ │ └── VerifyEmailController.php │ ├── Kernel.php │ └── Middleware │ │ ├── Authenticate.php │ │ ├── EncryptCookies.php │ │ ├── EnsureEmailIVerifiedOrSkipped.php │ │ ├── HandleInertiaRequests.php │ │ ├── PreventRequestsDuringMaintenance.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── TrimStrings.php │ │ ├── TrustHosts.php │ │ ├── TrustProxies.php │ │ ├── ValidateSignature.php │ │ └── VerifyCsrfToken.php ├── Mail │ └── UnverifiedEmailReminder.php ├── Models │ └── User.php └── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ ├── FortifyServiceProvider.php │ ├── JetstreamServiceProvider.php │ └── RouteServiceProvider.php ├── artisan ├── bootstrap ├── app.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── cors.php ├── database.php ├── filesystems.php ├── fortify.php ├── hashing.php ├── jetstream.php ├── logging.php ├── mail.php ├── queue.php ├── sanctum.php ├── services.php ├── session.php └── view.php ├── database ├── .gitignore ├── factories │ └── UserFactory.php ├── migrations │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2014_10_12_100000_create_password_reset_tokens_table.php │ ├── 2014_10_12_200000_add_two_factor_columns_to_users_table.php │ ├── 2019_08_19_000000_create_failed_jobs_table.php │ ├── 2019_12_14_000001_create_personal_access_tokens_table.php │ ├── 2023_10_24_024523_create_sessions_table.php │ ├── 2023_10_24_142743_add_social_login_field.php │ └── 2023_10_28_172936_add_email_verification_code_field.php └── seeders │ └── DatabaseSeeder.php ├── jsconfig.json ├── package-lock.json ├── package.json ├── phpunit.xml ├── postcss.config.js ├── public ├── .htaccess ├── favicon.ico ├── index.php └── robots.txt ├── resources ├── css │ └── app.css ├── js │ ├── Components │ │ ├── ActionMessage.vue │ │ ├── ActionSection.vue │ │ ├── ApplicationLogo.vue │ │ ├── ApplicationMark.vue │ │ ├── AuthenticationCard.vue │ │ ├── AuthenticationCardLogo.vue │ │ ├── Banner.vue │ │ ├── Checkbox.vue │ │ ├── ConfirmationModal.vue │ │ ├── ConfirmsPassword.vue │ │ ├── DangerButton.vue │ │ ├── DialogModal.vue │ │ ├── Dropdown.vue │ │ ├── DropdownLink.vue │ │ ├── FormSection.vue │ │ ├── InputError.vue │ │ ├── InputLabel.vue │ │ ├── Modal.vue │ │ ├── NavLink.vue │ │ ├── PrimaryButton.vue │ │ ├── ResponsiveNavLink.vue │ │ ├── SecondaryButton.vue │ │ ├── SectionBorder.vue │ │ ├── SectionTitle.vue │ │ ├── TextInput.vue │ │ └── Welcome.vue │ ├── Layouts │ │ ├── AppLayout.vue │ │ ├── Topbar.vue │ │ └── TopbarData.js │ ├── Pages │ │ ├── API │ │ │ ├── Index.vue │ │ │ └── Partials │ │ │ │ └── ApiTokenManager.vue │ │ ├── AboutUs.vue │ │ ├── Auth │ │ │ ├── ConfirmPassword.vue │ │ │ ├── ForgotPassword.vue │ │ │ ├── Login.vue │ │ │ ├── Register.vue │ │ │ ├── ResetPassword.vue │ │ │ ├── TwoFactorChallenge.vue │ │ │ └── VerifyEmail.vue │ │ ├── Blog.vue │ │ ├── Container │ │ │ ├── Create.vue │ │ │ ├── Edit.vue │ │ │ ├── Index.vue │ │ │ └── Show.vue │ │ ├── Dashboard.vue │ │ ├── PrivacyPolicy.vue │ │ ├── Profile │ │ │ ├── Partials │ │ │ │ ├── DeleteUserForm.vue │ │ │ │ ├── LogoutOtherBrowserSessionsForm.vue │ │ │ │ ├── TwoFactorAuthenticationForm.vue │ │ │ │ ├── UpdatePasswordForm.vue │ │ │ │ └── UpdateProfileInformationForm.vue │ │ │ └── Show.vue │ │ ├── TermsOfService.vue │ │ └── Welcome.vue │ ├── app.js │ └── bootstrap.js ├── markdown │ ├── policy.md │ └── terms.md └── views │ ├── app.blade.php │ └── emails │ ├── email-confirmation.blade.php │ └── team-invitation.blade.php ├── routes ├── api.php ├── channels.php ├── console.php └── web.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ ├── .gitignore │ │ └── data │ │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tailwind.config.js ├── tests ├── CreatesApplication.php ├── Feature │ ├── ApiTokenPermissionsTest.php │ ├── AuthenticationTest.php │ ├── BrowserSessionsTest.php │ ├── CreateApiTokenTest.php │ ├── DeleteAccountTest.php │ ├── DeleteApiTokenTest.php │ ├── EmailVerificationTest.php │ ├── ExampleTest.php │ ├── PasswordConfirmationTest.php │ ├── PasswordResetTest.php │ ├── ProfileInformationTest.php │ ├── RegistrationTest.php │ ├── TwoFactorAuthenticationSettingsTest.php │ └── UpdatePasswordTest.php ├── TestCase.php └── Unit │ └── ExampleTest.php └── vite.config.js /.editorconfig: -------------------------------------------------------------------------------- 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 19 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Stagger 2 | APP_ENV=local 3 | APP_KEY=base64:2zdVn7P3oSMtCKWejKojo/nZWGdiTtjAck+6eDYJ3UM= 4 | APP_DEBUG=true 5 | APP_URL=http://localhost 6 | 7 | LOG_CHANNEL=stack 8 | LOG_DEPRECATIONS_CHANNEL=null 9 | LOG_LEVEL=debug 10 | 11 | DB_CONNECTION=mysql 12 | DB_HOST=127.0.0.1 13 | DB_PORT=3306 14 | DB_DATABASE=sprlogin 15 | DB_USERNAME=root 16 | DB_PASSWORD= 17 | 18 | BROADCAST_DRIVER=log 19 | CACHE_DRIVER=file 20 | FILESYSTEM_DISK=local 21 | QUEUE_CONNECTION=sync 22 | SESSION_DRIVER=file 23 | SESSION_LIFETIME=120 24 | 25 | MEMCACHED_HOST=127.0.0.1 26 | 27 | REDIS_HOST=127.0.0.1 28 | REDIS_PASSWORD=null 29 | REDIS_PORT=6379 30 | 31 | MAIL_MAILER=smtp 32 | MAIL_HOST=smtp-relay.brevo.com 33 | MAIL_PORT=587 34 | MAIL_USERNAME=info@itomoti.com 35 | MAIL_PASSWORD=xsmtpsib-38f7c9e0b63225d247eb7d96d7737660a205529cbfbdfdcea47c9aee52ab7859-pnVvYjFL86IxXqNM 36 | MAIL_ENCRYPTION=tls 37 | MAIL_FROM_ADDRESS="hello@sprsaas.io" 38 | MAIL_FROM_NAME="Mike from Sprsaas" 39 | 40 | AWS_ACCESS_KEY_ID= 41 | AWS_SECRET_ACCESS_KEY= 42 | AWS_DEFAULT_REGION=us-east-1 43 | AWS_BUCKET= 44 | AWS_USE_PATH_STYLE_ENDPOINT=false 45 | 46 | PUSHER_APP_ID= 47 | PUSHER_APP_KEY= 48 | PUSHER_APP_SECRET= 49 | PUSHER_HOST= 50 | PUSHER_PORT=443 51 | PUSHER_SCHEME=https 52 | PUSHER_APP_CLUSTER=mt1 53 | 54 | VITE_APP_NAME="${APP_NAME}" 55 | VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 56 | VITE_PUSHER_HOST="${PUSHER_HOST}" 57 | VITE_PUSHER_PORT="${PUSHER_PORT}" 58 | VITE_PUSHER_SCHEME="${PUSHER_SCHEME}" 59 | VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 60 | 61 | FACEBOOK_APP_ID= 62 | FACEBOOK_APP_SECRET= 63 | FACEBOOK_REDIRECT=http://localhost:9000/callback/facebook 64 | 65 | GOOGLE_CLIENT_ID=683854147474-taomntm3sqlgihdsopaq9ltrnsfjbb1v.apps.googleusercontent.com 66 | GOOGLE_CLIENT_SECRET=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 67 | GOOGLE_REDIRECT_URI=http://localhost:9000/callback/google 68 | 69 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 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 | /.github export-ignore 10 | CHANGELOG.md export-ignore 11 | .styleci.yml export-ignore 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.phpunit.cache 2 | /node_modules 3 | /public/build 4 | /public/hot 5 | /public/storage 6 | /storage/*.key 7 | /vendor 8 | .env 9 | .env.backup 10 | .env.production 11 | .phpunit.result.cache 12 | Homestead.json 13 | Homestead.yaml 14 | auth.json 15 | npm-debug.log 16 | yarn-error.log 17 | /.fleet 18 | /.idea 19 | /.vscode 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | ## About Jetstream 4 | 5 | Laravel Jetstream is a beautifully designed application starter kit for Laravel and provides the perfect starting point for your next Laravel application. Jetstream provides the implementation for your application's login, registration, email verification, two-factor authentication, session management, API via Laravel Sanctum, and optional team management features. 6 | 7 | ## Installation Guide 8 | 9 | 1: Install [Xampp](https://sourceforge.net/projects/xampp/files/XAMPP%20Windows/8.2.4/xampp-windows-x64-8.2.4-0-VS16-installer.exe), [SQLyog](https://en.softonic.com/download/sqlyog/windows/post-download) and [Composer](https://getcomposer.org/Composer-Setup.exe) on your local machine 10 | 11 | 2: Create a database:`sprlogin` using SQLyog after running Xampp 12 | 13 | 3: Download the source code and change `.env.example` to `.env` 14 | 15 | 4: Install Laravel composer 16 | ``` 17 | composer install 18 | ``` 19 | 20 | 5: Migrate your database 21 | ``` 22 | php artisan migrate 23 | ``` 24 | 25 | 6: Install npm package 26 | ``` 27 | npm install 28 | ``` 29 | 30 | 7: Run front-end 31 | 32 | ``` 33 | npm run dev 34 | ``` 35 | 36 | 8: Run Laravel backend 37 | 38 | ``` 39 | php artisan serve 40 | ``` 41 | 42 | Open [http://localhost:8000](http://localhost:8000) to view it in your browser. 43 | -------------------------------------------------------------------------------- /app/Actions/Fortify/CreateNewUser.php: -------------------------------------------------------------------------------- 1 | $input 20 | */ 21 | public function create(array $input): User 22 | { 23 | Validator::make($input, [ 24 | 'name' => ['required', 'string', 'max:255'], 25 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 26 | 'password' => $this->passwordRules(), 27 | 'terms' => Jetstream::hasTermsAndPrivacyPolicyFeature() ? ['accepted', 'required'] : '', 28 | ])->validate(); 29 | 30 | return User::create([ 31 | 'name' => $input['name'], 32 | 'email' => $input['email'], 33 | 'email_verification_code' => random_int(100000, 999999), 34 | 'password' => Hash::make($input['password']), 35 | ]); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/Actions/Fortify/PasswordValidationRules.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected function passwordRules(): array 15 | { 16 | return ['required', 'string', new Password, 'confirmed']; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Actions/Fortify/ResetUserPassword.php: -------------------------------------------------------------------------------- 1 | $input 18 | */ 19 | public function reset(User $user, array $input): void 20 | { 21 | Validator::make($input, [ 22 | 'password' => $this->passwordRules(), 23 | ])->validate(); 24 | 25 | $user->forceFill([ 26 | 'password' => Hash::make($input['password']), 27 | ])->save(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/Actions/Fortify/UpdateUserPassword.php: -------------------------------------------------------------------------------- 1 | $input 18 | */ 19 | public function update(User $user, array $input): void 20 | { 21 | Validator::make($input, [ 22 | 'current_password' => ['required', 'string', 'current_password:web'], 23 | 'password' => $this->passwordRules(), 24 | ], [ 25 | 'current_password.current_password' => __('The provided password does not match your current password.'), 26 | ])->validateWithBag('updatePassword'); 27 | 28 | $user->forceFill([ 29 | 'password' => Hash::make($input['password']), 30 | ])->save(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Actions/Fortify/UpdateUserProfileInformation.php: -------------------------------------------------------------------------------- 1 | $input 17 | */ 18 | public function update(User $user, array $input): void 19 | { 20 | Validator::make($input, [ 21 | 'name' => ['required', 'string', 'max:255'], 22 | 'email' => ['required', 'email', 'max:255', Rule::unique('users')->ignore($user->id)], 23 | 'photo' => ['nullable', 'mimes:jpg,jpeg,png', 'max:1024'], 24 | ])->validateWithBag('updateProfileInformation'); 25 | 26 | if (isset($input['photo'])) { 27 | $user->updateProfilePhoto($input['photo']); 28 | } 29 | 30 | if ($input['email'] !== $user->email && 31 | $user instanceof MustVerifyEmail) { 32 | $this->updateVerifiedUser($user, $input); 33 | } else { 34 | $user->forceFill([ 35 | 'name' => $input['name'], 36 | 'email' => $input['email'], 37 | ])->save(); 38 | } 39 | } 40 | 41 | /** 42 | * Update the given verified user's profile information. 43 | * 44 | * @param array34 | {{ message }} 35 |
36 |10 | {{ message }} 11 |
12 |
9 |
63 | Or 64 |
65 |10 | Enter this code in your browser to verify your email:
11 |12 | {{$code}} 13 |
14 |15 | You can open form in browser using this ink. 16 |
17 |