DynamoDB Single-Table Design Cognito

SmartStore Gacha Inventory Platform

By Jake CollyerFocus: SaaS Backend & NoSQL

To support a physical gacha vending machine project—including tracking the custom multi-color tokens designed for its operation—I needed a robust, highly available backend. This Serverless SaaS platform tracks physical machine restock levels and user token balances.

// Single-Table Application Backend

[ React Frontend ] → [ API Gateway ] → [ Lambda (Business Logic) ]
      ↑                                    ↓
[ Cognito Auth ]                       [ DynamoDB (Single Table) ]

The Single-Table NoSQL Strategy

Instead of creating separate tables for Users, Machines, Tokens, and Restock Logs, I utilized DynamoDB single-table design. By using overloaded Partition Keys (e.g., `USER#123` or `MACHINE#456`) and strategic Sort Keys, the application can fetch a user's profile, their token balance, and their recent machine interactions in a single, lightning-fast database query.