Skip to content

stanleypangg/Orbit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

148 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Orbit

AI-powered Recycle-to-Market generator that transforms recyclable materials into creative DIY projects with step-by-step instructions, AI-generated visuals, and 3D models.

How It Works

Orbit guides users through a 4-phase AI workflow:

  1. Ingredient Discovery — Describe your materials (e.g. "plastic bottles and aluminum cans") and the AI extracts, categorizes, and scores them
  2. Goal Formation — Choose from 3 AI-generated project ideas tailored to your materials
  3. Concept Visualization — View 3 AI-generated design variations for your chosen project
  4. Final Package — Get a complete project package with instructions, bill of materials, ESG impact scores, storyboard, and a downloadable 3D model

Quick Start

Prerequisites

  • Node.js 18+
  • Python 3.9+
  • Redis (optional — falls back to in-memory)
  • Gemini API key

Backend

cd backend
pip install -r requirements.txt

# Create .env
echo "GEMINI_API_KEY=your_key_here" > .env
echo "GEMINI_MODEL=gemini-2.5-flash" >> .env
echo "REPLICATE_API_KEY=your_key_here" >> .env

uvicorn main:app --reload --port 8000

Frontend

cd frontend
npm install
npm run dev

Open http://localhost:3000 to get started.

Tech Stack

Layer Tech
Frontend Next.js 15, React 19, TypeScript, Tailwind CSS 4, Three.js, Motion
Backend FastAPI, LangGraph, Pydantic
AI Google Gemini, Replicate (image gen), Trellis (3D models)
State Redis (with in-memory fallback)
Infra Docker, Turbopack

Features

  • Real-time SSE streaming for workflow progress
  • Interactive 3D model viewer (Three.js / React Three Fiber)
  • AI-generated storyboards and step-by-step instructions
  • ESG impact scoring for each project
  • Magic Pencil image editing
  • Gemini-powered chat assistant
  • Interrupt/resume workflow via LangGraph checkpointing
  • Export to JSON and HTML

Project Structure

Orbit/
├── frontend/                # Next.js application
│   ├── app/
│   │   ├── page.tsx         # Landing page
│   │   ├── poc/             # Main workflow interface
│   │   └── product/         # Product detail view
│   ├── components/          # React components
│   │   └── ProductDetail/   # ESG, 3D viewer, storyboard
│   └── lib/                 # Hooks and utilities
│       └── workflow/        # Workflow state management
├── backend/                 # FastAPI application
│   ├── main.py              # Entry point
│   ├── app/
│   │   ├── endpoints/       # API routes (chat, workflow, images, etc.)
│   │   ├── workflows/       # LangGraph orchestration and nodes
│   │   ├── ai_service/      # LLM clients
│   │   ├── integrations/    # Trellis, Replicate
│   │   └── core/            # Config, Redis
│   └── requirements.txt
└── docs/                    # Additional documentation

API Endpoints

Endpoint Description
POST /api/chat Gemini chat with SSE streaming
POST /workflow/start Start LangGraph workflow
GET /workflow/stream/{thread_id} SSE workflow progress
POST /workflow/select-option/{thread_id} Select a project idea
POST /workflow/select-concept/{thread_id} Select a design concept
POST /magic-pencil/edit Image editing
GET /api/package/package/{thread_id} Export project package
GET /workflow/download/{thread_id}/{format} Download as JSON or HTML
GET /health Health check

API docs available at http://localhost:8000/docs

About

AI-powered Recycle-to-Market generator. Describe your recyclable materials and get creative DIY project ideas with AI-generated visuals, 3D models, step-by-step instructions, and ESG impact scores. Built with Next.js, FastAPI, LangGraph, and Google Gemini.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors