The admin dashboard loads six queries at once and nothing waits
The admin dashboard is the command centre for every service I deliver. It needs to show active projects, open action items, pending deliverables, upcoming bookings, recent sessions, and the full client list — all on one page, all from the database, all before a single pixel renders. The page is a server component that opens with a Promise.all containing six Prisma queries running in parallel. Clients with a count of their projects and bookings. Active and in-review projects with their milestones, session counts, deliverable counts, action item counts, and the client name. The ten most recent sessions with their project and client names. Upcoming bookings ordered by start time with client names. All incomplete action items with their parent project. All pending or in-progress deliverables with their parent project. Six queries, one round trip, one render. The summary cards at the top show four numbers — active projects, open actions, pending deliverables, and upcoming bookings. Below that, every active project is a card with a MilestoneTimeline, a status badge, and counts for sessions, deliverables, and actions. Each card links to the admin project editor. The upcoming bookings section shows the next ten meetings with client names, formatted dates, and a Join button for each one that has a Google Meet link. The open action items section shows every incomplete task with a colour-coded badge — cyan for mine, orange for the client's — and a link to the project it belongs to. The pending deliverables section does the same with due dates. One page gives me the full picture across every client and every service type. No switching between tabs, no filtering by service, no separate tools for audio and software projects. Six parallel queries and one vertical scroll.
Comments coming soon
Sign in with TikTok to leave a comment. Coming soon.