Minifly 🚀
Local Fly.io development simulator with incredible developer experience
Minifly provides a complete local development environment that simulates the Fly.io platform, allowing you to develop, test, and debug your applications with the same APIs and behavior you'll see in production.
🚀 Quick Start
Install from crates.io
Initialize and start
# Initialize Minifly environment
# Start the platform
# Deploy your first app
✨ Features
- 🚀 Complete Fly.io API Compatibility - Full Machines API with Docker integration
- 🗄️ LiteFS Integration - Distributed SQLite with local replication testing
- 🔥 Incredible Developer Experience - Hot reloading, watch mode, structured logging
- 🌍 Multi-region Simulation - Test region-specific behavior locally
- 📊 Real-time Monitoring - Comprehensive status dashboards and logging
- 🐳 Docker Management - Automatic container lifecycle management
- ⚡ Lightning Fast - Instant deployments and real-time feedback
📋 Commands
Platform Management
# Start the Minifly platform
# Start in development mode with enhanced logging
# Stop the platform
Application Management
# Create an application
# List applications
# Delete an application
Machine Management
# Create a machine
# List machines
# Start/stop machines
Development Workflow
# Deploy with automatic redeployment on changes
# View real-time logs with region context
# Check platform status
🏗️ Multi-tenant Applications
Minifly excels at simulating multi-tenant architectures with per-tenant databases:
// Each tenant gets their own replicated database
let db_path = format!;
let pool = connect.await?;
📊 Structured Logging
Get comprehensive observability with built-in structured logging:
# Enable debug logging
MINIFLY_DEBUG=1
# JSON formatted logs for production
MINIFLY_LOG_JSON=1
All operations include:
- Correlation IDs for request tracking
- Region context for multi-region testing
- Performance metrics and timing information
- Structured error context for debugging
🌐 API Compatibility
Minifly implements the complete Fly.io Machines API v1:
# All standard Fly.io API endpoints work locally
🔧 Configuration
Environment Variables
MINIFLY_API_PORT: API server port (default: 4280)MINIFLY_LOG_LEVEL: Log level (default: info)MINIFLY_LOG_JSON: Use JSON logging formatMINIFLY_DEBUG: Enable debug loggingMINIFLY_DATA_DIR: Data directory for volumes (default: ./data)
Configuration File
Create ~/.config/minifly/config.toml:
= "http://localhost:4280"
= "your-api-token"
[]
= "info"
= "human" # or "json"
🚀 Examples
Simple Web App
# fly.toml
= "my-web-app"
= "local"
[[]]
= 8080
= "tcp"
[[]]
= 80
= ["http"]
[[]]
= 443
= ["tls", "http"]
# Deploy and watch for changes
Multi-tenant SaaS
# fly.toml for multi-tenant app
= "saas-app"
= "local"
[]
= "/litefs/primary.db"
= "database"
[[]]
= "sqlite_data"
= "/litefs"
📚 Documentation
- Full Documentation - Complete documentation site
- Getting Started Guide - Complete setup tutorial
- API Reference - Full API documentation
- GitHub Repository - Source code and examples
🤝 Contributing
Contributions are welcome! Please see our Contributing Guide for details.
📄 License
Licensed under the MIT License. See LICENSE for details.
Happy local development! 🎉
For questions and support, visit our GitHub repository.