Skip to Content
TutorialsVibe Coder Series5. Add a Dashboard

5. Add a Dashboard

Your app works great, but every time you sign in you land on an empty home page. Let’s fix that with a dashboard — a home screen that shows you the numbers that matter at a glance.

By the end you’ll have:

  • A home dashboard with live stats cards
  • Counts for total events, total RSVPs, and events happening this week
  • The dashboard only visible to signed-in Organizers

Time: About 10 minutes.

Prerequisites

Ask for the Dashboard

Say this to your AI:

Build a home dashboard page at / (the root URL) for Organizers. Show these stats:

  • Total number of published events
  • Total RSVPs this month
  • Number of events happening in the next 7 days
  • The 3 most recent RSVPs (name, event title, date registered)

Use stat cards for the numbers and a small table for the recent RSVPs.

Your AI will build the dashboard page and connect it to your data using aggregate queries — it calculates the counts automatically from your database records.

When done, open http://localhost:3000 . You should see the stat cards with real numbers from your data.

Dashboard showing four stat cards and a recent RSVPs table

If your stats show zero — you may need to add more test data. Go back to DaaS Studio and create a couple more events (set their dates to this week and status to “published”) and a few RSVPs. Refresh the dashboard and the numbers will update.

Make the Dashboard Organizer-Only

The dashboard shows private stats — your total RSVP counts, recent registrations. Attendees shouldn’t see this.

Say this to your AI:

Make the home dashboard only visible to Organizers. When Attendees sign in, redirect them to /events instead of the dashboard.

Test this by signing in with your Attendee account — you should land on the events page, not the dashboard.

Add a Quick-Create Button

While you’re on the dashboard, make it easy to create a new event without navigating to the admin page:

Say this to your AI:

Add a “New Event” button to the dashboard page that links to the create event form in the admin area.

Add an Upcoming Events Preview

Let’s also show a preview of the next few events right on the dashboard:

Say this to your AI:

Below the stats, add a section called “Upcoming Events” showing the next 3 published events with their title, date, location, and a link to manage each one.

After this, your dashboard has everything you need for a quick daily check-in.

Dashboard with stats, upcoming events preview, and New Event button

What Just Happened?

Your AI used aggregate queries to calculate the stats. Instead of fetching every record and counting them in the browser, it asked the database directly: “How many events exist? How many RSVPs were created this month?” — getting back single numbers efficiently.

StatHow it’s calculated
Total published eventsCOUNT of events where status = published
RSVPs this monthCOUNT of rsvps where date_created is this month
Events this weekCOUNT of events where event_date is within 7 days

Peek under the hood (optional)

The API call your AI generated for “RSVPs this month” looks roughly like this:

GET /api/items/rsvps ?aggregate[count]=* &filter[date_created][_gte]=2026-04-01T00:00:00 &filter[date_created][_lte]=2026-04-30T23:59:59

This returns { count: 12 } — the database does the counting, and your app just displays the number. It’s fast and doesn’t require loading all 12 records.

What’s Next

Your app is feature-complete with a proper dashboard. The final tutorial shows you how to share it with the world.

Continue to 6. Go Live →

Last updated on