Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/JAQA20/Paradigmas-G3/llms.txt

Use this file to discover all available pages before exploring further.

La Comanda uses Clerk as its identity provider. When you visit the root route /, the application renders the La Comanda login page — branded with the Restaurant Management Suite subtitle — and presents the Clerk-powered sign-in card. On successful authentication, Clerk issues a session and react-router-dom redirects you to /dashboard via the fallbackRedirectUrl prop. No credentials are ever stored by La Comanda itself.

Station Roles

La Comanda staff sign in to one of four designated stations. Your station determines which dashboard view and navigation modules you can access after authentication:
StationWho uses it
ADMINRestaurant managers who need full access to all modules
WAITSTAFFFront-of-house staff managing tables and orders
KITCHENLine cooks and chefs working the Kitchen Display System (KDS)
BARISTABar and coffee station staff
Your station role is configured in Clerk by your administrator before your first login. Picking the wrong station or having the wrong role assigned will result in a restricted view after sign-in.

Authentication Flow

1

Open the application

Navigate to http://localhost:5173 in your browser (or your production deployment URL). The root path / always renders the login page.
2

Identify the La Comanda login page

You will see the La Comanda logo, the heading La Comanda, and the subtitle Restaurant Management Suite. Below that is the Clerk-powered sign-in card.
3

Enter your credentials

Type your credentials into the Clerk sign-in card. Credentials are managed entirely by Clerk — La Comanda has no access to raw passwords.
4

Submit the form

Submit the form. Clerk validates your credentials, establishes a session, and react-router-dom redirects you to /dashboard via the fallbackRedirectUrl="/dashboard" prop set on the <SignIn /> component.

Protected Routes

Every route in La Comanda except / is wrapped in a ProtectedRoute component defined in App.tsx. If you attempt to access any protected URL without an active Clerk session, the component renders <RedirectToSignIn /> which bounces you back to the Clerk-hosted sign-in page automatically.
const ProtectedRoute = ({ children }: { children: React.ReactNode }) => {
  return (
    <>
      <SignedIn>{children}</SignedIn>
      <SignedOut>
        <RedirectToSignIn />
      </SignedOut>
    </>
  );
};
The full route table in App.tsx wraps every protected page with this component:
RouteProtected
/No — public login page
/dashboardYes
/tablesYes
/kitchenYes
/inventoryYes
/staffYes
/settingsYes
/403Yes

Access Denied (403)

If an authenticated user navigates to a module their role does not permit, La Comanda redirects them to /403. The Restricted Access page displays:
  • Network Status — shows Error: 403 Forbidden
  • System ID / User ID — a reference identifier for the session
  • Access Layer — shows Level: Admin Only for admin-only modules
The page offers two actions: Return to Dashboard (navigates to /dashboard) and Request Permission (intended for contacting your administrator for a role elevation).
If you believe you have been redirected to /403 in error, contact your restaurant administrator and ask for a role elevation. Do not attempt to navigate directly to a restricted URL — the route guard will redirect you back.

Signing Out

The Logout button is always visible at the bottom of the sidebar. Clicking it calls signOut() from Clerk’s useAuth() hook, which immediately invalidates the session and returns you to the login page.
const { signOut } = useAuth();

// Sidebar logout button
<button onClick={() => signOut()}>
  Logout
</button>
Clerk handles all credential storage and session management. La Comanda never stores, hashes, or has access to your password at any point. To reset your password, use the Forgot password? link on the Clerk sign-in card.

Build docs developers (and LLMs) love