Skip to content

mwmeyer/flyapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

✈️ Airplane Dashboard

A super dooper simple FastAPI dashboard showcasing legendary aircraft throughout aviation history.

🚀 Features

  • Beautiful responsive dashboard with airplane cards
  • Historic aircraft data from Wright Flyer to modern planes
  • FastAPI backend with clean REST endpoints
  • Interactive UI with hover effects and detailed specs
  • Mobile-responsive design

🛩️ Aircraft Collection

  • Wright Flyer (1903) - First powered flight
  • Spirit of St. Louis (1927) - Lindbergh's transatlantic flight
  • Supermarine Spitfire (1936) - Battle of Britain legend
  • North American P-51 Mustang (1940) - WWII fighter
  • Boeing B-17 Flying Fortress (1935) - Heavy bomber
  • Bell X-1 (1946) - First to break sound barrier
  • Douglas DC-3 (1935) - Revolutionary airliner
  • Cessna 172 (1955) - Most produced aircraft

🖥️ API Endpoints

  • GET / - Dashboard homepage
  • GET /api/data - All data
  • GET /api/airplanes - List all airplanes
  • GET /api/airplanes/{id} - Get specific airplane details

🏃‍♂️ Local Development

Prerequisites

  • Python 3.11+
  • uv package manager

Setup

# Clone the repository
git clone <your-repo-url>
cd flyapi

# Install dependencies
uv sync

# Run the development server
uv run uvicorn src.api.main:app --host 0.0.0.0 --port 8000 --reload

Visit http://localhost:8000 to see the dashboard.

🚀 Deploy to Fly.io

Prerequisites

Deployment Steps

# Login to Fly.io
flyctl auth login

# Initialize and deploy (first time)
flyctl launch --no-deploy
flyctl deploy

# Or just deploy updates
flyctl deploy

Troubleshooting Deployment

If you get connection errors immediately after deployment:

  1. Wait 2-3 minutes - Services need time to start and register with load balancer
  2. Check status: flyctl status
  3. View logs: flyctl logs
  4. Test locally: flyctl proxy 8080:8000 then visit http://localhost:8080

Common Issues

  • "Connection refused" - Wait a few minutes after deployment for services to fully start
  • DNS resolution issues - IPv6 routing problems; try curl -4 <url> or wait for DNS propagation
  • App not responding - Check flyctl logs for startup errors

Deployment Configuration

The app uses:

  • Docker containerization
  • Port 8000 internally (FastAPI/Uvicorn)
  • Auto-scaling machines (stop when idle)
  • HTTPS enforced
  • Shared CPU/1GB RAM per machine

📁 Project Structure

flyapi/
├── src/
│   ├── api/
│   │   └── main.py          # FastAPI application
│   ├── data/
│   │   └── db.json          # Airplane data
│   └── ui/
│       └── dashboard.html   # Frontend dashboard
├── Dockerfile               # Container configuration
├── fly.toml                # Fly.io deployment config
└── pyproject.toml          # Python dependencies

🔧 Tech Stack

  • Backend: FastAPI, Uvicorn
  • Frontend: Vanilla HTML/CSS/JavaScript
  • Deployment: Fly.io, Docker
  • Package Management: uv

📝 License

MIT License - feel free to use this project as a starting point for your own dashboards!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published