Proje: Okul Platform

Customer panel FE is a separate bundle

The customer panel (kurumsal) is architecturally isolated from the public school site. Loading/build/pattern differences matter when adding features that span both.

CSS

  • Source: resources/assets/css/customer.css
  • Build (webpack.mix.js): mix.styles(['resources/assets/css/customer.css'], 'public/customer/dist/vendors/styles/customer.css');
  • NOT loaded on public site. NOT concatenated into main.min.css.
  • Public site CSS (main.min.css) uses resources/assets/css/custom.css — separate file.

GOTCHA: not all customer views load customer.css

Only resources/views/customer_v2/layouts/master.blade.php includes <link … customer/dist/vendors/styles/customer.css>.

Legacy v1 pages that use customer/includes/head.blade.php (e.g., customer/user/login.blade.php, customer/user/forgot-password.blade.php) load ONLY bootstrap.min.css, font-awesome, beyond.css, demo.min.css, typicons.min.css, animate.min.cssNOT customer.css.

Effect: styles you add to resources/assets/css/customer.css won’t apply on v1 pages until you explicitly add the <link> tag to the page’s head (or include it in customer/includes/head.blade.php if you want it global).

Caught 2026-04-14: OTP styles added to customer.css had no effect on kurumsal/giris-yap (v1 login page) until the blade was patched with <link rel="stylesheet" href="{{asset('customer/dist/vendors/styles/customer.css')}}">.

Rule: Before adding styles to customer.css, grep which views load it; if the target view doesn’t, either:

  1. Add <link> in the blade head, OR
  2. Add the <link> to customer/includes/head.blade.php to cover all v1 pages, OR
  3. Put styles elsewhere (e.g., inline on that one page).

JS

Customer pages (e.g., customer/user/login.blade.php) load scripts directly via <script src="...">:

  • public/assets/customer/js/jquery.min.js (own jQuery — separate from bower jQuery on public site)
  • public/assets/customer/js/bootstrap.min.js
  • public/assets/customer/js/beyond.js
  • public/assets/customer/js/toastr/toastr.js

These are static files under public/assets/customer/js/, not in the webpack pipeline.

Neither resources/assets/scripts/frontend/general.js nor mobile/app.js is loaded on customer pages. The OTP helpers we defined there (gaSendEventOtp, readOtpDuration, startOtpCountdown, etc.) are NOT available in the customer panel.

Consequence for customer features

When adding a FE feature to a customer page:

  • CSSresources/assets/css/customer.css (not custom.css, not mobile sass).
  • Page-specific JS → inline <script> in the blade, or a new static file added to <script src>. Inline IIFE is the existing pattern (see Notify() block in customer/user/login.blade.php).
  • No access to shared helpers. If you need a helper, either inline it in the page or create a customer-specific JS file.
  • No GA event helpers loaded by default (gaEvents.js isn’t included on customer pages). If GA needed, include or inline.

Example: OTP integration on customer login (2026-04-14)

The customer/user/login.blade.php OTP flow is self-contained:

  • OTP CSS added to customer.css (new .login-modal .login-method-switch, .otp-meta, etc.)
  • OTP JS written as an inline IIFE (function ($) { ... })(jQuery) at the bottom of the blade — reimplements validate/normalize/countdown/session helpers locally rather than pulling from general.js.
  • Calls school-api.auth.* directly via jQuery AJAX (same endpoints as public site), but redirects to customer_homepage on success.