Infinite Storefront – Eradicating the E-Commerce Return Crisis

Inspiration

E-commerce returns are not just a financial burden; they are a quiet ecological disaster. Every year, millions of tons of returned clothing end up in landfills because it is often cheaper for brands to throw returns away than to inspect and repackage them. The reverse logistics also generate a massive, unnecessary carbon footprint.

The root cause? Sizing charts are fundamentally broken. Consumers buy multiple sizes with the intent to return what doesn't fit because they can't visualize how a garment will drape on their specific body type.

I realized that if we could solve the "sizing confidence" problem pre-purchase, we could directly prevent millions of garments from being manufactured, shipped, and dumped. I wanted to build a solution that tackled this global sustainability crisis without compromising on enterprise-grade cloud architecture.


What it does

Infinite Storefront is an AI-powered virtual fitting room that turns any smartphone into a personal dressing room.

  • Users upload a photo of themselves and a picture of a clothing item.
  • The application generates a high-fidelity, photorealistic image of the user actually wearing the garment.
  • By allowing shoppers to see the exact fit, drape, and style on their own body before clicking Buy, Infinite Storefront eliminates the guesswork that leads to bracket buying (buying multiple sizes).

This drastically reduces return rates and the associated environmental waste.


How I built it

I engineered a 100% serverless, event-driven architecture on AWS to ensure massive scalability and cost efficiency.

  • Frontend & Auth: React web application secured by Amazon Cognito. Implemented strict session-based rate limiting via Cognito to govern Non-Human Identity (NHI) costs and prevent runaway GenAI billing.
  • AI Engine: Amazon Bedrock calling the Amazon Nova Canvas model. Nova Canvas was key—its advanced multi-modal anchoring allowed photorealistic fabric draping without distorting the user's spatial dimensions.
  • Decoupled State Management: Built a robust state machine using Amazon API Gateway, AWS Lambda, and Amazon DynamoDB.
    • Frontend initiates the request.
    • Lambda triggers the Bedrock job and writes the "Pending" state to DynamoDB.
    • UI asynchronously polls DynamoDB for the completed image.
  • Secure Storage: All user images and generated assets stored securely in Amazon S3 using short-lived Presigned URLs and JWTs for absolute data privacy.

Challenges I ran into

  • Managing asynchronous latency of generative AI (30–45 seconds inference).
  • Keeping the UI responsive without API timeouts.
  • Building DynamoDB polling with careful tuning of idempotency, retry strategies, and read/write capacities.
  • Rigorous prompt engineering for Nova Canvas to distinguish between "replacing a shirt" and "altering the user's body."

Accomplishments that I'm proud of

  • Shipped a production-ready, future-proofed architecture beyond a hackathon prototype.
  • Strong security posture: strict IAM roles, Cognito rate-limiting, and S3 Presigned URLs implemented from day one.
  • Successfully orchestrated a complex, decoupled GenAI workflow entirely on the AWS Free Tier/Serverless stack, proving high-impact AI solutions can be built securely and efficiently.

What I learned

  • Masterclass in serverless GenAI orchestration.
  • Pushed the limits of Amazon Nova Canvas using multi-modal anchors for spatial tasks.
  • Learned that designing for AI is as much about state management, cost governance, and UX expectations during inference latency as it is about the actual LLM call.

What's next for Infinite Storefront

  • Evolve from a React web app to a native mobile application.
  • Leverage hardware like the iPhone's LiDAR scanner to capture true 3D spatial data and depth maps.
  • Feed deterministic 3D data into the Bedrock pipeline to eliminate guesswork in fabric draping.
  • Move from photorealistic to mathematically precise virtual try-on.

Built With

Share this project:

Updates