Skip to content

Keshraf/forge

Repository files navigation

🎨 Forge Master

AI-powered 3D model generation from text prompts

Status Platform

Forge Master is a production-ready AI-powered platform that transforms text descriptions into high-quality 3D models. Simply describe what you want, and our AI agents will generate, optimize, and deliver production-ready 3D assets in multiple formats.

πŸš€ Try It Live

Production URL: https://forge-master-frontend-525900378413.europe-west1.run.app

✨ Features

  • Text-to-3D: Describe your model in plain English
  • AI-Powered Quality: 4 intelligent agents ensure production-ready results
  • Multiple Formats: Download in GLB, OBJ, FBX, and STL
  • Interactive Viewer: Inspect your model in 3D before downloading
  • Fast Generation: 70-140 seconds from prompt to download
  • Quality Guaranteed: AI quality assessment with scores and analysis

πŸ”’ Security Status

Backend APIs are now protected! The GPU service (most expensive component) uses service-to-service authentication:

  • βœ… GPU Service: Protected - Only accessible by agent-service (not public)
  • βœ… Agent Service: Public - Accessible via web frontend only
  • βœ… Frontend: Public - Anyone can use the web interface

What this means:

  • Users can access the web interface normally
  • Direct API abuse is prevented (GPU endpoint is protected)
  • Cost risk from the expensive GPU operations is mitigated

🎯 Quick Start

For Users

  1. Visit https://forge-master-frontend-525900378413.europe-west1.run.app
  2. Enter a text prompt (e.g., "A futuristic sports car")
  3. Click "Generate 3D Model"
  4. Wait ~90 seconds
  5. Download your model in your preferred format

Note: This is a demo deployment. Please use responsibly.

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Browser   β”‚  Next.js Frontend + 3D Viewer
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚Agent Serviceβ”‚  4 AI Agents (Gemini)
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜  β€’ Prompt Enhancement
       β”‚         β€’ Generation Coordination
       β”‚         β€’ Quality Assessment
       β”‚         β€’ Iterative Improvement
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ GPU Service β”‚  Imagen 4 + InstantMesh (L4 GPU)
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜  β€’ Text β†’ Image
       β”‚         β€’ Image β†’ Multi-view
       β”‚         β€’ Multi-view β†’ 3D Mesh
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚Cloud Storageβ”‚  GLB, OBJ, FBX, STL files
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
diag2

πŸ› οΈ Tech Stack

Frontend

  • Next.js 15 - Modern React framework
  • shadcn/ui - Polished UI components
  • React Three Fiber - 3D rendering and viewer
  • Tailwind CSS - Styling

Backend

  • FastAPI - High-performance Python API
  • Imagen 4 - Text-to-image generation
  • InstantMesh - Image-to-3D conversion
  • Gemini AI - Prompt enhancement & quality assessment

Infrastructure

  • Google Cloud Run - Serverless deployment
  • NVIDIA L4 GPU - GPU acceleration
  • Cloud Storage - Model file hosting

πŸ“– Documentation

πŸ’‘ Example Prompts

Try these prompts to see what Forge Master can create:

A wooden chair with curved armrests
A medieval fantasy sword with ornate handle
A futuristic sports car with sleek design
A modern minimalist coffee table
A vintage rotary telephone

πŸ“Š Performance

  • Generation Time: 70-140 seconds
  • Success Rate: >95%
  • Average Quality Score: 8.2/10
  • Supported Formats: GLB, OBJ, FBX, STL

🎨 Quality System

Each generated model receives an AI quality score:

  • 🟒 8.5-10: Production Ready βœ…
  • 🟑 7.0-8.5: Good Quality
  • πŸ”΄ <7.0: Needs Improvement

Models that score below the target are automatically improved through iterative refinement.

πŸ’° Cost (Self-Hosting)

Approximate cost per generation:

  • GPU time: ~$0.50
  • Imagen API: ~$0.04
  • Gemini API: ~$0.001
  • Storage: ~$0.001

Total: ~$0.56 per model

πŸ”— Service URLs

Service URL Access Purpose
Frontend https://forge-master-frontend-525900378413.europe-west1.run.app Public Web interface
Agent Service https://forge-master-agents-7n53rqwksq-ew.a.run.app Public (Frontend only) AI orchestration
GPU Service https://forge-master-gpu-7n53rqwksq-ew.a.run.app Protected (IAM) 3D generation

Note: The GPU service URL is listed for reference only. Direct access is blocked - it can only be accessed by the agent-service with proper authentication.

πŸ“ Project Structure

cloudrun/
β”œβ”€β”€ frontend/              # Next.js web application
β”œβ”€β”€ agent-service/         # 4-agent AI pipeline
β”œβ”€β”€ gpu-service/           # GPU-accelerated 3D generation
β”œβ”€β”€ README.md             # This file
β”œβ”€β”€ QUICKSTART.md         # Quick start guide
β”œβ”€β”€ PROJECT_SUMMARY.md    # Detailed project overview
└── DEPLOYMENT.md         # Deployment instructions

πŸš€ Deployment

All services are currently deployed and operational. See DEPLOYMENT.md for redeployment instructions if needed.

Prerequisites:

  • Google Cloud Project
  • Billing enabled
  • Cloud Run, Cloud Build, Cloud Storage APIs enabled
  • GOOGLE_API_KEY for Imagen and Gemini

πŸ”’ Security Implementation

Current Security Setup:

βœ… Service-to-Service Authentication (Implemented)

  • GPU service is protected with Cloud Run IAM authentication
  • Only the agent-service can invoke the GPU service
  • Direct API calls to GPU endpoint are blocked with 403 Forbidden

🀝 Contributing

This is a hackathon project currently in production. Feel free to:

  • Report issues or bugs
  • Suggest features or improvements
  • Fork and experiment with your own modifications

πŸ”Œ Third-Party Integrations & Licenses

This project integrates the following third-party SDKs, APIs, and open-source libraries, all used in compliance with their respective terms and licenses:

Google Cloud Services (Proprietary)

  • Google Imagen 4 (via Imagen 4.0 API) - Text-to-image generation (Authorized with GOOGLE_API_KEY)
  • Google Gemini AI - Prompt enhancement and quality assessment (Authorized with GOOGLE_API_KEY)
  • Google Cloud Run - Serverless deployment platform
  • Google Cloud Storage - Object storage for 3D model files

Open Source AI Models

  • InstantMesh by TencentARC - Image-to-3D mesh conversion
    • License: Apache 2.0
    • Components: Zero123++ (multi-view synthesis), LRM (Large Reconstruction Model)

Frontend Libraries (Open Source)

Backend Libraries (Open Source)

3D Processing Libraries (Open Source)

  • Trimesh - Python 3D mesh library (MIT License)
  • PyMeshLab - MeshLab Python bindings (GPL License)
  • PyMCubes - Marching cubes implementation (BSD License)
  • xatlas - UV unwrapping library (MIT License)

Additional Dependencies

  • OpenCV - Computer vision library (Apache 2.0)
  • Pillow - Image processing (HPND License)
  • NumPy - Numerical computing (BSD License)
  • SciPy - Scientific computing (BSD License)

Compliance Statement: All third-party integrations are used in accordance with their respective licensing terms. Google Cloud APIs are accessed with valid API credentials. All open-source software is properly attributed and used under permissive licenses (MIT, Apache 2.0, BSD) or with proper compliance (GPL).

πŸ“ License

This project was built as a hackathon submission. The original code is available under MIT License, while third-party components retain their respective licenses as listed above.

πŸŽ‰ Credits

Built with:


Live Demo: https://forge-master-frontend-525900378413.europe-west1.run.app

About

AI-powered 3D model generation from text prompts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published