Skip to content

liamma06/trashtoimpress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Trash to Impress

An AI-powered web application that helps users transform their trash and discarded items into creative, upcycled products. The app generates personalized upcycling ideas with visual designs, allows interactive editing, and provides comprehensive build guides with environmental impact information.

Overview

Trash to Impress uses AI (Google Gemini) to:

  • Generate creative upcycling ideas from user descriptions of their trash/discarded items
  • Create visual representations of the upcycled products
  • Provide tools and materials lists needed for each project
  • Calculate and display environmental impact and benefits
  • Generate downloadable PDF guides for each project

Features

1. Idea Generation

  • Users describe their available trash/discarded items and desired product type
  • AI generates 4 unique upcycling ideas with titles, descriptions, and visual images
  • Each idea includes a short summary and visual description

2. Interactive Image Editing

  • Select your favorite idea to see the generated product image
  • Draw directly on the image to mark areas you want to change
  • Use pencil tool for marking changes
  • Use eraser tool to remove markings
  • Chat interface to describe desired modifications
  • Real-time image regeneration based on your edits

3. Version Control

  • View all versions of your edited images
  • Revert to previous versions if needed
  • Track your editing history

4. Finalization & PDF Export

  • Finalize your design when satisfied
  • Automatically generates comprehensive guide including:
    • Tools needed
    • Materials required
    • Environmental impact analysis
    • Waste diverted information
    • Carbon footprint benefits
  • Download everything as a PDF for offline reference

Tech Stack

Frontend

  • Next.js 16 - React framework
  • TypeScript - Type safety
  • Tailwind CSS - Styling
  • jsPDF - PDF generation
  • React Three Fiber - 3D graphics (landing page)

Backend

  • FastAPI - Python web framework
  • LangGraph - Workflow orchestration
  • Google Gemini AI - Image generation and text analysis
  • Pydantic - Data validation

Project Structure

Trash-to-Impress/
├── frontend/          # Next.js React application
│   ├── app/          # Next.js app router pages
│   ├── components/   # React components
│   └── lib/          # API utilities
├── backend/          # FastAPI Python backend
│   ├── app/
│   │   └── build/    # Core workflow logic
│   └── generated_images/  # Generated product images
└── README.md         # This file

Getting Started

Prerequisites

  • Node.js 18+ and npm
  • Python 3.11+
  • Google Gemini API key

Backend Setup

  1. Navigate to backend directory:
cd backend
  1. Create and activate virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Create .env file with your API key:
GOOGLE_API_KEY=your_api_key_here
  1. Run the backend server:
uvicorn main:app --reload

Backend runs on http://localhost:8000

Frontend Setup

  1. Navigate to frontend directory:
cd frontend
  1. Install dependencies:
npm install
  1. Run the development server:
npm run dev

Frontend runs on http://localhost:3000

How It Works

  1. Input: User describes their trash items and what they want to create
  2. Idea Generation: AI generates 4 creative upcycling ideas with images
  3. Selection: User picks their favorite idea
  4. Editing: User can draw on the image and describe changes via chat
  5. Iteration: AI regenerates the image based on feedback
  6. Finalization: User finalizes the design
  7. Guide Generation: AI generates tools, materials, and environmental impact info
  8. Export: User downloads a comprehensive PDF guide

Environmental Focus

The application emphasizes environmental benefits by:

  • Calculating waste diverted from landfills
  • Estimating carbon footprint reduction
  • Highlighting resource conservation
  • Promoting circular economy principles
  • Educating users about upcycling benefits

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors