Skip to content
Public template

About

**Maya AI** is a cross-platform AI Creative Studio for Android and iOS built with React Native. Generate images, edit photos, animate images, and create natural TTS voices with optimized AI workflows, fast performance, cloud sync, offline support, multilingual localization, secure authentication.

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Maya AI Studio

A self-hosted AI creative studio for image, video, and animation generation — powered by local GPU infrastructure, open models, Docker, Firebase, and Kubernetes.

Maya AI Studio is a production-oriented, open-source AI generation platform designed to make local AI creation as simple as a modern creative app.

Generate images, videos, and animations from prompts or reference images, manage checkpoints and LoRAs, monitor GPU workers in real time, track generation history, and expose a secure OAuth2 API for external tools — without requiring a paid per-generation AI API.


✨ Features

🎨 AI Generation

  • Text → Image
  • Image → Image
  • Reference Image → Image
  • Text → Video
  • Image → Video
  • Image → Animation
  • Prompt + negative prompt
  • Additional generation instructions
  • Reference image uploads
  • Seed and advanced generation parameters
  • Batch generation
  • Generation progress tracking

🧠 Local AI Models

Designed for self-hosted inference with:

  • Stable Diffusion
  • SDXL
  • ComfyUI
  • Compatible local image models
  • Local video models
  • Animation pipelines
  • Checkpoints
  • LoRAs
  • VAE
  • ControlNet
  • Upscalers

Models are configured through environment variables and/or the model manager rather than being hard-coded into the application.

🖥️ GPU Worker Management

Monitor connected rendering nodes in real time:

  • GPU utilization
  • VRAM usage
  • GPU temperature
  • CPU utilization
  • RAM usage
  • Queue depth
  • Active jobs
  • Render time
  • Worker health
  • Worker availability
  • Model capabilities

Supports multiple local GPU workers for concurrent generation.

📚 Generation History

Every generation can retain:

  • Prompt
  • Negative prompt
  • Model
  • LoRAs
  • Seed
  • Steps
  • CFG
  • Sampler
  • Resolution
  • Worker
  • GPU
  • Render duration
  • Timestamp
  • Output
  • Reference assets
  • Job status

Actions include:

  • Download
  • Regenerate
  • Edit
  • Animate
  • Reuse prompt
  • Use as reference
  • Copy metadata
  • Favorite
  • Delete

🏗️ Architecture

                         ┌──────────────────────┐
                         │   Android / iOS      │
                         │   Web Application    │
                         └──────────┬───────────┘
                                    │
                                  HTTPS
                                    │
                                    ▼
                         ┌──────────────────────┐
                         │     API Gateway      │
                         │ OAuth2 / OIDC / RBAC │
                         └──────────┬───────────┘
                                    │
                                    ▼
                         ┌──────────────────────┐
                         │      API Service     │
                         └──────────┬───────────┘
                                    │
                         ┌──────────┴──────────┐
                         │                     │
                         ▼                     ▼
                  ┌─────────────┐       ┌─────────────┐
                  │ PostgreSQL  │       │    Redis    │
                  │ Persistence │       │ Job Queue   │
                  └─────────────┘       └──────┬──────┘
                                               │
                                               ▼
                                      ┌────────────────┐
                                      │    Scheduler   │
                                      └───────┬────────┘
                                              │
                           ┌──────────────────┼──────────────────┐
                           │                  │                  │
                           ▼                  ▼                  ▼
                     ┌──────────┐       ┌──────────┐       ┌──────────┐
                     │ GPU Node │       │ GPU Node │       │ GPU Node │
                     │ Image    │       │ Video    │       │ Animate  │
                     └────┬─────┘       └────┬─────┘       └────┬─────┘
                          │                  │                  │
                          ▼                  ▼                  ▼
                     ┌─────────────────────────────────────────────┐
                     │       ComfyUI / Local AI Models             │
                     └──────────────────────┬──────────────────────┘
                                            │
                                            ▼
                                   ┌──────────────────┐
                                   │ Object Storage   │
                                   │ Generated Assets │
                                   └──────────────────┘

                         ┌──────────────────────────┐
                         │ Prometheus + Grafana     │
                         │ GPU / Worker Monitoring  │
                         └──────────────────────────┘

📱 Application Navigation

Maya AI Studio uses a simple, visual navigation model.

Home
│
├── Quick Create
│   ├── Image
│   ├── Video
│   └── Animate
│
├── Recent Generations
├── Recommended Styles
└── Explore

Create
│
├── Image
├── Video
└── Animate

Gallery
│
├── Images
├── Videos
├── Animations
├── Projects
└── Favorites

Discover
│
├── Styles
├── Prompts
├── Templates
├── Models
└── Workflows

Me
│
├── Profile
├── Analytics
├── API
├── Workers
├── Storage
└── Settings

The UX is inspired by the simplicity of modern visual discovery applications, while maintaining an independent Maya AI design system and implementation.


🔐 Security

Security is a core architectural requirement.

Maya AI Studio supports:

  • OAuth2 / OIDC authentication
  • JWT validation
  • Role-based access control
  • Scoped API permissions
  • Secure API gateway
  • Rate limiting
  • Request validation
  • Upload validation
  • Audit logging
  • Secure secrets management
  • HTTPS
  • Private GPU workers
  • No direct public access to ComfyUI

External API scopes can include:

generation:create
generation:read
generation:delete

models:read
models:manage

workers:read
workers:manage

analytics:read

Important

GPU workers should never be exposed directly to the public Internet.

The intended path is:

External Client
      ↓
HTTPS
      ↓
API Gateway
      ↓
OAuth2
      ↓
API
      ↓
Scheduler
      ↓
Private GPU Worker

🆓 Free & Self-Hosted Architecture

Maya AI Studio is designed around self-hosted inference.

The application does not require a paid per-generation API such as:

OpenAI API
Midjourney API
Runway API
Hosted Stable Diffusion API

Instead:

Your GPU
   ↓
Docker
   ↓
ComfyUI
   ↓
Open Model
   ↓
Maya AI Studio

This means generation can be performed without a commercial AI inference API, subject to the availability and cost of the user's own hardware/infrastructure.

Free software does not mean free GPU compute. Running local models still requires appropriate hardware, electricity, storage, and potentially cloud infrastructure if GPUs are rented.


⚙️ Environment Configuration

Maya AI Studio avoids hard-coding inference providers.

Example:

APP_ENV=development

FIREBASE_PROJECT_ID=
FIREBASE_STORAGE_BUCKET=

API_URL=
API_PORT=8000

OAUTH_ISSUER=
OAUTH_AUDIENCE=

IMAGE_ENGINE=comfyui
VIDEO_ENGINE=comfyui
ANIMATION_ENGINE=comfyui

COMFYUI_URL=http://comfyui:8188

DEFAULT_IMAGE_MODEL=sdxl
DEFAULT_VIDEO_MODEL=local-video
DEFAULT_ANIMATION_MODEL=local-animation

MODEL_PATH=/models
LORA_PATH=/models/loras
OUTPUT_PATH=/outputs

REDIS_URL=
DATABASE_URL=

MAX_CONCURRENT_JOBS=2
MAX_UPLOAD_MB=100

Never commit production secrets to GitHub.


🐳 Docker

Maya AI Studio is designed to run locally using Docker Compose.

Start the base stack

docker compose up -d

Start with GPU workers

docker compose \
  -f docker-compose.yml \
  -f docker-compose.gpu.yml \
  up -d

Check services

docker compose ps

View logs

docker compose logs -f

Stop

docker compose down

🖥️ NVIDIA GPU

For NVIDIA GPU workers, install the appropriate NVIDIA driver and NVIDIA Container Toolkit.

Verify:

nvidia-smi

Verify Docker GPU access:

docker run --rm --gpus all \
  nvidia/cuda:12.6.3-base-ubuntu24.04 \
  nvidia-smi

The exact CUDA image should be adjusted according to the supported CUDA/driver combination of the target machine.


🧩 Project Structure

maya-ai-studio/
│
├── apps/
│   ├── mobile/
│   └── web/
│
├── services/
│   ├── api/
│   ├── auth/
│   ├── scheduler/
│   ├── generation/
│   ├── worker-manager/
│   └── metrics/
│
├── workers/
│   ├── image/
│   ├── video/
│   └── animate/
│
├── infrastructure/
│   ├── docker/
│   ├── nginx/
│   ├── prometheus/
│   ├── grafana/
│   └── kubernetes/
│
├── firebase/
│
├── tests/
│   ├── unit/
│   ├── integration/
│   └── e2e/
│
├── docs/
│
├── scripts/
│
├── docker-compose.yml
├── docker-compose.gpu.yml
├── .env.example
├── README.md
├── CONTRIBUTING.md
└── LICENSE

🔥 Firebase

Firebase provides the application control plane.

Firebase Authentication

Supports configurable authentication providers such as:

  • Email/password
  • Google
  • OAuth providers

Firestore

Suggested collections:

users
projects
generations
models
loras
workers
jobs
apiClients
auditLogs
settings

Firebase Storage

Used for:

  • Reference images
  • Thumbnails
  • User assets
  • Project files
  • Generated media where appropriate

Large media storage can later be migrated to S3-compatible object storage without changing the core generation architecture.


🧠 Generation API

Example:

POST /api/v1/generations
Authorization: Bearer ACCESS_TOKEN
Content-Type: application/json

Request:

{
  "type": "image",
  "prompt": "cinematic Bangladeshi village at sunset",
  "negative_prompt": "low quality, distorted",
  "model": "sdxl",
  "loras": [],
  "width": 1024,
  "height": 1024
}

Response:

{
  "job_id": "job_01HXYZ",
  "status": "queued"
}

Check the job:

GET /api/v1/generations/job_01HXYZ

🎨 Supported Generation Modes

Image

Text → Image
Image → Image
Reference → Image

Video

Text → Video
Image → Video

Animation

Image → Animation
Reference → Animation

📊 Monitoring

Maya AI Studio integrates with:

  • Prometheus
  • Grafana
  • NVIDIA GPU metrics
  • Worker health monitoring

Example metrics:

GPU utilization
VRAM utilization
GPU temperature
GPU power
CPU utilization
RAM utilization
Queue depth
Active jobs
Completed jobs
Failed jobs
Average render duration
Worker uptime

☸️ Kubernetes

Docker Compose is intended for development and smaller deployments.

Kubernetes provides distributed production orchestration.

Kubernetes Cluster
│
├── API
├── Scheduler
├── API Gateway
├── Redis
├── PostgreSQL
│
├── GPU Node 01
│   └── Image Worker
│
├── GPU Node 02
│   └── Video Worker
│
└── GPU Node 03
    └── Animation Worker

GPU workloads can request NVIDIA GPU resources:

resources:
  limits:
    nvidia.com/gpu: 1

This enables Kubernetes to schedule GPU workloads across available nodes.


🧪 Testing

The project is designed for automated testing at multiple levels.

Unit

npm test

Integration

npm run test:integration

End-to-End

npm run test:e2e

Testing areas include:

  • Authentication
  • Authorization
  • API validation
  • Generation requests
  • Queue scheduling
  • Worker health
  • Model discovery
  • Upload validation
  • History persistence
  • API security
  • Failure recovery

🚀 CI/CD

GitHub Actions is used for automated:

Push
 ↓
Lint
 ↓
Unit Tests
 ↓
Integration Tests
 ↓
E2E Tests
 ↓
Security Scan
 ↓
Docker Build
 ↓
Container Scan
 ↓
Registry Push
 ↓
Deployment
 ↓
Health Check

Workflow directory:

.github/workflows/
├── test.yml
├── build.yml
├── security.yml
└── deploy.yml

📦 Installation

Requirements

Recommended development environment:

  • Git
  • Docker
  • Docker Compose
  • Node.js
  • Python
  • NVIDIA GPU + drivers for local generation
  • NVIDIA Container Toolkit
  • Firebase project
  • Optional Kubernetes cluster for distributed deployment

Clone

git clone https://github.com/YOUR_USERNAME/maya-ai-studio.git
cd maya-ai-studio

Configure

cp .env.example .env

Edit:

.env

with your Firebase, authentication, database, Redis, ComfyUI and model configuration.


Start

docker compose up -d

GPU deployment:

docker compose \
  -f docker-compose.yml \
  -f docker-compose.gpu.yml \
  up -d

📱 Android

The mobile application is based on React Native / Expo.

Development:

cd apps/mobile
npm install
npx expo start

Production Android build:

eas build --platform android

Production builds should generate:

APK
AAB

The Android application communicates with the backend; AI inference remains on the configured server/GPU workers.


🌐 Web

cd apps/web
npm install
npm run dev

Production:

npm run build

🔑 API Usage

External applications can submit authenticated generation jobs.

Example:

curl -X POST \
  "$API_URL/api/v1/generations" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "image",
    "prompt": "cinematic futuristic Dhaka skyline at night",
    "model": "sdxl"
  }'

🛡️ Security Principles

Maya AI Studio follows these principles:

  1. Never commit secrets.
  2. Never expose GPU workers directly.
  3. Require authentication for external APIs.
  4. Validate all uploaded files.
  5. Apply request-size limits.
  6. Apply API rate limits.
  7. Use least-privilege API scopes.
  8. Encrypt communication using HTTPS.
  9. Keep model execution isolated in containers.
  10. Maintain audit logs for sensitive operations.

🗺️ Roadmap

Phase 1 — Foundation

  • Repository architecture
  • React web application
  • Expo mobile application
  • Firebase authentication
  • Firebase persistence
  • Docker Compose
  • API foundation

Phase 2 — AI

  • ComfyUI integration
  • Image generation
  • Reference image generation
  • Video generation
  • Animation
  • Model manager
  • LoRA manager

Phase 3 — Infrastructure

  • Redis scheduler
  • Multi-GPU workers
  • Worker health monitoring
  • Persistent generation history
  • Prometheus
  • Grafana

Phase 4 — Security

  • OAuth2/OIDC
  • RBAC
  • API scopes
  • Rate limiting
  • Audit logging

Phase 5 — Production

  • Kubernetes
  • GPU-aware scheduling
  • CI/CD
  • Automated E2E tests
  • Production APK
  • Production AAB
  • Production deployment

🤝 Contributing

Contributions are welcome.

git checkout -b feature/my-feature

Make your changes, test them, then:

git add .
git commit -m "feat: add my feature"
git push origin feature/my-feature

Open a Pull Request.

Please ensure:

  • tests pass
  • no secrets are committed
  • Docker builds successfully
  • API contracts remain backwards compatible
  • security-sensitive changes include tests

📄 License

This project is released under the Apache License 2.0.

See LICENSE for details.


⚠️ Model & Content Licensing

Maya AI Studio is an inference platform and does not automatically grant rights to third-party AI models or generated content.

Users are responsible for checking the license and usage restrictions of every model, checkpoint, LoRA, ControlNet, dataset, image, video, and other asset they install or use.

Only use models and assets whose licenses permit your intended use.


⚖️ Disclaimer

Maya AI Studio is provided as a self-hosted software platform.

The project does not guarantee:

  • unlimited generation
  • unlimited GPU capacity
  • compatibility with every model
  • compatibility with every GPU
  • commercial rights to generated content
  • availability of third-party model repositories

Actual performance depends on the user's hardware, models, configuration, storage, network and infrastructure.


🌟 Vision

Make powerful AI creation accessible without forcing creators into a paid per-generation ecosystem.

Maya AI Studio brings together:

Local AI
+
Open Models
+
GPU Computing
+
Creative Tools
+
Secure APIs
+
Cloud Control Plane
+
Distributed Infrastructure

into one extensible creative platform.

Build locally. Generate freely. Scale when needed.

About

**Maya AI** is a cross-platform AI Creative Studio for Android and iOS built with React Native. Generate images, edit photos, animate images, and create natural TTS voices with optimized AI workflows, fast performance, cloud sync, offline support, multilingual localization, secure authentication.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors