chore: remove admin SPA and update to two-app production setup
Remove apps/admin/ entirely — platform admin functionality now lives in apps/app/ under /platform/* routes for super_admin users. Production URL scheme changed: - Organizer app: crewli.app (was app.crewli.app) - Portal: portal.crewli.app (unchanged) - API: api.crewli.app (unchanged) - admin.crewli.app and app.crewli.app retired Backend: - Removed FRONTEND_ADMIN_URL config and admin cookie (crewli_admin_token) from SetAuthCookie, CookieBearerToken, cors.php, app.php - Updated .env and .env.example (two origins, no port 5173) - Updated cookie test: admin origin test → unknown origin fallback test Infrastructure: - Makefile: removed admin target - deploy/nginx: updated CSP comment, removed admin vhost - Updated README.md, CLAUDE.md, and all dev-docs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
20
README.md
20
README.md
@@ -21,8 +21,7 @@ Implementation is phased; the authoritative feature and schema list lives in the
|
||||
|
||||
| App | Path | Port | Role |
|
||||
|-----|------|------|------|
|
||||
| **Admin** | `apps/admin/` | 5173 | Platform **super admin**: organisations, billing-style flags, global settings. Full Vuexy shell. |
|
||||
| **Organizer** | `apps/app/` | 5174 | Main product for **org and event staff**: events, sections, shifts, people, artists, accreditation, briefings, reports, etc. |
|
||||
| **Organizer** | `apps/app/` | 5174 | Main product for **org and event staff**: events, sections, shifts, people, artists, accreditation, briefings, reports. Includes **Platform Admin** section for super admins (`/platform/*`). |
|
||||
| **Portal** | `apps/portal/` | 5175 | **External** users: stripped layout; login- or token-based access. |
|
||||
|
||||
All apps talk to the API over **CORS** with **Laravel Sanctum** tokens.
|
||||
@@ -48,8 +47,7 @@ All apps talk to the API over **CORS** with **Laravel Sanctum** tokens.
|
||||
crewli/
|
||||
├── api/ # Laravel 12 REST API (JSON only)
|
||||
├── apps/
|
||||
│ ├── admin/ # Super Admin SPA
|
||||
│ ├── app/ # Organizer SPA (primary UI)
|
||||
│ ├── app/ # Organizer SPA (primary UI + platform admin)
|
||||
│ └── portal/ # External portal SPA
|
||||
├── docker/ # Docker / Compose assets
|
||||
├── docs/ # SETUP, API notes, schema notes
|
||||
@@ -75,9 +73,8 @@ cd api && cp .env.example .env && composer install && php artisan key:generate &
|
||||
|
||||
# 3. Run API + the SPAs you need (separate terminals)
|
||||
make api
|
||||
make admin # optional
|
||||
make app # optional
|
||||
make portal # optional
|
||||
make app
|
||||
make portal
|
||||
```
|
||||
|
||||
Detailed setup: **[docs/SETUP.md](docs/SETUP.md)**.
|
||||
@@ -89,25 +86,23 @@ Detailed setup: **[docs/SETUP.md](docs/SETUP.md)**.
|
||||
| Service | Development | Env / notes |
|
||||
|---------|-------------|-------------|
|
||||
| API | http://localhost:8000/api/v1 | Base path `/api/v1` |
|
||||
| Admin | http://localhost:5173 | `FRONTEND_ADMIN_URL` in Laravel CORS |
|
||||
| Organizer | http://localhost:5174 | `FRONTEND_APP_URL` |
|
||||
| Portal | http://localhost:5175 | `FRONTEND_PORTAL_URL` |
|
||||
| Mailpit | http://localhost:8025 | Local mail capture |
|
||||
|
||||
### Production (crewli.app)
|
||||
|
||||
**Domains:** **`crewli.app`** is this product (API + organizer/admin/portal SPAs, transactional email from the app, seeds, etc.). **`crewli.nl`** is reserved for a future **public marketing site** only — do not point this codebase’s `APP_URL`, CORS, Sanctum, or app mail at `crewli.nl`.
|
||||
**Domains:** **`crewli.app`** is this product (API + organizer + portal SPAs, transactional email from the app, seeds, etc.). **`crewli.nl`** is reserved for a future **public marketing site** only — do not point this codebase's `APP_URL`, CORS, Sanctum, or app mail at `crewli.nl`.
|
||||
|
||||
Typical layout (configure the same values in `api/.env` — see `api/.env.example`):
|
||||
|
||||
| Service | URL | Env variable |
|
||||
|---------|-----|----------------|
|
||||
| API | `https://api.crewli.app` | `APP_URL` |
|
||||
| Admin | `https://admin.crewli.app` | `FRONTEND_ADMIN_URL` |
|
||||
| Organizer | `https://app.crewli.app` | `FRONTEND_APP_URL` |
|
||||
| Organizer | `https://crewli.app` | `FRONTEND_APP_URL` |
|
||||
| Portal | `https://portal.crewli.app` | `FRONTEND_PORTAL_URL` |
|
||||
|
||||
Frontends: set `VITE_API_URL=https://api.crewli.app/api/v1` in each app’s env for production builds. `SANCTUM_STATEFUL_DOMAINS` must list the **hostnames only** of the three SPAs (e.g. `admin.crewli.app,app.crewli.app,portal.crewli.app`).
|
||||
Frontends: set `VITE_API_URL=https://api.crewli.app/api/v1` in each app's env for production builds. `SANCTUM_STATEFUL_DOMAINS` must list the **hostnames only** of the two SPAs (e.g. `crewli.app,portal.crewli.app`).
|
||||
|
||||
---
|
||||
|
||||
@@ -117,7 +112,6 @@ Frontends: set `VITE_API_URL=https://api.crewli.app/api/v1` in each app’s env
|
||||
make services # MySQL, Redis, Mailpit
|
||||
make services-stop
|
||||
make api # Laravel on :8000
|
||||
make admin # Admin on :5173
|
||||
make app # Organizer on :5174
|
||||
make portal # Portal on :5175
|
||||
make migrate
|
||||
|
||||
Reference in New Issue
Block a user