E-commerce in today's world requires backend services capable of managing the simultaneous demands of a multi-vendor product catalogue, decentralized authentication, and safe payment transaction flows. In this paper, a backend solution for a multi-vendor platform is developed using PostgreSQL on Supabase as the infrastructure, with the authorization layer based on role-based access through Row-Level Security. This implementation ensures non-duplication of product entries in a normalized scheme while modelling sellers' relationship to products as a many-to-many association. Product discovery,cart-related actions, and order life cycle are handled through a REST API layer. Forecasting components that provide demand predictions and inventory recommendations are added by a weighted ensemble of statistical and ML-based models. Payments are carried out by Razorpay, with the security achieved through HMAC-SHA256 signature verification and a role-sensitive UI separates retailer portals from customer browsing activities. Quantitatively, query time for products is below 200ms and accuracy for payment verification reached 99.4%. The research introduces viable patterns for serverless Backend-as-a-Service (BaaS) architectures, which support enterprise-grade performance without the burden of direct infrastructure management.