Dashboard

The home page (/) shows the authenticated user's game dashboard.

Component hierarchy

Welcome → Main → Me
File Role
Welcome.js Home page wrapper
Main.js Layout shell for dashboard
Me.js Dashboard logic and tables

Data loading

Me.js calls fetchDashboard() (me_dashboard auth query) on mount and when refresh increments. Navbar and other chrome use fetchProfile() (me_profile) separately — profile fetches do not load or refresh in-app notifications.

The dashboard response drives:

Partial data may already be in Zustand globalMe from navbar login; fetchDashboard merges into globalMe with { ...prev, ...dashboard }.

Backend: Auth queries — Profile and dashboard (me_dashboard, dismiss_notification).

Tables

Component Content
NotificationsTable.js In-app notification feed (top of dashboard when non-empty)
MyTurnTable.js Games where it is the user's turn
TheirTurnTable.js Games waiting on opponent
WatchedGamesTable.js Spectated games (persistent watch list)
StandingChallengeTable.js Active standing challenges

Notifications

NotificationsTable.js renders only when globalMe.notifications.length > 0. Columns: message, optional challenge note, time, dismiss.

Under Your games, a link downloads all completed game reports from records.abstractplay.com.

Creation rules and DynamoDB layout: Notifications — In-app dashboard feed.

English copy lives under me.notifications in src/locales/en/apfront.json.

Challenges

Modal flows for creating and responding to challenges:

Backend semantics: Challenges.

Profile creation

If the user has no profile, NewProfile.js is shown before the dashboard tables.

WebSocket refresh

Dashboard tables update when WebSocket messages arrive (e.g. opponent moved, new challenge). See WebSockets.

Related