Inforario supports two distinct user modes: a fully anonymous guest mode that requires no account and stores everything locally, and an authenticated mode powered by Supabase Auth that enables cloud sync, profile management, and Google Calendar integration. Both modes share the same UI — the app detects which mode is active by validating whether the currentDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/DavidCevallos15/inforario-IA-null/llms.txt
Use this file to discover all available pages before exploring further.
deviceId is a proper UUID, and gates all database calls accordingly.
User Modes
Guest Mode
No account required. A
deviceId is generated as dev-{random string} and persisted in localStorage under the key inforario_device_id. Schedules are parsed and displayed locally but never written to Supabase — all DB calls are gated behind a UUID validation check that rejects the dev- prefix.Authenticated Mode
After sign-in,
deviceId becomes the user’s UUID from the Supabase session. Schedules, the user profile, and Google Calendar tokens are all persisted in the database and available across devices.UUID Gate
Every database operation insupabaseClient.ts runs the user ID through a UUID regex before touching Supabase:
dev-{random string} ID will never match, so no accidental writes or 400 errors reach the database.
isSupabaseConfigured
Before any Supabase operation, the app checks whether valid credentials are present:
false if either of the following is true:
VITE_SUPABASE_URLorVITE_SUPABASE_ANON_KEYis missing from the environment- The URL contains the placeholder string
"placeholder"(i.e., the default unconfigured value)
Dummy Client
When Supabase is not configured, the module exports a dummy client object instead of crashing. Every method on the dummy client returns a resolved promise with a descriptive error payload, allowing the entire app to operate in offline-first mode withoutTypeError exceptions:
createDummyBuilder function additionally returns a chainable builder that supports every Supabase query modifier (.select, .eq, .order, .single, etc.) so that multi-step query chains do not throw.
Authentication Methods
- Email / Password
- Google OAuth
Sign-Up Flow
Open the Auth Modal
The user clicks Iniciar Sesión / Registrarse in the Inforario header. The
AuthModal component opens with the Login tab active by default.Switch to Register tab
The user clicks the Registrarse tab. A full name field appears in addition to email and password.
Enter credentials and validate password
As the user types their password, a live strength indicator validates four requirements in real time: 8+ characters, at least one uppercase letter, at least one lowercase letter, and at least one number. The Crear cuenta button is disabled until all four pass.
Submit the form
On submit,
signUpWithEmail(email, password, fullName) is called. Supabase creates the account and sends a confirmation email with a link to window.location.origin.Session Management
The app uses two Supabase Auth hooks at startup to hydrate and maintain the user session:onAuthStateChange fires for every auth event: SIGNED_IN, SIGNED_OUT, TOKEN_REFRESHED, PASSWORD_RECOVERY, and USER_UPDATED. Inforario uses this callback to update the deviceId and trigger a re-fetch of the user’s cloud schedules.
getUserProfile
Reads the authenticated user’s profile row from the profiles table.
The user’s UUID from the Supabase session. The function returns
null immediately if the ID is not a valid UUID (i.e., for guest users).UserProfile object:
Database Tables
profiles
One row per authenticated user. Contains
id (UUID matching the Supabase Auth user), email, full_name, avatar_url, and career. Read by getUserProfile.schedules
Stores parsed timetables. Each row has a
user_id foreign key (UUID) and a schedule_data JSONB column holding the ClassSession[] array. Guest users never write here.user_calendar_tokens
Stores Google OAuth2 tokens per user. Requires a valid authenticated session — the Google Calendar sync Edge Function rejects requests without a row in this table.
Environment Variables
"placeholder", the app switches to dummy-client mode and all users are treated as guests with local-only access.
Auth Modal Views
TheAuthModal component (components/modals/AuthModal.tsx) exposes three views selectable at runtime:
| View | Trigger | Action |
|---|---|---|
LOGIN | Default on open | signInWithEmail |
REGISTER | Click Registrarse tab | signUpWithEmail + validation |
FORGOT_PASSWORD | Click ¿Olvidaste tu contraseña? | resetPasswordForEmail |
onSubmit handler, which checks isSupabaseConfigured() first. If Supabase is not configured, the modal simulates a successful login after a 1-second delay — useful for previewing the app without credentials.