Pumoxi

This mini project simulates a simple coffee shop game where users can create, update, and manage in-game menu.

The frontend is built with WordPress hosting. The backend leverages AWS API Gateway, Lambda (Python), and DynamoDB.

Pumoxi Game Coffeeshop Simulation
This is a simulation game where you can create, update, resume, or delete a coffee shop and manage its menu.




Menu

Logging


How to use it

This mini game comes with 2 features:

  • Simulate you own a coffee shop
  • Simulate you can maintain the menu of this coffee shop

Game Controls

On top left is a drop down menu, allowing you to simulate a coffee shop business:

ActionDescriptionHTTP MethodBackend
New ShopInitialize a new shopPOSTCreate a new entry in the coffee shop DynamoDB.
Existing ShopResume the last session based on shop ID.GETRetrieve the shop details from the DynamoDB.
Delete ShopDeletes the shop based on shop ID.DELETEDelete the shop details from the DynamoDB.
Update ShopUpdate the shop info based on the shop ID.PUTUpdate the ship details in the DynamoDB.

Menu Management

On top right is a drop down menu, allowing you to simulate the menu management of the coffee shop:

ActionDescriptionHTTP MethodBackend
Add new item to menuAdd new food name and price to the menu.POSTCreate a new entry in the menu DynamoDB.
Update existing menuUpdate food name and price on the menu based on food ID.PUTUpdate existing entry in the menu DynamoDB.
Delete item from menuDelete food entry from the menu.DELETEDelete food entry from the menu DynamoDB.

Logs and Output

All API responses and simulation logs are shown at the bottom of the interface. This helps track what’s happening under the hood.


Architecture Diagram

Architecture diagram showing AWS API Gateway interfacing with Lambda functions for Coffeeshop and Menu, linked to their respective DynamoDB databases.
Architecture diagram showcasing the integration of AWS API Gateway, Lambda functions, and DynamoDB for managing a coffee shop simulation.

Using AWS API Gateway + Lambda + DynamoDB as a Backend

I treated AWS as a “headless backend”:

  • API Gateway exposes REST endpoints.
  • Lambda runs isolated Python logic per request.
  • DynamoDB persists game state and menu data.
  • Python class keep business logic clean and manageable.

This pattern is scalable, cost-effective (server less billing), and decouples frontend logic from backend infrastructure.

State Management Without Sessions

  • Instead of relying on WordPress sessions or cookies, I pushed all persistent data to DynamoDB.
  • The game state is fetched on each resume or update. This ensures stateless client behavior. It works well with Lambda.

Next Steps

I will include additional features to enhance the Coffee Shop simulation:

  • Ordering
  • Table
  • Cashier

Any feedback or suggestions, please let me know.



Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.


Discover more from Pumoxi

Subscribe now to keep reading and get access to the full archive.

Continue reading