A real-time aircraft maintenance monitoring and task management system built for American Airlines. Features an interactive 3D digital twin, AI-powered task delegation, and real-time crew coordination.
- 3D Digital Twin - Interactive Boeing 737-800 model with part highlighting and camera presets
- Real-time Task Management - Create, assign, and track maintenance tasks with priority levels
- AI Smart Delegation - Google Gemini-powered suggestions for optimal task assignments
- Crew Coordination - Real-time chat and crew member status tracking
- Role-based Access - Overseer dashboard and crew portal with different capabilities
- Live Updates - Supabase real-time subscriptions for instant data sync
- Framework: Next.js 16 with App Router
- 3D Rendering: React Three Fiber + Three.js
- Database: Supabase (PostgreSQL + Realtime)
- AI: Google Generative AI (Gemini)
- Styling: Tailwind CSS 4
- Auth: Supabase Auth
- Node.js 18+ or Bun
- Supabase account
Create .env.local:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key
GOOGLE_AI_API_KEY=your_gemini_api_key
NEXT_PUBLIC_SITE_URL=http://localhost:3000# Install dependencies
npm install
# or
bun install
# Run development server
npm run dev
# or
bun devOpen http://localhost:3000.
Run migrations in order from supabase/migrations/ in your Supabase SQL editor:
001_add_overseer_role.sql- User roles002_create_part_templates.sql- Part templates003_add_rls_policies.sql- Row-level security010_merge_parts_tables.sql- Unified parts table011_auto_part_status.sql- Auto-status triggers
app/
├── dashboard/ # Overseer dashboard
├── crew/ # Crew portal
├── login/ # Authentication
├── actions/ # Server actions
└── traffic/ # Traffic simulation
components/
├── canvas/ # 3D model components
├── dashboard/ # Dashboard widgets
├── chat/ # Real-time chat
├── panels/ # Slide-out panels
└── layout/ # Navbar, shared UI
hooks/
├── useRealtimePartsWithTasks.ts # Parts & tasks sync
├── useRealtimeTasks.ts # Task subscriptions
├── useUserRole.ts # Role detection
└── useViewMode.ts # View mode state
lib/
├── supabase/ # Supabase clients
├── types/ # TypeScript types
└── utils/ # Utility functions
| Component | Description |
|---|---|
Scene.tsx |
3D model viewer with camera controls |
PieceSelection.tsx |
Parts list with status indicators |
TimeBreakdowns.tsx |
Active tasks list |
DelegationSuggestions.tsx |
AI-powered task delegation |
RealtimeChat.tsx |
Crew communication |
TaskProgressBar.tsx |
Task completion progress |
- aircraft_parts - Parts with status and camera positions
- task_assignments - Maintenance tasks with assignments
- crew_members - Crew with roles and availability
- chat_messages - Real-time chat messages
npm run dev # Development server
npm run build # Production build
npm run test # Run tests
npm run lint # ESLint