# Banatie Admin

Administration dashboard for managing the entire Banatie AI image generation service.

## Features

- 📊 **System Monitoring**: Real-time service health and performance metrics
- 👥 **User Management**: Manage users, subscriptions, and permissions
- 🖼️ **Content Management**: Monitor generated images and usage patterns
- 🔧 **Service Control**: Start/stop services, update configurations
- 📈 **Analytics**: Detailed usage analytics and reporting
- 🚨 **Alerts**: System alerts and notifications

## Tech Stack

- **Framework**: Next.js 14 with App Router
- **Database**: Direct PostgreSQL connection for admin operations
- **Storage**: MinIO admin interface integration
- **Monitoring**: Integration with API service metrics
- **Styling**: Tailwind CSS with admin-focused components
- **Charts**: Recharts for data visualization

## Development

```bash
# Install dependencies
pnpm install

# Set up environment variables
cp .env.example .env.local

# Start development server
pnpm dev
```

## Environment Variables

```env
# Banatie API
BANATIE_API_URL=http://localhost:3000

# Database (Direct admin access)
POSTGRES_URL=postgresql://user:password@localhost:5460/banatie

# Storage
MINIO_ENDPOINT=http://localhost:9000
MINIO_ACCESS_KEY=admin_access_key
MINIO_SECRET_KEY=admin_secret_key

# Admin Authentication
ADMIN_USERNAME=admin
ADMIN_PASSWORD=secure_password
```

## TODO

- [ ] Implement real-time metrics dashboard
- [ ] Add user management interface
- [ ] Create service control panel
- [ ] Add database admin tools
- [ ] Implement log viewer
- [ ] Add configuration management
- [ ] Create backup/restore functionality
- [ ] Add alert system
- [ ] Implement audit logging
- [ ] Add API key management
