Tongfei Gao
E-commerce

Launch a real online store in minutes, then let AI agents make it yours

Author

Demo Author

Date Published

A Railway project with the Medusa storefront, backend, MeiliSearch, Postgres, Redis, bucket and bucket proxy all online

Vibe coding a webshop from scratch is the slow way to start a business. Deploy a proven commerce engine in one click, then point your AI agent at the parts that make your store different.

Your own webshop in minutes: click Deploy template, the store is live in 3 minutes, then an AI assistant customizes an outdoor gear shop called Trailhead for your brand

AI agents have made building software feel almost free. Describe an app, wait a few minutes, and something that looks finished appears on your screen. So it is tempting to open your agent and type: build me a webshop.

You will get one. It will have product pages, a cart and a checkout button. It will look done. That is exactly the problem.

Why you shouldn't vibe code a webshop from zero

The storefront is the easy ten percent of e-commerce. The other ninety percent is invisible until it breaks, and when commerce breaks, it breaks with someone's money:

• Payments: authorizing, capturing and refunding, 3-D Secure, and webhooks that arrive late, twice or out of order

• Checkout: carts that live across sessions, discounts that stack, and taxes that depend on where the customer lives

• Inventory: stock that stays right when two people buy the last item at the same moment

• Fulfilment: shipping options, partial shipments, returns, exchanges and claims

• Order emails: confirmations and password resets that have to arrive, every single time

• Admin: a dashboard where you, not a developer, manage products, orders and customers

An agent can write code for every one of these in an afternoon. What it can't do is test them the way a real store gets tested: with real cards, real carriers, real customers who do unexpected things, and months of edge cases. Checking all of that yourself takes weeks, and every bug you miss is a double charge, a lost order or a customer who never comes back.

Medusa has already done the hard part

Medusa is an open-source commerce platform used by businesses around the world. Payments, carts, taxes, regions and currencies, inventory across warehouses, fulfilment, returns, promotions, customer accounts and a full admin dashboard are all built in.

More importantly, they are proven. Medusa has a large community, and its features have been stress-tested in more combinations of products, countries, payment providers and edge cases than any single team, or any agent, could ever simulate. When something does go wrong, someone has usually hit it before you, and the fix is already in a release.

So you don't just get a head start. You get a foundation that is far more likely to still be standing in two years.

No flavors, on purpose. Out of the box the store is deliberately plain: a clean storefront and a complete backend, with no opinions about your brand or your business. That is exactly what you want to hand to an AI agent.

A foundation built for AI-driven development

Agents do their best work on ground that is solid, well documented and testable. This template gives them all three:

• Plain, unforked Medusa: the core is untouched, so the official docs apply, the patterns your agent already knows are the right ones, and new Medusa releases are a dependency update away

• Docs written for agents: Medusa publishes an llms.txt index, a docs MCP server and agent skills. See Build with AI in the Medusa docs.

• Clear places to build: modules, workflows, API routes, subscribers and admin widgets, so new features land where they belong instead of in a patched core

• TypeScript from end to end: backend and Next.js storefront, so mistakes show up while the agent works, not when a customer checks out

• A safety net: type checking and linting on every pull request, a Playwright suite for the main storefront flows, and a docker compose setup that mirrors the Railway services, so an agent can run the whole stack locally and check its own work

Then tell your agent what makes your store yours

This is where it gets fun. You bring the idea, your agent brings the speed, and Medusa keeps the commerce honest. Some first prompts:

• “Restyle the storefront to match our brand: warm earth tones, a serif headline font and big product photos.”

• “Add a gift message field at checkout and include it in the order confirmation email.”

• “Create a Medusa module for product bundles, with an admin widget to manage them.”

• “Set up Stripe in test mode and add an end-to-end test that buys a product from start to finish.”

Each of these is a focused change on top of a checkout thousands of stores already trust. Built from zero, each one would sit on top of a checkout nobody has tested.

From one click to a live store in minutes

The Medusa 2.0 Railway template deploys the official Medusa release together with the Medusa team's Next.js storefront, and wires everything up for you:

• Seven connected services: storefront, backend with admin, Postgres, Redis, MeiliSearch, a storage bucket and a small read-only image proxy

• Ready on first boot: migrations run, demo products are seeded, and an admin user is created with a strong random password

• Keys handled: the publishable API key is shared with the storefront, and the search key is created and the catalogue indexed

• Health checks on every service: when Railway shows green, your store is live

• Payments and email ready to switch on: add your Stripe and Resend keys when you are ready to take real orders

This is not a toy. The template has been deployed more than 3,800 times since 2023, and over 1,100 of those stores are still serving customers today.

Architecture diagram: shoppers use the Next.js storefront, which calls the Medusa backend; the backend uses Postgres, Redis, MeiliSearch and a bucket inside one Railway project, and calls Stripe and Resend outside it

How the services fit together. Diagram from the Medusa 2.0 Railway boilerplate.

What you need

• A GitHub account: and a Railway account connected to it

• Railway Hobby plan: $5 a month, to run the store in the cloud

• Optional: Stripe and Resend API keys, to take payments and send order emails

Just want to look around first? A trial version fits inside Railway's free tier. It leaves out search and file storage, so use it to explore, not to sell.

Selling wholesale, or hosting many sellers on one storefront? There are sibling templates for Medusa B2B and the MercurJS marketplace.

Your store could be live before your coffee gets cold

Every online business starts the same way: with a store that works. Skip the weeks of plumbing and testing, deploy a commerce engine that is already proven in production, and spend your time, and your agent's, on the part only you can build: your brand, your products and your customers.

  • #E-commerce
  • #Railway
  • #Open Source
  • #Tutorial
The Payload admin panel with live preview of a page, side by side with the rendered website
Content Management,  News

Deploy the Payload 4 template on Railway, create your admin account, seed demo content, moderate comments, connect an MCP client and develop locally.

Comments (1)

  • Priya Raman

    Used the Railway template for a client shop last month. Having the storefront and backend share the API key automatically saved me a surprising amount of fiddling.

Leave a comment