Overview
SkyTeam ROBLOX provides a comprehensive flight management system that tracks flights through their entire lifecycle. Airlines can create, start, monitor, and end flights through the API, with real-time updates to passengers and Discord integration.Flight Lifecycle
Flights progress through several distinct stages:Flight Schema
Flights are stored in the database with the following structure:packages/database/src/schema.ts
API Endpoints
Fetch Upcoming Flights
Retrieve all flights that haven’t ended yet for an airline, including brand information:apps/api/src/routes/flight.ts
Note
This endpoint automatically enriches flight data with brand information for display purposes.
Start Flight
Mark a flight as started when the ROBLOX game server begins:apps/api/src/routes/flight.ts
startFlight function sets the startedAt timestamp:
packages/database/src/flights.ts
Heartbeat (Tick)
Games send periodic heartbeat signals to indicate the flight is still active:apps/api/src/routes/flight.ts
Future Enhancement
The schema will be expanded to include
lastPingAt to automatically end flights that become stale.End Flight
Mark a flight as completed:apps/api/src/routes/flight.ts
endFlight function sets the endTime timestamp:
packages/database/src/flights.ts
Flight Passengers
Passengers are tracked separately with miles earned:packages/database/src/schema.ts
Fetching User Flights
Retrieve all flights a user has participated in:packages/database/src/flights.ts
Best Practices
Always Start Flights
Call
/flight/:id/serverStart as soon as the ROBLOX game beginsSend Heartbeats
Send tick requests every 30-60 seconds during active flights
End Flights Promptly
Call
/flight/:id/serverEnd immediately when the game completesInclude Discord Links
Provide Discord event links for community engagement
Next Steps
Learn About Miles
Discover how passengers earn and spend miles from flights