lake/larke-admin-frontend
Larke Admin Frontend supplies the frontend layer for Larke Admin in Laravel apps, providing admin UI views, layouts, and assets to build management dashboards faster. Pair it with the backend package for a complete admin experience.
This is a standalone Vue 2 + Element UI SPA, not a Composer package you require in a Laravel app. It is the decoupled frontend that talks to a larke-admin backend over HTTP, so treat it as a companion repo rather than a library.
Minimal setup:
git clone https://github.com/deatil/larke-admin-frontend. Note the package name in the prompt (lake/larke-admin-frontend) is off — the actual repo is deatil/larke-admin-frontend.node-sass or openssl in webpack 4..env* files and src/config/ (base URL / request prefix), plus the axios instance under src/utils/request.js or src/api/. Set the base URL to your working larke-admin backend (which itself is a Laravel app with the API plugin running).npm run serve (or yarn serve). Log in with the super-admin credentials created on the backend side.npm run build and serve dist/ — either from Laravel's public/ dir or via nginx.First use case: get the login screen talking to your backend and land on the dashboard. That single flow validates CORS, the API prefix, token handling, and menu/permission hydration in one go — everything else in the app hangs off those four pieces.
Where to look first, in order: .env/src/config → src/utils/request.js (axios interceptors) → src/router/ (routes and guards) → src/store/ (auth/user state) → src/views/ (actual pages).
Cloning as your own admin base. Because it's a template, the common pattern is: fork the repo, keep src/api/ and src/utils/request.js as the sole network layer, and add your own view modules under src/views/<module>/ with a matching src/api/<module>.js. Avoid scattering axios calls through components.
Token + interceptor flow. Auth is typically a token stored in localStorage and Vuex, injected by an axios request interceptor. The response interceptor catches the backend's auth/401 envelope and redirects to login. When integrating against a customized larke-admin, this interceptor is the first place to adapt — the backend's error envelope (code/message/data) may differ from what the frontend expects.
Menu and route generation. Admin frameworks in this family usually drive sidebar menus and even route permissions from data returned by the backend, not purely from static route files. So a new page needs three aligned things: a frontend route/component, an API endpoint, and a backend menu/permission entry. Missing any one yields a page that 404s, an empty menu, or a button that silently hides.
Permission directives. Button- and column-level control is usually done with a v-permission-style directive checked against the current user's permission codes. Pattern: derive codes from the logged-in user, register the directive globally, and keep the code strings identical to the backend menu permission keys.
Reusable CRUD scaffolding. The dominant day-to-day pattern is list + search form + dialog form CRUD. Copy an existing module (e.g. users/roles) as the template, then swap the API module and columns. This is faster and safer than building a page from scratch and keeps Element UI table/pagination/form conventions consistent.
Deployment integration. Build with npm run build, then either drop dist/ into the Laravel public/ subdirectory or serve it via nginx with a try_files ... /index.html fallback for history-mode routing. Set the vue-cli publicPath to match where you mount it (subpath vs. root) so asset URLs resolve.
node-sass fails on newer Node with ERR_OSSL_EVP_UNSUPPORTED or binding errors. Fix by pinning Node 14/16, or NODE_OPTIONS=--openssl-legacy-provider, or swapping to sass (dart-sass).VUE_APP_* variables reach the app. Renaming a VITE_/API_ var won't work — this trips people coming from other toolchains.APP_URL mismatch, not the frontend code. Test the login endpoint with curl first.v-permission strings are not type-checked; a typo just hides a button. Keep a single authoritative list of codes and grep both sides when something "disappears."How can I help you explore Laravel packages today?