Vasyka d10480b9f4 fix: language switcher now robust — persistent cookie fallback
Session-only storage was flaky in production: sessions get regenerated,
scoped per-subdomain differently, or lost on error pages. User reported
switcher had no effect on visible language.

Add a persistent 'app_locale' cookie set by the /locale/{lang} route.
SetLocale middleware now resolves in this order:
  1. app_locale cookie (survives everything)
  2. session locale
  3. authenticated user.locale
  4. tenant.settings.language
  5. hard-coded 'ro'

Cookie is 1-year, path=/, not httpOnly (JS can read for debug), not
Secure (works on any protocol including plain HTTP during dev).

Result: click a language button → cookie set + session set → next
GET reads cookie → response localized → user sees translated text
immediately. Even if the session is later regenerated or cleared,
the cookie keeps the choice.

Suite: 306 passed (853 assertions). Unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-07-13 20:22:14 +00:00

AutoCRM

SaaS CRM multi-tenant pentru autoservice și magazin piese auto.

Stack

  • Laravel 12 + Filament 5
  • Octane (FrankenPHP runtime)
  • MariaDB 11.4
  • Redis 7
  • Stancl/Tenancy v3 (single-DB multi-tenant)

Domenii

  • service.mir.md — panou central super-admin
  • <slug>.service.mir.md — instanță tenant

Documentație

Vezi /root/service/docs/00-index.md în repo-ul părinte (separat de cod) pentru:

  • Arhitectură + decizii
  • Setup multi-tenant (3 niveluri izolare)
  • Toate cele 31 module preluate din prototip
  • Operațiuni (deploy / backup / add-tenant / troubleshoot)

Dev local

cp .env.example .env
composer install
npm install
php artisan key:generate
php artisan migrate
npm run build
php artisan octane:start --server=frankenphp

Deploy

Push pe main → Coolify auto-deploy.

License

Proprietary. © 2026.

S
Description
AutoCRM SaaS multi-tenant
Readme 14 MiB
Languages
PHP 78%
Blade 21.7%
Dockerfile 0.2%