Assemble the Admin Dashboard
Explore how to create a real-time admin dashboard that tracks shopping carts using Phoenix Presence. Understand how to count active shoppers, page views, and cart items dynamically and update the interface as actions occur across multiple sessions and tabs.
We'll cover the following...
Admin dashboard
At this point in the project, our CartTracker is working from end to end. The Presence updates flow through our application and make their way to the admin dashboard. The final step in this chapter is to piece together the Presence state into a format that completes our requirements.
To make a visually appealing dashboard, we need to work with our CSS and HTML.
To check that everything is set up correctly, let’s start our server with mix phx.server and visit our webpage/admin. We will see a page that looks like the following image.
Shopper count
The first feature that we’ll tackle is the shopper count. In our Presence ...