The admin app's 1.router plugin loads before 2.pinia. During router.install(), the initial navigation triggers the index redirect and beforeEach guard, both of which call useAuthStore() — but Pinia isn't registered yet, causing a crash. Fix: wrap useAuthStore() in try/catch in both additional-routes.ts and guards.ts. On the initial router install navigation, the catch falls back to redirecting to login / allowing navigation. Once Pinia is available on subsequent navigations, the store works normally. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Admin Dashboard
This folder will contain the Admin SPA using Vuexy Vue.
Setup
- Copy Vuexy Vue full-version (TypeScript) here:
cp -r /path/to/vuexy/typescript-version/full-version/* .
- Install dependencies:
pnpm install
- Create
.env.local:
VITE_API_URL=http://localhost:8000/api/v1
VITE_APP_NAME="Crewli Admin"
- Start development:
pnpm dev
Port
Runs on http://localhost:5173 (Vite default).
Production: point VITE_API_URL at your API, e.g. https://api.crewli.app/api/v1, with DNS/TLS for admin.crewli.app (and matching Laravel FRONTEND_ADMIN_URL / CORS / Sanctum settings — see repo README.md and api/.env.example).