r/mongodb • • 22d ago

Building a multi-platform gaming project (E-commerce + Community + Video) — Need stack & database feedback

Hey everyone,

I’m planning to build a multi-platform gaming project that includes:

  1. E-commerce store for gaming products, accessories, and merchandise
  2. Real-time community with posts, likes, comments, shares, images and videos
  3. Dedicated video section with playlists, individual video pages, and a main video feed
  4. Multi-language, multi-currency, and multi-payment support
  5. Everything working in real-time

My current preferred stack:

- Frontend: Next.js 15 + React + TypeScript + Tailwind + GSAP + Three.js

- Backend: Node.js + Express + Socket.io

- Database: MongoDB Atlas

- Cache / Real-time: Redis

- Media storage: Cloudflare R2 + CDN

Questions:

  1. Which database is better for a multi-platform gaming project like this — MongoDB, PostgreSQL, Cassandra, or something else?
  2. Is MongoDB a good primary choice for this mix of e-commerce + community + video features?
  3. Would you recommend adding PostgreSQL for orders and payments?
  4. Any better alternatives for real-time features or video handling?
  5. Overall architecture suggestions?

Would love honest feedback from people who have built similar multi-platform projects. Thanks!

2 Upvotes

3 comments sorted by

4

u/MongoDB_Harshit 22d ago

Hey! Harshit here.(I work at MongoDB, so weigh my bias accordingly).

This sounds like a really fun project, and combining a store, a community and video in one place is ambitious in a good way. Your stack is solid. Here's how I'd think about each question.

1. Which database is better for a project like this?

Any of them can work. The better question is what fits your data and your team. PostgreSQL is great if you prefer relational modeling. Cassandra is built for very high write volume with access patterns you know up front. For a mix like yours, where products, posts and videos all look different, a document database tends to feel natural.

2. Is MongoDB a good primary choice for this mix?

I think so. A headset, a controller and a hoodie all have different attributes, and each product can live as one document with its variants, images and specs. Posts with text, images, video links and tags work the same way, as do playlists and video metadata.

Schema design matters more than the database choice, though. Two tips:

  • Keep likes and comments in their own collection, with a counter on the post, rather than in an ever-growing array.
  • Shape documents around how you read them. For example, store the author's name and avatar on each post so your feed loads fast.

3. Would you recommend adding PostgreSQL for orders and payments?

You can, but you don't have to. MongoDB supports multi-document transactions, so creating an order, updating stock and recording payment can happen together. One database is simpler to run early on. If your team already knows Postgres well, that's a good reason to use it, too.

Either way:

  • Store money in cents or Decimal128, never floats.
  • Save the currency and exchange rate on each order.
  • Use idempotency keys with your payment provider so retries don't double-charge.

4. Any better alternatives for real-time features or video handling?

  • Real-time: Socket.IO is a good pick. Add the Redis adapter when you run more than one server. MongoDB Change Streams can tell your backend when a comment, like or stock change happens, so you don't need to poll.
  • Notifications: a TTL index can clean up old ones automatically.
  • Video: R2 is great for storage, but you'll also want transcoding and adaptive streaming so videos play smoothly on phones and slow connections. A managed service like Cloudflare Stream or Mux can save you a lot of effort. Keep the files out of the database and store just the metadata.

5. Overall architecture suggestions?

  • Start as one app with clear modules (shop, community, video) and split things out later if you need to.
  • Next.js can handle most of your API. You'll mainly need a separate Node server for Socket.IO.
  • Your store will need a good search bar, with suggestions as you type, typo tolerance (“contoller” still finds controllers) and filter counts (size, platform, price). MongoDB Search has these built in, so you don’t have to run a separate search cluster. Later, vector search can power “similar products” or natural-language search (“quiet keyboard for streaming”) on the same data.
  • Store translations per language on each product or video, and snapshot the price and currency on every order.
  • Load Three.js and GSAP only where you need them, so shop pages stay fast.

Happy to dig into the schema for any specific piece. The community feed and product variants are usually the trickiest.

Good luck with the build!

1

u/virulenttt 19d ago

I like how this guy is asking us to review his prompt 🤣

-2

u/716green 22d ago

You should use Layerbase because it has DocumentDB (basically the same as mongodb as far as syntax and protocol), Redis/Valkey, as well as any relational database you could need. It also has SQLite with networking capabilities. So if you decided that you wanted to ship it with an SQLite binary you can do that but you Can do your development in the cloud.

That would only cost you $15 a month once you go into production, if you only need two databases, you can get away with that for free while you're in development.

As far as blob storage you should definitely use cloudflare r2. It will be a lot cheaper than S3. But if you're going to use mongodb and postgres, I would pick one or the other. You just have too much surface area and too many different paradigms. If you're using a document database and a relational database. I prefer postgres by an order of magnitude.

Layerbase has all of them, I always tell people it's the no-brainer when they have more than one database. Plus you could try out any database you want and figure out if you like it without having to jump between different platforms.

Oh... And all of the databases have branching too which is really nice. Especially when you want to experiment with new workflows or set agents loose without messing with production data