Repository navigation
docs(frontend): add AGENTS.md for tokens, components and Figma to code - #160
Merged
Merged
Conversation
AuthProvider asks GET /auth/me once and shares { user, hotels, hotel,
status, retry } through useAuth(). hotel is the first of hotels: one hotel
per user for now. status is loading, authed, anon (a 401), no-hotel or
error. /auth/me doesn't redirect on 401 like other calls, so signed out can
be told apart from failed. The mock returns Beresford, Dublin, 107 rooms.
Every page inside the app shell waits for /auth/me. Loading shows the shared LoadingState centred on the screen, signed out goes to /sign-in (saving the page to come back to), no hotel shows EmptyState with "No hotel linked to your account" and a sign out button, and an error shows ErrorState with Try again. These states have no Figma design yet. SignOutButton posts /auth/logout, then loads /sign-in fresh.
The calendar and the top bar read the signed-in user's hotel from useAuth(). The top bar shows the hotel's city when it has one. VITE_HOTEL_ID is gone, and so is getHotel, whose only caller was the top bar.
The other screens are placeholders, so the sidebar lists Calendar alone; their routes stay in App.jsx. Sign out sits at the bottom and posts /auth/logout.
Two panels from the Figma "Log in" frame: the brand panel (logo, headline,
subline, © 2026 Foresight) and the form panel ("Welcome back" and one
"Continue with Google" link to the API's /auth/google/login). The design's
email, password, "Forgot password?" and "Create an account" aren't built:
Google is the only sign-in. The subline names events only, since weather
and flights are out of the model (0055, 0050). The gradient's three
off-scale stops are tokens in index.css, and the logo mark, circles and
button icon are Figma's SVGs.
Where tokens live and how Figma's variables map to them, which shared components to reuse, the styling, asset and icon rules, and the patterns a screen follows. Linked from the root AGENTS.md.
selvarajuv
approved these changes
Nov 27, 2026
Jrodrigo06
force-pushed
the
auth-me-hotel
branch
from
November 27, 2026 19:03
93855eb to
d69e5af
Compare
Jrodrigo06
added a commit
that referenced
this pull request
Nov 27, 2026
#160 merged into auth-me-hotel after that branch had already reached main, so the file never landed. Same content, now against main.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
frontend/AGENTS.md: where the design tokens live, which shared components to reuse, and how to turn a Figma design into code here. The root AGENTS.md links to it.Why
So people and AI agents building frontend screens reuse the existing tokens and components instead of adding new ones.
How to check
frontend/AGENTS.mdand follow the link from the root AGENTS.md.Notes