├── public
├── favicon.ico
├── assets
│ ├── img
│ │ ├── index.html
│ │ ├── favicon
│ │ │ ├── index.html
│ │ │ ├── favicon.ico
│ │ │ ├── favicon-16x16.png
│ │ │ ├── favicon-32x32.png
│ │ │ ├── mstile-150x150.png
│ │ │ ├── apple-touch-icon.png
│ │ │ ├── android-chrome-96x96.png
│ │ │ ├── browserconfig.xml
│ │ │ └── site.webmanifest
│ │ ├── logo.png
│ │ ├── appstore.png
│ │ ├── fb-share.png
│ │ └── googleplay.png
│ ├── index.html
│ ├── js
│ │ └── index.html
│ └── datetimepicker
│ │ └── index.html
├── robots.txt
├── vendor
│ └── livewire
│ │ └── manifest.json
└── .htaccess
├── database
├── .gitignore
├── factories
│ ├── ConversationFactory.php
│ ├── MessageFactory.php
│ ├── RatingFactory.php
│ ├── RideRequestFactory.php
│ ├── UserProfileFactory.php
│ ├── PlaceFactory.php
│ └── RideFactory.php
├── seeders
│ ├── DatabaseSeeder.php
│ ├── UserSeeder.php
│ ├── data
│ │ └── country_data.json
│ └── CountrySeeder.php
└── migrations
│ ├── 2023_03_22_150112_create_places_table.php
│ ├── 2023_03_25_181438_add_soft_deletes_to_users_table.php
│ ├── 2023_04_01_101523_add_index_to_places_table.php
│ ├── 2023_04_09_161731_create_countries_table.php
│ ├── 2023_04_20_144243_add_country_code_column_to_countries_table.php
│ ├── 2023_04_20_150744_add_time_utc_to_rides_table.php
│ ├── 2023_04_21_125443_increase_device_id_length_in_push_tokens_table.php
│ ├── 2023_05_03_172435_add_additional_phones_to_users_table.php
│ ├── 2014_10_12_100000_create_password_reset_tokens_table.php
│ ├── 2023_04_22_181338_add_accepting_package_column_to_rides_table.php
│ ├── 2023_04_02_132504_remove_index_and_add_unique_key_to_places_table.php
│ ├── 2023_04_17_132710_add_phone_number_public_field_in_users_table.php
│ ├── 2023_04_17_180308_add_is_phone_number_verified_column_in_users_table.php
│ ├── 2023_04_05_124108_add_pending_requests_count_to_user_profiles_table.php
│ ├── 2019_08_19_000000_create_failed_jobs_table.php
│ ├── 2023_04_23_102759_add_country_id_to_rides_table.php
│ ├── 2023_03_22_164146_create_sessions_table.php
│ ├── 2023_03_23_190312_create_user_profiles_table.php
│ ├── 2023_04_23_101531_add_currency_and_locale_to_countries_table.php
│ ├── 2023_04_03_174349_create_jobs_table.php
│ ├── 2023_04_13_175442_create_driver_profiles_table.php
│ ├── 2019_12_14_000001_create_personal_access_tokens_table.php
│ ├── 2023_05_19_072032_create_transit_places_table.php
│ ├── 2014_10_12_000000_create_users_table.php
│ ├── 2023_04_12_124608_update_constraints_in_messages_table.php
│ ├── 2023_05_03_214325_update_driver_profiles_and_rides_table.php
│ ├── 2023_03_23_185651_create_ride_requests_table.php
│ ├── 2022_02_07_163617_create_social_logins_table.php
│ ├── 2023_05_10_134756_add_parent_id_column_to_countries_table.php
│ ├── 2023_04_09_161850_add_country_id_to_places_table.php
│ └── 2023_04_19_153406_add_cancelled_rides_columns_to_user_profiles_table.php
├── bootstrap
└── cache
│ └── .gitignore
├── storage
├── logs
│ └── .gitignore
├── app
│ ├── public
│ │ └── .gitignore
│ └── .gitignore
├── debugbar
│ └── .gitignore
└── framework
│ ├── testing
│ └── .gitignore
│ ├── views
│ └── .gitignore
│ ├── cache
│ ├── data
│ │ └── .gitignore
│ └── .gitignore
│ ├── sessions
│ └── .gitignore
│ └── .gitignore
├── resources
├── views
│ ├── components
│ │ ├── application-logo.blade.php
│ │ ├── application-mark.blade.php
│ │ ├── authentication-card-logo.blade.php
│ │ ├── ride-status.blade.php
│ │ ├── input-error.blade.php
│ │ ├── section-border.blade.php
│ │ ├── label.blade.php
│ │ ├── checkmark.blade.php
│ │ ├── checkbox.blade.php
│ │ ├── dropdown-link.blade.php
│ │ ├── input.blade.php
│ │ ├── authentication-card.blade.php
│ │ ├── section-title.blade.php
│ │ ├── danger-button.blade.php
│ │ ├── validation-errors.blade.php
│ │ ├── action-section.blade.php
│ │ ├── action-message.blade.php
│ │ ├── secondary-button.blade.php
│ │ ├── button.blade.php
│ │ ├── google-analytics.blade.php
│ │ ├── dialog-modal.blade.php
│ │ ├── nav-link.blade.php
│ │ ├── alert.blade.php
│ │ ├── switchable-team.blade.php
│ │ ├── new-messages-alert.blade.php
│ │ ├── pending-requests-alert.blade.php
│ │ ├── form-section.blade.php
│ │ ├── responsive-nav-link.blade.php
│ │ └── toastr.blade.php
│ ├── errors
│ │ ├── 404.blade.php
│ │ ├── 419.blade.php
│ │ └── 500.blade.php
│ ├── ride
│ │ ├── search
│ │ │ ├── public_list.blade.php
│ │ │ ├── private_list.blade.php
│ │ │ └── components
│ │ │ │ └── request-ride-form.blade.php
│ │ └── my-rides
│ │ │ ├── components
│ │ │ └── delete-form.blade.php
│ │ │ └── list.blade.php
│ ├── emails
│ │ ├── default_mail.blade.php
│ │ └── team-invitation.blade.php
│ ├── api
│ │ └── index.blade.php
│ ├── auth
│ │ ├── components
│ │ │ └── facebook-btn.blade.php
│ │ └── confirm-password.blade.php
│ ├── driver-profiles
│ │ └── components
│ │ │ └── smoking-animals.blade.php
│ ├── rating
│ │ └── components
│ │ │ ├── stars-rating.blade.php
│ │ │ └── rating-between-users.blade.php
│ ├── policy.blade.php
│ ├── terms.blade.php
│ ├── dashboard.blade.php
│ ├── layouts
│ │ └── components
│ │ │ └── custom-modal-content.blade.php
│ └── ride-requests
│ │ └── my-requests
│ │ └── components
│ │ ├── cancel-form.blade.php
│ │ ├── accept-form.blade.php
│ │ └── reject-form.blade.php
├── css
│ └── app.css
└── js
│ └── app.js
├── postcss.config.js
├── config
├── staging.php
├── server.php
├── ride.php
├── firebase.php
├── cors.php
└── view.php
├── app
├── Enum
│ ├── CoreEnum.php
│ └── TimeEnum.php
├── Source
│ ├── User
│ │ ├── Enum
│ │ │ └── PhoneNumberEnum.php
│ │ ├── App
│ │ │ └── Controllers
│ │ │ │ └── UserController.php
│ │ ├── Infra
│ │ │ └── UpdateUserProfile
│ │ │ │ └── Services
│ │ │ │ └── SaveAdditionalPhonesService.php
│ │ └── Domain
│ │ │ ├── UpdateProfilePhoto
│ │ │ └── UpdateProfilePhotoLogic.php
│ │ │ ├── UpdateUserProfile
│ │ │ └── UpdateUserProfileLogic.php
│ │ │ └── DeleteUser
│ │ │ └── DeleteUserLogic.php
│ ├── DriverProfile
│ │ ├── Enum
│ │ │ └── DriverCarEnum.php
│ │ ├── Infra
│ │ │ └── SaveDriverProfile
│ │ │ │ └── Services
│ │ │ │ └── SaveDriverProfileService.php
│ │ └── Domain
│ │ │ └── SaveDriverProfile
│ │ │ └── SaveDriverProfileLogic.php
│ ├── Localization
│ │ └── Domain
│ │ │ └── Enum
│ │ │ └── LocaleEnum.php
│ ├── SystemCommunication
│ │ ├── Base
│ │ │ └── Infra
│ │ │ │ ├── Value
│ │ │ │ └── SystemCommunicationValueInterface.php
│ │ │ │ ├── Exceptions
│ │ │ │ └── SystemCommunicationTypeNotSupportedException.php
│ │ │ │ ├── Services
│ │ │ │ └── SendSystemCommunicationInterface.php
│ │ │ │ └── Events
│ │ │ │ └── SystemCommunicationEvent.php
│ │ ├── Socket
│ │ │ └── Infra
│ │ │ │ └── Value
│ │ │ │ ├── SocketSystemCommunicationValueInterface.php
│ │ │ │ └── SocketChatMessageSystemCommunicationValue.php
│ │ ├── Email
│ │ │ └── Infra
│ │ │ │ ├── Value
│ │ │ │ ├── FromValue.php
│ │ │ │ └── ViewDataValue.php
│ │ │ │ └── Services
│ │ │ │ └── GetAdminEmailsService.php
│ │ └── PushNotification
│ │ │ └── Infra
│ │ │ ├── Services
│ │ │ ├── UpdatePushTokenDataService.php
│ │ │ └── GetPushTokensService.php
│ │ │ ├── Value
│ │ │ └── PushNotificationValueInterface.php
│ │ │ └── Builder
│ │ │ └── AndroidPushMessageBuilder.php
│ ├── Auth
│ │ ├── Domain
│ │ │ ├── Enum
│ │ │ │ └── PhoneVerificationEnum.php
│ │ │ ├── Register
│ │ │ │ └── RegisterLogic.php
│ │ │ ├── SocialLoginScopes
│ │ │ │ └── SocialLoginScopesLogic.php
│ │ │ └── VerifyPhoneNumber
│ │ │ │ └── LogVerificationErrorLogic.php
│ │ ├── Infra
│ │ │ ├── SocialLogin
│ │ │ │ └── Services
│ │ │ │ │ └── GetSocialUserService.php
│ │ │ └── VerifyPhoneNumber
│ │ │ │ └── Services
│ │ │ │ └── VerifyPhoneService.php
│ │ └── App
│ │ │ ├── Requests
│ │ │ ├── VerifyEmailRequest.php
│ │ │ ├── VerifyPhoneRequest.php
│ │ │ └── SocialDriverRequest.php
│ │ │ └── Controllers
│ │ │ └── VerifyEmailController.php
│ ├── RideRequest
│ │ ├── Enum
│ │ │ └── RideRequestEnum.php
│ │ ├── Infra
│ │ │ ├── RequestRide
│ │ │ │ ├── Specifications
│ │ │ │ │ └── IsRideRequestedSpecification.php
│ │ │ │ └── Services
│ │ │ │ │ └── SaveRideRequestService.php
│ │ │ ├── RideRequests
│ │ │ │ └── Services
│ │ │ │ │ └── GetRideRequestsService.php
│ │ │ ├── AcceptOrReject
│ │ │ │ └── Services
│ │ │ │ │ ├── CreateRatingService.php
│ │ │ │ │ └── ChangeStatusService.php
│ │ │ ├── CancelRide
│ │ │ │ └── Specifications
│ │ │ │ │ ├── CanCancelRideSpecification.php
│ │ │ │ │ └── IsLateCancellationSpecification.php
│ │ │ └── Common
│ │ │ │ └── Services
│ │ │ │ └── UpdatePendingRequestsCountService.php
│ │ └── App
│ │ │ └── Requests
│ │ │ ├── CancelRideRequest.php
│ │ │ └── AcceptOrRejectRideRequest.php
│ ├── Staging
│ │ └── StagingHelper.php
│ ├── Ride
│ │ ├── Enum
│ │ │ ├── RideExtraFiltersEnum.php
│ │ │ └── RideBaseFiltersEnum.php
│ │ ├── Domain
│ │ │ ├── Traits
│ │ │ │ └── RideTimeTrait.php
│ │ │ ├── MyRides
│ │ │ │ └── MyRidesLogic.php
│ │ │ ├── UpdateRide
│ │ │ │ └── GetRideLogic.php
│ │ │ └── DeleteRide
│ │ │ │ └── DeleteRideLogic.php
│ │ ├── Infra
│ │ │ ├── DeleteRide
│ │ │ │ ├── Services
│ │ │ │ │ └── DeleteRideService.php
│ │ │ │ └── Specifications
│ │ │ │ │ └── CanDeleteSpecification.php
│ │ │ ├── UpdateRide
│ │ │ │ └── Services
│ │ │ │ │ └── GetRideService.php
│ │ │ ├── CreateRide
│ │ │ │ └── Specifications
│ │ │ │ │ └── CanCreateRideSpecification.php
│ │ │ ├── MyRides
│ │ │ │ └── Services
│ │ │ │ │ └── GetRidesByUserService.php
│ │ │ └── Common
│ │ │ │ └── Specifications
│ │ │ │ └── CanAccessRideSpecification.php
│ │ └── App
│ │ │ └── Requests
│ │ │ └── SearchRidesRequest.php
│ ├── Rating
│ │ ├── Infra
│ │ │ ├── GetRatings
│ │ │ │ └── Services
│ │ │ │ │ └── GetRatingsService.php
│ │ │ ├── SaveRating
│ │ │ │ ├── Services
│ │ │ │ │ ├── UpdateProfileRatingService.php
│ │ │ │ │ └── SaveRatingService.php
│ │ │ │ └── Specifications
│ │ │ │ │ └── CanLeaveRatingSpecification.php
│ │ │ └── UserRatings
│ │ │ │ └── Services
│ │ │ │ └── GetUserRatingsService.php
│ │ ├── Domain
│ │ │ ├── UserRatings
│ │ │ │ └── GetUserRatingsLogic.php
│ │ │ └── GetRatings
│ │ │ │ └── GetRatingsLogic.php
│ │ └── App
│ │ │ └── Requests
│ │ │ └── SaveRatingRequest.php
│ ├── Messaging
│ │ ├── Infra
│ │ │ ├── ListMessages
│ │ │ │ └── Services
│ │ │ │ │ └── GetMessagesService.php
│ │ │ ├── SendMessage
│ │ │ │ └── Services
│ │ │ │ │ └── SaveMessageService.php
│ │ │ ├── CreateConversation
│ │ │ │ └── Services
│ │ │ │ │ └── SaveConversationService.php
│ │ │ └── Common
│ │ │ │ ├── Specifications
│ │ │ │ └── CanAccessConversationSpecification.php
│ │ │ │ └── Services
│ │ │ │ └── UpdateUserProfileService.php
│ │ ├── App
│ │ │ └── Requests
│ │ │ │ ├── SendMessageRequest.php
│ │ │ │ └── CreateConversationRequest.php
│ │ └── Domain
│ │ │ └── FindConversation
│ │ │ └── FindConversationLogic.php
│ ├── ImageModification
│ │ └── Infra
│ │ │ └── ModifyImage
│ │ │ └── Services
│ │ │ └── ChangeSizeImageService.php
│ ├── Place
│ │ ├── App
│ │ │ ├── Resources
│ │ │ │ └── PlaceResource.php
│ │ │ ├── Requests
│ │ │ │ └── GetPlacesRequest.php
│ │ │ └── Controllers
│ │ │ │ └── PlaceController.php
│ │ └── Infra
│ │ │ └── SearchPlaces
│ │ │ └── Services
│ │ │ └── GetPlacesService.php
│ ├── Helper
│ │ └── Trait
│ │ │ └── RequiredParamsCheckTrait.php
│ ├── Report
│ │ └── App
│ │ │ ├── Controllers
│ │ │ └── ReportController.php
│ │ │ └── Requests
│ │ │ └── ReportUserRequest.php
│ ├── PushToken
│ │ └── App
│ │ │ ├── Controllers
│ │ │ └── PushTokenController.php
│ │ │ └── Requests
│ │ │ └── SavePushTokenRequest.php
│ ├── Public
│ │ └── App
│ │ │ ├── Controllers
│ │ │ ├── StagingController.php
│ │ │ └── ContactController.php
│ │ │ └── Requests
│ │ │ └── ContactRequest.php
│ └── Commands
│ │ ├── Messaging
│ │ └── DeleteOldMessagesCommand.php
│ │ └── Firebase
│ │ └── RemoveUsersFromFirebaseCommand.php
├── Http
│ ├── Controllers
│ │ └── Controller.php
│ └── Middleware
│ │ ├── EncryptCookies.php
│ │ ├── VerifyCsrfToken.php
│ │ ├── PreventRequestsDuringMaintenance.php
│ │ ├── TrimStrings.php
│ │ ├── TrustHosts.php
│ │ ├── Authenticate.php
│ │ ├── ValidateSignature.php
│ │ ├── EndGameMiddleware.php
│ │ ├── LogAuthMiddleware.php
│ │ ├── TrustProxies.php
│ │ ├── LocalizationMiddleware.php
│ │ └── RedirectIfAuthenticated.php
├── View
│ └── Components
│ │ ├── AppLayout.php
│ │ ├── ErrorLayout.php
│ │ ├── GuestLayout.php
│ │ └── CustomModal.php
├── Providers
│ ├── BroadcastServiceProvider.php
│ ├── AuthServiceProvider.php
│ └── JetstreamServiceProvider.php
├── Actions
│ ├── Fortify
│ │ ├── PasswordValidationRules.php
│ │ ├── ResetUserPassword.php
│ │ └── UpdateUserPassword.php
│ └── Jetstream
│ │ └── DeleteUser.php
├── Models
│ ├── User
│ │ └── AdditionalPhoneValue.php
│ └── DriverProfile
│ │ └── AdditionalCarValue.php
└── Console
│ ├── Commands
│ ├── DeleteUserCommand.php
│ └── TestPushCommand.php
│ └── Kernel.php
├── lang
├── bs
│ ├── pagination.php
│ ├── auth.php
│ └── passwords.php
├── de
│ ├── pagination.php
│ ├── auth.php
│ └── passwords.php
├── sr
│ ├── pagination.php
│ ├── auth.php
│ └── passwords.php
├── hr
│ ├── pagination.php
│ ├── auth.php
│ └── passwords.php
├── sr_Cyrl
│ ├── pagination.php
│ ├── auth.php
│ └── passwords.php
└── en
│ ├── pagination.php
│ ├── auth.php
│ └── passwords.php
├── tests
├── TestCase.php
├── Unit
│ └── ExampleTest.php
├── Feature
│ ├── ExampleTest.php
│ ├── BrowserSessionsTest.php
│ └── DeleteApiTokenTest.php
└── CreatesApplication.php
├── routes
├── web
│ ├── public
│ │ ├── ride.php
│ │ ├── staging.php
│ │ ├── auth.php
│ │ └── public.php
│ └── private
│ │ ├── user.php
│ │ ├── report.php
│ │ ├── push-token.php
│ │ ├── rating.php
│ │ ├── ride.php
│ │ ├── ride-request.php
│ │ ├── auth.php
│ │ └── messaging.php
├── channels.php
├── console.php
└── api.php
├── .gitattributes
├── .editorconfig
├── .gitignore
├── docs
├── Other.md
├── UsedComponents.md
└── Server.md
├── vite.config.js
├── package.json
├── make.sh
├── tailwind.config.js
└── README.md
/public/favicon.ico:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/assets/img/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/assets/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/assets/js/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/database/.gitignore:
--------------------------------------------------------------------------------
1 | *.sqlite*
2 |
--------------------------------------------------------------------------------
/public/assets/img/favicon/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/assets/datetimepicker/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/bootstrap/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/logs/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow:
3 |
--------------------------------------------------------------------------------
/storage/app/public/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/debugbar/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/app/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !public/
3 | !.gitignore
4 |
--------------------------------------------------------------------------------
/storage/framework/testing/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/views/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/cache/data/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/sessions/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !data/
3 | !.gitignore
4 |
--------------------------------------------------------------------------------
/public/vendor/livewire/manifest.json:
--------------------------------------------------------------------------------
1 | {"/livewire.js":"/livewire.js?id=90730a3b0e7144480175"}
--------------------------------------------------------------------------------
/public/assets/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trbsi/YugoAuto/HEAD/public/assets/img/logo.png
--------------------------------------------------------------------------------
/public/assets/img/appstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trbsi/YugoAuto/HEAD/public/assets/img/appstore.png
--------------------------------------------------------------------------------
/public/assets/img/fb-share.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trbsi/YugoAuto/HEAD/public/assets/img/fb-share.png
--------------------------------------------------------------------------------
/public/assets/img/googleplay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trbsi/YugoAuto/HEAD/public/assets/img/googleplay.png
--------------------------------------------------------------------------------
/resources/views/components/application-logo.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/resources/views/components/application-mark.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/public/assets/img/favicon/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trbsi/YugoAuto/HEAD/public/assets/img/favicon/favicon.ico
--------------------------------------------------------------------------------
/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | tailwindcss: {},
4 | autoprefixer: {},
5 | },
6 | };
7 |
--------------------------------------------------------------------------------
/public/assets/img/favicon/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trbsi/YugoAuto/HEAD/public/assets/img/favicon/favicon-16x16.png
--------------------------------------------------------------------------------
/public/assets/img/favicon/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trbsi/YugoAuto/HEAD/public/assets/img/favicon/favicon-32x32.png
--------------------------------------------------------------------------------
/public/assets/img/favicon/mstile-150x150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trbsi/YugoAuto/HEAD/public/assets/img/favicon/mstile-150x150.png
--------------------------------------------------------------------------------
/public/assets/img/favicon/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trbsi/YugoAuto/HEAD/public/assets/img/favicon/apple-touch-icon.png
--------------------------------------------------------------------------------
/resources/views/errors/404.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | 404
4 |
5 |
6 |
--------------------------------------------------------------------------------
/resources/views/errors/419.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | 419
4 |
5 |
6 |
--------------------------------------------------------------------------------
/resources/views/errors/500.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | 500
4 |
5 |
6 |
--------------------------------------------------------------------------------
/config/staging.php:
--------------------------------------------------------------------------------
1 | env('STAGING_APP_URL'),
5 | 'access_key' => env('STAGING_ACCESS_KEY')
6 | ];
7 |
--------------------------------------------------------------------------------
/public/assets/img/favicon/android-chrome-96x96.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trbsi/YugoAuto/HEAD/public/assets/img/favicon/android-chrome-96x96.png
--------------------------------------------------------------------------------
/resources/views/components/authentication-card-logo.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app/Enum/CoreEnum.php:
--------------------------------------------------------------------------------
1 | 'Naprijed »',
7 | 'previous' => '« Nazad',
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/de/pagination.php:
--------------------------------------------------------------------------------
1 | 'Weiter »',
7 | 'previous' => '« Zurück',
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/sr/pagination.php:
--------------------------------------------------------------------------------
1 | 'Napred »',
7 | 'previous' => '« Nazad',
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/hr/pagination.php:
--------------------------------------------------------------------------------
1 | 'Sljedeća »',
7 | 'previous' => '« Prethodna',
8 | ];
9 |
--------------------------------------------------------------------------------
/lang/sr_Cyrl/pagination.php:
--------------------------------------------------------------------------------
1 | 'Напред »',
7 | 'previous' => '« Назад',
8 | ];
9 |
--------------------------------------------------------------------------------
/resources/css/app.css:
--------------------------------------------------------------------------------
1 | @import "custom.css";
2 | @import "token_input/token-input-facebook.css";
3 |
4 | @tailwind base;
5 | @tailwind components;
6 | @tailwind utilities;
7 |
--------------------------------------------------------------------------------
/app/Source/User/Enum/PhoneNumberEnum.php:
--------------------------------------------------------------------------------
1 | [
5 | 'api_key' => env('RUNCLOUD_API_KEY'),
6 | 'api_secret' => env('RUNCLOUD_API_SECRET')
7 | ]
8 | ];
9 |
--------------------------------------------------------------------------------
/storage/framework/.gitignore:
--------------------------------------------------------------------------------
1 | compiled.php
2 | config.php
3 | down
4 | events.scanned.php
5 | maintenance.php
6 | routes.php
7 | routes.scanned.php
8 | schedule-*
9 | services.json
10 |
--------------------------------------------------------------------------------
/app/Source/Localization/Domain/Enum/LocaleEnum.php:
--------------------------------------------------------------------------------
1 |
3 | {{__('Ride request status')}}: {{__($status)}}
4 |
5 |
--------------------------------------------------------------------------------
/resources/views/components/input-error.blade.php:
--------------------------------------------------------------------------------
1 | @props(['for'])
2 |
3 | @error($for)
4 |
merge(['class' => 'text-sm text-red-600 dark:text-red-400']) }}>{{ $message }}
5 | @enderror
6 |
--------------------------------------------------------------------------------
/resources/views/components/section-border.blade.php:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/resources/views/components/label.blade.php:
--------------------------------------------------------------------------------
1 | @props(['value'])
2 |
3 | merge(['class' => 'block font-medium text-sm text-gray-700 dark:text-gray-300']) }}>
4 | {{ $value ?? $slot }}
5 |
6 |
--------------------------------------------------------------------------------
/tests/TestCase.php:
--------------------------------------------------------------------------------
1 | group(function () {
6 | Route::get('search', [RideController::class, 'search'])->name('ride.search');
7 | });
8 |
--------------------------------------------------------------------------------
/config/ride.php:
--------------------------------------------------------------------------------
1 | (int)env('CANCEL_RIDE_THRESHOLD_IN_HOURS', 2),
6 | ];
7 |
--------------------------------------------------------------------------------
/resources/views/components/checkmark.blade.php:
--------------------------------------------------------------------------------
1 | @if($type === 'tick')
2 |
3 | @else
4 |
5 | @endif
6 |
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/app/Source/SystemCommunication/Base/Infra/Value/SystemCommunicationValueInterface.php:
--------------------------------------------------------------------------------
1 | group(function () {
6 | Route::get('setcookie', [StagingController::class, 'setCookie'])->name('staging.setcookie');
7 | });
8 |
--------------------------------------------------------------------------------
/routes/web/private/user.php:
--------------------------------------------------------------------------------
1 | group(function () {
7 | Route::get('/{id}', [UserController::class, 'show'])->name('user.show');
8 | });
9 |
--------------------------------------------------------------------------------
/app/Source/SystemCommunication/Socket/Infra/Value/SocketSystemCommunicationValueInterface.php:
--------------------------------------------------------------------------------
1 | merge(['class' => 'rounded dark:bg-gray-900 border-gray-300 dark:border-gray-700 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:focus:ring-indigo-600 dark:focus:ring-offset-gray-800']) !!}>
2 |
--------------------------------------------------------------------------------
/lang/sr/auth.php:
--------------------------------------------------------------------------------
1 | 'Podaci ne odgovaraju ni jednom nalogu.',
7 | 'password' => 'Pogrešna lozinka',
8 | 'throttle' => 'Previše neuspelih pokušaja. Pokušajte ponovo za :seconds sekundi.',
9 | ];
10 |
--------------------------------------------------------------------------------
/routes/web/private/report.php:
--------------------------------------------------------------------------------
1 | group(function () {
7 | Route::post('', [ReportController::class, 'report'])->name('report.user');
8 | });
9 |
--------------------------------------------------------------------------------
/lang/sr_Cyrl/auth.php:
--------------------------------------------------------------------------------
1 | 'Подаци не одговарају ни једном налогу.',
7 | 'password' => 'Погрешна лозинка',
8 | 'throttle' => 'Превише неуспелих покушаја. Покушајте поново за :seconds секунди.',
9 | ];
10 |
--------------------------------------------------------------------------------
/lang/bs/auth.php:
--------------------------------------------------------------------------------
1 | 'Ovi podaci se ne podudaraju s našim zapisima.',
7 | 'password' => 'Lozinka nije tačna.',
8 | 'throttle' => 'Previše neuspjelih pokušaja. Pokušajte ponovo za :seconds sekundi.',
9 | ];
10 |
--------------------------------------------------------------------------------
/lang/hr/auth.php:
--------------------------------------------------------------------------------
1 | 'Ovi podaci ne odgovaraju našima.',
7 | 'password' => 'Lozinka je pogrešna.',
8 | 'throttle' => 'Previše pokušaja prijave. Molim Vas pokušajte ponovno za :seconds sekundi.',
9 | ];
10 |
--------------------------------------------------------------------------------
/routes/web/private/push-token.php:
--------------------------------------------------------------------------------
1 | group(function () {
7 | Route::post('', [PushTokenController::class, 'create'])->name('push-token.create');
8 | });
9 |
--------------------------------------------------------------------------------
/public/assets/img/favicon/browserconfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | #da532c
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/resources/views/components/dropdown-link.blade.php:
--------------------------------------------------------------------------------
1 | merge(['class' => 'block w-full px-4 py-2 text-left text-sm leading-5 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none focus:bg-gray-100 dark:focus:bg-gray-800 transition duration-150 ease-in-out']) }}>{{ $slot }}
2 |
--------------------------------------------------------------------------------
/resources/views/ride/search/public_list.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{ config('app.name') }}
5 |
6 |
7 | {{__('Find your ride')}}
8 |
9 |
10 | @include('ride.search.list')
11 |
12 |
--------------------------------------------------------------------------------
/resources/views/ride/search/private_list.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{ __('Search ride') }}
5 |
6 |
7 |
8 | @include('ride.search.list')
9 |
10 |
--------------------------------------------------------------------------------
/app/Source/Auth/Domain/Enum/PhoneVerificationEnum.php:
--------------------------------------------------------------------------------
1 | $buttonUrl])
8 | {{$buttonText}}
9 | @endcomponent
10 | @endif
11 |
12 | "{{ config('app.name') }}"
13 | @endcomponent
14 |
--------------------------------------------------------------------------------
/app/Source/SystemCommunication/Base/Infra/Exceptions/SystemCommunicationTypeNotSupportedException.php:
--------------------------------------------------------------------------------
1 | 'Diese Kombination aus Zugangsdaten wurde nicht in unserer Datenbank gefunden.',
7 | 'password' => 'Das Passwort ist falsch.',
8 | 'throttle' => 'Zu viele Loginversuche. Versuchen Sie es bitte in :seconds Sekunden nochmal.',
9 | ];
10 |
--------------------------------------------------------------------------------
/tests/Unit/ExampleTest.php:
--------------------------------------------------------------------------------
1 | assertTrue(true);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/resources/views/components/input.blade.php:
--------------------------------------------------------------------------------
1 | @props(['disabled' => false])
2 |
3 | merge(['class' => 'border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 rounded-md shadow-sm']) !!}>
4 |
--------------------------------------------------------------------------------
/.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 | .phpstorm.meta.php
21 |
--------------------------------------------------------------------------------
/app/Source/RideRequest/Enum/RideRequestEnum.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ $logo }}
4 |
5 |
6 |
7 | {{ $slot }}
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/View/Components/ErrorLayout.php:
--------------------------------------------------------------------------------
1 |
13 | */
14 | protected $except = [
15 | //
16 | ];
17 | }
18 |
--------------------------------------------------------------------------------
/lang/bs/passwords.php:
--------------------------------------------------------------------------------
1 | 'Lozinka je resetovana!',
7 | 'sent' => 'Poslan vam je e-mail za povrat lozinke!',
8 | 'throttled' => 'Molimo sačekajte prije ponovnog pokušaja.',
9 | 'token' => 'Ovaj token za resetovanje lozinke nije ispravan.',
10 | 'user' => 'Ne može se pronaći korisnik sa tom e-mail adresom.',
11 | ];
12 |
--------------------------------------------------------------------------------
/app/Source/Ride/Enum/RideBaseFiltersEnum.php:
--------------------------------------------------------------------------------
1 | 'Lozinka je resetovana!',
7 | 'sent' => 'Poslali smo reset link za vašu lozinku!',
8 | 'throttled' => 'Molimo sačekajte pre nego sto pokušate ponovo.',
9 | 'token' => 'Ukucana oznaka za resetovanje lozinke nije važeća.',
10 | 'user' => 'Nismo uspeli pronaći korisnika sa email adresom.',
11 | ];
12 |
--------------------------------------------------------------------------------
/app/Http/Middleware/VerifyCsrfToken.php:
--------------------------------------------------------------------------------
1 |
13 | */
14 | protected $except = [
15 | //
16 | ];
17 | }
18 |
--------------------------------------------------------------------------------
/lang/sr_Cyrl/passwords.php:
--------------------------------------------------------------------------------
1 | 'Лозинка је ресетована!',
7 | 'sent' => 'Послали смо ресет линк за вашу лозинку!',
8 | 'throttled' => 'Молимо сачекајте пре него сто покушате поново.',
9 | 'token' => 'Укуцана ознака за ресетовање лозинке није важећа.',
10 | 'user' => 'Нисмо успели пронаћи корисника са емаил адресом.',
11 | ];
12 |
--------------------------------------------------------------------------------
/resources/views/api/index.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{ __('API Tokens') }}
5 |
6 |
7 |
8 |
9 |
10 | @livewire('api.api-token-manager')
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/resources/views/auth/components/facebook-btn.blade.php:
--------------------------------------------------------------------------------
1 | @if(env('FACEBOOK_APP_ID'))
2 |
8 | @endif
9 |
--------------------------------------------------------------------------------
/resources/views/driver-profiles/components/smoking-animals.blade.php:
--------------------------------------------------------------------------------
1 | @if($type==='animals')
2 | @if($driverProfile->animalsAllowed())
3 |
4 | @else
5 |
6 | @endif
7 | @elseif($type === 'smoking')
8 | @if($driverProfile->smokingAllowed())
9 |
10 | @else
11 |
12 | @endif
13 | @endif
14 |
--------------------------------------------------------------------------------
/app/Source/SystemCommunication/Base/Infra/Services/SendSystemCommunicationInterface.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | @for($i = 1; $i <= $rating; $i++)
4 | ★
5 | @endfor
6 |
7 | @for($i = 5; $i > $rating; $i--)
8 | ★
9 | @endfor
10 |
11 |
12 | @if($comment)
13 |
14 | "{{$comment}}"
15 |
16 | @endif
17 |
--------------------------------------------------------------------------------
/docs/Other.md:
--------------------------------------------------------------------------------
1 | # Tech
2 |
3 | ## Firebase credentials
4 |
5 | 1. Open https://console.firebase.google.com/project/_/settings/serviceaccounts/adminsdk and select the project you want
6 | to generate a private key file for.
7 | 1. Click on "Manage service account permissions"
8 | 1. Under Actions column click on 3 dots and click on "Manage keys"
9 | 1. On the new page click ADD KEY > Create new key
10 | 1. Securely store the JSON file containing the key.
11 |
12 |
--------------------------------------------------------------------------------
/lang/hr/passwords.php:
--------------------------------------------------------------------------------
1 | 'Lozinka je ponovno postavljena!',
7 | 'sent' => 'E-mail sa poveznicom za ponovno postavljanje lozinke je poslan!',
8 | 'throttled' => 'Molimo pričekajte prije ponovnog pokušaja!',
9 | 'token' => 'Oznaka za ponovno postavljanje lozinke više nije važeća.',
10 | 'user' => 'Korisnik s navedenom e-mail adresom nije pronađen.',
11 | ];
12 |
--------------------------------------------------------------------------------
/resources/views/components/section-title.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
{{ $title }}
4 |
5 |
6 | {{ $description }}
7 |
8 |
9 |
10 |
11 | {{ $aside ?? '' }}
12 |
13 |
14 |
--------------------------------------------------------------------------------
/tests/Feature/ExampleTest.php:
--------------------------------------------------------------------------------
1 | get('/');
16 |
17 | $response->assertStatus(200);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/resources/views/components/danger-button.blade.php:
--------------------------------------------------------------------------------
1 | merge(['type' => 'button', 'class' => 'inline-flex items-center justify-center px-4 py-2 bg-red-600 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-red-500 active:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800 transition ease-in-out duration-150']) }}>
2 | {{ $slot }}
3 |
4 |
--------------------------------------------------------------------------------
/app/Providers/BroadcastServiceProvider.php:
--------------------------------------------------------------------------------
1 | 'Das Passwort wurde zurückgesetzt!',
7 | 'sent' => 'Passworterinnerung wurde gesendet!',
8 | 'throttled' => 'Bitte warten Sie, bevor Sie es erneut versuchen.',
9 | 'token' => 'Der Passwort-Wiederherstellungs-Schlüssel ist ungültig oder abgelaufen.',
10 | 'user' => 'Es konnte leider kein Nutzer mit dieser E-Mail-Adresse gefunden werden.',
11 | ];
12 |
--------------------------------------------------------------------------------
/resources/views/components/validation-errors.blade.php:
--------------------------------------------------------------------------------
1 | @if ($errors->any())
2 |
3 |
{{ __('Whoops! Something went wrong.') }}
4 |
5 |
6 | @foreach ($errors->all() as $error)
7 | {{ $error }}
8 | @endforeach
9 |
10 |
11 | @endif
12 |
--------------------------------------------------------------------------------
/app/Http/Middleware/PreventRequestsDuringMaintenance.php:
--------------------------------------------------------------------------------
1 |
13 | */
14 | protected $except = [
15 | //
16 | ];
17 | }
18 |
--------------------------------------------------------------------------------
/app/Http/Middleware/TrimStrings.php:
--------------------------------------------------------------------------------
1 |
13 | */
14 | protected $except = [
15 | 'current_password',
16 | 'password',
17 | 'password_confirmation',
18 | ];
19 | }
20 |
--------------------------------------------------------------------------------
/tests/CreatesApplication.php:
--------------------------------------------------------------------------------
1 | make(Kernel::class)->bootstrap();
18 |
19 | return $app;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import laravel, { refreshPaths } from 'laravel-vite-plugin';
3 |
4 | export default defineConfig({
5 | plugins: [
6 | laravel({
7 | input: [
8 | 'resources/css/app.css',
9 | 'resources/js/app.js',
10 | ],
11 | refresh: [
12 | ...refreshPaths,
13 | 'app/Http/Livewire/**',
14 | ],
15 | }),
16 | ],
17 | });
18 |
--------------------------------------------------------------------------------
/app/Http/Middleware/TrustHosts.php:
--------------------------------------------------------------------------------
1 |
13 | */
14 | public function hosts(): array
15 | {
16 | return [
17 | $this->allSubdomainsOfApplicationUrl(),
18 | ];
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/app/Source/Rating/Infra/GetRatings/Services/GetRatingsService.php:
--------------------------------------------------------------------------------
1 | with(['driver', 'passenger'])
16 | ->get();
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/app/Source/Auth/Infra/SocialLogin/Services/GetSocialUserService.php:
--------------------------------------------------------------------------------
1 | where('provider', $provider)
15 | ->first();
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/app/Actions/Fortify/PasswordValidationRules.php:
--------------------------------------------------------------------------------
1 |
13 | */
14 | protected function passwordRules(): array
15 | {
16 | return ['required', 'string', new Password, 'confirmed'];
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/app/Http/Middleware/Authenticate.php:
--------------------------------------------------------------------------------
1 | expectsJson() ? null : route('login');
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/resources/views/components/action-section.blade.php:
--------------------------------------------------------------------------------
1 | merge(['class' => 'md:grid md:grid-cols-3 md:gap-6']) }}>
2 |
3 | {{ $title }}
4 | {{ $description }}
5 |
6 |
7 |
8 |
9 | {{ $content }}
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/routes/web/private/rating.php:
--------------------------------------------------------------------------------
1 | group(function () {
7 | Route::get('/show/{rideId}', [RatingController::class, 'showRideRatings'])->name('rating.show-for-ride');
8 | Route::get('/show-for-user/{userId}', [RatingController::class, 'showUserRatings'])->name('rating.show-for-user');
9 | Route::post('/save', [RatingController::class, 'save'])->name('rating.save');
10 | });
11 |
--------------------------------------------------------------------------------
/app/Source/RideRequest/Infra/RequestRide/Specifications/IsRideRequestedSpecification.php:
--------------------------------------------------------------------------------
1 | where('ride_id', $rideId)
15 | ->count() > 0;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/resources/views/policy.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | {!! $policy !!}
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/resources/views/terms.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | {!! $terms !!}
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/Source/User/App/Controllers/UserController.php:
--------------------------------------------------------------------------------
1 | findOrFail($id);
15 |
16 | return view(
17 | 'user.profile.profile',
18 | compact('user', 'authUserId')
19 | );
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/docs/UsedComponents.md:
--------------------------------------------------------------------------------
1 | # Used components
2 |
3 | ## Tailwindcss components
4 |
5 | https://flowbite.com/docs/components/tables/
6 |
7 | ## Auto complete
8 |
9 | Used for auto complete for cities
10 |
11 | https://jqueryui.com/autocomplete/#custom-data
12 |
13 | ## Datetime picker
14 |
15 | Used for time picker
16 |
17 | https://github.com/xdan/datetimepicker
18 |
19 | ## Cookie consent
20 |
21 | https://cookieconsent.popupsmart.com/
22 |
23 | ## Toastr
24 |
25 | Used for showing notifications
26 |
27 | https://github.com/CodeSeven/toastr
28 |
--------------------------------------------------------------------------------
/resources/views/components/action-message.blade.php:
--------------------------------------------------------------------------------
1 | @props(['on'])
2 |
3 | merge(['class' => 'text-sm text-gray-600 dark:text-gray-400']) }}>
9 | {{ $slot->isEmpty() ? 'Saved.' : $slot }}
10 |
11 |
--------------------------------------------------------------------------------
/resources/views/components/secondary-button.blade.php:
--------------------------------------------------------------------------------
1 | merge(['type' => 'button', 'class' => 'inline-flex items-center px-4 py-2 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-500 rounded-md font-semibold text-xs text-gray-700 dark:text-gray-300 uppercase tracking-widest shadow-sm hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800 disabled:opacity-25 transition ease-in-out duration-150']) }}>
2 | {{ $slot }}
3 |
4 |
--------------------------------------------------------------------------------
/resources/views/dashboard.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{ __('Dashboard') }}
5 |
6 |
7 |
8 |
15 |
16 |
--------------------------------------------------------------------------------
/app/Source/Auth/Infra/VerifyPhoneNumber/Services/VerifyPhoneService.php:
--------------------------------------------------------------------------------
1 | setIsPhoneNumberVerified(true)
18 | ->setPhoneNumber($phoneNumber)
19 | ->save();
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/database/factories/ConversationFactory.php:
--------------------------------------------------------------------------------
1 |
9 | */
10 | class ConversationFactory extends Factory
11 | {
12 | /**
13 | * Define the model's default state.
14 | *
15 | * @return array
16 | */
17 | public function definition(): array
18 | {
19 | return [
20 | //
21 | ];
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "dev": "vite",
5 | "build": "vite build"
6 | },
7 | "devDependencies": {
8 | "@alpinejs/focus": "^3.10.5",
9 | "@tailwindcss/forms": "^0.5.2",
10 | "@tailwindcss/typography": "^0.5.0",
11 | "alpinejs": "^3.0.6",
12 | "autoprefixer": "^10.4.7",
13 | "axios": "^1.1.2",
14 | "laravel-vite-plugin": "^0.7.2",
15 | "postcss": "^8.4.14",
16 | "tailwindcss": "^3.1.0",
17 | "vite": "^4.0.0"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/resources/views/ride/my-rides/components/delete-form.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/app/Source/Ride/Domain/Traits/RideTimeTrait.php:
--------------------------------------------------------------------------------
1 | value, $time, $timezones[0] ?? 'UTC');
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/app/Source/RideRequest/Infra/RideRequests/Services/GetRideRequestsService.php:
--------------------------------------------------------------------------------
1 | orderBy('id', 'DESC')
14 | ->with(['passenger.profile', 'ride'])
15 | ->paginate();
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/resources/views/components/button.blade.php:
--------------------------------------------------------------------------------
1 | merge(['type' => 'submit', 'class' => 'inline-flex items-center px-4 py-2 bg-gray-800 dark:bg-gray-200 border border-transparent rounded-md font-semibold text-xs text-white dark:text-gray-800 uppercase tracking-widest hover:bg-gray-700 dark:hover:bg-white focus:bg-gray-700 dark:focus:bg-white active:bg-gray-900 dark:active:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800 transition ease-in-out duration-150']) }}>
2 | {{ $slot }}
3 |
4 |
--------------------------------------------------------------------------------
/database/factories/MessageFactory.php:
--------------------------------------------------------------------------------
1 |
9 | */
10 | class MessageFactory extends Factory
11 | {
12 | /**
13 | * Define the model's default state.
14 | *
15 | * @return array
16 | */
17 | public function definition(): array
18 | {
19 | return [
20 | 'content' => $this->faker->realText
21 | ];
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/resources/views/components/google-analytics.blade.php:
--------------------------------------------------------------------------------
1 |
4 |
6 |
13 |
14 |
15 | */ ?>
16 |
--------------------------------------------------------------------------------
/app/Http/Middleware/ValidateSignature.php:
--------------------------------------------------------------------------------
1 |
13 | */
14 | protected $except = [
15 | // 'fbclid',
16 | // 'utm_campaign',
17 | // 'utm_content',
18 | // 'utm_medium',
19 | // 'utm_source',
20 | // 'utm_term',
21 | ];
22 | }
23 |
--------------------------------------------------------------------------------
/app/Source/Messaging/Infra/ListMessages/Services/GetMessagesService.php:
--------------------------------------------------------------------------------
1 | orderBy('id', 'desc')
16 | ->with(['sender'])
17 | ->paginate(10);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/Actions/Jetstream/DeleteUser.php:
--------------------------------------------------------------------------------
1 | deleteUserLogic->delete($user);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/app/Source/Rating/Infra/SaveRating/Services/UpdateProfileRatingService.php:
--------------------------------------------------------------------------------
1 | first();
14 | $profile
15 | ->setRatingCount($profile->getRatingCount() + 1)
16 | ->setRatingSum($profile->getRatingSum() + $rating)
17 | ->save();
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/resources/views/components/dialog-modal.blade.php:
--------------------------------------------------------------------------------
1 | @props(['id' => null, 'maxWidth' => null])
2 |
3 |
4 |
5 |
6 | {{ $title }}
7 |
8 |
9 |
10 | {{ $content }}
11 |
12 |
13 |
14 |
15 | {{ $footer }}
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/Source/Ride/Infra/DeleteRide/Services/DeleteRideService.php:
--------------------------------------------------------------------------------
1 | isActiveRide()) {
15 | $userProfile = $ride->driver->profile;
16 | $userProfile
17 | ->decreaseTotalRidesCount()
18 | ->save();
19 | }
20 |
21 | $ride->delete();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lang/en/pagination.php:
--------------------------------------------------------------------------------
1 | '« Previous',
17 | 'next' => 'Next »',
18 |
19 | ];
20 |
--------------------------------------------------------------------------------
/app/View/Components/CustomModal.php:
--------------------------------------------------------------------------------
1 | id === (int) $id;
18 | });
19 |
--------------------------------------------------------------------------------
/app/Source/Ride/Infra/UpdateRide/Services/GetRideService.php:
--------------------------------------------------------------------------------
1 | where('id', $rideId)
15 | ->with([
16 | 'fromPlace',
17 | 'toPlace',
18 | 'driver.driverProfile',
19 | 'transitPlaces',
20 | 'acceptedRideRequests'
21 | ])
22 | ->firstOrFail();
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/config/firebase.php:
--------------------------------------------------------------------------------
1 | [
5 | 'apiKey' => env('FIREBASE_WEB_API_KEY'),
6 | 'authDomain' => env('FIREBASE_WEB_AUTH_DOMAIN'),
7 | 'projectId' => env('FIREBASE_WEB_PROJECT_ID'),
8 | 'storageBucket' => env('FIREBASE_WEB_STORAGE_BUCKET'),
9 | 'messagingSenderId' => env('FIREBASE_WEB_MESSAGING_SENDER_ID'),
10 | 'appId' => env('FIREBASE_WEB_APP_ID'),
11 | ],
12 | 'phone_verification_daily_limit' => env('FIREBASE_PHONE_VERIFICATION_DAILY_LIMIT', 50),
13 | 'phone_verification_user_daily_limit' => env('FIREBASE_PHONE_VERIFICATION_USER_DAILY_LIMIT', 2),
14 | ];
15 |
--------------------------------------------------------------------------------
/database/seeders/DatabaseSeeder.php:
--------------------------------------------------------------------------------
1 | call(UserSeeder::class);
16 | $this->call(CountrySeeder::class);
17 | $this->call(PlacesSeeder::class);
18 | $this->call(RideSeeder::class);
19 | $this->call(RideRequestSeeder::class);
20 | $this->call(MessagingSeeder::class);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/app/Source/Rating/Domain/UserRatings/GetUserRatingsLogic.php:
--------------------------------------------------------------------------------
1 | getUserRatingsService->getByUser($userId);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/app/Source/Messaging/Infra/SendMessage/Services/SaveMessageService.php:
--------------------------------------------------------------------------------
1 | setSenderId($senderId)
19 | ->setConversationId($conversationId)
20 | ->setContent($content)
21 | ->save();
22 |
23 | return $model;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/app/Source/Rating/Infra/UserRatings/Services/GetUserRatingsService.php:
--------------------------------------------------------------------------------
1 | with(['driver', 'passenger'])
16 | ->where('driver_id', $userId)
17 | ->orWhere('passenger_id', $userId)
18 | ->orderBy('id', 'DESC')
19 | ->paginate();
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/app/Source/RideRequest/Infra/AcceptOrReject/Services/CreateRatingService.php:
--------------------------------------------------------------------------------
1 | setDriverId($driverId)
17 | ->setDriverRating(0)
18 | ->setPassengerId($passengerId)
19 | ->setPassengerRating(0)
20 | ->setRideId($rideId)
21 | ->save();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/app/Source/SystemCommunication/Email/Infra/Value/FromValue.php:
--------------------------------------------------------------------------------
1 | email = $email;
17 | $this->name = $name;
18 | }
19 |
20 | public function getEmail(): string
21 | {
22 | return $this->email;
23 | }
24 |
25 | public function getName(): string
26 | {
27 | return $this->name;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/database/factories/RatingFactory.php:
--------------------------------------------------------------------------------
1 |
9 | */
10 | class RatingFactory extends Factory
11 | {
12 | /**
13 | * Define the model's default state.
14 | *
15 | * @return array
16 | */
17 | public function definition(): array
18 | {
19 | return [
20 | 'driver_rating' => $this->faker->numberBetween(1, 5),
21 | 'passenger_rating' => $this->faker->numberBetween(1, 5),
22 | ];
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/Http/Middleware/EndGameMiddleware.php:
--------------------------------------------------------------------------------
1 | routeIs('endgame')) {
19 | return redirect(route('endgame'));
20 | }
21 |
22 | return $next($request);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/Source/SystemCommunication/PushNotification/Infra/Services/UpdatePushTokenDataService.php:
--------------------------------------------------------------------------------
1 | setLastPushSentAt($now)
19 | ->save();
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/app/Source/RideRequest/Infra/RequestRide/Services/SaveRideRequestService.php:
--------------------------------------------------------------------------------
1 | setRideId($rideId)
17 | ->setPassengerId($passengerId)
18 | ->setStatus(RideRequestEnum::PENDING->value)
19 | ->save();
20 |
21 | return $model;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/database/factories/RideRequestFactory.php:
--------------------------------------------------------------------------------
1 |
10 | */
11 | class RideRequestFactory extends Factory
12 | {
13 | /**
14 | * Define the model's default state.
15 | *
16 | * @return array
17 | */
18 | public function definition(): array
19 | {
20 | return [
21 | 'status' => $this->faker->randomElement(RideRequestEnum::values())
22 | ];
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/database/factories/UserProfileFactory.php:
--------------------------------------------------------------------------------
1 |
9 | */
10 | class UserProfileFactory extends Factory
11 | {
12 | /**
13 | * Define the model's default state.
14 | *
15 | * @return array
16 | */
17 | public function definition(): array
18 | {
19 | return [
20 | 'rating_sum' => $this->faker->numberBetween(1, 5),
21 | 'rating_count' => $this->faker->numberBetween(1, 5),
22 | ];
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/Source/ImageModification/Infra/ModifyImage/Services/ChangeSizeImageService.php:
--------------------------------------------------------------------------------
1 | resize(
14 | $width,
15 | $height,
16 | function ($constraint) {
17 | $constraint->aspectRatio();
18 | $constraint->upsize();
19 | }
20 | );
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/app/Source/Place/App/Resources/PlaceResource.php:
--------------------------------------------------------------------------------
1 |
15 | */
16 | public function toArray(Request $request): array
17 | {
18 | /** @var Place $place */
19 | $place = $this;
20 | return [
21 | 'value' => $place->getId(),
22 | 'label' => $place->getName()
23 | ];
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/database/factories/PlaceFactory.php:
--------------------------------------------------------------------------------
1 |
10 | */
11 | class PlaceFactory extends Factory
12 | {
13 | /**
14 | * Define the model's default state.
15 | *
16 | * @return array
17 | */
18 | public function definition(): array
19 | {
20 | return [
21 | 'name' => $this->faker->country,
22 | 'country_id' => Country::query()->inRandomOrder()->first()->getId(),
23 | ];
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/resources/views/ride/search/components/request-ride-form.blade.php:
--------------------------------------------------------------------------------
1 |
15 |
--------------------------------------------------------------------------------
/routes/console.php:
--------------------------------------------------------------------------------
1 | comment(Inspiring::quote());
19 | })->purpose('Display an inspiring quote');
20 |
--------------------------------------------------------------------------------
/app/Providers/AuthServiceProvider.php:
--------------------------------------------------------------------------------
1 |
14 | */
15 | protected $policies = [
16 | // 'App\Models\Model' => 'App\Policies\ModelPolicy',
17 | ];
18 |
19 | /**
20 | * Register any authentication / authorization services.
21 | */
22 | public function boot(): void
23 | {
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/app/Source/Helper/Trait/RequiredParamsCheckTrait.php:
--------------------------------------------------------------------------------
1 | $value) {
13 | if (isset($requiredParams[$param])) {
14 | $requiredParams[$param] = true;
15 | }
16 | }
17 |
18 | if (count(array_unique($requiredParams)) === 1) {
19 | return true;
20 | }
21 |
22 | return false;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/Source/Place/Infra/SearchPlaces/Services/GetPlacesService.php:
--------------------------------------------------------------------------------
1 | get();
15 | }
16 |
17 | public function getById(int $id): Place
18 | {
19 | return Place::findOrFail($id);
20 | }
21 |
22 | public function getByIds(array $ids): Collection
23 | {
24 | return Place::whereIn('id', $ids)->get();
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Source/Messaging/Infra/CreateConversation/Services/SaveConversationService.php:
--------------------------------------------------------------------------------
1 | setSenderId($senderId)
18 | ->setSenderRead(true)
19 | ->setRecipientId($recipientId)
20 | ->setRecipientRead(false)
21 | ->save();
22 |
23 | return $model;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/public/.htaccess:
--------------------------------------------------------------------------------
1 |
2 |
3 | Options -MultiViews -Indexes
4 |
5 |
6 | RewriteEngine On
7 |
8 | # Handle Authorization Header
9 | RewriteCond %{HTTP:Authorization} .
10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
11 |
12 | # Redirect Trailing Slashes If Not A Folder...
13 | RewriteCond %{REQUEST_FILENAME} !-d
14 | RewriteCond %{REQUEST_URI} (.+)/$
15 | RewriteRule ^ %1 [L,R=301]
16 |
17 | # Send Requests To Front Controller...
18 | RewriteCond %{REQUEST_FILENAME} !-d
19 | RewriteCond %{REQUEST_FILENAME} !-f
20 | RewriteRule ^ index.php [L]
21 |
22 |
--------------------------------------------------------------------------------
/resources/views/layouts/components/custom-modal-content.blade.php:
--------------------------------------------------------------------------------
1 | @if(!is_country_chosen())
2 |
3 |
4 | {{ __('Choose country') }}
5 |
6 |
7 |
8 | @foreach(get_available_countries() as $enName => $nativeName)
9 |
12 | @endforeach
13 |
14 |
15 |
16 | @endif
17 |
--------------------------------------------------------------------------------
/app/Models/User/AdditionalPhoneValue.php:
--------------------------------------------------------------------------------
1 | phoneNumber;
16 | }
17 |
18 | public function isVerified(): bool
19 | {
20 | return $this->isVerified;
21 | }
22 |
23 | public function toArray(): array
24 | {
25 | return [
26 | 'phoneNumber' => $this->getPhoneNumber(),
27 | 'isVerified' => $this->isVerified(),
28 | ];
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/Source/Ride/Infra/DeleteRide/Specifications/CanDeleteSpecification.php:
--------------------------------------------------------------------------------
1 | where('driver_id', $userId)
15 | ->where('id', $rideId)
16 | ->first();
17 |
18 | if ($ride === null) {
19 | return false;
20 | }
21 |
22 | if ($ride->isNonActiveRide()) {
23 | return false;
24 | }
25 |
26 | return true;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/app/Source/Ride/Domain/MyRides/MyRidesLogic.php:
--------------------------------------------------------------------------------
1 | getRidesByUserService = $getRidesByUserService;
18 | }
19 |
20 | public function get(int $userId): LengthAwarePaginator
21 | {
22 | return $this->getRidesByUserService->get($userId);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/Source/Auth/App/Requests/VerifyEmailRequest.php:
--------------------------------------------------------------------------------
1 | route('id'));
13 |
14 | if (!hash_equals((string)$user->getKey(), (string)$this->route('id'))) {
15 | return false;
16 | }
17 |
18 | if (!hash_equals(sha1($user->getEmailForVerification()), (string)$this->route('hash'))) {
19 | return false;
20 | }
21 |
22 | return true;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/make.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | target=${1:-usage}
3 |
4 | case ${target} in
5 | install)
6 | composer install --no-dev && php artisan key:generate && php artisan storage:link && php artisan migrate && npm install && npm run build && php artisan db:seed --class=PlacesSeeder;
7 | ;;
8 |
9 | install-local)
10 | composer install && php artisan key:generate && php artisan storage:link && php artisan migrate:fresh --seed && npm install && npm run build
11 | ;;
12 |
13 | ide)
14 | php artisan ide-helper:generate && php artisan ide-helper:meta && php artisan ide-helper:models && php artisan ide-helper:eloquent
15 | ;;
16 |
17 | *)
18 | echo "Choose something!"
19 | ;;
20 | esac
21 |
--------------------------------------------------------------------------------
/resources/views/rating/components/rating-between-users.blade.php:
--------------------------------------------------------------------------------
1 |
5 |
6 |
22 |
--------------------------------------------------------------------------------
/routes/web/private/ride.php:
--------------------------------------------------------------------------------
1 | group(function () {
7 | Route::get('create', [RideController::class, 'showCreate'])->name('ride.create');
8 | Route::post('save', [RideController::class, 'create'])->name('ride.save');
9 | Route::get('my', [RideController::class, 'myRides'])->name('ride.my-rides');
10 | Route::post('delete/{id}', [RideController::class, 'delete'])->name('ride.delete');
11 | Route::get('update/{id}', [RideController::class, 'showUpdate'])->name('ride.show-update');
12 | Route::post('update', [RideController::class, 'update'])->name('ride.update');
13 | });
14 |
--------------------------------------------------------------------------------
/app/Source/Auth/Domain/Register/RegisterLogic.php:
--------------------------------------------------------------------------------
1 | $input['username'],
17 | 'email' => $input['email'],
18 | 'password' => Hash::make($input['password']),
19 | ]
20 | );
21 |
22 | if (method_exists($user, 'profile')) {
23 | $user->profile()->create();
24 | }
25 |
26 | return $user;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/database/migrations/2023_03_22_150112_create_places_table.php:
--------------------------------------------------------------------------------
1 | id();
15 | $table->string('name');
16 | $table->timestamps();
17 | });
18 | }
19 |
20 | /**
21 | * Reverse the migrations.
22 | */
23 | public function down(): void
24 | {
25 | Schema::dropIfExists('places');
26 | }
27 | };
28 |
--------------------------------------------------------------------------------
/app/Source/Place/App/Requests/GetPlacesRequest.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | public function rules(): array
23 | {
24 | return [
25 | 'term' => ['required', 'min:3'],
26 | ];
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/app/Source/RideRequest/Infra/AcceptOrReject/Services/ChangeStatusService.php:
--------------------------------------------------------------------------------
1 | setStatus($status)
15 | ->save();
16 |
17 | if ($rideRequest->isAccepted()) {
18 | $userProfile = $rideRequest->passenger->profile;
19 | $userProfile
20 | ->increaseTotalRidesCount()
21 | ->save();
22 | }
23 |
24 | return $rideRequest;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/database/migrations/2023_03_25_181438_add_soft_deletes_to_users_table.php:
--------------------------------------------------------------------------------
1 | softDeletes();
15 | });
16 | }
17 |
18 | /**
19 | * Reverse the migrations.
20 | */
21 | public function down(): void
22 | {
23 | Schema::table('users', function (Blueprint $table) {
24 | $table->dropSoftDeletes();
25 | });
26 | }
27 | };
28 |
--------------------------------------------------------------------------------
/database/migrations/2023_04_01_101523_add_index_to_places_table.php:
--------------------------------------------------------------------------------
1 | index('name');
15 | });
16 | }
17 |
18 | /**
19 | * Reverse the migrations.
20 | */
21 | public function down(): void
22 | {
23 | Schema::table('places', function (Blueprint $table) {
24 | $table->dropIndex('name');
25 | });
26 | }
27 | };
28 |
--------------------------------------------------------------------------------
/tailwind.config.js:
--------------------------------------------------------------------------------
1 | const defaultTheme = require('tailwindcss/defaultTheme');
2 |
3 | /** @type {import('tailwindcss').Config} */
4 | module.exports = {
5 | darkMode: 'class',
6 |
7 | content: [
8 | './vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php',
9 | './vendor/laravel/jetstream/**/*.blade.php',
10 | './storage/framework/views/*.php',
11 | './resources/views/**/*.blade.php',
12 | ],
13 |
14 | theme: {
15 | extend: {
16 | fontFamily: {
17 | sans: ['Figtree', ...defaultTheme.fontFamily.sans],
18 | },
19 | },
20 | },
21 |
22 | plugins: [require('@tailwindcss/forms'), require('@tailwindcss/typography')],
23 | };
24 |
--------------------------------------------------------------------------------
/database/migrations/2023_04_09_161731_create_countries_table.php:
--------------------------------------------------------------------------------
1 | id();
15 | $table->string('name', 100)->unique();
16 | $table->timestamps();
17 | });
18 | }
19 |
20 | /**
21 | * Reverse the migrations.
22 | */
23 | public function down(): void
24 | {
25 | Schema::dropIfExists('countries');
26 | }
27 | };
28 |
--------------------------------------------------------------------------------
/app/Source/SystemCommunication/Email/Infra/Services/GetAdminEmailsService.php:
--------------------------------------------------------------------------------
1 | value)->get();
17 | foreach ($users as $user) {
18 | if (str_ends_with($user->getAnyEmail(), 'test.com')) {
19 | continue;
20 | }
21 | $emails[] = $user->getAnyEmail();
22 | }
23 |
24 | return $emails;*/
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/lang/en/auth.php:
--------------------------------------------------------------------------------
1 | 'These credentials do not match our records.',
17 | 'password' => 'The provided password is incorrect.',
18 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
19 |
20 | ];
21 |
--------------------------------------------------------------------------------
/tests/Feature/BrowserSessionsTest.php:
--------------------------------------------------------------------------------
1 | actingAs($user = User::factory()->create());
18 |
19 | Livewire::test(LogoutOtherBrowserSessionsForm::class)
20 | ->set('password', 'password')
21 | ->call('logoutOtherBrowserSessions')
22 | ->assertSuccessful();
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/Source/Messaging/Infra/Common/Specifications/CanAccessConversationSpecification.php:
--------------------------------------------------------------------------------
1 | where(function (Builder $query) use ($userId) {
16 | $query
17 | ->where('sender_id', $userId)
18 | ->orWhere('recipient_id', $userId);
19 | })
20 | ->count() > 0;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/database/seeders/UserSeeder.php:
--------------------------------------------------------------------------------
1 | state([
18 | 'email' => 'a@a.com',
19 | 'name' => 'Main User',
20 | ])
21 | ->has(UserProfile::factory(), 'profile')
22 | ->create();
23 |
24 | for ($i = 0; $i < 10; $i++) {
25 | User::factory()
26 | ->has(UserProfile::factory(), 'profile')
27 | ->create();
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/resources/views/ride-requests/my-requests/components/cancel-form.blade.php:
--------------------------------------------------------------------------------
1 |
5 |
17 |
--------------------------------------------------------------------------------
/docs/Server.md:
--------------------------------------------------------------------------------
1 | # Server config
2 |
3 | ## Deployment script
4 |
5 | ```
6 | git reset
7 | git checkout .
8 | git checkout master
9 | git pull --rebase
10 | composer install --no-dev
11 | php artisan migrate --force
12 | npm i
13 | npm run build
14 |
15 | php artisan optimize:clear
16 | php artisan route:cache
17 | php artisan config:cache
18 | php artisan view:cache
19 |
20 | php artisan runcloud:restart-supervisor
21 | ```
22 |
23 | ## File upload
24 |
25 | In order to be able to upload a file enable: highlight_file() and tmpfile().
26 |
27 | ## Supervisor
28 |
29 | `php artisan queue:work --sleep=3 --tries=3 --max-time=3600`
30 |
31 | ## Cron
32 |
33 | `* * * * * php artisan schedule:run > /dev/null 2>&1`
34 |
35 | OR
36 |
37 | `* * * * * php artisan schedule:run >> logcron.log`
38 |
--------------------------------------------------------------------------------
/routes/web/private/ride-request.php:
--------------------------------------------------------------------------------
1 | group(function () {
7 | Route::get('my-requests/{rideId}', [RideRequestController::class, 'myRequests'])->name(
8 | 'ride-request.my-requests'
9 | );
10 | Route::post('pending/{rideId}', [RideRequestController::class, 'sendRequest'])->name(
11 | 'ride-request.request-ride'
12 | );
13 | Route::post('cancel', [RideRequestController::class, 'cancelRequest'])->name(
14 | 'ride-request.cancel'
15 | );
16 | Route::post('accept-reject', [RideRequestController::class, 'acceptOrReject'])->name(
17 | 'ride-request.accept-reject'
18 | );
19 | });
20 |
--------------------------------------------------------------------------------
/app/Http/Middleware/LogAuthMiddleware.php:
--------------------------------------------------------------------------------
1 | user();
19 |
20 | if (!$user) {
21 | abort(403);
22 | }
23 |
24 | if ($user->getId() !== (int)config('app.log_access_user_id')) {
25 | abort(403);
26 | }
27 |
28 | return $next($request);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/Http/Middleware/TrustProxies.php:
--------------------------------------------------------------------------------
1 | |string|null
14 | */
15 | protected $proxies;
16 |
17 | /**
18 | * The headers that should be used to detect proxies.
19 | *
20 | * @var int
21 | */
22 | protected $headers =
23 | Request::HEADER_X_FORWARDED_FOR |
24 | Request::HEADER_X_FORWARDED_HOST |
25 | Request::HEADER_X_FORWARDED_PORT |
26 | Request::HEADER_X_FORWARDED_PROTO |
27 | Request::HEADER_X_FORWARDED_AWS_ELB;
28 | }
29 |
--------------------------------------------------------------------------------
/app/Source/RideRequest/App/Requests/CancelRideRequest.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | public function rules(): array
23 | {
24 | return [
25 | 'ride_request_id' => ['required', 'integer', 'exists:ride_requests,id'],
26 | ];
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/routes/web/private/auth.php:
--------------------------------------------------------------------------------
1 | group(function () {
7 | Route::get('/verify', [VerifyPhoneNumberController::class, 'showForm'])->name('phone-verification.show');
8 | Route::post('/verify/{type}', [VerifyPhoneNumberController::class, 'verifyPhoneNumber'])->name(
9 | 'phone-verification.verify-phone'
10 | );
11 | Route::post('/can-verify', [VerifyPhoneNumberController::class, 'canVerify'])->name(
12 | 'phone-verification.can-verify'
13 | );
14 | Route::post('/log-error', [VerifyPhoneNumberController::class, 'logVerificationError'])->name(
15 | 'phone-verification.log-error'
16 | );
17 | });
18 |
19 |
--------------------------------------------------------------------------------
/database/migrations/2023_04_20_144243_add_country_code_column_to_countries_table.php:
--------------------------------------------------------------------------------
1 | string('code', 2)->after('name')->default('');
15 | });
16 | }
17 |
18 | /**
19 | * Reverse the migrations.
20 | */
21 | public function down(): void
22 | {
23 | Schema::table('countries', function (Blueprint $table) {
24 | $table->dropColumn('code');
25 | });
26 | }
27 | };
28 |
--------------------------------------------------------------------------------
/database/migrations/2023_04_20_150744_add_time_utc_to_rides_table.php:
--------------------------------------------------------------------------------
1 | datetime('time_utc')->after('time')->default('1970-01-01 00:00:00');
15 | });
16 | }
17 |
18 | /**
19 | * Reverse the migrations.
20 | */
21 | public function down(): void
22 | {
23 | Schema::table('rides', function (Blueprint $table) {
24 | $table->dropColumn('time_utc');
25 | });
26 | }
27 | };
28 |
--------------------------------------------------------------------------------
/app/Source/Auth/Domain/SocialLoginScopes/SocialLoginScopesLogic.php:
--------------------------------------------------------------------------------
1 |
9 | */
10 | class RideFactory extends Factory
11 | {
12 | /**
13 | * Define the model's default state.
14 | *
15 | * @return array
16 | */
17 | public function definition(): array
18 | {
19 | return [
20 | 'description' => $this->faker->sentence,
21 | 'price' => $this->faker->numberBetween(1, 100),
22 | 'number_of_seats' => $this->faker->numberBetween(1, 3),
23 | 'currency' => 'EUR',
24 | 'is_accepting_package' => $this->faker->boolean()
25 | ];
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/database/migrations/2023_04_21_125443_increase_device_id_length_in_push_tokens_table.php:
--------------------------------------------------------------------------------
1 | string('device_id', 128)->change();
15 | });
16 | }
17 |
18 | /**
19 | * Reverse the migrations.
20 | */
21 | public function down(): void
22 | {
23 | Schema::table('push_tokens', function (Blueprint $table) {
24 | $table->string('device_id', 32)->change();
25 | });
26 | }
27 | };
28 |
--------------------------------------------------------------------------------
/resources/views/ride-requests/my-requests/components/accept-form.blade.php:
--------------------------------------------------------------------------------
1 |
6 |
18 |
--------------------------------------------------------------------------------
/database/migrations/2023_05_03_172435_add_additional_phones_to_users_table.php:
--------------------------------------------------------------------------------
1 | text('additional_phones')->after('phone_number')->nullable();
15 | });
16 | }
17 |
18 | /**
19 | * Reverse the migrations.
20 | */
21 | public function down(): void
22 | {
23 | Schema::table('users', function (Blueprint $table) {
24 | $table->dropColumn('additional_phones');
25 | });
26 | }
27 | };
28 |
--------------------------------------------------------------------------------
/app/Http/Middleware/LocalizationMiddleware.php:
--------------------------------------------------------------------------------
1 | getDriverId() === $graderId && $rating->getPassengerId() === $userToBeRatedId) {
19 | return true;
20 | }
21 |
22 | if ($rating->getDriverId() === $userToBeRatedId && $rating->getPassengerId() === $graderId) {
23 | return true;
24 | }
25 |
26 | return false;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/app/Source/Report/App/Controllers/ReportController.php:
--------------------------------------------------------------------------------
1 | report(
18 | authUserId: Auth::id(),
19 | content: $request->report_content,
20 | reportedUserId: (int)$request->reported_user_id,
21 | );
22 | $request->session()->flash('success', __('User has been reported. We will review it.'));
23 | return redirect()->back();
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php:
--------------------------------------------------------------------------------
1 | string('email')->primary();
16 | $table->string('token');
17 | $table->timestamp('created_at')->nullable();
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | */
24 | public function down(): void
25 | {
26 | Schema::dropIfExists('password_reset_tokens');
27 | }
28 | };
29 |
--------------------------------------------------------------------------------
/app/Source/SystemCommunication/Socket/Infra/Value/SocketChatMessageSystemCommunicationValue.php:
--------------------------------------------------------------------------------
1 | message = $message;
19 | }
20 |
21 | public function getMessage(): Message
22 | {
23 | return $this->message;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/app/Source/Auth/App/Controllers/VerifyEmailController.php:
--------------------------------------------------------------------------------
1 | route('id'));
16 | if ($user->hasVerifiedEmail()) {
17 | return app(VerifyEmailResponse::class);
18 | }
19 |
20 | if ($user->markEmailAsVerified()) {
21 | event(new Verified($request->user()));
22 | }
23 |
24 | return app(VerifyEmailResponse::class);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/database/migrations/2023_04_22_181338_add_accepting_package_column_to_rides_table.php:
--------------------------------------------------------------------------------
1 | boolean('is_accepting_package')->default(0)->after('description');
15 | });
16 | }
17 |
18 | /**
19 | * Reverse the migrations.
20 | */
21 | public function down(): void
22 | {
23 | Schema::table('rides', function (Blueprint $table) {
24 | $table->dropColumn('is_accepting_package');
25 | });
26 | }
27 | };
28 |
--------------------------------------------------------------------------------
/app/Source/Report/App/Requests/ReportUserRequest.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | public function rules(): array
23 | {
24 | return [
25 | 'report_content' => ['required', 'string'],
26 | 'reported_user_id' => ['required', 'integer', 'exists:users,id'],
27 | ];
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/resources/views/components/nav-link.blade.php:
--------------------------------------------------------------------------------
1 | @props(['active'])
2 |
3 | @php
4 | $classes = ($active ?? false)
5 | ? 'inline-flex items-center px-1 pt-1 border-b-2 border-indigo-400 dark:border-indigo-600 text-sm font-medium leading-5 text-gray-900 dark:text-gray-100 focus:outline-none focus:border-indigo-700 transition duration-150 ease-in-out'
6 | : 'inline-flex items-center px-1 pt-1 border-b-2 border-transparent text-sm font-medium leading-5 text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 hover:border-gray-300 dark:hover:border-gray-700 focus:outline-none focus:text-gray-700 dark:focus:text-gray-300 focus:border-gray-300 dark:focus:border-gray-700 transition duration-150 ease-in-out';
7 | @endphp
8 |
9 | merge(['class' => $classes]) }}>
10 | {{ $slot }}
11 |
12 |
--------------------------------------------------------------------------------
/app/Source/Auth/App/Requests/VerifyPhoneRequest.php:
--------------------------------------------------------------------------------
1 | ['required', 'string'],
29 | 'phone_number' => ['required', 'string', 'regex:' . CoreEnum::PHONE_REGEX->value],
30 | ];
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/lang/en/passwords.php:
--------------------------------------------------------------------------------
1 | 'Your password has been reset.',
17 | 'sent' => 'We have emailed your password reset link.',
18 | 'throttled' => 'Please wait before retrying.',
19 | 'token' => 'This password reset token is invalid.',
20 | 'user' => "We can't find a user with that email address.",
21 |
22 | ];
23 |
--------------------------------------------------------------------------------
/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/Source/User/Infra/UpdateUserProfile/Services/SaveAdditionalPhonesService.php:
--------------------------------------------------------------------------------
1 | new AdditionalPhoneValue(
15 | $phone['phoneNumber'],
16 | $phone['isVerified'] ?? false
17 | ),
18 | $input['additional_phones'] ?? []
19 | );
20 |
21 | $user
22 | ->setAdditionalPhones(new AdditionalPhonesCollection(...$phones))
23 | ->save();
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/app/Source/Messaging/App/Requests/SendMessageRequest.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | public function rules(): array
23 | {
24 | return [
25 | 'conversation_id' => ['required', 'integer', 'exists:conversations,id'],
26 | 'message_content' => ['required', 'string'],
27 | ];
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/app/Source/Ride/Infra/CreateRide/Specifications/CanCreateRideSpecification.php:
--------------------------------------------------------------------------------
1 | where('to_place_id', $toPlaceId)
20 | ->where('from_place_id', $fromPlaceId)
21 | ->whereRaw(sprintf('DATE(time) = "%s"', $creationTime->format('Y-m-d')))
22 | ->count() === 0;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/Source/Messaging/App/Requests/CreateConversationRequest.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | public function rules(): array
23 | {
24 | return [
25 | 'receiver_id' => ['required', 'integer', 'exists:users,id'],
26 | 'message_content' => ['required', 'string'],
27 | ];
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/app/Models/DriverProfile/AdditionalCarValue.php:
--------------------------------------------------------------------------------
1 | carName;
16 | }
17 |
18 | public function getCarPlate(): string
19 | {
20 | return $this->carPlate;
21 | }
22 |
23 |
24 | public function getCarNameAndPlate(): string
25 | {
26 | return sprintf('%s (%s)', $this->getCarName(), $this->getCarPlate());
27 | }
28 |
29 | public function toArray(): array
30 | {
31 | return [
32 | 'carName' => $this->getCarName(),
33 | 'carPlate' => $this->getCarPlate(),
34 | ];
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/database/migrations/2023_04_02_132504_remove_index_and_add_unique_key_to_places_table.php:
--------------------------------------------------------------------------------
1 | dropIndex('places_name_index');
15 | $table->unique('name');
16 | });
17 | }
18 |
19 | /**
20 | * Reverse the migrations.
21 | */
22 | public function down(): void
23 | {
24 | Schema::table('places', function (Blueprint $table) {
25 | $table->dropUnique('name');
26 | $table->index('name');
27 | });
28 | }
29 | };
30 |
--------------------------------------------------------------------------------
/routes/api.php:
--------------------------------------------------------------------------------
1 | get('/user', function (Request $request) {
19 | return $request->user();
20 | });
21 |
22 | Route::prefix('place')->group(function () {
23 | Route::get('search', [PlaceController::class, 'searchPlaces'])->name('api.place.search');
24 | });
25 |
--------------------------------------------------------------------------------
/app/Source/SystemCommunication/PushNotification/Infra/Value/PushNotificationValueInterface.php:
--------------------------------------------------------------------------------
1 | middleware(['signed', 'throttle:6,1'])
9 | ->name('verification.verify');
10 |
11 | //Route::get('/auth/redirect/{driver}', [SocialController::class, 'redirect'])->name('social_login.redirect');
12 | //Route::get('/auth/callback/{driver}', [SocialController::class, 'callback'])->name('social_login.callback');
13 |
14 | Route::post(RoutePath::for('register', '/register'), [RegisteredUserController::class, 'store'])
15 | ->middleware(
16 | [
17 | 'guest:' . config('fortify.guard'),
18 | 'throttle:registration-limiter'
19 | ]
20 | );
21 |
--------------------------------------------------------------------------------
/app/Source/Place/App/Controllers/PlaceController.php:
--------------------------------------------------------------------------------
1 | get($request->term);
18 | $data = [];
19 | foreach ($places as $place) {
20 | $data[] = [
21 | 'id' => $place->getId(),
22 | 'name' => $place->getName()
23 | ];
24 | }
25 |
26 | return response()->json($data);
27 | // return PlaceResource::collection($places);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/app/Source/SystemCommunication/Base/Infra/Events/SystemCommunicationEvent.php:
--------------------------------------------------------------------------------
1 | communicationValues = $communicationValues;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/app/Console/Commands/DeleteUserCommand.php:
--------------------------------------------------------------------------------
1 | argument('userId'));
31 | $deleteUserLogic->delete($user);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/database/migrations/2023_04_17_132710_add_phone_number_public_field_in_users_table.php:
--------------------------------------------------------------------------------
1 | boolean('is_phone_number_public')
15 | ->default(0)
16 | ->after('phone_number');
17 | });
18 | }
19 |
20 | /**
21 | * Reverse the migrations.
22 | */
23 | public function down(): void
24 | {
25 | Schema::table('users', function (Blueprint $table) {
26 | $table->dropColumn('is_phone_number_public');
27 | });
28 | }
29 | };
30 |
--------------------------------------------------------------------------------
/app/Source/PushToken/App/Controllers/PushTokenController.php:
--------------------------------------------------------------------------------
1 | save(
16 | userId: Auth::id(),
17 | deviceId: $request->deviceId,
18 | platform: $request->platform,
19 | token: $request->token,
20 | tokenType: $request->tokenType ?: PushToken::TOKEN_TYPE_FIREBASE
21 | );
22 | return response()->json();
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/Source/RideRequest/Infra/CancelRide/Specifications/CanCancelRideSpecification.php:
--------------------------------------------------------------------------------
1 | isNonActiveRide()) {
13 | return false;
14 | }
15 |
16 | //user is passenger
17 | if ($rideRequest->getPassengerId() === $authUserId &&
18 | ($rideRequest->isAccepted() || $rideRequest->isPending())
19 | ) {
20 | return true;
21 | }
22 |
23 | //user is driver
24 | if ($ride->getDriverId() === $authUserId) {
25 | return true;
26 | }
27 |
28 | return false;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/Source/SystemCommunication/PushNotification/Infra/Builder/AndroidPushMessageBuilder.php:
--------------------------------------------------------------------------------
1 | 'normal',
16 | 'notification' => [
17 | 'title' => $payload->getTitle(),
18 | 'body' => $payload->getBody(),
19 | 'sound' => $payload->getSoundForAndroid(),
20 | ],
21 | ];
22 |
23 | return AndroidConfig::fromArray($configArray);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/database/migrations/2023_04_17_180308_add_is_phone_number_verified_column_in_users_table.php:
--------------------------------------------------------------------------------
1 | boolean('is_phone_number_verified')
15 | ->default(0)
16 | ->after('phone_number');
17 | });
18 | }
19 |
20 | /**
21 | * Reverse the migrations.
22 | */
23 | public function down(): void
24 | {
25 | Schema::table('users', function (Blueprint $table) {
26 | $table->dropColumn('is_phone_number_verified');
27 | });
28 | }
29 | };
30 |
--------------------------------------------------------------------------------
/app/Source/Auth/Domain/VerifyPhoneNumber/LogVerificationErrorLogic.php:
--------------------------------------------------------------------------------
1 | json_decode($message, true),
25 | 'userId' => $user->getId(),
26 | 'phoneNumberFromDb' => $user->getPhoneNumber(),
27 | 'phoneNumberFromInput' => $phoneNumberFromInput
28 | ]
29 | );
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/app/Source/Auth/App/Requests/SocialDriverRequest.php:
--------------------------------------------------------------------------------
1 | 'in:' . implode(',', SocialLogin::getProviders()),
29 | ];
30 | }
31 |
32 | public function prepareForValidation()
33 | {
34 | $this->merge(['driver' => $this->route('driver')]);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/resources/views/ride/my-rides/list.blade.php:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 | {{ __('My rides') }}
9 |
10 |
11 |
12 |
13 |
14 |
15 | @if($rides !== null && $rides->isNotEmpty())
16 | @include('ride.my-rides.components.list_result')
17 | @else
18 |
{{__('No rides')}}
19 | @endif
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/database/migrations/2023_04_05_124108_add_pending_requests_count_to_user_profiles_table.php:
--------------------------------------------------------------------------------
1 | integer('pending_requests_count')
15 | ->after('unread_messages_count')
16 | ->default(0);
17 | });
18 | }
19 |
20 | /**
21 | * Reverse the migrations.
22 | */
23 | public function down(): void
24 | {
25 | Schema::table('user_profiles', function (Blueprint $table) {
26 | $table->dropColumn('pending_requests_count');
27 | });
28 | }
29 | };
30 |
--------------------------------------------------------------------------------
/resources/views/ride-requests/my-requests/components/reject-form.blade.php:
--------------------------------------------------------------------------------
1 |
6 |
21 |
--------------------------------------------------------------------------------
/app/Http/Middleware/RedirectIfAuthenticated.php:
--------------------------------------------------------------------------------
1 | check()) {
24 | return redirect(RouteServiceProvider::HOME);
25 | }
26 | }
27 |
28 | return $next($request);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/Source/Public/App/Controllers/StagingController.php:
--------------------------------------------------------------------------------
1 | get('staging_access') !== config('staging.access_key')) {
16 | abort(403);
17 | }
18 |
19 | if (Cookie::get('staging_access')) {
20 | echo 'OK';
21 | return;
22 | }
23 |
24 | $cookie = Cookie::make(
25 | 'staging_access',
26 | config('staging.access_key'),
27 | 60
28 | );
29 |
30 | return redirect(
31 | route('staging.setcookie', ['staging_access' => $request->get('staging_access')])
32 | )->withCookie($cookie);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/Source/User/Domain/UpdateProfilePhoto/UpdateProfilePhotoLogic.php:
--------------------------------------------------------------------------------
1 | modifyImageService->createImage($user->getProfilePhotoPath());
21 |
22 | $image
23 | ->resize(300, 300)
24 | ->orientate()
25 | ->getImage()
26 | ->save(
27 | Storage::disk('public')->path($user->getProfilePhotoPath()),
28 | 60
29 | );
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/app/Source/RideRequest/Infra/Common/Services/UpdatePendingRequestsCountService.php:
--------------------------------------------------------------------------------
1 | driver->profile;
13 | $driverProfile->increasePendingRequestsCount()
14 | ->save();
15 | }
16 |
17 | public function decreaseForDriver(
18 | Ride $ride
19 | ): void {
20 | $driverProfile = $ride->driver->profile;
21 | $driverProfile->decreasePendingRequestsCount()
22 | ->save();
23 | }
24 |
25 | public function setToZeroForDriver(
26 | Ride $ride
27 | ): void {
28 | $driverProfile = $ride->driver->profile;
29 | $driverProfile->setPendingRequestsCount(0)
30 | ->save();
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/resources/views/components/alert.blade.php:
--------------------------------------------------------------------------------
1 | @if($attributes['role'] === 'warning')
2 |
4 | {{$content}}
5 |
6 | @endif
7 |
8 | @if($attributes['role'] === 'info')
9 |
10 | {{$content}}
11 |
12 | @endif
13 |
14 | @if($attributes['role'] === 'danger')
15 |
16 | {{$content}}
17 |
18 | @endif
19 |
20 | @if($attributes['role'] === 'success')
21 |
23 | {{$content}}
24 |
25 | @endif
26 |
--------------------------------------------------------------------------------
/app/Source/RideRequest/App/Requests/AcceptOrRejectRideRequest.php:
--------------------------------------------------------------------------------
1 |
22 | */
23 | public function rules(): array
24 | {
25 | return [
26 | 'ride_request_id' => ['required', 'integer', 'exists:ride_requests,id'],
27 | 'status' => ['required', 'in:' . implode(',', RideRequestEnum::values())],
28 | ];
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/app/Source/User/Domain/UpdateUserProfile/UpdateUserProfileLogic.php:
--------------------------------------------------------------------------------
1 | saveUserProfileService->update(
20 | input: $input,
21 | user: $user
22 | );
23 |
24 | $this->saveAdditionalPhonesService->update(
25 | input: $input,
26 | user: $user
27 | );
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/database/migrations/2019_08_19_000000_create_failed_jobs_table.php:
--------------------------------------------------------------------------------
1 | id();
16 | $table->string('uuid')->unique();
17 | $table->text('connection');
18 | $table->text('queue');
19 | $table->longText('payload');
20 | $table->longText('exception');
21 | $table->timestamp('failed_at')->useCurrent();
22 | });
23 | }
24 |
25 | /**
26 | * Reverse the migrations.
27 | */
28 | public function down(): void
29 | {
30 | Schema::dropIfExists('failed_jobs');
31 | }
32 | };
33 |
--------------------------------------------------------------------------------
/app/Source/Ride/Domain/UpdateRide/GetRideLogic.php:
--------------------------------------------------------------------------------
1 | canAccessRideSpecification->isSatisfiedByDriver(driverId: $userId, rideId: $rideId);
23 |
24 | if (!$canAccess) {
25 | throw new Exception(__('Cannot access ride'));
26 | }
27 |
28 | return $this->getRideService->getById($rideId);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/database/migrations/2023_04_23_102759_add_country_id_to_rides_table.php:
--------------------------------------------------------------------------------
1 | foreignId('country_id')
16 | ->after('driver_id')
17 | ->default(Country::where('name', 'Croatia')->first()->getId())
18 | ->constrained('countries');
19 | });
20 | }
21 |
22 | /**
23 | * Reverse the migrations.
24 | */
25 | public function down(): void
26 | {
27 | Schema::table('rides', function (Blueprint $table) {
28 | $table->dropColumn('country_id');
29 | });
30 | }
31 | };
32 |
--------------------------------------------------------------------------------
/app/Source/Public/App/Controllers/ContactController.php:
--------------------------------------------------------------------------------
1 | sendForAuthUser(Auth::id(), $request->message);
17 | } else {
18 | $logic->sendForGuest(
19 | $request->name,
20 | $request->email,
21 | $request->message
22 | );
23 | }
24 |
25 | $request->session()->flash('success', __('Message sent'));
26 | return redirect()->back();
27 | }
28 |
29 | public function contact()
30 | {
31 | return view('public.contact');
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/database/migrations/2023_03_22_164146_create_sessions_table.php:
--------------------------------------------------------------------------------
1 | string('id')->primary();
16 | $table->foreignId('user_id')->nullable()->index();
17 | $table->string('ip_address', 45)->nullable();
18 | $table->text('user_agent')->nullable();
19 | $table->longText('payload');
20 | $table->integer('last_activity')->index();
21 | });
22 | }
23 |
24 | /**
25 | * Reverse the migrations.
26 | */
27 | public function down(): void
28 | {
29 | Schema::dropIfExists('sessions');
30 | }
31 | };
32 |
--------------------------------------------------------------------------------
/database/migrations/2023_03_23_190312_create_user_profiles_table.php:
--------------------------------------------------------------------------------
1 | id();
15 | $table->foreignId('user_id')->constrained('users');
16 | $table->integer('rating_sum')->default(0);
17 | $table->integer('rating_count')->default(0);
18 | $table->integer('unread_messages_count')->default(0);
19 | $table->timestamps();
20 | });
21 | }
22 |
23 | /**
24 | * Reverse the migrations.
25 | */
26 | public function down(): void
27 | {
28 | Schema::dropIfExists('user_profiles');
29 | }
30 | };
31 |
--------------------------------------------------------------------------------
/app/Source/Ride/App/Requests/SearchRidesRequest.php:
--------------------------------------------------------------------------------
1 |
22 | */
23 | public function rules(): array
24 | {
25 | return [
26 | 'from_place_id' => ['nullable', 'integer'],
27 | 'to_place_id' => ['nullable', 'string'],
28 | 'min_time' => ['nullable', 'date_format:' . TimeEnum::DATE_FORMAT->value],
29 | 'filter' => ['nullable', 'string']
30 | ];
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/Source/Rating/App/Requests/SaveRatingRequest.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | public function rules(): array
23 | {
24 | return [
25 | 'stars' => ['required', 'integer', 'min:1', 'max:5'],
26 | 'rating_id' => ['required', 'integer', 'exists:ratings,id'],
27 | 'comment' => ['nullable', 'string', 'max:500'],
28 | 'user_to_be_rated_id' => ['required', 'exists:users,id'],
29 | ];
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/app/Source/PushToken/App/Requests/SavePushTokenRequest.php:
--------------------------------------------------------------------------------
1 | ['required'],
29 | 'platform' => ['required', 'in:' . implode(',', [PushToken::PLATFORM_IOS, PushToken::PLATFORM_ANDROID])],
30 | 'token' => ['required'],
31 | 'tokenType' => ['nullable', 'in:' . PushToken::TOKEN_TYPE_FIREBASE],
32 | ];
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/database/migrations/2023_04_23_101531_add_currency_and_locale_to_countries_table.php:
--------------------------------------------------------------------------------
1 | string('currency', 3)
15 | ->after('code')
16 | ->default('');
17 |
18 | $table->string('locale', 2)
19 | ->after('currency')
20 | ->default('');
21 | });
22 | }
23 |
24 | /**
25 | * Reverse the migrations.
26 | */
27 | public function down(): void
28 | {
29 | Schema::table('countries', function (Blueprint $table) {
30 | $table->dropColumn(['currency', 'locale']);
31 | });
32 | }
33 | };
34 |
--------------------------------------------------------------------------------
/app/Console/Kernel.php:
--------------------------------------------------------------------------------
1 | command(RemoveUsersFromFirebaseCommand::class)->twiceDaily();
18 | $schedule->command(DeleteOldMessagesCommand::class)->daily();
19 | }
20 |
21 | /**
22 | * Register the commands for the application.
23 | */
24 | protected function commands(): void
25 | {
26 | $this->load(__DIR__ . '/Commands');
27 | $this->load(__DIR__ . '/../Source/Commands');
28 |
29 | require base_path('routes/console.php');
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/app/Source/Public/App/Requests/ContactRequest.php:
--------------------------------------------------------------------------------
1 |
22 | */
23 | public function rules(): array
24 | {
25 | $isGuest = Auth::guest();
26 |
27 | $rules = [
28 | 'message' => ['required'],
29 | ];
30 |
31 | if ($isGuest) {
32 | $rules['name'] = ['required'];
33 | $rules['email'] = ['required'];
34 | }
35 |
36 | return $rules;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/app/Source/Ride/Infra/MyRides/Services/GetRidesByUserService.php:
--------------------------------------------------------------------------------
1 | orWhereHas('rideRequests', function (Builder $query) use ($userId) {
17 | $query->where('passenger_id', $userId);
18 | })
19 | ->orderBy('time', 'desc')
20 | ->with([
21 | 'fromPlace',
22 | 'toPlace',
23 | 'driver',
24 | 'pendingRideRequests',
25 | 'rideRequestForAuthUser',
26 | 'acceptedRideRequests'
27 | ])
28 | ->paginate();
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/config/cors.php:
--------------------------------------------------------------------------------
1 | ['api/*', 'sanctum/csrf-cookie'],
19 |
20 | 'allowed_methods' => ['*'],
21 |
22 | 'allowed_origins' => ['*'],
23 |
24 | 'allowed_origins_patterns' => [],
25 |
26 | 'allowed_headers' => ['*'],
27 |
28 | 'exposed_headers' => [],
29 |
30 | 'max_age' => 0,
31 |
32 | 'supports_credentials' => false,
33 |
34 | ];
35 |
--------------------------------------------------------------------------------
/database/migrations/2023_04_03_174349_create_jobs_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
16 | $table->string('queue')->index();
17 | $table->longText('payload');
18 | $table->unsignedTinyInteger('attempts');
19 | $table->unsignedInteger('reserved_at')->nullable();
20 | $table->unsignedInteger('available_at');
21 | $table->unsignedInteger('created_at');
22 | });
23 | }
24 |
25 | /**
26 | * Reverse the migrations.
27 | */
28 | public function down(): void
29 | {
30 | Schema::dropIfExists('jobs');
31 | }
32 | };
33 |
--------------------------------------------------------------------------------
/app/Source/SystemCommunication/PushNotification/Infra/Services/GetPushTokensService.php:
--------------------------------------------------------------------------------
1 | getOtherUser($senderId)->getId())
18 | ->where('token_type', $tokenType)
19 | ->get();
20 | }
21 |
22 | public function getPushTokensByUser(int $userId, string $tokenType): Collection
23 | {
24 | return PushToken::where('user_id', $userId)
25 | ->where('token_type', $tokenType)
26 | ->get();
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/app/Source/SystemCommunication/Email/Infra/Value/ViewDataValue.php:
--------------------------------------------------------------------------------
1 | body;
19 | }
20 |
21 | public function getButtonUrl(): ?string
22 | {
23 | return $this->buttonUrl;
24 | }
25 |
26 | public function getButtonText(): ?string
27 | {
28 | return $this->buttonText;
29 | }
30 |
31 | public function toArray(): array
32 | {
33 | return [
34 | 'body' => $this->body,
35 | 'buttonUrl' => $this->buttonUrl,
36 | 'buttonText' => $this->buttonText,
37 | ];
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/app/Source/Commands/Messaging/DeleteOldMessagesCommand.php:
--------------------------------------------------------------------------------
1 | subDays((int)$this->argument('days'));
31 |
32 | Conversation::query()
33 | ->where('updated_at', '<=', $now->format('Y-m-d H:i:s'))
34 | ->delete();
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/resources/views/components/switchable-team.blade.php:
--------------------------------------------------------------------------------
1 | @props(['team', 'component' => 'dropdown-link'])
2 |
3 |
22 |
--------------------------------------------------------------------------------
/database/migrations/2023_04_13_175442_create_driver_profiles_table.php:
--------------------------------------------------------------------------------
1 | id();
15 | $table->foreignId('user_id')
16 | ->unique()
17 | ->constrained('users');
18 | $table->string('car_name', 20);
19 | $table->string('car_plate', 20);
20 | $table->boolean('animals');
21 | $table->boolean('smoking');
22 | $table->timestamps();
23 | });
24 | }
25 |
26 | /**
27 | * Reverse the migrations.
28 | */
29 | public function down(): void
30 | {
31 | Schema::dropIfExists('driver_profiles');
32 | }
33 | };
34 |
--------------------------------------------------------------------------------
/app/Source/Rating/Infra/SaveRating/Services/SaveRatingService.php:
--------------------------------------------------------------------------------
1 | getDriverId() === $graderId) {
20 | $comment = trim(sprintf('%s %s', $model->getPassengerComment(), $comment));
21 | $model
22 | ->setPassengerComment($comment)
23 | ->setPassengerRating($rating);
24 | } else {
25 | $comment = trim(sprintf('%s %s', $model->getDriverComment(), $comment));
26 | $model
27 | ->setDriverComment($comment)
28 | ->setDriverRating($rating);
29 | }
30 |
31 | $model->save();
32 | return $model;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/resources/views/emails/team-invitation.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | {{ __('You have been invited to join the :team team!', ['team' => $invitation->team->name]) }}
3 |
4 | @if (Laravel\Fortify\Features::enabled(Laravel\Fortify\Features::registration()))
5 | {{ __('If you do not have an account, you may create one by clicking the button below. After creating an account, you may click the invitation acceptance button in this email to accept the team invitation:') }}
6 |
7 | @component('mail::button', ['url' => route('register')])
8 | {{ __('Create Account') }}
9 | @endcomponent
10 |
11 | {{ __('If you already have an account, you may accept this invitation by clicking the button below:') }}
12 |
13 | @else
14 | {{ __('You may accept this invitation by clicking the button below:') }}
15 | @endif
16 |
17 |
18 | @component('mail::button', ['url' => $acceptUrl])
19 | {{ __('Accept Invitation') }}
20 | @endcomponent
21 |
22 | {{ __('If you did not expect to receive an invitation to this team, you may discard this email.') }}
23 | @endcomponent
24 |
--------------------------------------------------------------------------------
/app/Source/Messaging/Infra/Common/Services/UpdateUserProfileService.php:
--------------------------------------------------------------------------------
1 | first();
16 | $model
17 | ->setUnreadMessagesCount(1)
18 | ->save();
19 | }
20 |
21 | public function decreaseUnreadMessagesCount(
22 | Conversation $conversation,
23 | int $userId
24 | ): void {
25 | //if user already read the message, don't decrease unread messages count
26 | if ($conversation->isReadByCurrentUser()) {
27 | return;
28 | }
29 |
30 | $model = UserProfile::where('user_id', $userId)->first();
31 | $model
32 | ->setUnreadMessagesCount(0)
33 | ->save();
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/resources/views/components/new-messages-alert.blade.php:
--------------------------------------------------------------------------------
1 | @if($unreadMessages)
2 |
3 |
6 |
8 |
11 |
12 |
Info
13 |
18 |
19 |
20 | @endif
21 |
--------------------------------------------------------------------------------
/resources/views/components/pending-requests-alert.blade.php:
--------------------------------------------------------------------------------
1 | @if($pendingRequestsCount)
2 |
3 |
6 |
8 |
11 |
12 |
Info
13 |
18 |
19 |
20 | @endif
21 |
--------------------------------------------------------------------------------
/app/Source/DriverProfile/Infra/SaveDriverProfile/Services/SaveDriverProfileService.php:
--------------------------------------------------------------------------------
1 | first();
21 | if (null === $model) {
22 | $model = new DriverProfile();
23 | }
24 |
25 | $model
26 | ->setUserId($userId)
27 | ->setCarPlate($carPlate)
28 | ->setCarName($carName)
29 | ->setSmoking($smoking)
30 | ->setAnimals($animals)
31 | ->setAdditionalCars($additionalCars)
32 | ->save();
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php:
--------------------------------------------------------------------------------
1 | id();
16 | $table->morphs('tokenable');
17 | $table->string('name');
18 | $table->string('token', 64)->unique();
19 | $table->text('abilities')->nullable();
20 | $table->timestamp('last_used_at')->nullable();
21 | $table->timestamp('expires_at')->nullable();
22 | $table->timestamps();
23 | });
24 | }
25 |
26 | /**
27 | * Reverse the migrations.
28 | */
29 | public function down(): void
30 | {
31 | Schema::dropIfExists('personal_access_tokens');
32 | }
33 | };
34 |
--------------------------------------------------------------------------------
/routes/web/private/messaging.php:
--------------------------------------------------------------------------------
1 | group(function () {
8 | Route::prefix('conversation')->group(function () {
9 | Route::get('/list', [ConversationController::class, 'list'])->name('messaging.conversation.list');
10 | Route::get('/create/{userId}', [ConversationController::class, 'createForm'])->name(
11 | 'messaging.conversation.create-form'
12 | );
13 | Route::post('/create-conversation', [ConversationController::class, 'create'])->name(
14 | 'messaging.conversation.create'
15 | );
16 | });
17 |
18 | Route::prefix('message')->group(function () {
19 | Route::get('/single/{id}', [MessageController::class, 'list'])->name('messaging.message.single');
20 | Route::post('/send', [MessageController::class, 'send'])->name('messaging.message.send');
21 | });
22 | });
23 |
--------------------------------------------------------------------------------
/app/Source/DriverProfile/Domain/SaveDriverProfile/SaveDriverProfileLogic.php:
--------------------------------------------------------------------------------
1 | saveDriverProfileService->save(
26 | userId: $userId,
27 | carName: $carName,
28 | carPlate: $carPlate,
29 | animals: $animals,
30 | smoking: $smoking,
31 | additionalCars: $additionalCars
32 | );
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Project is dead
2 |
3 | Folks, this is the end of YugoAuto. It didn't last long but it was fun. Often small fish like me can't fight against big
4 | corporations like BlaBlaCar.
5 |
6 | I had the best of intentions, but without a large marketing budget this was going nowhere. People will still use
7 | Facebook groups and BlaBlaCar. That's perfectly fine. Statistics on YugoAuto are quite bad and people use YugoAuto very
8 | little.
9 |
10 | With that, I decided to shut down YugoAuto. People will be ok if they have to pay a booking fee. It was great for me, I
11 | learned a lot and I'm glad I offered something for free.
12 |
13 | Kisses to everyone ;)
14 |
15 | # About
16 |
17 | Free and open-source alternative to ride-sharing apps written in Laravel (PHP+MySQL). This is a web version.
18 |
19 | ## Live site
20 |
21 | https://yugoauto.com
22 |
23 | # Docs
24 |
25 | - [Used Components](./docs/UsedComponents.md)
26 | - [Server](./docs/Server.md)
27 | - [Other](./docs/Other.md)
28 |
29 | # Contributing
30 |
31 | Everyone is welcome to contribute to the YugoAuto.
32 |
--------------------------------------------------------------------------------
/app/Source/Commands/Firebase/RemoveUsersFromFirebaseCommand.php:
--------------------------------------------------------------------------------
1 | listUsers($defaultMaxResults = 1000, $defaultBatchSize = 1000);
30 |
31 | foreach ($users as $user) {
32 | /** @var \Kreait\Firebase\Auth\UserRecord $user */
33 | $this->info($user->phoneNumber);
34 | $auth->deleteUser($user->uid);
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/resources/views/components/form-section.blade.php:
--------------------------------------------------------------------------------
1 | @props(['submit'])
2 |
3 | merge(['class' => 'md:grid md:grid-cols-3 md:gap-6']) }}>
4 |
5 | {{ $title }}
6 | {{ $description }}
7 |
8 |
9 |
24 |
25 |
--------------------------------------------------------------------------------
/resources/views/components/responsive-nav-link.blade.php:
--------------------------------------------------------------------------------
1 | @props(['active'])
2 |
3 | @php
4 | $classes = ($active ?? false)
5 | ? 'block w-full pl-3 pr-4 py-2 border-l-4 border-indigo-400 dark:border-indigo-600 text-left text-base font-medium text-indigo-700 dark:text-indigo-300 bg-indigo-50 dark:bg-indigo-900/50 focus:outline-none focus:text-indigo-800 dark:focus:text-indigo-200 focus:bg-indigo-100 dark:focus:bg-indigo-900 focus:border-indigo-700 dark:focus:border-indigo-300 transition duration-150 ease-in-out'
6 | : 'block w-full pl-3 pr-4 py-2 border-l-4 border-transparent text-left text-base font-medium text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-700 hover:border-gray-300 dark:hover:border-gray-600 focus:outline-none focus:text-gray-800 dark:focus:text-gray-200 focus:bg-gray-50 dark:focus:bg-gray-700 focus:border-gray-300 dark:focus:border-gray-600 transition duration-150 ease-in-out';
7 | @endphp
8 |
9 | merge(['class' => $classes]) }}>
10 | {{ $slot }}
11 |
12 |
--------------------------------------------------------------------------------
/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/Providers/JetstreamServiceProvider.php:
--------------------------------------------------------------------------------
1 | configurePermissions();
25 |
26 | Jetstream::deleteUsersUsing(DeleteUser::class);
27 | }
28 |
29 | /**
30 | * Configure the permissions that are available within the application.
31 | */
32 | protected function configurePermissions(): void
33 | {
34 | Jetstream::defaultApiTokenPermissions(['read']);
35 |
36 | Jetstream::permissions([
37 | 'create',
38 | 'read',
39 | 'update',
40 | 'delete',
41 | ]);
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/database/migrations/2023_05_19_072032_create_transit_places_table.php:
--------------------------------------------------------------------------------
1 | id();
15 | $table->foreignId('ride_id')
16 | ->nullable()
17 | ->constrained('rides')
18 | ->cascadeOnUpdate()
19 | ->cascadeOnDelete();
20 | $table->foreignId('to_place_id')
21 | ->nullable()
22 | ->constrained('places')
23 | ->cascadeOnUpdate()
24 | ->cascadeOnDelete();
25 | });
26 | }
27 |
28 | /**
29 | * Reverse the migrations.
30 | */
31 | public function down(): void
32 | {
33 | Schema::dropIfExists('transit_places');
34 | }
35 | };
36 |
--------------------------------------------------------------------------------
/app/Source/Rating/Domain/GetRatings/GetRatingsLogic.php:
--------------------------------------------------------------------------------
1 | canAccessRideSpecification->isSatisfiedByDriverOrPassenger(
24 | userId: $authUserId,
25 | rideId: $rideId
26 | );
27 | if (!$canAccess) {
28 | throw new Exception(__('You cannot access this page'));
29 | }
30 |
31 | return $this->getRatingsService->get($rideId);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/Source/Messaging/Domain/FindConversation/FindConversationLogic.php:
--------------------------------------------------------------------------------
1 | findConversationService->findByUserId($userId);
21 | }
22 |
23 | public function findSingleByBetweenTwoUsers(int $userOneId, int $userTwoId): ?Conversation
24 | {
25 | return $this->findConversationService->findByBetweenTwoUsers($userOneId, $userTwoId);
26 | }
27 |
28 | public function findMultipleByUserId(int $userId): LengthAwarePaginator
29 | {
30 | return $this->findConversationService->findMultipleByUserId($userId);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/resources/views/auth/confirm-password.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{ __('This is a secure area of the application. Please confirm your password before continuing.') }}
9 |
10 |
11 |
12 |
13 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/database/migrations/2014_10_12_000000_create_users_table.php:
--------------------------------------------------------------------------------
1 | id();
15 | $table->string('name');
16 | $table->string('email')->unique();
17 | $table->string('phone_number')->unique()->nullable();
18 | $table->timestamp('email_verified_at')->nullable();
19 | $table->string('password');
20 | $table->rememberToken();
21 | $table->foreignId('current_team_id')->nullable();
22 | $table->string('profile_photo_path', 2048)->nullable();
23 | $table->timestamps();
24 | });
25 | }
26 |
27 | /**
28 | * Reverse the migrations.
29 | */
30 | public function down(): void
31 | {
32 | Schema::dropIfExists('users');
33 | }
34 | };
35 |
--------------------------------------------------------------------------------
/app/Source/RideRequest/Infra/CancelRide/Specifications/IsLateCancellationSpecification.php:
--------------------------------------------------------------------------------
1 | rideCancellationThresholdInSeconds = (int)config('ride.cancel_ride_threshold_in_hours') * 3600;
17 | }
18 |
19 | public function isSatisfied(RideRequest $rideRequest): bool
20 | {
21 | if (!$rideRequest->isAccepted()) {
22 | return false;
23 | }
24 |
25 | $ride = $rideRequest->ride;
26 | if ($ride->isNonActiveRide()) {
27 | return false;
28 | }
29 |
30 | $timeDifferenceInSeconds = $ride->getRideTimeUtc()->timestamp - Carbon::now()->timestamp;
31 | if ($timeDifferenceInSeconds <= $this->rideCancellationThresholdInSeconds) {
32 | return true;
33 | }
34 |
35 | return false;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/database/migrations/2023_04_12_124608_update_constraints_in_messages_table.php:
--------------------------------------------------------------------------------
1 | dropForeign('messages_conversation_id_foreign');
15 | $table->foreign('conversation_id')
16 | ->references('id')
17 | ->on('conversations')
18 | ->cascadeOnDelete()
19 | ->cascadeOnUpdate();
20 | });
21 | }
22 |
23 | /**
24 | * Reverse the migrations.
25 | */
26 | public function down(): void
27 | {
28 | Schema::table('messages', function (Blueprint $table) {
29 | $table->dropForeign('messages_conversation_id_foreign');
30 | $table->foreign('conversation_id')
31 | ->references('id')
32 | ->on('conversations');
33 | });
34 | }
35 | };
36 |
--------------------------------------------------------------------------------
/database/seeders/data/country_data.json:
--------------------------------------------------------------------------------
1 | {
2 | "Croatia": {
3 | "iso2": "HR",
4 | "currency": "EUR",
5 | "locale": "hr"
6 | },
7 | "Serbia": {
8 | "iso2": "RS",
9 | "currency": "RSD",
10 | "locale": "sr"
11 | },
12 | "Slovenia": {
13 | "iso2": "SI",
14 | "currency": "EUR",
15 | "locale": "sl"
16 | },
17 | "Montenegro": {
18 | "iso2": "ME",
19 | "currency": "EUR",
20 | "locale": "me"
21 | },
22 | "Bosnia and Herzegovina": {
23 | "iso2": "BE",
24 | "currency": "BAM",
25 | "locale": "bs"
26 | },
27 | "Austria": {
28 | "iso2": "AT",
29 | "currency": "EUR",
30 | "locale": "de"
31 | },
32 | "Germany": {
33 | "iso2": "DE",
34 | "currency": "EUR",
35 | "locale": "de"
36 | },
37 | "United Kingdom": {
38 | "iso2": "GB",
39 | "currency": "GBP",
40 | "locale": "en"
41 | },
42 | "Serbia_Cyrl": {
43 | "iso2": "RS",
44 | "currency": "RSD",
45 | "locale": "sr_Cyrl",
46 | "parent": "Serbia"
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/app/Console/Commands/TestPushCommand.php:
--------------------------------------------------------------------------------
1 | argument('receiverId')
36 | );
37 | SystemCommunicationEvent::dispatch($event);
38 | $this->info('Sent');
39 | return 0;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/database/migrations/2023_05_03_214325_update_driver_profiles_and_rides_table.php:
--------------------------------------------------------------------------------
1 | text('additional_cars')->after('car_plate')->nullable();
15 | });
16 |
17 | Schema::table('rides', function (Blueprint $table) {
18 | $table->string('car', 50)
19 | ->after('is_accepting_package')
20 | ->nullable();
21 | });
22 | }
23 |
24 | /**
25 | * Reverse the migrations.
26 | */
27 | public function down(): void
28 | {
29 | Schema::table('driver_profiles', function (Blueprint $table) {
30 | $table->dropColumn('additional_cars');
31 | });
32 |
33 | Schema::table('rides', function (Blueprint $table) {
34 | $table->dropColumn('car');
35 | });
36 | }
37 | };
38 |
--------------------------------------------------------------------------------
/routes/web/public/public.php:
--------------------------------------------------------------------------------
1 | name('home');
8 | Route::get('android', [PublicController::class, 'androidStore'])->name('android.store');
9 | Route::get('iphone', [PublicController::class, 'iphoneStore'])->name('iphone.store');
10 | Route::get('app', [PublicController::class, 'app'])->name('app.redirect');
11 | Route::get('open-and-redirect/{route}', [PublicController::class, 'openAndRedirect'])->name('open-and-redirect');
12 |
13 | Route::prefix('contact')->group(function () {
14 | Route::get('contact', [ContactController::class, 'contact'])->name('contact');
15 | Route::middleware('throttle:2,30')->post('send-message', [ContactController::class, 'sendMessage'])->name(
16 | 'contact.send-message'
17 | );
18 | });
19 |
20 | Route::get('localization/{country}', [PublicController::class, 'changeLocalization'])->name('change.localization');
21 | Route::get('end-game', [PublicController::class, 'endGame'])->name('endgame');
22 |
--------------------------------------------------------------------------------
/database/migrations/2023_03_23_185651_create_ride_requests_table.php:
--------------------------------------------------------------------------------
1 | id();
16 | $table->foreignId('ride_id')->constrained('rides');
17 | $table->foreignId('passenger_id')->constrained('users');
18 | $table->enum('status', RideRequestEnum::values());
19 | $table->datetime('cancelled_time')->nullable();
20 | $table->foreignId('cancelled_by')->nullable()->constrained('users');
21 | $table->timestamps();
22 | $table->unique(['ride_id', 'passenger_id']);
23 | });
24 | }
25 |
26 | /**
27 | * Reverse the migrations.
28 | */
29 | public function down(): void
30 | {
31 | Schema::dropIfExists('ride_requests');
32 | }
33 | };
34 |
--------------------------------------------------------------------------------
/app/Source/Ride/Infra/Common/Specifications/CanAccessRideSpecification.php:
--------------------------------------------------------------------------------
1 | where('driver_id', $driverId)
14 | ->count() > 0;
15 | }
16 |
17 | public function isSatisfiedByDriverOrPassenger(
18 | int $userId,
19 | int $rideId
20 | ): bool
21 | {
22 | $rideCount = Ride::where('driver_id', $userId)
23 | ->where('id', $rideId)
24 | ->count() > 0;
25 |
26 | if ($rideCount) {
27 | return true;
28 | }
29 |
30 | $rideRequest = RideRequest::where('ride_id', $rideId)
31 | ->where('passenger_id', $userId)
32 | ->first();
33 |
34 | if ($rideRequest && ($rideRequest->isAccepted() || $rideRequest->isCancelledAtLastMinute())) {
35 | return true;
36 | }
37 |
38 | return false;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/app/Source/Ride/Domain/DeleteRide/DeleteRideLogic.php:
--------------------------------------------------------------------------------
1 | canDeleteSpecification->isSatisfied($rideId, $userId)) {
25 | throw new Exception(__('Cannot delete ride'));
26 | }
27 |
28 | $ride = Ride::find($rideId);
29 | $this->updatePendingRequestsCountService->setToZeroForDriver($ride);
30 | $this->deleteRideService->delete($ride);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/database/migrations/2022_02_07_163617_create_social_logins_table.php:
--------------------------------------------------------------------------------
1 | id();
21 | $table->foreignId('user_id')
22 | ->constrained('users')
23 | ->onUpdate('cascade')
24 | ->onDelete('cascade');
25 | $table->enum('provider', SocialLogin::getProviders());
26 | $table->string('provider_id', 200);
27 | $table->timestamps();
28 | }
29 | );
30 | }
31 |
32 | /**
33 | * Reverse the migrations.
34 | *
35 | * @return void
36 | */
37 | public function down()
38 | {
39 | Schema::dropIfExists('social_logins');
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/config/view.php:
--------------------------------------------------------------------------------
1 | [
17 | resource_path('views'),
18 | ],
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Compiled View Path
23 | |--------------------------------------------------------------------------
24 | |
25 | | This option determines where all the compiled Blade templates will be
26 | | stored for your application. Typically, this is within the storage
27 | | directory. However, as usual, you are free to change this value.
28 | |
29 | */
30 |
31 | 'compiled' => env(
32 | 'VIEW_COMPILED_PATH',
33 | realpath(storage_path('framework/views'))
34 | ),
35 |
36 | ];
37 |
--------------------------------------------------------------------------------
/database/migrations/2023_05_10_134756_add_parent_id_column_to_countries_table.php:
--------------------------------------------------------------------------------
1 | foreignId('parent_id')
15 | ->after('locale')
16 | ->nullable()
17 | ->constrained('countries')
18 | ->onDelete('restrict')
19 | ->onUpdate('restrict');
20 |
21 | $table->string('locale', 10)->change();
22 | $table->string('name', 30)->change();
23 | });
24 | }
25 |
26 | /**
27 | * Reverse the migrations.
28 | */
29 | public function down(): void
30 | {
31 | Schema::table('countries', function (Blueprint $table) {
32 | $table->dropColumn('parent_id');
33 | $table->string('locale', 2)->change();
34 | $table->string('name', 100)->change();
35 | });
36 | }
37 | };
38 |
--------------------------------------------------------------------------------
/database/seeders/CountrySeeder.php:
--------------------------------------------------------------------------------
1 | $data) {
18 | $parentCountry = null;
19 | if (isset($data['parent'])) {
20 | $parentCountry = Country::where('name', $data['parent'])->first();
21 | }
22 |
23 | Country::query()
24 | ->updateOrCreate(
25 | [
26 | 'name' => $countryName
27 | ],
28 | [
29 | 'code' => $data['iso2'],
30 | 'currency' => $data['currency'],
31 | 'locale' => $data['locale'],
32 | 'parent_id' => $parentCountry ? $parentCountry->getId() : null
33 | ]
34 | );
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/resources/views/components/toastr.blade.php:
--------------------------------------------------------------------------------
1 |
43 |
--------------------------------------------------------------------------------
/tests/Feature/DeleteApiTokenTest.php:
--------------------------------------------------------------------------------
1 | markTestSkipped('API support is not enabled.');
21 |
22 | return;
23 | }
24 |
25 | $this->actingAs($user = User::factory()->withPersonalTeam()->create());
26 |
27 | $token = $user->tokens()->create([
28 | 'name' => 'Test Token',
29 | 'token' => Str::random(40),
30 | 'abilities' => ['create', 'read'],
31 | ]);
32 |
33 | Livewire::test(ApiTokenManager::class)
34 | ->set(['apiTokenIdBeingDeleted' => $token->id])
35 | ->call('deleteApiToken');
36 |
37 | $this->assertCount(0, $user->fresh()->tokens);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/app/Source/User/Domain/DeleteUser/DeleteUserLogic.php:
--------------------------------------------------------------------------------
1 | getId())->delete();
20 | Ride::where('driver_id', $user->getId())->delete();
21 | Conversation::where('sender_id', $user->getId())->orWhere('recipient_id', $user->getId())->delete();
22 | DriverProfile::where('user_id', $user->getId())->delete();
23 |
24 | $user->deleteProfilePhoto();
25 | $user->tokens->each->delete();
26 | $user->socialLogins()->delete();
27 | $user
28 | ->setEmail(sprintf('%s@del.xxx', md5((string)(mt_rand() + $user->getId()))))
29 | ->setPhoneNumber(null)
30 | ->setName(__('Deleted user'))
31 | ->setPassword(Hash::make(mt_rand()))
32 | ->save();
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/database/migrations/2023_04_09_161850_add_country_id_to_places_table.php:
--------------------------------------------------------------------------------
1 | addCountry();
15 |
16 | Schema::table('places', function (Blueprint $table) use ($country) {
17 | $table->foreignId('country_id')
18 | ->after('name')
19 | ->default($country->getId())
20 | ->constrained('countries');
21 | });
22 | }
23 |
24 | /**
25 | * Reverse the migrations.
26 | */
27 | public function down(): void
28 | {
29 | Schema::table('places', function (Blueprint $table) {
30 | $table->dropColumn('country_id');
31 | });
32 | }
33 |
34 | private function addCountry(): Country
35 | {
36 | $model = new Country();
37 | $model
38 | ->setName('Croatia')
39 | ->save();
40 |
41 | return $model;
42 | }
43 | };
44 |
--------------------------------------------------------------------------------
/database/migrations/2023_04_19_153406_add_cancelled_rides_columns_to_user_profiles_table.php:
--------------------------------------------------------------------------------
1 | integer('total_rides_count')
15 | ->default(0)
16 | ->after('pending_requests_count');
17 |
18 | $table->integer('last_minute_cancelled_rides_count')
19 | ->default(0)
20 | ->after('total_rides_count');
21 | });
22 | }
23 |
24 | /**
25 | * Reverse the migrations.
26 | */
27 | public function down(): void
28 | {
29 | Schema::table('user_profiles', function (Blueprint $table) {
30 | $table->dropColumn(
31 | [
32 | 'total_rides_count',
33 | 'last_minute_cancelled_rides_count'
34 | ]
35 | );
36 | });
37 | }
38 | };
39 |
--------------------------------------------------------------------------------