# ICE Felix Starter 🚀

**Complete development environment installer for Laravel, Flutter, and Supabase projects**

[![npm version](https://badge.fury.io/js/ice-felix-starter.svg)](https://www.npmjs.com/package/ice-felix-starter)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A powerful CLI installer that sets up a complete full-stack development environment with Laravel backend, Flutter frontend, and Supabase database - all configured and ready to use!

## 🎯 What You Get

- **Laravel Backend** - PHP API with MySQL database
- **Flutter Frontend** - Cross-platform web and mobile app
- **Supabase Database** - Real-time database with authentication
- **Docker Services** - MySQL and Redis containers
- **Environment Configuration** - Automated .env file setup
- **Git Integration** - Repository cloning and configuration

## 📦 Installation

### Global Installation (Recommended)

```bash
npm install -g ice-felix-starter
```

### One-time Run (No Installation)

```bash
npx ice-felix-starter
```

## 🚀 Usage

After installation, simply run:

```bash
ice-felix
```

Or with the full name:

```bash
ice-felix-starter
```

The installer will guide you through:

1. **System Requirements Check** - Verifies required tools
2. **Project Configuration** - App name, domain, credentials
3. **Repository Setup** - Clones Laravel and Flutter projects
4. **Supabase Integration** - Sets up database and functions
5. **Docker Configuration** - Prepares container services
6. **Environment Setup** - Generates configuration files

## 🛠️ Prerequisites

### Required Tools
- **Git** - Version control
- **Python 3.8+** - CLI runtime
- **Docker** - Container platform (for Supabase functions)

### Optional Tools (Auto-detected)
- **PHP & Composer** - Laravel development
- **Flutter** - Mobile app development
- **Supabase CLI** - Database management

## 📋 Features

### ✅ Automated Setup
- **Smart System Detection** - Checks for required tools
- **Interactive Configuration** - Guided setup process
- **Docker Integration** - Automatic container setup
- **Environment Generation** - Complete .env file creation

### ✅ Supabase Integration
- **Database Migrations** - Automatic deployment
- **Edge Functions** - TypeScript serverless functions
- **Authentication Setup** - User management ready
- **Real-time Features** - Live data synchronization

### ✅ Development Ready
- **Laravel API** - RESTful backend with MySQL
- **Flutter App** - Cross-platform frontend
- **Docker Compose** - Multi-container orchestration
- **Git Repositories** - Version control integration

## 🎛️ Configuration Options

The installer will prompt for:

- **Project Name** - Your application identifier
- **Installation Directory** - Where to create the project
- **Domain Address** - Your app's URL
- **Admin Credentials** - Initial admin user
- **API Keys** - Supabase and external service keys

## 📁 Project Structure

```
your-project/
├── backend/              # Laravel API
│   ├── app/             # Application code
│   ├── database/        # Migrations & seeds
│   └── .env             # Environment config
├── frontend/            # Flutter app
│   ├── lib/             # Dart source code
│   ├── assets/          # Images & resources
│   └── pubspec.yaml     # Dependencies
├── cloud/               # Supabase project
│   ├── supabase/        # Database & functions
│   │   ├── functions/   # Edge functions
│   │   └── migrations/  # Database schema
│   └── config.toml      # Supabase config
└── docker-compose.yml   # Container orchestration
```

## 🐳 Docker Support

The installer includes smart Docker integration:

- **Automatic Detection** - Checks if Docker is running
- **Function Deployment** - Supabase edge functions require Docker
- **Graceful Fallback** - Clear instructions if Docker unavailable
- **Manual Options** - Commands for manual deployment

## 🔧 Advanced Usage

### Manual Python Execution

If you prefer to run the Python script directly:

```bash
# Clone the repository
git clone https://github.com/ICE-Felix/ice-felix-starter.git
cd ice-felix-starter

# Install dependencies
pip install -r requirements.txt

# Run installer
python3 install_cli.py
```

### Development Mode

```bash
# Install in development mode
git clone https://github.com/ICE-Felix/ice-felix-starter.git
cd ice-felix-starter
npm install
npm start
```

## 🆘 Troubleshooting

### Common Issues

**Command not found: ice-felix**
```bash
# Reinstall globally
npm uninstall -g ice-felix-starter
npm install -g ice-felix-starter
```

**Python not found**
```bash
# Install Python 3.8+
# macOS: brew install python3
# Ubuntu: sudo apt install python3
# Windows: Download from python.org
```

**Docker not running**
```bash
# Start Docker Desktop
# The installer will guide you through this
```

## 📞 Support

- **Issues**: [GitHub Issues](https://github.com/ICE-Felix/ice-felix-starter/issues)
- **Documentation**: [Wiki](https://github.com/ICE-Felix/ice-felix-starter/wiki)
- **Website**: [icefelix.com](https://icefelix.com)

## 🤝 Contributing

We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md).

## 📄 License

MIT License - see [LICENSE](LICENSE) file for details.

---

**Made with ❤️ by the ICE Felix Team**

*Transform your development workflow with a complete full-stack starter in minutes!* 