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:
2026-04-07 10:45:34 +02:00
parent 5e2ede14b4
commit fda161ee09
53 changed files with 355 additions and 446 deletions

View File

@@ -20,7 +20,7 @@ pnpm install
```env
VITE_API_URL=http://localhost:8000/api/v1
VITE_APP_NAME="Event Crew Admin"
VITE_APP_NAME="Crewli Admin"
```
4. Start development:
@@ -31,4 +31,6 @@ pnpm dev
## Port
Runs on http://localhost:5173 (Vite default)
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`).

View File

@@ -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 Admin</title>
<title>Crewli Admin</title>
<link rel="stylesheet" type="text/css" href="/loader.css" />
</head>

View File

@@ -1,5 +1,5 @@
{
"name": "eventcrew-admin",
"name": "crewli-admin",
"version": "9.5.0",
"private": true,
"type": "module",

View File

@@ -5,7 +5,7 @@ import type { AxiosInstance, InternalAxiosRequestConfig } from 'axios'
/**
* Single axios instance for the real Laravel API (VITE_API_URL).
* Auth: Bearer token from cookie 'accessToken' (set by login).
* Use this for all event-crew API calls; useApi (composables/useApi) stays for Vuexy demo/mock endpoints.
* Use this for all Crewli API calls; useApi (composables/useApi) stays for Vuexy demo/mock endpoints.
*/
const apiClient: AxiosInstance = axios.create({
baseURL: import.meta.env.VITE_API_URL,

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import { useEvents } from '@/composables/useEvents'
import { useRoute, useRouter } from 'vue-router'
import type { EventCrewEventStatus, UpdateEventData } from '@/types/events'
import type { CrewliEventStatus, UpdateEventData } from '@/types/events'
definePage({
meta: {
@@ -17,7 +17,7 @@ const eventId = computed(() => route.params.id as string)
const formData = ref<UpdateEventData>({})
const statusOptions: { title: string; value: EventCrewEventStatus }[] = [
const statusOptions: { title: string; value: CrewliEventStatus }[] = [
{ title: 'Draft', value: 'draft' },
{ title: 'Published', value: 'published' },
{ title: 'Registration open', value: 'registration_open' },

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import { useEvents } from '@/composables/useEvents'
import { useRouter } from 'vue-router'
import type { CreateEventData, EventCrewEventStatus } from '@/types/events'
import type { CreateEventData, CrewliEventStatus } from '@/types/events'
definePage({
meta: {
@@ -21,7 +21,7 @@ const formData = ref<CreateEventData>({
status: 'draft',
})
const statusOptions: { title: string; value: EventCrewEventStatus }[] = [
const statusOptions: { title: string; value: CrewliEventStatus }[] = [
{ title: 'Draft', value: 'draft' },
{ title: 'Published', value: 'published' },
{ title: 'Registration open', value: 'registration_open' },

View File

@@ -17,8 +17,8 @@ export interface Pagination {
to: number | null
}
/** EventCrew festival / multi-day event (API resource). */
export type EventCrewEventStatus =
/** Crewli festival / multi-day event (API resource). */
export type CrewliEventStatus =
| 'draft'
| 'published'
| 'registration_open'
@@ -41,7 +41,7 @@ export interface Event {
start_date: string
end_date: string
timezone: string
status: EventCrewEventStatus
status: CrewliEventStatus
created_at: string
updated_at: string
organisation?: OrganisationSummary
@@ -53,7 +53,7 @@ export interface CreateEventData {
start_date: string
end_date: string
timezone?: string
status?: EventCrewEventStatus
status?: CrewliEventStatus
}
export interface UpdateEventData extends Partial<CreateEventData> {}

View File

@@ -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`).

View File

@@ -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>

View File

@@ -1,5 +1,5 @@
{
"name": "eventcrew-app",
"name": "crewli-app",
"version": "9.5.0",
"private": true,
"type": "module",

View File

@@ -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)
},
)

View File

@@ -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

View File

@@ -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,

View File

@@ -1,40 +1,23 @@
# Customer Portal
# Crewli — Portal SPA
This folder will contain the Customer Portal using Vuexy Vue.
External-facing app for volunteers (login) and artists/suppliers (token links). Stripped Vuexy layout; same stack as other apps.
## 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="Customer Portal"
VITE_APP_NAME="Crewli Portal"
```
4. Update `vite.config.ts` to use port 5175:
```typescript
export default defineConfig({
// ... existing config
server: {
port: 5175,
},
})
```
5. Start development:
3. Dev server uses port **5175** (see `vite.config.ts` or run from repo root: `make portal`).
```bash
pnpm dev --port 5175
@@ -43,3 +26,5 @@ pnpm dev --port 5175
## Port
Runs on http://localhost:5175
**Production:** e.g. `VITE_API_URL=https://api.crewli.app/api/v1` and host the SPA at `https://portal.crewli.app` (portal links in emails use this host; see `api/.env.example`).

View File

@@ -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 - Customer Portal</title>
<title>Crewli — Portal</title>
<link rel="stylesheet" type="text/css" href="/loader.css" />
</head>

View File

@@ -1,5 +1,5 @@
{
"name": "eventcrew-portal",
"name": "crewli-portal",
"version": "9.5.0",
"private": true,
"type": "module",

View File

@@ -10,7 +10,7 @@ import { AppContentLayoutNav, ContentWidth, FooterType, NavbarType } from '@layo
export const { themeConfig, layoutConfig } = defineThemeConfig({
app: {
title: 'Customer',
title: 'Portal',
logo: h('div', { innerHTML: logo, style: 'line-height:0; color: rgb(var(--v-global-theme-primary))' }),
contentWidth: ContentWidth.Boxed,
contentLayoutNav: AppContentLayoutNav.Vertical,