Transform your room photos into 9 dreamy bedroom variations perfect for Instagram's "Where would you sleep best?" content format.
- 9 Unique Variations: Generate 9 different styled bedroom options in a 3x3 grid
- 6 Room Types: Choose from Cozy Cabin, Modern Luxury, Fantasy Magical, Tropical Paradise, Vintage Romantic, or Minimalist Zen
- Optional Photo Upload: Upload your room photo for personalized results or start with a blank canvas
- Instagram-Optimized: All images are generated as perfect 1080x1080 squares with numbered overlays
- Individual Sharing: Download and share each option separately with suggested captions
- Real-time Progress: Watch your images generate with live progress updates
- Mobile-Friendly: Responsive design optimized for mobile creation and sharing
- Node.js 18+
- npm or yarn
- Sogni AI API key (or Replicate/Stability AI)
-
Clone the repository
git clone https://github.com/your-username/amalgamate.git cd amalgamate -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env
Edit
.envand add your API keys:SOGNI_API_KEY=your_sogni_api_key_here VITE_API_URL=http://localhost:3001 PORT=3001 BASE_URL=http://localhost:3001
-
Start the development servers
Terminal 1 - Backend:
npm run server:dev
Terminal 2 - Frontend:
npm run dev
-
Open your browser
http://localhost:5173
- Welcome Screen: Choose to upload a room photo or start with blank canvas
- Image Upload (Optional): Drag & drop, browse files, or use camera capture
- Style Selection: Pick from 6 room type categories
- Generation: Watch 9 unique bedroom variations generate in real-time
- Results: Browse 3x3 grid, click any image to download/share individually
- Image Analysis: Extract colors, lighting, and style from uploaded photos
- Prompt Building: Create 9 unique prompts based on selected room type and user preferences
- Batch Generation: Generate images in batches of 3 to manage API limits
- Processing: Convert all images to 1080x1080 squares with number overlays
- Delivery: Serve processed images with download and sharing options
src/
├── components/
│ ├── ImageUpload.jsx # Photo upload with camera support
│ ├── TypeSelector.jsx # 6 room type selection grid
│ ├── ProgressBar.jsx # Real-time generation progress
│ ├── OptionsGrid.jsx # 3x3 results grid
│ ├── ImageCard.jsx # Individual image with number overlay
│ └── ShareModal.jsx # Download/share individual images
├── services/
│ └── api.js # Backend API communication
├── utils/
│ ├── imageOptimizer.js # Client-side image processing
│ └── promptBuilder.js # Prompt construction helpers
└── styles/
└── index.css # Tailwind + custom styles
server/
├── routes/
│ ├── generate.js # Main generation endpoint with SSE
│ └── styles.js # Style presets and inspiration
├── services/
│ ├── aiImageService.js # Sogni AI integration
│ ├── promptService.js # Prompt engineering logic
│ └── imageProcessor.js # Sharp-based image processing
├── config/
│ └── styles.js # Room types & style variations data
└── index.js # Express server setup
Generate 9 bedroom variations with real-time progress updates via Server-Sent Events.
Request:
// FormData with:
{
"roomType": "cozy-cabin", // Required
"userImage": File, // Optional uploaded image
"customPrompts": { // Optional customization
"colorPalette": "warm earth tones",
"mood": "romantic",
"additionalDetails": "fairy lights"
}
}Response (SSE Stream):
data: {"type":"progress","imageNumber":1,"status":"generating","progress":45}
data: {"type":"complete","image":{"id":"cozy-cabin-1","number":1,"url":"...", "style":"..."}}
data: {"type":"finished"}Get all available room types and style variations.
Get specific room type details and variations.
Get random style combinations for inspiration.
- 1080x1080 pixels: Instagram's preferred square format
- Numbered overlays: Easy reference for story polls and engagement
- High quality JPEG: Optimized for social media compression
- Grid Post: Share all 9 images as a carousel post
- Story Polls: Use individual numbered images for "Which would you choose?" polls
- Engagement: Ask followers to comment their favorite number
- User-Generated Content: Encourage followers to create their own versions
Option [X]: Where would you sleep best? 🛏️✨
[Style description]
#WhereWouldYouSleepBest #BedroomGoals #DreamBedroom #InteriorDesign #CozyVibes
Made with ❤️ for content creators and bedroom dreamers everywhere
