chore: align migrations, docs, and frontends with crewli.app setup
- Replace dated migrations with ordered 2026_04_07_* chain; fold users update into base migration - Update OrganisationScope, AppServiceProvider, seeders, api routes, and .env.example - Refresh Cursor rules, CLAUDE.md, Makefile, README, and docs (API, SCHEMA, SETUP) - Adjust admin/app/portal HTML, packages, api-client, events types, and theme config - Update docker-compose and VS Code settings; remove stray Office lock files from resources Made-with: Cursor
This commit is contained in:
@@ -1,40 +1,23 @@
|
||||
# Band Portal
|
||||
# Crewli — Organizer SPA
|
||||
|
||||
This folder will contain the Band Member Portal using Vuexy Vue.
|
||||
Main product UI for organisation and event staff (Vue 3 + Vuexy + Vuetify). Lives in this repo; only re-copy from Vuexy when upgrading the template.
|
||||
|
||||
## Setup
|
||||
|
||||
1. Copy Vuexy Vue **starter-kit** (TypeScript) here:
|
||||
|
||||
```bash
|
||||
cp -r /path/to/vuexy/typescript-version/starter-kit/* .
|
||||
```
|
||||
|
||||
2. Install dependencies:
|
||||
1. Install dependencies:
|
||||
|
||||
```bash
|
||||
pnpm install
|
||||
```
|
||||
|
||||
3. Create `.env.local`:
|
||||
2. Create `.env.local`:
|
||||
|
||||
```env
|
||||
VITE_API_URL=http://localhost:8000/api/v1
|
||||
VITE_APP_NAME="Band Portal"
|
||||
VITE_APP_NAME="Crewli Organizer"
|
||||
```
|
||||
|
||||
4. Update `vite.config.ts` to use port 5174:
|
||||
|
||||
```typescript
|
||||
export default defineConfig({
|
||||
// ... existing config
|
||||
server: {
|
||||
port: 5174,
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
5. Start development:
|
||||
3. Dev server uses port **5174** (see `vite.config.ts` or run from repo root: `make app`).
|
||||
|
||||
```bash
|
||||
pnpm dev --port 5174
|
||||
@@ -43,3 +26,5 @@ pnpm dev --port 5174
|
||||
## Port
|
||||
|
||||
Runs on http://localhost:5174
|
||||
|
||||
**Production:** e.g. `VITE_API_URL=https://api.crewli.app/api/v1` and host the SPA at `https://app.crewli.app` (see `api/.env.example` for `FRONTEND_APP_URL` and `SANCTUM_STATEFUL_DOMAINS`).
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Event Crew - App</title>
|
||||
<title>Crewli — Organizer</title>
|
||||
<link rel="stylesheet" type="text/css" href="/loader.css" />
|
||||
</head>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "eventcrew-app",
|
||||
"name": "crewli-app",
|
||||
"version": "9.5.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
|
||||
@@ -2,6 +2,11 @@ import axios from 'axios'
|
||||
import { parse } from 'cookie-es'
|
||||
import type { AxiosInstance, InternalAxiosRequestConfig } from 'axios'
|
||||
|
||||
/**
|
||||
* Single axios instance for the Laravel API (`VITE_API_URL`, e.g. …/api/v1).
|
||||
* Auth: Bearer token from cookie `accessToken` (set by login).
|
||||
* Use composables built on this client for real API calls; Vuexy `useApi` remains for demos/mocks.
|
||||
*/
|
||||
const apiClient: AxiosInstance = axios.create({
|
||||
baseURL: import.meta.env.VITE_API_URL,
|
||||
headers: {
|
||||
@@ -14,9 +19,7 @@ const apiClient: AxiosInstance = axios.create({
|
||||
function getAccessToken(): string | null {
|
||||
if (typeof document === 'undefined') return null
|
||||
const cookies = parse(document.cookie)
|
||||
const token = cookies.accessToken
|
||||
|
||||
return token ?? null
|
||||
return cookies.accessToken ?? null
|
||||
}
|
||||
|
||||
apiClient.interceptors.request.use(
|
||||
@@ -25,11 +28,9 @@ apiClient.interceptors.request.use(
|
||||
if (token) {
|
||||
config.headers.Authorization = `Bearer ${token}`
|
||||
}
|
||||
|
||||
if (import.meta.env.DEV) {
|
||||
console.log(`🚀 ${config.method?.toUpperCase()} ${config.url}`, config.data)
|
||||
}
|
||||
|
||||
return config
|
||||
},
|
||||
error => Promise.reject(error),
|
||||
@@ -40,26 +41,20 @@ apiClient.interceptors.response.use(
|
||||
if (import.meta.env.DEV) {
|
||||
console.log(`✅ ${response.status} ${response.config.url}`, response.data)
|
||||
}
|
||||
|
||||
return response
|
||||
},
|
||||
error => {
|
||||
if (import.meta.env.DEV) {
|
||||
console.error(
|
||||
`❌ ${error.response?.status} ${error.config?.url}`,
|
||||
error.response?.data,
|
||||
)
|
||||
console.error(`❌ ${error.response?.status} ${error.config?.url}`, error.response?.data)
|
||||
}
|
||||
|
||||
if (error.response?.status === 401) {
|
||||
document.cookie = 'accessToken=; path=/; max-age=0'
|
||||
document.cookie = 'userData=; path=/; max-age=0'
|
||||
document.cookie = 'userAbilityRules=; path=/; max-age=0'
|
||||
if (window.location.pathname !== '/login') {
|
||||
if (typeof window !== 'undefined' && window.location.pathname !== '/login') {
|
||||
window.location.href = '/login'
|
||||
}
|
||||
}
|
||||
|
||||
return Promise.reject(error)
|
||||
},
|
||||
)
|
||||
|
||||
@@ -13,8 +13,8 @@ export interface Pagination {
|
||||
to: number | null
|
||||
}
|
||||
|
||||
/** EventCrew festival / multi-day event (aligned with API `EventResource`). */
|
||||
export type EventCrewEventStatus =
|
||||
/** Crewli festival / multi-day event (aligned with API `EventResource`). */
|
||||
export type CrewliEventStatus =
|
||||
| 'draft'
|
||||
| 'published'
|
||||
| 'registration_open'
|
||||
@@ -37,7 +37,7 @@ export interface Event {
|
||||
start_date: string
|
||||
end_date: string
|
||||
timezone: string
|
||||
status: EventCrewEventStatus
|
||||
status: CrewliEventStatus
|
||||
created_at: string
|
||||
updated_at: string
|
||||
organisation?: OrganisationSummary
|
||||
|
||||
@@ -10,7 +10,7 @@ import { AppContentLayoutNav, ContentWidth, FooterType, NavbarType } from '@layo
|
||||
|
||||
export const { themeConfig, layoutConfig } = defineThemeConfig({
|
||||
app: {
|
||||
title: 'Band',
|
||||
title: 'Organizer',
|
||||
logo: h('div', { innerHTML: logo, style: 'line-height:0; color: rgb(var(--v-global-theme-primary))' }),
|
||||
contentWidth: ContentWidth.Boxed,
|
||||
contentLayoutNav: AppContentLayoutNav.Vertical,
|
||||
|
||||
Reference in New Issue
Block a user