Back

Data Foundations

BFshop is founded on data entities. These are the entities and their properties. The database used for these is Neon, with prisma linking it to the project.

Core Entity

Customer

Stores the identity and contact details of the person placing orders and interacting with the storefront.

Properties to document: name, email, phone, account status

Commerce Entity

Product

Defines the items being sold, including their pricing, stock position, and how they should appear in the storefront.

Properties to document: title, price, stock, SKU, description

Transaction Entity

Order

Captures the final purchase record, connecting customers, products, totals, and the current order lifecycle state.

Properties to document: order total, status, timestamps, payment reference

Line Item Entity

OrderItem

Represents each individual product entry inside an order, linking the order record to the purchased product and quantity.

Properties to document: quantity, unit price, order id, product id

Monitoring Entity

AI Log

Records AI actions, decisions, and outputs so the system can track behaviour, support oversight, and enable review.

Properties to document: action type, timestamp, model output, linked context