Skip to content

docs(frontend): add AGENTS.md for tokens, components and Figma to code - #160

Merged
selvarajuv merged 7 commits into
auth-me-hotelfrom
frontend-agents-md
Nov 27, 2026
Merged

selvarajuv merged 7 commits into
auth-me-hotelfrom
frontend-agents-md

Conversation

@Jrodrigo06

@Jrodrigo06 Jrodrigo06 commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • Read frontend/AGENTS.md and follow the link from the root AGENTS.md.

Notes

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
selvarajuv merged commit 8b993c2 into auth-me-hotel Nov 27, 2026
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.
@Jrodrigo06
Jrodrigo06 deleted the frontend-agents-md branch November 27, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants