AI-assisted user stats module

Exploring in-app user activity with Vercel's V0.

/v1v3

A nicely designed user stats module showing daily/weekly insights tied to value user's experience can help gamify in-app activity.

I'll develop a user stats module in collaboration with Vercel's AI code generation tool called V0. Each iteration will include notes, prompts, and manual code edits. I'll also include a before and after comparison to see progress. In the end, I'll share the code so you are free to fork my work and build a user stats module for your app.

Updated
Mar 19th, 2025
Version
v1
Change
Something from nothing
/v0v1
A
Prompt

Create a user stats profile card centered on the screen that's 450x450 pixels and every element has to be contained within the boundaries of the card. Here are all the elements that should be included:

  1. Avatar
  2. Name
  3. Job title
  4. Spark chart of user activity in an app
  5. Overview of 3 stats related to activity
  6. Bookmark icon in the top right
  7. Chat icon centered in the bottom middle
  8. Email icon next to chat icon
B
Results

V0 created a solid foundation but used mostly white/gray backgrounds with dark text. I forgot to suggest using a dark layout to be compatible with the v1Labs design.

C
Clarification Prompt

Let's try a design with a dark background and adjust the size to 500x450 pixels.

D
Results + Manual Cleanup

V0 successfully changed the size and got 90% of the colors right. I had to manually change the color of the bars and the stroke color of the icons. But V0 used Tailwind so it was easy to make the adjustments by changing a few class names.

Updated
Mar 23rd, 2025
Version
v2
Change
Stacked bar chart
/v1v2
A
Prompt

Nice start, computer! Here are a few improvements:

  1. Condense the avatar, name, and title. The name+title can go to the right of the avatar.
  2. Align the avatar to the left instead of center.
  3. Slightly increase the height of the bars representing activity.
  4. Create 30 data points for the bars representing the last 30 days of activity.
  5. Make the background a gradient using #1b2443 and #2b174f.
  6. Add a stacked bar design with the bottom color a solid white (#fff). The top color should be white with 50% opaicty (rgba(255,255,255,.5).
  7. The full bar height should represent "Projects". The dark segment should represent "Competed Projects".
  8. The 3rd stat should be "Upvotes" instead of "Tasks".
  9. Remove the actions bar at the bottom that has the chat and email icon.
B
Results + Manual Cleanup

V0 got about 85% of the instructions right. I had to rearrange sections, remove unnecessary labels, and fix a visual bug related to the stacked bars.

C
Thoughts

Going with 1 bar per day over a 30 day period is a little noisy. Fewer bars would be visually cleaner. I find myself wanting to explore the upvotes data.

Updated
Mar 23rd, 2025
Version
v3
Change
Interactive data points
/v2v3
A
Prompt

Improvements:

  1. Instead of 30 data points, let's go with 14 to represent 2 weeks of activity.
  2. Add a back arrow to explore the previous 14 days. The graph should animate and the 3 stats should update to reflect the visible time range.
  3. Make the stacked bars slightly taller.
  4. For the 3 stats, use "Posts", "Comments", and "Reactions". Each stat should be clickable to be set as the active stat with "Posts" as the default.
  5. When posts are selected, the stacked bar chart should have "Post Count" to represent the bar height. "Popular Posts" should represent the solid segment of the bar.
  6. When Comments are selected, the stacked bar chart should have "Comment Count" to represent the bar height. "Popular Comments" should represent the solid segment of the bar.
  7. When "Reactions" are selected, the stacked bar chart should have "Total Reactions" to represent the bar height. "Upvotes" should represent the solid segment of the bar.
  8. The bars should be slightly taller.
B
Results + Manual Cleanup

V0 technically implemented all of the instructions correctly. However, some of the instructions were a little ambitious and the implementation isn't quite there. We can improve those interactions in future iterations. The only thing I manually added in this iteration is updating the avatar placeholder.

C
Thoughts

The biggest issue I have with this version is the interaction to go back in time. The button placement, label, and transition animation all need work.

Dane Lyons
Dane Lyons
Co-founder of AssetMule