GithubHelp home page GithubHelp logo

keithndhlovu / booking-platform Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 19.81 MB

Make flight bookings and order whats on the menu for that flight during that flight session

License: MIT License

Dockerfile 0.02% PHP 15.74% JavaScript 23.46% HTML 48.48% CSS 12.26% Vue 0.04%

booking-platform's Introduction

Laravel-Auth is a Complete Build of Laravel 5.5 with Email Registration Verification, Social Authentication, User Roles and Permissions, User Profiles, and Admin restricted user management system.

Build Status StyleCI Scrutinizer Code Quality Build Status License

READY FOR USE!

About

Laravel 5.5 with user authentication, registration with email confirmation, social media authentication, password recovery, and captcha protection. This also makes full use of Controllers for the routes, templates for the views, and makes use of middleware for routing. Project can be stood up in minutes.

Features

A Laravel 5.5.x with minimal Bootstrap 3.7.x project.

Laravel-Auth Features
Built on Laravel 5.5
Uses MySQL Database
Uses Artisan to manage database migration, schema creations, and create/publish page controller templates
Dependencies are managed with COMPOSER
Laravel Scaffolding User and Administrator Authentication.
User Socialite Logins ready to go - See API list used below
Google Maps API v3 for User Location lookup and Geocoding
CRUD (Create, Read, Update, Delete) Themes Management
CRUD (Create, Read, Update, Delete) User Management
Robust Laravel Logging with admin UI using MonoLog
Google reCaptcha Protection with Google API
User Registration with email verification
Makes us of Laravel Mix to compile assets
Makes use of Language Localization Files
Active Nav states using Laravel Requests
Restrict User Email Activation Attempts
Capture IP to users table upon signup
Uses Laravel Debugger for development
Makes us of Password Strength Meter
Makes use of hideShowPassword
User Avatar Image AJAX Upload with Dropzone.js
User Gravatar using Gravatar API
User Password Reset via Email Token
User Login with remember password
User Roles/ACL Implementation
Makes of Laravel's Soft Delete Structure
Soft Deleted Users Management System
Permanently Delete Soft Deleted Users
User Delete Account with Goodbye email
User Restore Deleted Account Token
Restore Soft Deleted Users
View Soft Deleted Users
Captures Soft Delete Date
Captures Soft Delete IP
Admin Routing Details UI
Admin PHP Information UI
Eloquent user profiles
User Themes
404 Page
403 Page
Configurable Email Notification via Laravel-Exception-Notifier
User Delete with Goodby email
User Restore Deleted Account

Installation Instructions

  1. Run sudo git clone https://github.com/jeremykenedy/laravel-auth.git laravel-auth
  2. Create a MySQL database for the project
    • mysql -u root -p, if using Vagrant: mysql -u homestead -psecret
    • create database laravelAuth;
    • \q
  3. From the projects root run cp .env.example .env
  4. Configure your .env file // NOTE: Google API Key will prevent maps error
  5. Run sudo composer update from the projects root folder
  6. Run php artisan vendor:publish --provider="jeremykenedy\LaravelRoles\RolesServiceProvider" --tag=config
  7. Run php artisan vendor:publish --provider="jeremykenedy\LaravelRoles\RolesServiceProvider" --tag=migrations
  8. Run php artisan vendor:publish --provider="jeremykenedy\LaravelRoles\RolesServiceProvider" --tag=seeds
  9. From the projects root folder run sudo chmod -R 755 ../laravel-auth
  10. From the projects root folder run php artisan key:generate
  11. From the projects root folder run php artisan migrate
  12. From the projects root folder run composer dump-autoload
  13. From the projects root folder run php artisan db:seed

** Note ** In order for Dropzone.js to work you will need to run

npm install

Rebuild Front End Assets with Mix

Rebuilding the front end of that project is OPTIONAL and can be done using Laravel Mix which is Elixers replacement.
  1. From the projects root folder run npm install
  2. From the projects root folder run npm run dev or npm run production
  • You can watch assets with npm run watch

Optionally Build Cache

  1. From the projects root folder run sudo php artisan config:cache
And thats it with the caveat of setting up and configuring your development environment. I recommend Laravel Homestead

Seeds

  1. Seeded Roles
  • Unverified - Level 0
  • User - Level 1
  • Administrator - Level 5
  1. Seeded Permissions
  • view.users
  • create.users
  • edit.users
  • delete.users
  1. Seeded Users
Email Password Access
[email protected] password User Access
[email protected] password Admin Access
  1. Themes Seed List

Routes

Authentication Routes

  • /login
  • /logout
  • /register
  • /password/email
  • /password/reset
  • /activate
  • /activate/{token}
  • /activation-required
  • /re-activate/{token}

Profile Routes

  • /profile/{username}
  • /profile/{username}/edit <- Editing in this view is limited to current user only.

Admin User Management Routes

  • /users
  • /users/create
  • /users/{user_id}
  • /users{user_id}/edit

Admin Theme Routes

  • /themes
  • /themes/create
  • /themes/{theme_id}
  • /themes/{theme_id}/edit

Admin Tools Routes

  • /logs
  • /php
  • /routes

Admin Soft Deleted Users Management Routes

  • /users/deleted
  • /users/deleted/{user_id}

Socialite

Get Socialite Login API Keys:

Add More Socialite Logins

Steps:
  1. Go to http://socialiteproviders.github.io and select the provider to be added.

  2. From the projects root folder in terminal run composer command to get the needed package.

    • Example:
       composer require socialiteproviders/twitch
    
  3. From the projects root folder run composer update

  4. Add the service provider to /app/services.php

    • Example:
       'twitch' => [
           'client_id'   => env('TWITCH_KEY'),
           'client_secret' => env('TWITCH_SECRET'),
           'redirect'    => env('TWITCH_REDIRECT_URI'),
       ],
    
  5. Add the API credentials to /.env

    • Example:
       TWITCH_KEY=YOURKEYHERE
       TWITCH_SECRET=YOURSECRETHERE
       TWITCH_REDIRECT_URI=http://YOURWEBSITEURL.COM/social/handle/twitch
    
  6. Add the social media login link:

    • Example: In file /resources/views/auth/login.blade.php add ONE of the following:
      • Conventional HTML:
       <a href="{{ route('social.redirect', ['provider' => 'twitch']) }}" class="btn btn-lg btn-primary btn-block twitch">Twitch</a>
    
    * Use Laravel HTML Facade with [Laravel Collective](https://laravelcollective.com/) (recommended)
    
       {!! HTML::link(route('social.redirect', ['provider' => 'twitch']), 'Twitch', array('class' => 'btn btn-lg btn-primary btn-block twitch')) !!}
    

Other API keys

Environment File

Example .env file:


APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravelAuth
DB_USERNAME=homestead
DB_PASSWORD=secret

BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

MAIL_FROM_ADDRESS=
MAIL_FROM_NAME=''

EMAIL_EXCEPTION_ENABLED=false
EMAIL_EXCEPTION_FROM=email#email.com
EMAIL_EXCEPTION_TO='[email protected], [email protected]'
EMAIL_EXCEPTION_CC=''
EMAIL_EXCEPTION_BCC=''
EMAIL_EXCEPTION_SUBJECT=''

ACTIVATION=true
ACTIVATION_LIMIT_TIME_PERIOD=24
ACTIVATION_LIMIT_MAX_ATTEMPTS=3

NULL_IP_ADDRESS=0.0.0.0

DEBUG_BAR_ENVIRONMENT=local

USER_RESTORE_CUTOFF_DAYS=31
USER_RESTORE_ENCRYPTION_KEY=

DEFAULT_GRAVATAR_SIZE=80
DEFAULT_GRAVATAR_FALLBACK=http://c1940652.r52.cf0.rackcdn.com/51ce28d0fb4f442061000000/Screen-Shot-2013-06-28-at-5.22.23-PM.png
DEFAULT_GRAVATAR_SECURE=false
DEFAULT_GRAVATAR_MAX_RATING=g
DEFAULT_GRAVATAR_FORCE_DEFAULT=false
DEFAULT_GRAVATAR_FORCE_EXTENSION=jpg

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=

// NOTE: YOU CAN REMOVE THE KEY CALL IN app.blade.php IF YOU GET A POP UP AND DO NOT WANT TO SETUP A KEY FOR DEV
# Google Maps API v3 Key - https://developers.google.com/maps/documentation/javascript/get-api-key#get-an-api-key
GOOGLEMAPS_API_KEY=YOURGOOGLEMAPSkeyHERE

# https://console.developers.google.com/ - NEED OAUTH CREDS
GOOGLE_ID=YOURGOOGLEPLUSidHERE
GOOGLE_SECRET=YOURGOOGLEPLUSsecretHERE
GOOGLE_REDIRECT=http://yourwebsiteURLhere.com/social/handle/google

# https://www.google.com/recaptcha/admin#list
ENABLE_RECAPTCHA=false
RE_CAP_SITE=YOURGOOGLECAPTCHAsitekeyHERE
RE_CAP_SECRET=YOURGOOGLECAPTCHAsecretHERE

# https://developers.facebook.com/
FB_ID=YOURFACEBOOKidHERE
FB_SECRET=YOURFACEBOOKsecretHERE
FB_REDIRECT=http://yourwebsiteURLhere.com/social/handle/facebook

# https://apps.twitter.com/
TW_ID=YOURTWITTERidHERE
TW_SECRET=YOURTWITTERkeyHERE
TW_REDIRECT=http://yourwebsiteURLhere.com/social/handle/twitter

# https://github.com/settings/applications/new
GITHUB_ID=YOURIDHERE
GITHUB_SECRET=YOURSECRETHERE
GITHUB_URL=https://larablog.io/social/handle/github

# https://developers.google.com/youtube/v3/getting-started
YOUTUBE_KEY=YOURKEYHERE
YOUTUBE_SECRET=YOURSECRETHERE
YOUTUBE_REDIRECT_URI=https://larablog.io/social/handle/youtube

# http://www.twitch.tv/kraken/oauth2/clients/new
TWITCH_KEY=YOURKEYHERE
TWITCH_SECRET=YOURSECRETHERE
TWITCH_REDIRECT_URI=http://laravel-auth.local/social/handle/twitch

# https://instagram.com/developer/register/
INSTAGRAM_KEY=YOURKEYHERE
INSTAGRAM_SECRET=YOURSECRETHERE
INSTAGRAM_REDIRECT_URI=http://laravel-auth.local/social/handle/instagram

# https://basecamp.com/
# https://github.com/basecamp/basecamp-classic-api
37SIGNALS_KEY=YOURKEYHERE
37SIGNALS_SECRET=YOURSECRETHERE
37SIGNALS_REDIRECT_URI=http://laravel-auth.local/social/handle/37signals

Laravel Developement Packages Used References

Updates:
  • Update to Laravel 5.5
  • Added User Delete with Goodbye email
  • Added User Restore Deleted Account from email with secure token
  • Added Soft Deletes and Soft Deletes Management panel
  • Added User Account Settings to Profile Edit
  • Added User Change Password to Profile Edit
  • Added User Delete Account to Profile Edit
  • Added Password Strength Meter
  • Added hideShowPassword
  • Added Admin Routing Details
  • Admin PHP Information
  • Added Robust Laravel Logging with admin UI using MonoLog
  • Added Active Nav states using Laravel Requests
  • Added Laravel Debugger with Service Provider to manage status in .env file.
  • Updated Capture IP not found IP address
  • Added User Avatar Image AJAX Upload with Dropzone.js
  • Added User Gravatar using Gravatar API
  • Added Themes Management.
  • Add user profiles with seeded list and global view
  • Major overhaul on Laravel 5.4
  • Update from Laravel 5.1 to 5.2
  • Added eloquent editable user profile
  • Added IP Capture
  • Added Google Maps API v3 for User Location lookup
  • Added Google Maps API v3 for User Location Input Geocoding
  • Added Google Maps API v3 for User Location Map with Options
  • Added CRUD(Create, Read, Update, Delete) User Management
  • Added Configurable Email Notification using Laravel-Exception-Notifier

Screenshots

Login Register Registration Confirmation Registration Email Registration Complete Intial User Profile Edit User Profile Find Location Using Google Maps API v3 Profile Updated Profile Semi-completed Admin Panel Users List Admin Panel Delete User Admin Panel Flash Error Admin Panel Show User Admin Panel Edit User Admin Panel Save Edits Admin Panel Create User

File Tree

laravel-auth
├── .env.example
├── .env.travis
├── .gitattributes
├── .gitignore
├── .travis.yml
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── app
│   ├── Console
│   │   ├── Commands
│   │   │   └── DeleteExpiredActivations.php
│   │   └── Kernel.php
│   ├── Exceptions
│   │   └── Handler.php
│   ├── Http
│   │   ├── Controllers
│   │   │   ├── AdminDetailsController.php
│   │   │   ├── Auth
│   │   │   │   ├── ActivateController.php
│   │   │   │   ├── ForgotPasswordController.php
│   │   │   │   ├── LoginController.php
│   │   │   │   ├── RegisterController.php
│   │   │   │   ├── ResetPasswordController.php
│   │   │   │   └── SocialController.php
│   │   │   ├── Controller.php
│   │   │   ├── ProfilesController.php
│   │   │   ├── RestoreUserController.php
│   │   │   ├── SoftDeletesController.php
│   │   │   ├── ThemesManagementController.php
│   │   │   ├── UserController.php
│   │   │   ├── UsersManagementController.php
│   │   │   └── WelcomeController.php
│   │   ├── Kernel.php
│   │   ├── Middleware
│   │   │   ├── Authenticate.php
│   │   │   ├── CheckCurrentUser.php
│   │   │   ├── CheckIsUserActivated.php
│   │   │   ├── EncryptCookies.php
│   │   │   ├── RedirectIfAuthenticated.php
│   │   │   ├── TrimStrings.php
│   │   │   └── VerifyCsrfToken.php
│   │   └── ViewComposers
│   │       └── ThemeComposer.php
│   ├── Logic
│   │   ├── Activation
│   │   │   └── ActivationRepository.php
│   │   └── Macros
│   │       └── HtmlMacros.php
│   ├── Mail
│   │   └── ExceptionOccured.php
│   ├── Models
│   │   ├── Activation.php
│   │   ├── Profile.php
│   │   ├── Social.php
│   │   ├── Theme.php
│   │   └── User.php
│   ├── Notifications
│   │   ├── SendActivationEmail.php
│   │   └── SendGoodbyeEmail.php
│   ├── Providers
│   │   ├── AppServiceProvider.php
│   │   ├── AuthServiceProvider.php
│   │   ├── BroadcastServiceProvider.php
│   │   ├── ComposerServiceProvider.php
│   │   ├── EventServiceProvider.php
│   │   ├── LocalEnvironmentServiceProvider.php
│   │   ├── MacroServiceProvider.php
│   │   └── RouteServiceProvider.php
│   └── Traits
│       ├── ActivationTrait.php
│       ├── CaptchaTrait.php
│       └── CaptureIpTrait.php
├── artisan
├── bootstrap
│   ├── app.php
│   ├── autoload.php
│   └── cache
│       └── .gitignore
├── composer.json
├── config
│   ├── app.php
│   ├── auth.php
│   ├── broadcasting.php
│   ├── cache.php
│   ├── database.php
│   ├── debugbar.php
│   ├── exceptions.php
│   ├── filesystems.php
│   ├── gravatar.php
│   ├── mail.php
│   ├── queue.php
│   ├── roles.php
│   ├── services.php
│   ├── session.php
│   ├── settings.php
│   └── view.php
├── database
│   ├── .gitignore
│   ├── factories
│   │   └── ModelFactory.php
│   ├── migrations
│   │   ├── 2014_10_12_000000_create_users_table.php
│   │   ├── 2014_10_12_100000_create_password_resets_table.php
│   │   ├── 2016_01_15_105324_create_roles_table.php
│   │   ├── 2016_01_15_114412_create_role_user_table.php
│   │   ├── 2016_01_26_115212_create_permissions_table.php
│   │   ├── 2016_01_26_115523_create_permission_role_table.php
│   │   ├── 2016_02_09_132439_create_permission_user_table.php
│   │   ├── 2017_03_09_082449_create_social_logins_table.php
│   │   ├── 2017_03_09_082526_create_activations_table.php
│   │   ├── 2017_03_20_213554_create_themes_table.php
│   │   └── 2017_03_21_042918_create_profiles_table.php
│   └── seeds
│       ├── ConnectRelationshipsSeeder.php
│       ├── DatabaseSeeder.php
│       ├── PermissionsTableSeeder.php
│       ├── RolesTableSeeder.php
│       ├── ThemesTableSeeder.php
│       └── UsersTableSeeder.php
├── license.svg
├── package.json
├── phpunit.xml
├── public
│   ├── .htaccess
│   ├── css
│   │   └── app.5c1428c07e35994073c2.css
│   ├── favicon.ico
│   ├── fonts
│   │   ├── fontawesome-webfont.eot
│   │   ├── fontawesome-webfont.svg
│   │   ├── fontawesome-webfont.ttf
│   │   ├── fontawesome-webfont.woff
│   │   ├── fontawesome-webfont.woff2
│   │   ├── glyphicons-halflings-regular.eot
│   │   ├── glyphicons-halflings-regular.svg
│   │   ├── glyphicons-halflings-regular.ttf
│   │   ├── glyphicons-halflings-regular.woff
│   │   └── glyphicons-halflings-regular.woff2
│   ├── images
│   │   ├── wink.png
│   │   └── wink.svg
│   ├── index.php
│   ├── js
│   │   └── app.0a5140ae2ab7468f1f8d.js
│   ├── mix-manifest.json
│   ├── robots.txt
│   └── web.config
├── resources
│   ├── assets
│   │   ├── js
│   │   │   ├── app.js
│   │   │   ├── bootstrap.js
│   │   │   └── components
│   │   │       └── Example.vue
│   │   └── sass
│   │       ├── _avatar.scss
│   │       ├── _badges.scss
│   │       ├── _buttons.scss
│   │       ├── _forms.scss
│   │       ├── _helpers.scss
│   │       ├── _hideShowPassword.scss
│   │       ├── _lists.scss
│   │       ├── _logs.scss
│   │       ├── _margins.scss
│   │       ├── _mixins.scss
│   │       ├── _modals.scss
│   │       ├── _panels.scss
│   │       ├── _password.scss
│   │       ├── _php-info.scss
│   │       ├── _socials.scss
│   │       ├── _typography.scss
│   │       ├── _variables.scss
│   │       ├── _wells.scss
│   │       └── app.scss
│   ├── lang
│   │   └── en
│   │       ├── auth.php
│   │       ├── emails.php
│   │       ├── forms.php
│   │       ├── modals.php
│   │       ├── pagination.php
│   │       ├── passwords.php
│   │       ├── permsandroles.php
│   │       ├── profile.php
│   │       ├── socials.php
│   │       ├── themes.php
│   │       ├── titles.php
│   │       ├── usersmanagement.php
│   │       └── validation.php
│   └── views
│       ├── auth
│       │   ├── activation.blade.php
│       │   ├── exceeded.blade.php
│       │   ├── login.blade.php
│       │   ├── passwords
│       │   │   ├── email.blade.php
│       │   │   └── reset.blade.php
│       │   └── register.blade.php
│       ├── emails
│       │   └── exception.blade.php
│       ├── errors
│       │   ├── 403.blade.php
│       │   ├── 404.blade.php
│       │   ├── 500.blade.php
│       │   └── 503.blade.php
│       ├── home.blade.php
│       ├── layouts
│       │   └── app.blade.php
│       ├── modals
│       │   ├── modal-delete.blade.php
│       │   ├── modal-form.blade.php
│       │   └── modal-save.blade.php
│       ├── pages
│       │   ├── admin
│       │   │   ├── home.blade.php
│       │   │   ├── php-details.blade.php
│       │   │   └── route-details.blade.php
│       │   ├── status.blade.php
│       │   └── user
│       │       └── home.blade.php
│       ├── panels
│       │   └── welcome-panel.blade.php
│       ├── partials
│       │   ├── errors.blade.php
│       │   ├── form-status.blade.php
│       │   ├── nav.blade.php
│       │   ├── socials-icons.blade.php
│       │   ├── socials.blade.php
│       │   ├── status-panel.blade.php
│       │   └── status.blade.php
│       ├── profiles
│       │   ├── edit.blade.php
│       │   └── show.blade.php
│       ├── scripts
│       │   ├── check-changed.blade.php
│       │   ├── datatables.blade.php
│       │   ├── delete-modal-script.blade.php
│       │   ├── form-modal-script.blade.php
│       │   ├── gmaps-address-lookup-api3.blade.php
│       │   ├── google-maps-geocode-and-map.blade.php
│       │   ├── save-modal-script.blade.php
│       │   ├── toggleStatus.blade.php
│       │   ├── tooltips.blade.php
│       │   └── user-avatar-dz.blade.php
│       ├── themesmanagement
│       │   ├── add-theme.blade.php
│       │   ├── edit-theme.blade.php
│       │   ├── show-theme.blade.php
│       │   └── show-themes.blade.php
│       ├── usersmanagement
│       │   ├── create-user.blade.php
│       │   ├── edit-user.blade.php
│       │   ├── show-deleted-user.blade.php
│       │   ├── show-deleted-users.blade.php
│       │   ├── show-user.blade.php
│       │   └── show-users.blade.php
│       └── welcome.blade.php
├── routes
│   ├── api.php
│   ├── channels.php
│   ├── console.php
│   └── web.php
├── server.php
├── webpack.mix.js
└── yarn.lock
  • Tree command can be installed using brew: brew install tree
  • File tree generated using command tree -a -I '.git|node_modules|vendor|storage|tests

Laravel Auth License

Laravel-auth is licensed under the MIT license. Enjoy!

booking-platform's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.