Transform your travel memories into miniature worlds! Upload your travel photos and watch them transform into beautiful isometric 3D miniature items placed in your own virtual travel worlds.
memento land is an innovative web application that converts travel photos into miniature collectibles within isometric 3D worlds. Each trip becomes its own unique miniature landscape where your photo memories are transformed into 3D miniature items.
- πΈ Photo-to-Miniature Conversion: Extract key subjects from travel photos and transform them into 3D miniature items
- ποΈ Trip-Based Worlds: Each trip has its own unique isometric landscape
- π¨ Progressive World Building: Add miniatures one by one to build your travel world
- π± Swipeable Navigation: Easily navigate between different trip worlds
- π€ AI-Powered Generation: Using Google Gemini 2.5 Flash Image Preview API
- Watch the demo: https://youtu.be/jnq0qOCQfBE
- Special Thanks to Nano-Banana β this was incredibly fun!
- Node.js 18+ and npm
- Python 3.8+ with pip
- Google Gemini API Key (provided in
.env.example)
- Clone the repository
git clone https://github.com/stpcoder/mementoLand.git
cd mementoLand- Python Dependencies Setup (for OpenCV)
# Create and use a virtual environment INSIDE the backend folder
cd memorize-travel-backend
python3 -m venv venv
source venv/bin/activate
# Upgrade pip inside the venv (recommended)
pip install --upgrade pip
# Install Python dependencies for image processing using the venv's python
pip install opencv-python numpy pillow
# macOS note (if OpenCV bindings fail to load):
# You may need system OpenCV libraries
# brew install opencv
# Ubuntu/Debian note (optional system libs):
# sudo apt-get install python3-opencv
# When you're done, you can deactivate the venv with:
# deactivate- Backend Setup
cd memorize-travel-backend
npm install- Frontend Setup
cd ../memorize-travel
npm install- Environment Configuration
Create
.envfile in the backend directory:
cd memorize-travel-backend
cp .env.example .envEdit .env file:
# Google Gemini API Configuration
GEMINI_API_KEY=...
MODEL_NAME=gemini-2.5-flash-image-preview
# ELEVEN LABS API Configuration
ELEVEN_API_KEY=...
# Server Configuration
PORT=3000
# File Storage
IMAGE_STORAGE_PATH=./public/images
MAX_FILE_SIZE=104857600- Start Backend Server
cd memorize-travel-backend
npm start
# Server runs on http://localhost:3000- Start Frontend Development Server
cd memorize-travel
npm run dev
# Frontend runs on http://localhost:5173- Access the Application
Open your browser and navigate to
http://localhost:5173
- Click "New Trip" button to generate a unique isometric landscape
- Each trip gets its own miniature world with a distinctive background
- Click the upload button to open the photo modal
- Select a photo from your travel memories
- The AI extracts the main subject and converts it to a 3D miniature
- Click "Add to World" to place the miniature in your trip landscape
- Continue adding photos to progressively build your miniature world
- Each new miniature is intelligently placed without disturbing existing items
- Swipe left/right to navigate between different trip worlds
- See previews of adjacent trips on the edges for smooth navigation
- Each trip maintains its own collection of miniatures
- Before Adding to Land: If the source image for a memento has an overly large background or includes visible floor/ground, it can disrupt the base land composition. Please be mindful of this before pressing "Add to Land."
- If You Decide Not to Add: Simply refresh the page to discard the current generation state. If repeated "Regenerate" attempts do not place the memento as desired or produce odd results, a full page refresh is recommended.
- Always Use Regenerate When Needed: If you proceed without pressing "Regenerate" after making adjustments, the existing memento might move, change size, or multiple mementos could be created unintentionally. To avoid these issues, please press "Regenerate" before finalizing.
memorize-travel/
βββ src/
β βββ components/ # React components
β βββ pages/ # Page components
β βββ services/ # API services
β βββ hooks/ # Custom React hooks
β βββ store/ # State management
β βββ styles/ # Global styles
memorize-travel-backend/
βββ src/
β βββ routes/ # API routes
β βββ controllers/ # Route controllers
β βββ services/ # Business logic
β βββ middleware/ # Express middleware
β βββ utils/ # Utility functions
βββ uploads/ # User uploaded images
βββ generated/ # AI generated images
The application uses Google Gemini 2.5 Flash Image Preview API for AI-powered image generation:
POST /api/trips- Create a new trip with generated backgroundGET /api/trips- Get all tripsPOST /api/trips/:id/photos- Upload photo to a tripPOST /api/generate/miniature- Generate miniature from photoPOST /api/generate/composite- Add miniature to world
Type 1: Background Generation (Text-to-Image)
- Generates isometric 3D landscape for new trips
- Creates minimalist square land tiles with soft shading
Type 2: Miniature Extraction (Image-to-Image)
- Extracts main subjects from uploaded photos
- Converts to simplified 3D miniature assets
- Preserves original colors and proportions
Type 3: Composite Generation (Multi-Image)
- Combines miniature with existing background
- Intelligently places items without overlap
- Maintains consistent perspective and lighting
- Minimalist Aesthetic: Clean, modern interface inspired by Toss UI
- Isometric 3D Style: Consistent 45Β° bird's-eye view across all elements
- Progressive Enhancement: Worlds grow organically with each addition
- Intuitive Navigation: Swipeable interface with visual previews
mementoLand/
βββ memorize-travel/ # React frontend application
βββ memorize-travel-backend/ # Node.js backend server
βββ README.md # This file
βββ PRD_Frontend.md # Frontend requirements
βββ PRD_Backend.md # Backend requirements
βββ E2E_TEST_REPORT.md # End-to-end testing documentation
- React 18 - UI framework
- Vite - Build tool and dev server
- Tailwind CSS - Utility-first CSS framework
- Zustand - State management
- Framer Motion - Animation library
- React Query - Data fetching and caching
- Node.js - JavaScript runtime
- Express - Web framework
- Multer - File upload handling
- Sharp - Image processing
- Google Generative AI SDK - Gemini API integration
- Cors - Cross-origin resource sharing
- Python/OpenCV - Advanced image segmentation and processing
- Backend First: Start the backend server to handle API requests
- Frontend Dev: Run frontend in development mode with hot reload
- Image Storage: All images are stored locally for reuse in API calls
- Progressive Building: Each miniature addition creates a new composite
# Google Gemini API Configuration
GEMINI_API_KEY=your_api_key_here
MODEL_NAME=gemini-2.5-flash-image-preview
# ELEVEN API Configuration
ELEVEN_API_KEY=...
# Server Configuration
PORT=3000
# File Storage
IMAGE_STORAGE_PATH=./public/images
MAX_FILE_SIZE=104857600VITE_API_URL=http://localhost:3000-
API Key Issues
- Ensure the Gemini API key is correctly set in
.env - Check API quota and rate limits
- Ensure the Gemini API key is correctly set in
-
Port Conflicts
- Backend defaults to port 3000
- Frontend defaults to port 5173
- Change in respective config files if needed
-
Image Upload Errors
- Ensure
public/images/directory exists in backend - Check file permissions for write access
- Ensure
-
CORS Errors
- Backend CORS is configured for localhost:5173
- Update CORS settings for different frontend ports
-
Python/OpenCV Issues
- If
cv2import fails, ensure OpenCV is properly installed:python3 -c "import cv2; print(cv2.__version__)" - On macOS with M1/M2, you might need to use conda:
conda install -c conda-forge opencv
- Verify numpy is installed:
pip install numpy
- If
This project is created for the Google Gemini 2.5 Hackathon.
Feel free to submit issues and enhancement requests!
For questions or support, please open an issue in the GitHub repository.
Built with β€οΈ using Google Gemini 2.5 Flash Image Preview API