stay_commerce-frontend 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (242) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +28 -0
  4. data/Rakefile +8 -0
  5. data/app/assets/builds/404error-RVKQJ4S4.digested.jpg +0 -0
  6. data/app/assets/builds/Facebook-5HJUILVR.digested.svg +3 -0
  7. data/app/assets/builds/Google-CZ3UPVSC.digested.svg +6 -0
  8. data/app/assets/builds/application.js +95 -0
  9. data/app/assets/builds/application.js.map +7 -0
  10. data/app/assets/builds/beach-KAZW5GM3.digested.jpg +0 -0
  11. data/app/assets/builds/beach2-3ARC34NS.digested.jpg +0 -0
  12. data/app/assets/builds/beach3-PSTOH5FV.digested.jpg +0 -0
  13. data/app/assets/builds/beach4-PWNRPD3S.digested.jpg +0 -0
  14. data/app/assets/builds/beach5-SBOKKRHF.digested.jpg +0 -0
  15. data/app/assets/builds/beach6-SXZ5Y5AI.digested.jpg +0 -0
  16. data/app/assets/builds/beach7-FNBMFVKK.digested.jpg +0 -0
  17. data/app/assets/builds/beach8-TD7LTRQM.digested.jpg +0 -0
  18. data/app/assets/builds/bg-image-H7UGUMV2.digested.jpg +0 -0
  19. data/app/assets/builds/bgimage-DU3PCXKN.digested.jpg +0 -0
  20. data/app/assets/builds/bundle.css +30914 -0
  21. data/app/assets/builds/bundle.css.map +7 -0
  22. data/app/assets/builds/bundle.js +74569 -0
  23. data/app/assets/builds/bundle.js.map +7 -0
  24. data/app/assets/builds/hotel1-HGBXPKJK.digested.jpg +0 -0
  25. data/app/assets/builds/logo_updated-KQWAXLYL.digested.png +0 -0
  26. data/app/assets/builds/styles.css +6422 -0
  27. data/app/assets/builds/styles.css.map +7 -0
  28. data/app/assets/config/manifest.js +2 -0
  29. data/app/assets/images/favicon.ico +0 -0
  30. data/app/assets/images/stay_commerce/frontend/beach-666122_1280 (1).jpg +0 -0
  31. data/app/assets/images/stay_commerce/frontend/beach-666122_1280.jpg +0 -0
  32. data/app/assets/stylesheets/stay_commerce/frontend/application.css +15 -0
  33. data/app/controllers/stay_commerce/frontend/application_controller.rb +8 -0
  34. data/app/controllers/stay_commerce/frontend/welcome_controller.rb +6 -0
  35. data/app/helpers/stay_commerce/frontend/application_helper.rb +6 -0
  36. data/app/javascript/Images/404error.jpg +0 -0
  37. data/app/javascript/Images/Facebook.svg +3 -0
  38. data/app/javascript/Images/Google.svg +6 -0
  39. data/app/javascript/Images/beach-2245867_1280.jpg +0 -0
  40. data/app/javascript/Images/beach.jpg +0 -0
  41. data/app/javascript/Images/beach2.jpg +0 -0
  42. data/app/javascript/Images/beach3.jpg +0 -0
  43. data/app/javascript/Images/beach4.jpg +0 -0
  44. data/app/javascript/Images/beach5.jpg +0 -0
  45. data/app/javascript/Images/beach6.jpg +0 -0
  46. data/app/javascript/Images/beach7.jpg +0 -0
  47. data/app/javascript/Images/beach8.jpg +0 -0
  48. data/app/javascript/Images/bg-image.jpg +0 -0
  49. data/app/javascript/Images/bgimage.jpg +0 -0
  50. data/app/javascript/Images/blog-1.jpg +0 -0
  51. data/app/javascript/Images/gallery.png +0 -0
  52. data/app/javascript/Images/home 5.jpg +0 -0
  53. data/app/javascript/Images/home1.jpg +0 -0
  54. data/app/javascript/Images/home2.jpg +0 -0
  55. data/app/javascript/Images/home3.jpg +0 -0
  56. data/app/javascript/Images/home6.jpg +0 -0
  57. data/app/javascript/Images/hotel1.jpg +0 -0
  58. data/app/javascript/Images/room1.jpg +0 -0
  59. data/app/javascript/Images/room2.jpg +0 -0
  60. data/app/javascript/Images/room3.jpg +0 -0
  61. data/app/javascript/Images/room4.jpg +0 -0
  62. data/app/javascript/Images/wine-4520213_1280.jpg +0 -0
  63. data/app/javascript/application.js +1 -0
  64. data/app/javascript/react/Api/apiConstants.js +47 -0
  65. data/app/javascript/react/assets/beach-2245867_1280.jpg +0 -0
  66. data/app/javascript/react/assets/logo.png +0 -0
  67. data/app/javascript/react/assets/logo_updated.png +0 -0
  68. data/app/javascript/react/components/AboutUsPage/AboutPage.jsx +41 -0
  69. data/app/javascript/react/components/AboutusFront/About.jsx +37 -0
  70. data/app/javascript/react/components/Accommodation/Accommodation.jsx +32 -0
  71. data/app/javascript/react/components/Accommodation/NormalListing.jsx +50 -0
  72. data/app/javascript/react/components/Accommodation/SpecialListing.jsx +51 -0
  73. data/app/javascript/react/components/Accountpage/AccountInfo.jsx +217 -0
  74. data/app/javascript/react/components/Accountpage/AccountPage.jsx +27 -0
  75. data/app/javascript/react/components/Accountpage/CommonPage.jsx +24 -0
  76. data/app/javascript/react/components/AddNewProperty/CommonLayout.jsx +68 -0
  77. data/app/javascript/react/components/AddNewProperty/Description.jsx +229 -0
  78. data/app/javascript/react/components/AddNewProperty/Details.jsx +234 -0
  79. data/app/javascript/react/components/AddNewProperty/Images.jsx +196 -0
  80. data/app/javascript/react/components/AddNewProperty/Location.jsx +239 -0
  81. data/app/javascript/react/components/AddNewProperty/Room.jsx +1132 -0
  82. data/app/javascript/react/components/AvatarDropdown/AvatarDropDown.jsx +142 -0
  83. data/app/javascript/react/components/BlogDesign/BlogsLatest.jsx +67 -0
  84. data/app/javascript/react/components/ContactUs/Contact.jsx +89 -0
  85. data/app/javascript/react/components/FacilitiesSection/Facilities.jsx +66 -0
  86. data/app/javascript/react/components/FixedNavbar/FixedNav.jsx +88 -0
  87. data/app/javascript/react/components/ForgetPassword/ForgetPassword.jsx +103 -0
  88. data/app/javascript/react/components/Gallery/Gallery.jsx +164 -0
  89. data/app/javascript/react/components/GalleryModalLight/GalleryModalLight.jsx +35 -0
  90. data/app/javascript/react/components/GallerySlider/GallerySlider.jsx +58 -0
  91. data/app/javascript/react/components/Headers/PropertyCard.jsx +46 -0
  92. data/app/javascript/react/components/HeroSectionDesign/BookingForm.jsx +178 -0
  93. data/app/javascript/react/components/HeroSectionDesign/HeroSection.jsx +29 -0
  94. data/app/javascript/react/components/HeroSectionDesign/MyPropertiesListing.jsx +104 -0
  95. data/app/javascript/react/components/HeroSectionDesign/PropertiesPage.jsx +122 -0
  96. data/app/javascript/react/components/HotelListing/Listing.jsx +48 -0
  97. data/app/javascript/react/components/Layout/Layout.js +18 -0
  98. data/app/javascript/react/components/Listing-stay-Detail/AmenitiesFeatures.jsx +58 -0
  99. data/app/javascript/react/components/Listing-stay-Detail/AmenitiesModal.jsx +250 -0
  100. data/app/javascript/react/components/Listing-stay-Detail/ApartmentCard.jsx +120 -0
  101. data/app/javascript/react/components/Listing-stay-Detail/BookingModal.jsx +398 -0
  102. data/app/javascript/react/components/Listing-stay-Detail/CheckoutForm.jsx +296 -0
  103. data/app/javascript/react/components/Listing-stay-Detail/ListingStayDetailPage.jsx +512 -0
  104. data/app/javascript/react/components/Listing-stay-Detail/PropertyDescription.jsx +76 -0
  105. data/app/javascript/react/components/Listing-stay-Detail/PropertyDetailsCard.jsx +62 -0
  106. data/app/javascript/react/components/Listing-stay-Detail/Reviews.jsx +132 -0
  107. data/app/javascript/react/components/Listing-stay-Detail/RoomDescriptionModal.jsx +105 -0
  108. data/app/javascript/react/components/Listing-stay-Detail/Rules.jsx +23 -0
  109. data/app/javascript/react/components/ListingImageGallery/ListingImageGallery.jsx +30 -0
  110. data/app/javascript/react/components/LoginPage/LoginPage.jsx +115 -0
  111. data/app/javascript/react/components/MobileNav/MobileMenu.jsx +47 -0
  112. data/app/javascript/react/components/Navbar/Navbar.jsx +25 -0
  113. data/app/javascript/react/components/Page404/Page404.jsx +30 -0
  114. data/app/javascript/react/components/PropertyListing/MyProperties.jsx +146 -0
  115. data/app/javascript/react/components/PropertyListing/StayBooking/BookingDetails.jsx +178 -0
  116. data/app/javascript/react/components/PropertyListing/StayBooking/MyBooking.jsx +83 -0
  117. data/app/javascript/react/components/ResetPassword/ResetPassword.jsx +117 -0
  118. data/app/javascript/react/components/SignupPage/SignupPage.jsx +185 -0
  119. data/app/javascript/react/components/SmallNavbar/SmallNav.jsx +51 -0
  120. data/app/javascript/react/components/SocialAuth/SocialAuth.jsx +21 -0
  121. data/app/javascript/react/components/StayCard/StayCard.jsx +69 -0
  122. data/app/javascript/react/components/StayCard/StayCard2.jsx +45 -0
  123. data/app/javascript/react/components/StayCard/StayCard3.jsx +45 -0
  124. data/app/javascript/react/components/TestimonialSection/Testimonial.jsx +113 -0
  125. data/app/javascript/react/components/Unauthorized/Unauthorized.jsx +12 -0
  126. data/app/javascript/react/data/jsons/__countryListing.json +201 -0
  127. data/app/javascript/react/packs/App.js +26 -0
  128. data/app/javascript/react/packs/index.jsx +38 -0
  129. data/app/javascript/react/packs/routes/ParentRoute.jsx +14 -0
  130. data/app/javascript/react/packs/routes/Route.jsx +163 -0
  131. data/app/javascript/react/pages/AccommodationList.jsx +21 -0
  132. data/app/javascript/react/pages/Home.jsx +32 -0
  133. data/app/javascript/react/redux/slices/AuthSlice/AuthSlice.jsx +100 -0
  134. data/app/javascript/react/redux/slices/PropertySlice/PropertySlice.jsx +722 -0
  135. data/app/javascript/react/redux/slices/PropertySlice/Searchslice.jsx +36 -0
  136. data/app/javascript/react/redux/slices/UserSlice/UserSlice.jsx +215 -0
  137. data/app/javascript/react/redux/store.js +35 -0
  138. data/app/javascript/react/shared/Avatar/Avatar.jsx +32 -0
  139. data/app/javascript/react/shared/Badge/Badge.jsx +33 -0
  140. data/app/javascript/react/shared/Button/Button.jsx +67 -0
  141. data/app/javascript/react/shared/Button/ButtonPrimary.jsx +11 -0
  142. data/app/javascript/react/shared/Button/ButtonSelect.jsx +9 -0
  143. data/app/javascript/react/shared/Checkbox/Checkbox.jsx +38 -0
  144. data/app/javascript/react/shared/CurrencySymbol.jsx +6 -0
  145. data/app/javascript/react/shared/DateField/CustomDatePicker.jsx +69 -0
  146. data/app/javascript/react/shared/FooterSection/Footer.jsx +75 -0
  147. data/app/javascript/react/shared/FormField/FormField.jsx +75 -0
  148. data/app/javascript/react/shared/FormItem/FormItem.jsx +20 -0
  149. data/app/javascript/react/shared/Input/Input.jsx +27 -0
  150. data/app/javascript/react/shared/Label/Label.jsx +12 -0
  151. data/app/javascript/react/shared/Modal.jsx +20 -0
  152. data/app/javascript/react/shared/NcImage/NcImage.jsx +101 -0
  153. data/app/javascript/react/shared/NcImage/PlaceIcon.jsx +31 -0
  154. data/app/javascript/react/shared/NcImage/placecImageIcon.svg +6 -0
  155. data/app/javascript/react/shared/Select/Select.jsx +20 -0
  156. data/app/javascript/react/styles/404error.scss +58 -0
  157. data/app/javascript/react/styles/ApartmentCard.scss +126 -0
  158. data/app/javascript/react/styles/BookingDetails.scss +457 -0
  159. data/app/javascript/react/styles/Modal.scss +36 -0
  160. data/app/javascript/react/styles/PropertiesPage.scss +219 -0
  161. data/app/javascript/react/styles/RenderSection.scss +480 -0
  162. data/app/javascript/react/styles/about.scss +97 -0
  163. data/app/javascript/react/styles/accountinfo.scss +67 -0
  164. data/app/javascript/react/styles/accountpage.scss +36 -0
  165. data/app/javascript/react/styles/amenitiesfeatures.scss +223 -0
  166. data/app/javascript/react/styles/application.scss +87 -0
  167. data/app/javascript/react/styles/avatar.scss +39 -0
  168. data/app/javascript/react/styles/avatardropdown.scss +57 -0
  169. data/app/javascript/react/styles/badge.scss +90 -0
  170. data/app/javascript/react/styles/blog.scss +100 -0
  171. data/app/javascript/react/styles/bookingform.scss +124 -0
  172. data/app/javascript/react/styles/button.scss +44 -0
  173. data/app/javascript/react/styles/buttonprimary.scss +32 -0
  174. data/app/javascript/react/styles/checkbox.scss +37 -0
  175. data/app/javascript/react/styles/commonlayout.scss +83 -0
  176. data/app/javascript/react/styles/commonpage.scss +51 -0
  177. data/app/javascript/react/styles/contact.scss +173 -0
  178. data/app/javascript/react/styles/customdatepicker.scss +120 -0
  179. data/app/javascript/react/styles/description.scss +21 -0
  180. data/app/javascript/react/styles/details.scss +88 -0
  181. data/app/javascript/react/styles/facilities.scss +131 -0
  182. data/app/javascript/react/styles/fixednavbar.scss +137 -0
  183. data/app/javascript/react/styles/fonts.scss +22 -0
  184. data/app/javascript/react/styles/footer.scss +300 -0
  185. data/app/javascript/react/styles/forgetpassword.scss +68 -0
  186. data/app/javascript/react/styles/formfield.scss +39 -0
  187. data/app/javascript/react/styles/formitem.scss +20 -0
  188. data/app/javascript/react/styles/gallery.scss +142 -0
  189. data/app/javascript/react/styles/gallerymodallight.scss +137 -0
  190. data/app/javascript/react/styles/galleryslider.scss +114 -0
  191. data/app/javascript/react/styles/header.scss +49 -0
  192. data/app/javascript/react/styles/herosection.scss +61 -0
  193. data/app/javascript/react/styles/images.scss +112 -0
  194. data/app/javascript/react/styles/input.scss +58 -0
  195. data/app/javascript/react/styles/label.scss +11 -0
  196. data/app/javascript/react/styles/listing.scss +94 -0
  197. data/app/javascript/react/styles/listingimagegallery.scss +57 -0
  198. data/app/javascript/react/styles/listingstaydetailpage.scss +887 -0
  199. data/app/javascript/react/styles/location.scss +66 -0
  200. data/app/javascript/react/styles/loginpage.scss +150 -0
  201. data/app/javascript/react/styles/mobilemenu.scss +53 -0
  202. data/app/javascript/react/styles/mybooking.scss +104 -0
  203. data/app/javascript/react/styles/myproperty.scss +51 -0
  204. data/app/javascript/react/styles/ncimage.scss +24 -0
  205. data/app/javascript/react/styles/normallisting.scss +95 -0
  206. data/app/javascript/react/styles/property-description.scss +75 -0
  207. data/app/javascript/react/styles/propertycard.scss +48 -0
  208. data/app/javascript/react/styles/propertydetailscard.scss +302 -0
  209. data/app/javascript/react/styles/resetpassword.scss +79 -0
  210. data/app/javascript/react/styles/reviews.scss +185 -0
  211. data/app/javascript/react/styles/room.scss +275 -0
  212. data/app/javascript/react/styles/rooms.scss +0 -0
  213. data/app/javascript/react/styles/select.scss +44 -0
  214. data/app/javascript/react/styles/signuppage.scss +132 -0
  215. data/app/javascript/react/styles/smallnav.scss +94 -0
  216. data/app/javascript/react/styles/socialauth.scss +62 -0
  217. data/app/javascript/react/styles/speciallisting.scss +94 -0
  218. data/app/javascript/react/styles/staycard.scss +77 -0
  219. data/app/javascript/react/styles/staycard2.scss +115 -0
  220. data/app/javascript/react/styles/testimonial.scss +216 -0
  221. data/app/javascript/react/styles/unauthorized.scss +22 -0
  222. data/app/javascript/react/styles/variables.scss +3 -0
  223. data/app/javascript/react/styles/wrapper.scss +4 -0
  224. data/app/javascript/react/utils/formSchema.js +120 -0
  225. data/app/javascript/react/utils/helpers/APIHelper.jsx +55 -0
  226. data/app/javascript/react/utils/helpers/ErrorHandler.js +21 -0
  227. data/app/javascript/react/utils/helpers/InfoHandler.js +15 -0
  228. data/app/javascript/react/utils/helpers/SuccessHandler.js +12 -0
  229. data/app/javascript/react/utils/helpers/isInViewPortIntersectionObserver.jsx +39 -0
  230. data/app/jobs/stay_commerce/frontend/application_job.rb +6 -0
  231. data/app/mailers/stay_commerce/frontend/application_mailer.rb +8 -0
  232. data/app/models/stay_commerce/frontend/application_record.rb +7 -0
  233. data/app/views/layouts/stay_commerce/frontend/application.html.erb +61 -0
  234. data/app/views/stay_commerce/frontend/welcome/index.html.erb +2 -0
  235. data/config/initializers/cors.rb +6 -0
  236. data/config/initializers/devise.rb +359 -0
  237. data/config/routes.rb +11 -0
  238. data/lib/stay_commerce/frontend/engine.rb +14 -0
  239. data/lib/stay_commerce/frontend/version.rb +5 -0
  240. data/lib/stay_commerce/frontend.rb +8 -0
  241. data/lib/tasks/stay_commerce/frontend_tasks.rake +4 -0
  242. metadata +370 -0
@@ -0,0 +1,6 @@
1
+ module StayCommerce
2
+ module Frontend
3
+ class ApplicationJob < ActiveJob::Base
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,8 @@
1
+ module StayCommerce
2
+ module Frontend
3
+ class ApplicationMailer < ActionMailer::Base
4
+ default from: "from@example.com"
5
+ layout "mailer"
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,7 @@
1
+ module StayCommerce
2
+ module Frontend
3
+ class ApplicationRecord < ActiveRecord::Base
4
+ self.abstract_class = true
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,61 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title><%= content_for(:title) || "Stay Commerce" %></title>
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <%= csrf_meta_tags %>
7
+ <%= csp_meta_tag %>
8
+ <%= favicon_link_tag asset_path('favicon.ico'), :rel => 'icon', :type => 'image/ico' %>
9
+
10
+ <%= javascript_include_tag "application", "data-turbo-track": "reload", defer: true %>
11
+ <%= javascript_include_tag 'bundle', 'data-turbo-track': 'reload', defer: true %>
12
+ <%= stylesheet_link_tag "styles", media: "all" %>
13
+
14
+ <style>
15
+ /* Loader styles */
16
+ #page-loader {
17
+ position: fixed;
18
+ top: 0;
19
+ left: 0;
20
+ width: 100vw;
21
+ height: 100vh;
22
+ background: white;
23
+ z-index: 9999;
24
+ display: flex;
25
+ justify-content: center;
26
+ align-items: center;
27
+ }
28
+
29
+ .spinner {
30
+ border: 8px solid #f3f3f3;
31
+ border-top: 8px solid #081976;
32
+ border-radius: 50%;
33
+ width: 60px;
34
+ height: 60px;
35
+ animation: spin 1s linear infinite;
36
+ }
37
+
38
+ @keyframes spin {
39
+ 0% { transform: rotate(0deg); }
40
+ 100% { transform: rotate(360deg); }
41
+ }
42
+ </style>
43
+
44
+ <script>
45
+ // Hide loader on full page load
46
+ window.addEventListener('load', function () {
47
+ const loader = document.getElementById('page-loader');
48
+ if (loader) loader.style.display = 'none';
49
+ });
50
+ </script>
51
+ </head>
52
+ <body>
53
+ <!-- Loader HTML -->
54
+ <div id="page-loader">
55
+ <div class="spinner"></div>
56
+ </div>
57
+
58
+ <div id="root"></div>
59
+ <%= yield %>
60
+ </body>
61
+ </html>
@@ -0,0 +1,2 @@
1
+ <%= javascript_include_tag "application", "data-turbo-track": "reload", defer: true %>
2
+ <%= javascript_include_tag 'bundle', 'data-turbo-track': 'reload' , defer: true %>
@@ -0,0 +1,6 @@
1
+ Rails.application.config.middleware.insert_before 0, Rack::Cors do
2
+ allow do
3
+ origins '*'
4
+ resource '*', headers: :any, methods: [:get, :post, :patch, :put, :delete, :options]
5
+ end
6
+ end
@@ -0,0 +1,359 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Assuming you have not yet modified this file, each configuration option below
4
+ # is set to its default value. Note that some are commented out while others
5
+ # are not: uncommented lines are intended to protect your configuration from
6
+ # breaking changes in upgrades (i.e., in the event that future versions of
7
+ # Devise change the default values for those options).
8
+
9
+ # Either do this or autoload the lib directory
10
+
11
+ # Use this hook to configure devise mailer, warden hooks and so forth.
12
+ # Many of these configuration options can be set straight in your model.
13
+ Devise.setup do |config|
14
+ config.api.configure do |api|
15
+ # Access Token
16
+ api.access_token.expires_in = 1.week
17
+ api.access_token.expires_in_infinite = ->(_resource_owner) { false }
18
+ api.access_token.generator = ->(_resource_owner) { Devise.friendly_token(60) }
19
+
20
+ # Refresh Token
21
+ api.refresh_token.enabled = true
22
+ api.refresh_token.expires_in = 1.week
23
+ api.refresh_token.generator = ->(_resource_owner) { Devise.friendly_token(60) }
24
+ api.refresh_token.expires_in_infinite = ->(_resource_owner) { false }
25
+
26
+ # Sign up
27
+ api.sign_up.enabled = true
28
+ api.sign_up.extra_fields = [ :first_name, :last_name, :date_of_birth, :phone, :gender ]
29
+
30
+ # Authorization
31
+ api.authorization.key = "Authorization"
32
+ api.authorization.scheme = "Bearer"
33
+ api.authorization.location = :both # :header or :params or :both
34
+ api.authorization.params_key = "access_token"
35
+
36
+
37
+ # Base classes
38
+ api.base_token_model = "Devise::Api::Token"
39
+ api.base_controller = "::DeviseController"
40
+
41
+
42
+ # After successful callbacks
43
+ api.after_successful_sign_in = ->(_resource_owner, _token, _request) { }
44
+ api.after_successful_sign_up = ->(_resource_owner, _token, _request) { }
45
+ api.after_successful_refresh = ->(_resource_owner, _token, _request) { }
46
+ api.after_successful_revoke = ->(_resource_owner, _token, _request) { }
47
+
48
+
49
+ # Before callbacks
50
+ api.before_sign_in = ->(_params, _request, _resource_class) { }
51
+ api.before_sign_up = ->(_params, _request, _resource_class) { }
52
+ api.before_refresh = ->(_params, _request, _resource_class) { }
53
+ api.before_revoke = ->(_params, _request, _resource_class) { }
54
+ end
55
+ # The secret key used by Devise. Devise uses this key to generate
56
+ # random tokens. Changing this key will render invalid all existing
57
+ # confirmation, reset password and unlock tokens in the database.
58
+ # Devise will use the `secret_key_base` as its `secret_key`
59
+ # by default. You can change it below and use your own secret key.
60
+ # config.secret_key = '970aacf90a96c897573711cfcee34143f27df71d6000d21f0f4902966d4d4f99cb0cbb0a408da61240b7c1de45052d73a1df16a9f3e49c8403ee18d64672fab4'
61
+
62
+ # ==> Controller configuration
63
+ # Configure the parent class to the devise controllers.
64
+ # config.parent_controller = 'DeviseController'
65
+
66
+ # ==> Mailer Configuration
67
+ # Configure the e-mail address which will be shown in Devise::Mailer,
68
+ # note that it will be overwritten if you use your own mailer class
69
+ # with default "from" parameter.
70
+ config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com"
71
+
72
+ # Configure the class responsible to send e-mails.
73
+ # config.mailer = 'Devise::Mailer'
74
+
75
+ # Configure the parent class responsible to send e-mails.
76
+ # config.parent_mailer = 'ActionMailer::Base'
77
+
78
+ # ==> ORM configuration
79
+ # Load and configure the ORM. Supports :active_record (default) and
80
+ # :mongoid (bson_ext recommended) by default. Other ORMs may be
81
+ # available as additional gems.
82
+ require "devise/orm/active_record"
83
+
84
+ # ==> Configuration for any authentication mechanism
85
+ # Configure which keys are used when authenticating a user. The default is
86
+ # just :email. You can configure it to use [:username, :subdomain], so for
87
+ # authenticating a user, both parameters are required. Remember that those
88
+ # parameters are used only when authenticating and not when retrieving from
89
+ # session. If you need permissions, you should implement that in a before filter.
90
+ # You can also supply a hash where the value is a boolean determining whether
91
+ # or not authentication should be aborted when the value is not present.
92
+ # config.authentication_keys = [:email]
93
+
94
+ # Configure parameters from the request object used for authentication. Each entry
95
+ # given should be a request method and it will automatically be passed to the
96
+ # find_for_authentication method and considered in your model lookup. For instance,
97
+ # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
98
+ # The same considerations mentioned for authentication_keys also apply to request_keys.
99
+ # config.request_keys = []
100
+
101
+ # Configure which authentication keys should be case-insensitive.
102
+ # These keys will be downcased upon creating or modifying a user and when used
103
+ # to authenticate or find a user. Default is :email.
104
+ config.case_insensitive_keys = [ :email ]
105
+
106
+ # Configure which authentication keys should have whitespace stripped.
107
+ # These keys will have whitespace before and after removed upon creating or
108
+ # modifying a user and when used to authenticate or find a user. Default is :email.
109
+ config.strip_whitespace_keys = [ :email ]
110
+
111
+ # Tell if authentication through request.params is enabled. True by default.
112
+ # It can be set to an array that will enable params authentication only for the
113
+ # given strategies, for example, `config.params_authenticatable = [:database]` will
114
+ # enable it only for database (email + password) authentication.
115
+ # config.params_authenticatable = true
116
+
117
+ # Tell if authentication through HTTP Auth is enabled. False by default.
118
+ # It can be set to an array that will enable http authentication only for the
119
+ # given strategies, for example, `config.http_authenticatable = [:database]` will
120
+ # enable it only for database authentication.
121
+ # For API-only applications to support authentication "out-of-the-box", you will likely want to
122
+ # enable this with :database unless you are using a custom strategy.
123
+ # The supported strategies are:
124
+ # :database = Support basic authentication with authentication key + password
125
+ # config.http_authenticatable = false
126
+
127
+ # If 401 status code should be returned for AJAX requests. True by default.
128
+ # config.http_authenticatable_on_xhr = true
129
+
130
+ # The realm used in Http Basic Authentication. 'Application' by default.
131
+ # config.http_authentication_realm = 'Application'
132
+
133
+ # It will change confirmation, password recovery and other workflows
134
+ # to behave the same regardless if the e-mail provided was right or wrong.
135
+ # Does not affect registerable.
136
+ # config.paranoid = true
137
+
138
+ # By default Devise will store the user in session. You can skip storage for
139
+ # particular strategies by setting this option.
140
+ # Notice that if you are skipping storage for all authentication paths, you
141
+ # may want to disable generating routes to Devise's sessions controller by
142
+ # passing skip: :sessions to `devise_for` in your config/routes.rb
143
+ config.skip_session_storage = [ :http_auth ]
144
+
145
+ # By default, Devise cleans up the CSRF token on authentication to
146
+ # avoid CSRF token fixation attacks. This means that, when using AJAX
147
+ # requests for sign in and sign up, you need to get a new CSRF token
148
+ # from the server. You can disable this option at your own risk.
149
+ # config.clean_up_csrf_token_on_authentication = true
150
+
151
+ # When false, Devise will not attempt to reload routes on eager load.
152
+ # This can reduce the time taken to boot the app but if your application
153
+ # requires the Devise mappings to be loaded during boot time the application
154
+ # won't boot properly.
155
+ # config.reload_routes = true
156
+
157
+ # ==> Configuration for :database_authenticatable
158
+ # For bcrypt, this is the cost for hashing the password and defaults to 12. If
159
+ # using other algorithms, it sets how many times you want the password to be hashed.
160
+ # The number of stretches used for generating the hashed password are stored
161
+ # with the hashed password. This allows you to change the stretches without
162
+ # invalidating existing passwords.
163
+ #
164
+ # Limiting the stretches to just one in testing will increase the performance of
165
+ # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
166
+ # a value less than 10 in other environments. Note that, for bcrypt (the default
167
+ # algorithm), the cost increases exponentially with the number of stretches (e.g.
168
+ # a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
169
+ config.stretches = Rails.env.test? ? 1 : 12
170
+
171
+ # Set up a pepper to generate the hashed password.
172
+ # config.pepper = 'cdeac596597cec5e4fff2260002d63e78df2ef79b362ec0eeaf805a2c969815296e218e813688f303bcfde8f6323200676ab2e27d6b5dd4945c1fbfbc64a54f2'
173
+
174
+ # Send a notification to the original email when the user's email is changed.
175
+ # config.send_email_changed_notification = false
176
+
177
+ # Send a notification email when the user's password is changed.
178
+ # config.send_password_change_notification = false
179
+
180
+ # ==> Configuration for :confirmable
181
+ # A period that the user is allowed to access the website even without
182
+ # confirming their account. For instance, if set to 2.days, the user will be
183
+ # able to access the website for two days without confirming their account,
184
+ # access will be blocked just in the third day.
185
+ # You can also set it to nil, which will allow the user to access the website
186
+ # without confirming their account.
187
+ # Default is 0.days, meaning the user cannot access the website without
188
+ # confirming their account.
189
+ # config.allow_unconfirmed_access_for = 2.days
190
+
191
+ # A period that the user is allowed to confirm their account before their
192
+ # token becomes invalid. For example, if set to 3.days, the user can confirm
193
+ # their account within 3 days after the mail was sent, but on the fourth day
194
+ # their account can't be confirmed with the token any more.
195
+ # Default is nil, meaning there is no restriction on how long a user can take
196
+ # before confirming their account.
197
+ # config.confirm_within = 3.days
198
+
199
+ # If true, requires any email changes to be confirmed (exactly the same way as
200
+ # initial account confirmation) to be applied. Requires additional unconfirmed_email
201
+ # db field (see migrations). Until confirmed, new email is stored in
202
+ # unconfirmed_email column, and copied to email column on successful confirmation.
203
+ config.reconfirmable = true
204
+
205
+ # Defines which key will be used when confirming an account
206
+ # config.confirmation_keys = [:email]
207
+
208
+ # ==> Configuration for :rememberable
209
+ # The time the user will be remembered without asking for credentials again.
210
+ # config.remember_for = 2.weeks
211
+
212
+ # Invalidates all the remember me tokens when the user signs out.
213
+ config.expire_all_remember_me_on_sign_out = true
214
+
215
+ # If true, extends the user's remember period when remembered via cookie.
216
+ # config.extend_remember_period = false
217
+
218
+ # Options to be passed to the created cookie. For instance, you can set
219
+ # secure: true in order to force SSL only cookies.
220
+ # config.rememberable_options = {}
221
+
222
+ # ==> Configuration for :validatable
223
+ # Range for password length.
224
+ config.password_length = 6..128
225
+
226
+ # Email regex used to validate email formats. It simply asserts that
227
+ # one (and only one) @ exists in the given string. This is mainly
228
+ # to give user feedback and not to assert the e-mail validity.
229
+ config.email_regexp = /\A[^@\s]+@[^@\s]+\z/
230
+
231
+ # ==> Configuration for :timeoutable
232
+ # The time you want to timeout the user session without activity. After this
233
+ # time the user will be asked for credentials again. Default is 30 minutes.
234
+ # config.timeout_in = 30.minutes
235
+
236
+ # ==> Configuration for :lockable
237
+ # Defines which strategy will be used to lock an account.
238
+ # :failed_attempts = Locks an account after a number of failed attempts to sign in.
239
+ # :none = No lock strategy. You should handle locking by yourself.
240
+ # config.lock_strategy = :failed_attempts
241
+
242
+ # Defines which key will be used when locking and unlocking an account
243
+ # config.unlock_keys = [:email]
244
+
245
+ # Defines which strategy will be used to unlock an account.
246
+ # :email = Sends an unlock link to the user email
247
+ # :time = Re-enables login after a certain amount of time (see :unlock_in below)
248
+ # :both = Enables both strategies
249
+ # :none = No unlock strategy. You should handle unlocking by yourself.
250
+ # config.unlock_strategy = :both
251
+
252
+ # Number of authentication tries before locking an account if lock_strategy
253
+ # is failed attempts.
254
+ # config.maximum_attempts = 20
255
+
256
+ # Time interval to unlock the account if :time is enabled as unlock_strategy.
257
+ # config.unlock_in = 1.hour
258
+
259
+ # Warn on the last attempt before the account is locked.
260
+ # config.last_attempt_warning = true
261
+
262
+ # ==> Configuration for :recoverable
263
+ #
264
+ # Defines which key will be used when recovering the password for an account
265
+ config.reset_password_keys = [ :email ]
266
+
267
+ # Time interval you can reset your password with a reset password key.
268
+ # Don't put a too small interval or your users won't have the time to
269
+ # change their passwords.
270
+ config.reset_password_within = 6.hours
271
+
272
+ # When set to false, does not sign a user in automatically after their password is
273
+ # reset. Defaults to true, so a user is signed in automatically after a reset.
274
+ # config.sign_in_after_reset_password = true
275
+
276
+ # ==> Configuration for :encryptable
277
+ # Allow you to use another hashing or encryption algorithm besides bcrypt (default).
278
+ # You can use :sha1, :sha512 or algorithms from others authentication tools as
279
+ # :clearance_sha1, :authlogic_sha512 (then you should set stretches above to 20
280
+ # for default behavior) and :restful_authentication_sha1 (then you should set
281
+ # stretches to 10, and copy REST_AUTH_SITE_KEY to pepper).
282
+ #
283
+ # Require the `devise-encryptable` gem when using anything other than bcrypt
284
+ # config.encryptor = :sha512
285
+
286
+ # ==> Scopes configuration
287
+ # Turn scoped views on. Before rendering "sessions/new", it will first check for
288
+ # "users/sessions/new". It's turned off by default because it's slower if you
289
+ # are using only default views.
290
+ # config.scoped_views = false
291
+
292
+ # Configure the default scope given to Warden. By default it's the first
293
+ # devise role declared in your routes (usually :user).
294
+ # config.default_scope = :user
295
+
296
+ # Set this configuration to false if you want /users/sign_out to sign out
297
+ # only the current scope. By default, Devise signs out all scopes.
298
+ # config.sign_out_all_scopes = true
299
+
300
+ # ==> Navigation configuration
301
+ # Lists the formats that should be treated as navigational. Formats like
302
+ # :html should redirect to the sign in page when the user does not have
303
+ # access, but formats like :xml or :json, should return 401.
304
+ #
305
+ # If you have any extra navigational formats, like :iphone or :mobile, you
306
+ # should add them to the navigational formats lists.
307
+ #
308
+ # The "*/*" below is required to match Internet Explorer requests.
309
+ # config.navigational_formats = ['*/*', :html, :turbo_stream]
310
+
311
+ # The default HTTP method used to sign out a resource. Default is :delete.
312
+ config.sign_out_via = :delete
313
+
314
+ # ==> OmniAuth
315
+ # Add a new OmniAuth provider. Check the wiki for more information on setting
316
+ # up on your models and hooks.
317
+ # config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
318
+
319
+ # ==> Warden configuration
320
+ # If you want to use other strategies, that are not supported by Devise, or
321
+ # change the failure app, you can configure them inside the config.warden block.
322
+ #
323
+ # config.warden do |manager|
324
+ # manager.intercept_401 = false
325
+ # manager.default_strategies(scope: :user).unshift :some_external_strategy
326
+ # end
327
+
328
+ # ==> Mountable engine configurations
329
+ # When using Devise inside an engine, let's call it `MyEngine`, and this engine
330
+ # is mountable, there are some extra configurations to be taken into account.
331
+ # The following options are available, assuming the engine is mounted as:
332
+ #
333
+ # mount MyEngine, at: '/my_engine'
334
+ #
335
+ # The router that invoked `devise_for`, in the example above, would be:
336
+ # config.router_name = :my_engine
337
+ #
338
+ config.router_name = :stay
339
+ config.parent_controller = "Stay::ApplicationController"
340
+
341
+ # When using OmniAuth, Devise cannot automatically set OmniAuth path,
342
+ # so you need to do it manually. For the users scope, it would be:
343
+ # config.omniauth_path_prefix = '/my_engine/users/auth'
344
+
345
+ # ==> Hotwire/Turbo configuration
346
+ # When using Devise with Hotwire/Turbo, the http status for error responses
347
+ # and some redirects must match the following. The default in Devise for existing
348
+ # apps is `200 OK` and `302 Found` respectively, but new apps are generated with
349
+ # these new defaults that match Hotwire/Turbo behavior.
350
+ # Note: These might become the new default in future versions of Devise.
351
+ config.responder.error_status = :unprocessable_entity
352
+ config.responder.redirect_status = :see_other
353
+
354
+ # ==> Configuration for :registerable
355
+
356
+ # When set to false, does not sign a user in automatically after their password is
357
+ # changed. Defaults to true, so a user is signed in automatically after changing a password.
358
+ # config.sign_in_after_change_password = true
359
+ end
data/config/routes.rb ADDED
@@ -0,0 +1,11 @@
1
+ StayCommerce::Frontend::Engine.routes.draw do
2
+ mount Stay::Engine, at: "/stay"
3
+ get "*path", to: "welcome#index", constraints: ->(req) { !req.xhr? && req.format.html? }
4
+ root to: "welcome#index"
5
+ devise_for :users, class_name: "Stay::User", controllers: {
6
+ registrations: "stay/users/registrations",
7
+ sessions: "stay/users/sessions",
8
+ passwords: "stay/users/passwords",
9
+ tokens: "devise/api/tokens"
10
+ }
11
+ end
@@ -0,0 +1,14 @@
1
+ require "devise"
2
+ require "devise/api"
3
+ module StayCommerce
4
+ module Frontend
5
+ class Engine < ::Rails::Engine
6
+ isolate_namespace StayCommerce::Frontend
7
+
8
+ initializer "stay_commerce.frontend.assets.precompile" do |app|
9
+ app.config.assets.paths << root.join("app", "javascript")
10
+ app.config.assets.precompile += %w[ application.js ]
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,5 @@
1
+ module StayCommerce
2
+ module Frontend
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
@@ -0,0 +1,8 @@
1
+ require "stay_commerce/frontend/version"
2
+ require "stay_commerce/frontend/engine"
3
+
4
+ module StayCommerce
5
+ module Frontend
6
+ # Your code goes here...
7
+ end
8
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :stay_commerce_frontend do
3
+ # # Task goes here
4
+ # end