AI Rental DB
An end-to-end, data-first application where business metrics are defined and validated in notebooks before being exposed through Django APIs and visualized with D3.js and GSAP. The project emphasizes metric correctness, clear backendβfrontend contracts.
π¬ AI-DVD-Rental-DB Project: End-to-End, Data-First Application Design
This project is built with a data-first mindset, where correctness and interpretation come before visualization or UI decisions.
The notebook serves as the source of truth. Core metrics are defined, validated, and sanity-checked there first. In particular, I evaluate multiple revenue definitions and intentionally choose staff-centric revenue once the data supports it. Only after this decision is locked does the frontend layer come into play.
Validated metrics are exposed via Django API endpoints, which act as a clear contract between backend and frontend. This ensures that:
-
Business logic lives on the server
-
The frontend consumes trusted, pre-validated data
-
Metrics are not redefined or guessed in the UI layer
On the frontend, data is visualized using D3.js for data-driven rendering and GSAP for controlled, purposeful animations. The frontend is bundled with Vite, keeping the build fast and the separation between data and presentation clear.
-
π Data is defined and validated first (notebook)
-
π Django APIs expose trusted metrics
-
π¨ D3.js + GSAP visualize what the data supports
-
βοΈ Vite packages the frontend cleanly
This approach keeps the system reliable, explainable, and maintainable.
π Why Staff-Centric Revenue?
During notebook analysis, I compare staff-centric (where payments are processed) and customer-centric (where customers are registered) revenue attribution. While total revenue remains the same, the store-level distribution differs.
For this application, the staff-centric definition is chosen because it aligns with:
-
Actual payment and accounting flows
-
Store operations and staff performance
The customer-centric view remains useful for understanding customer behavior, but the staff-centric metric better represents store performance and is therefore used as the primary definition exposed through the API.
π Live Demo
π View the rental DB