Mahmoud-Anani/Ecommerce-Back-End-Nest.Js ? reverse-engineered prompt

Reverse engineered prompt

Build me a backend for an ecommerce app with NestJS, TypeScript, and MongoDB.

I want users to be able to sign up, log in, and manage their account, then browse products, add items to a cart, apply coupon codes, and place orders. It should also have the basic admin side for creating and updating products, categories, and coupons, plus viewing orders and customers. Use JWT based auth, connect everything cleanly with MongoDB, and organize it in separate modules so it’s easy to extend later.

Please make it feel like a real production backend, with proper validation, error handling, and tests where it makes sense. Set up the project so I can run it locally right away, and if you need to check any current NestJS or MongoDB best practices, look them up online before implementing.