feat: v0.6.0 — data foundation: Drizzle ORM + SQLite (sql.js/WASM) persistence, first-run seed, read-only GET /api/state snapshot

This commit is contained in:
2026-09-17 11:51:42 +00:00
parent 4d9a1e9fa9
commit 7fdc43bc7e
23 changed files with 1006 additions and 8 deletions
+26
View File
@@ -0,0 +1,26 @@
// Aircraft catalog — in-code constants for now (no DB table yet). One type is
// enough for the MVP; add more entries to PLANE_TYPES as they are designed.
export interface PlaneType {
id: string;
name: string;
// Fuel capacity, liters.
maxFuel: number;
// Fuel burn per km of flight, liters/km (cruise).
burnPerKm: number;
// Cruise speed, km/h — used by the sim tick to advance planes along routes.
speedKmh: number;
}
export const PLANE_TYPES: Record<string, PlaneType> = {
atr72: {
id: 'atr72',
name: 'ATR 72-600',
maxFuel: 6300,
burnPerKm: 1.75, // ~900 kg/h at 510 km/h cruise (Jet-A1 ≈ 0.8 kg/L)
speedKmh: 510,
},
};
// The plane the player starts with.
export const STARTER_MODEL = 'atr72';