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) usesresources/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.css — NOT 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:
- Add
<link>in the blade head, OR - Add the
<link>tocustomer/includes/head.blade.phpto cover all v1 pages, OR - 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.jspublic/assets/customer/js/beyond.jspublic/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:
- CSS →
resources/assets/css/customer.css(notcustom.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 (seeNotify()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.jsisn’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 fromgeneral.js. - Calls
school-api.auth.*directly via jQuery AJAX (same endpoints as public site), but redirects tocustomer_homepageon success.
Related
- 2026-04-14-fe-style-js-locations — public site style/JS locations
- 2026-04-14-customer-vs-user-login-rules — server-side differences
- 2026-04-14-external-api-otp-customer-only — why OTP fits naturally on customer panel