-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
-
PHP 8.2+ with the
intlandmysqlndextensions - Composer
- Node.js 20+ and pnpm (the project uses pnpm, not npm)
- A MariaDB/MySQL server (e.g. XAMPP)
composer install
cd frontend && pnpm install && cd ..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.
php spark migrate --all
php spark db:seed FlightMeetSeeder-
migrate --allcreates the Shield auth tables, the profile/subscription columns onusers, the FlightMeet domain tables, and the weather report cache. See Database. -
FlightMeetSeedercreates six sample pilots (pilot1..pilot6, passwordpassword123), 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 PersonenSeederimports the 9999 legacypersonenrecords as regular users (passwordpassword123) and creates the admin/moderator 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).
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 devOpen 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>infrontend/.env.local. - On some Windows setups
php spark servebinds IPv6 only; iflocalhostresolution causes trouble, try127.0.0.1explicitly.
cd frontend && pnpm buildThis 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); thepublic/build is for production only.
See Deployment for how the production server routes requests.
- New to the codebase? Read Architecture first, then Backend and Frontend.
- Building a feature? Follow
docs/SPECIFICATION.mdand the contract in API Reference. - Touching auth or the admin area? Read Authentication and Roles.
FlightMeet
Code
Reference