Skip to content

krishiv274/ReThink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌿 ReTh!nk – AI-Powered Upcycling Ideas

Status Platform Tech AI License

Turn Waste Into Wonder — Powered by AI

Banner

🎯 What is ReTh!nk?

ReTh!nk helps you discover creative ways to reuse everyday items instead of throwing them away. Simply upload a photo, and our AI generates personalized upcycling ideas tailored to your item.

✨ Features

Feature Description
📸 Smart Upload Upload photos of items you want to repurpose
🤖 AI Ideas Get personalized reuse ideas powered by Gemini Vision
Track Progress Mark ideas as complete, track monthly goals
🔍 Search Search items by name or material type
🔐 Secure Auth JWT + Google OAuth authentication
📱 Responsive Works on desktop and mobile

🛠️ Tech Stack

Layer Technologies
Frontend Next.js 14, React, Tailwind CSS, Framer Motion
Backend Node.js, Express.js, TypeScript
Database MongoDB Atlas (Mongoose)
AI Google Gemini 3 API
Auth JWT (httpOnly cookies), Google OAuth
Storage Cloudinary (image uploads)
Email Nodemailer (SMTP)

🚀 Quick Start

Prerequisites

  • Node.js 18+
  • MongoDB Atlas account
  • Cloudinary account
  • Google Cloud Console (for OAuth)
  • Gemini API key

Backend Setup

cd backend
cp .env.example .env
# Fill in your environment variables
pnpm install
pnpm run dev

Frontend Setup

cd frontend
cp .env.example .env.local
# Set NEXT_PUBLIC_API_URL=http://localhost:5000/api
pnpm install
pnpm run dev

📡 API Endpoints

Endpoint Method Description
/api/auth/signup POST Register new user
/api/auth/login POST Login user
/api/auth/google POST Google OAuth login
/api/auth/me GET Get current user
/api/auth/forgot-password POST Request password reset
/api/auth/reset-password/:token POST Reset password
/api/items GET Get user's items (paginated, filterable)
/api/items POST Create new item
/api/items/:id GET/PUT/DELETE CRUD operations
/api/items/:id/ideas POST Generate AI ideas
/api/profile GET/PUT User profile operations

🔧 Environment Variables

Backend (.env)

PORT=5000
MONGO_URI=mongodb+srv://...
JWT_ACCESS_SECRET=your_secret
JWT_REFRESH_SECRET=your_secret
FRONTEND_URL=http://localhost:3000
GEMINI_API_KEY=your_gemini_key
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
GOOGLE_CLIENT_ID=your_client_id
GOOGLE_CLIENT_SECRET=your_client_secret
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your_email
SMTP_PASS=your_app_password

Frontend (.env.local)

NEXT_PUBLIC_API_URL=http://localhost:5000/api

📁 Project Structure

ReTh!nk/
├── backend/
│   ├── src/
│   │   ├── config/        # DB, Cloudinary config
│   │   ├── controllers/   # Route handlers
│   │   ├── middleware/    # Auth middleware
│   │   ├── models/        # Mongoose schemas
│   │   ├── routes/        # Express routes
│   │   ├── services/      # Email, Gemini services
│   │   └── server.ts      # Entry point
│   └── package.json
│
└── frontend/
    ├── src/
    │   ├── app/           # Next.js pages
    │   ├── components/    # React components
    │   ├── contexts/      # React contexts
    │   ├── hooks/         # Custom hooks
    │   └── lib/           # API client, utilities
    └── package.json

🌐 Live Demo

📄 License

MIT License

Made with ❤️

About

Resources

License

Stars

Watchers

Forks

Contributors