{"id":29985976,"url":"https://github.com/guitaripod/pixie","last_synced_at":"2026-04-13T06:01:43.420Z","repository":{"id":305540279,"uuid":"1023152987","full_name":"guitaripod/pixie","owner":"guitaripod","description":"Image Generation Platform","archived":false,"fork":false,"pushed_at":"2025-10-01T07:19:58.000Z","size":2416,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-04T09:22:01.706Z","etag":null,"topics":["android","backend","cli","cloudflare","ios","kotlin","oauth","openapi","rust","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guitaripod.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-20T16:30:01.000Z","updated_at":"2025-09-30T20:23:04.000Z","dependencies_parsed_at":"2025-07-27T20:40:33.860Z","dependency_job_id":"1f5d1e93-0d4a-4722-a10b-e00cdcf637df","html_url":"https://github.com/guitaripod/pixie","commit_stats":null,"previous_names":["guitaripod/openai-image-proxy","guitaripod/pixie"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/guitaripod/pixie","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guitaripod%2Fpixie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guitaripod%2Fpixie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guitaripod%2Fpixie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guitaripod%2Fpixie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guitaripod","download_url":"https://codeload.github.com/guitaripod/pixie/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guitaripod%2Fpixie/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31741541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T05:13:27.074Z","status":"ssl_error","status_checked_at":"2026-04-13T05:13:25.150Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","backend","cli","cloudflare","ios","kotlin","oauth","openapi","rust","swift"],"created_at":"2025-08-04T22:02:03.524Z","updated_at":"2026-04-13T06:01:43.412Z","avatar_url":"https://github.com/guitaripod.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pixie - AI Image Generation Platform\n\n[![Download on the App Store](https://developer.apple.com/assets/elements/badges/download-on-the-app-store.svg)](https://apps.apple.com/us/app/pixiepocket/id6751730339)\n\nA high-performance monorepo containing the Pixie AI image generation service built on OpenAI's gpt-image-1 model. Includes a Rust-based Cloudflare Worker backend, command-line interface, Android app, and iOS app.\n\n## Quick Links\n\n- [Backend API](https://openai-image-proxy.guitaripod.workers.dev)\n- [CLI Client](#cli-client)\n- [Android App](#android-app)\n- [API Documentation](#backend-api)\n\n## Components\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eBackend API\u003c/b\u003e\u003c/summary\u003e\n\n### Overview\nHigh-performance Rust-based Cloudflare Worker that provides OpenAI-compatible image generation with enhanced features:\n- Automatic image storage in Cloudflare R2\n- Usage tracking and analytics\n- Public galleries\n- Credit-based billing system\n- OAuth authentication (GitHub, Google, Apple*)\n\n*Apple Sign In not supported on Windows servers\n\n### Architecture\n- **Runtime**: Cloudflare Workers (Rust/WASM)\n- **Database**: Cloudflare D1 (SQLite)\n- **Storage**: Cloudflare R2 (S3-compatible)\n- **Language**: Rust with worker-rs\n\n### Deployment Modes\n\n#### Official Mode (Hosted Service)\n- Managed credit system with payment processing\n- No OpenAI API key required from users\n- Automatic usage tracking and billing\n\n#### Self-Hosted Mode\n- Users provide their own OpenAI API keys\n- No credit system or payment processing\n- Direct pass-through to OpenAI API\n\n### Quick Setup\n\n1. **Clone and install dependencies**\n   ```bash\n   git clone https://github.com/guitaripod/pixie.git\n   cd pixie\n   npm install\n   cargo install worker-build\n   ```\n\n2. **Configure Cloudflare resources**\n   ```bash\n   # Create database\n   npx wrangler d1 create openai-image-proxy\n   \n   # Apply migrations\n   npx wrangler d1 migrations apply DB --local\n   \n   # Create R2 bucket\n   npx wrangler r2 bucket create openai-image-proxy-images\n   ```\n\n3. **Set secrets**\n   ```bash\n   npx wrangler secret put OPENAI_API_KEY\n   npx wrangler secret put GITHUB_CLIENT_SECRET\n   npx wrangler secret put GOOGLE_CLIENT_SECRET\n   # See docs/ENVIRONMENT_VARIABLES.md for complete list\n   ```\n\n4. **Deploy**\n   ```bash\n   npx wrangler deploy\n   ```\n\n### API Endpoints\n\n#### Image Generation\n```bash\nPOST /v1/images/generations\nAuthorization: Bearer \u003capi-key\u003e\n\n{\n  \"model\": \"gpt-image-1\",\n  \"prompt\": \"A serene mountain landscape\",\n  \"size\": \"1024x1024\",\n  \"quality\": \"high\"\n}\n```\n\n#### Image Editing\n```bash\nPOST /v1/images/edits\nAuthorization: Bearer \u003capi-key\u003e\nContent-Type: multipart/form-data\n\nimage: \u003cfile\u003e\nmask: \u003cfile\u003e (optional)\nprompt: \"Add a sunset\"\n```\n\n#### Other Endpoints\n- `GET /v1/images` - Browse public gallery\n- `GET /v1/credits/balance` - Check credit balance\n- `POST /v1/credits/purchase` - Buy credit packs\n- `POST /v1/auth/device/code` - Start device auth flow\n\nFull API documentation: [docs/API.md](docs/API.md)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eCLI Client\u003c/b\u003e\u003c/summary\u003e\n\n### Installation\n```bash\ncd cli\ncargo install --path .\n# Installs as 'pixie'\n```\n\n### Authentication\n```bash\n# OAuth providers\npixie auth github\npixie auth google\npixie auth apple  # Not supported on Windows\n\n# Check status\npixie config\n```\n\n### Image Generation\n```bash\n# Basic generation\npixie generate \"A beautiful sunset\"\n\n# Advanced options\npixie generate \"product photo\" \\\n  -s landscape \\      # Size: square, landscape, portrait\n  -q medium \\         # Quality: low (4-6 credits), medium (16-24), high (62-94)\n  -n 3 \\              # Generate 3 images\n  -b white \\          # Background: auto, transparent, white, black\n  -f jpeg \\           # Format: png, jpeg, webp\n  -c 85 \\             # Compression (0-100)\n  -o ./images         # Output directory\n```\n\n### Image Editing\n```bash\n# Edit local image\npixie edit photo.png \"add company logo\" --fidelity high\n\n# Edit from gallery\npixie edit gallery:abc123 \"enhance colors\" -s landscape\n```\n\n### Credit Management\n```bash\npixie credits              # Check balance\npixie credits history      # Transaction history\npixie credits packs        # Available packs\npixie credits estimate -q high -s 1024x1024  # Cost estimation\n```\n\n### Gallery\n```bash\npixie gallery list         # Browse public images\npixie gallery mine         # Your images\npixie gallery view \u003cid\u003e    # Image details\n```\n\n### Other Commands\n```bash\npixie usage --detailed     # API usage statistics\npixie health               # Check service status\npixie admin stats          # Admin only\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eAndroid App\u003c/b\u003e\u003c/summary\u003e\n\n### Overview\nNative Android application built with Kotlin and Jetpack Compose, providing a mobile interface for Pixie AI image generation.\n\n### Features\n- **Image Generation**: Chat-based interface with batch generation (1-10 images)\n- **Image Editing**: Upload and modify existing images with AI\n- **Gallery**: Browse public and personal galleries with download/share options\n- **Credits**: Balance tracking, usage dashboard, and in-app purchases\n- **Authentication**: OAuth with GitHub, Google, and Apple\n- **Admin Panel**: System statistics and user management (admin only)\n\n### Technical Stack\n- **Language**: Kotlin\n- **UI**: Jetpack Compose with Material Design 3\n- **Architecture**: MVVM with Clean Architecture\n- **Networking**: Retrofit + OkHttp + Moshi\n- **Image Loading**: Coil\n- **Payments**: RevenueCat\n- **Min SDK**: 24 (Android 7.0)\n- **Target SDK**: 34 (Android 14)\n\n### Building from Source\n```bash\ncd android\n./gradlew assembleDebug\n# APK will be in app/build/outputs/apk/debug/\n```\n\n### Configuration\n1. Add your OAuth client IDs to `local.properties`:\n   ```properties\n   GOOGLE_OAUTH_CLIENT_ID=your-client-id\n   ```\n\n2. Configure RevenueCat for in-app purchases\n\n3. Update the API endpoint in build configuration if using self-hosted backend\n\n### Google Play Store\nAvailable on Google Play Store with full feature set.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eiOS App\u003c/b\u003e\u003c/summary\u003e\n\n### Overview\nNative iOS application built with UIKit and Swift, providing a mobile interface for Pixie AI image generation with feature parity to the Android app.\n\n### Features\n- **Image Generation**: Chat-based interface with batch generation (1-10 images)\n- **Image Editing**: Upload and modify existing images with AI\n- **Gallery**: Browse public and personal galleries with download/share options\n- **Credits**: Balance tracking, usage dashboard, and in-app purchases via RevenueCat\n- **Authentication**: OAuth with GitHub, Google, and Apple Sign In\n- **Admin Panel**: System statistics and user management (admin only)\n- **Offline Support**: Network monitoring and offline indicators\n- **Background Tasks**: Efficient background processing for image operations\n\n### Technical Stack\n- **Language**: Swift 5.9+\n- **UI**: UIKit with programmatic constraints and UIStackViews\n- **Architecture**: MVVM with Repository pattern\n- **Networking**: URLSession with custom service layer\n- **Image Processing**: Native iOS image frameworks\n- **Payments**: RevenueCat for in-app purchases\n- **Persistence**: Keychain for secure storage\n- **Min iOS**: 15.0\n- **Target iOS**: 17.0+\n\n### Building from Source\n```bash\ncd iOS/Pixie\nxcodebuild -project Pixie.xcodeproj -scheme Pixie -destination 'platform=iOS Simulator,id=69011470-D880-44F0-A527-480A03C692CA' build\n```\n\n### Configuration\n1. Add your OAuth client IDs to the project configuration\n2. Configure RevenueCat for in-app purchases\n3. Update the API endpoint in ConfigurationManager if using self-hosted backend\n\n### App Store\n[![Download on the App Store](https://developer.apple.com/assets/elements/badges/download-on-the-app-store.svg)](https://apps.apple.com/us/app/pixiepocket/id6751730339)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eDevelopment\u003c/b\u003e\u003c/summary\u003e\n\n### Local Development\n\n#### Backend\n```bash\n# Run with hot reload\nnpx wrangler dev\n\n# Watch logs\nnpx wrangler tail\n\n# Run with cargo watch\ncargo watch -s \"npx wrangler dev\"\n```\n\n#### CLI\n```bash\ncd cli\ncargo run -- generate \"test prompt\" -q low\n```\n\n#### Android\n```bash\ncd android\n./gradlew installDebug\n```\n\n#### iOS\n```bash\ncd iOS/Pixie\nxcodebuild -project Pixie.xcodeproj -scheme Pixie -destination 'platform=iOS Simulator,id=69011470-D880-44F0-A527-480A03C692CA' build\n```\n\n### Testing\n- Backend: Test with CLI (`cd cli \u0026\u0026 cargo run -- [args]`)\n- Cost optimization: Always use `--quality low` for testing (4-5 credits vs 50-80)\n- Database: Check locks in `user_locks` table if requests hang\n\n### Common Commands\n```bash\n# Apply database migrations\nnpx wrangler d1 execute openai-image-proxy --file=migrations/001_schema.sql --remote\n\n# Update secrets (never use config files)\nnpx wrangler secret put OPENAI_API_KEY\n\n# Check service health\ncurl https://your-worker.workers.dev/\n```\n\n### Project Structure\n```\n├── src/                # Backend source (Rust/Cloudflare Workers)\n├── cli/                # CLI application (Rust)\n├── android/            # Android app (Kotlin/Jetpack Compose)\n├── iOS/                # iOS app (Swift/UIKit)\n├── migrations/         # Database schemas\n├── docs/               # Documentation\n├── .github/            # CI/CD workflows\n└── wrangler.toml      # Worker configuration\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003ePricing\u003c/b\u003e\u003c/summary\u003e\n\n### Credit System\nImages cost credits based on quality and complexity (prices don't include platform taxes):\n\n| Quality | Typical Cost | USD Equivalent |\n|---------|--------------|----------------|\n| Low | 4-6 credits | $0.04-0.06 |\n| Medium | 16-24 credits | $0.16-0.24 |\n| High | 62-94 credits | $0.62-0.94 |\n\n### Credit Packs\n\n| Pack | Credits | Price | Bonus |\n|------|---------|-------|-------|\n| Starter | 150 | $2.99 | - |\n| Basic | 500 | $9.99 | 5% |\n| Popular | 1,250 | $24.99 | 10% |\n| Pro | 2,500 | $49.99 | 15% |\n| Enterprise | 5,000 | $99.99 | 20% |\n\n### Payment Methods\n- **Cards**: All major credit/debit cards via Stripe\n- **Crypto**: BTC, ETH, DOGE, LTC (Basic pack and above only)\n\n\u003c/details\u003e\n\n## Documentation\n\n- [API Reference](docs/API.md)\n- [Environment Variables](docs/ENVIRONMENT_VARIABLES.md)\n- [Setup Guide](docs/SETUP.md)\n- [Pricing Details](docs/pricing.md)\n\n## Contributing\n\nContributions welcome! Please submit pull requests.\n\n## License\n\nGPL-3.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguitaripod%2Fpixie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguitaripod%2Fpixie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguitaripod%2Fpixie/lists"}