Skip to content

Getting Started

Joël Deffner edited this page Jul 17, 2026 · 1 revision

Getting Started

Prerequisites

  • PHP 8.2+ with the intl and mysqlnd extensions
  • Composer
  • Node.js 20+ and pnpm (the project uses pnpm, not npm)
  • A MariaDB/MySQL server (e.g. XAMPP)

Setup

1. Install dependencies

composer install
cd frontend && pnpm install && cd ..

2. Configure the environment

Copy env to .env and set the database credentials under database.default.*. The default database name is db_team11. Anything that isn't committed (credentials, base URL overrides) lives in .env.

3. Create the schema and sample data

php spark migrate --all
php spark db:seed FlightMeetSeeder
  • migrate --all creates the Shield auth tables, the profile/subscription columns on users, the FlightMeet domain tables, and the weather report cache. See Database.
  • FlightMeetSeeder creates six sample pilots (pilot1 .. pilot6, password password123), four flight groups, upcoming meets with real coordinates, participants, and chat messages. It is idempotent: it aborts if meets already exist.
  • Optionally, php spark db:seed PersonenSeeder imports the 9999 legacy personen records as regular users (password password123) and creates the admin/moderator test accounts.

Test accounts

Login (email or username) Password Role
admin@team11.local / admin Admin123! admin
moderator@team11.local / moderator Moderator123! moderator
pilot1@example.com / pilot1 (.. pilot6) password123 user

Login works with email or username (Shield's validFields includes username, already enabled in app/Config/Auth.php).

Run in development

Start the API and the frontend dev server in two terminals:

# Terminal 1: CodeIgniter API on http://localhost:8080
php spark serve --host localhost --port 8080

# Terminal 2: Vite dev server with HMR on http://localhost:5173
cd frontend && pnpm dev

Open http://localhost:5173. The Vite dev server proxies /api and /media to the backend.

  • If port 8080 is taken, run spark on another port and set CI_BACKEND_URL=http://localhost:<port> in frontend/.env.local.
  • On some Windows setups php spark serve binds IPv6 only; if localhost resolution causes trouble, try 127.0.0.1 explicitly.

Build for production

cd frontend && pnpm build

This runs tsc -b and compiles the SPA into public/ (outDir: '../public', base: '/public/'). Built assets are committed to the repository.

Important: a frontend source change only appears in the served app after pnpm build. In development you use the Vite server (HMR); the public/ build is for production only.

See Deployment for how the production server routes requests.

Where to go next

Clone this wiki locally