Why Schema-Per-Merchant?
When dealing with product information management (PIM), store data changes rapidly. By isolating each shop in its own database schema, we avoid indexing collisions, eliminate cross-tenant leakage risks, and make migrations simple.
Direct Database Access
The Next.js backend validates merchant requests and executes SQL through a connection pool. Each transaction selects the shop's database role and schema. A separate provisioning login creates schemas and tables during onboarding.