7 months ago
Hey everyone! I’ve been working for almost a year on a full-stack e-commerce platform that runs entirely on Railway, and it’s been one of the most technically rewarding builds I’ve done so far.
The goal was to create a modular architecture that could support multi-storefronts, supplier integrations, booking systems, and automated workflows, all while keeping deployments fast and infrastructure simple. Railway made that possible with its clean environment management and service linking.
Architecture Overview
- Backend: MedusaJS for the e-commerce engine (products, orders, inventory, payment lifecycle).
- Frontend: Two separate Next.js storefronts connected via Medusa’s REST and custom endpoints.
- Middleware: Custom Express.js layer for third-party integrations and background jobs.
- Databases: PostgreSQL for core commerce data and MongoDB for analytics and caching.
- Cache: Redis for session and notification management.
- CMS: Strapi for blog and product content management.
- Deployment: Everything is built and deployed through Railway.
Key Features
- Automated Product Sync (Cron Job):
Every day, a cron job fetches product data from a supplier API.
- New items are marked as proposed for review.
- Missing items are set to draft for cleanup.
- A notification system alerts admins of new proposed products upon login.
- Booking System Integration: A repair booking flow integrated with Cal.com, notifying each branch automatically.
- POS Checklist System: Pre-repair checklist integrated with our POS system, generating printed agreements for customers to sign.
- AWS Integration:
- S3 for asset storage (product images, CMS uploads)
- SES for transactional emails
- CloudWatch for monitoring
- Payment Flow: Customized MedusaJS checkout using Stripe Checkout with support for Australian payment methods (AfterPay, Zip).
- 3rd PT marketing emails (easier to design)
Lessons Learned
- Railway’s environment variables made multi-service orchestration smooth — no messy
.envjuggling between dev/production. - Logs and metrics in one dashboard helped debug complex sync operations faster than any other host I’ve used.
- Keeping Redis, Postgres, and Node services all in Railway simplified deployment pipelines significantly.
What’s Next
I’m currently designing a B2B platform on top of the same MedusaJS core with shared catalogs, role-based access, and partner-specific pricing. The goal is to evolve this from a consumer-focused system to a full B2B ecosystem, still fully hosted and orchestrated through Railway.
Plan to migrate AWS to Railway’s buckets.
Tips to save on railway?
enable serverless
earn bounties 🤣
Attachments
0 Replies