Skip to main content

Documentation 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.

Getting Inforario running on your local machine takes just a few commands. The frontend is a standard Vite + React project, and the optional backend services (Supabase auth, cloud persistence, and AI extraction) are isolated behind environment variables so you can skip them entirely if you only need PDF parsing.

Prerequisites

Before you begin, make sure you have the following installed:
  • Node.js v18 or later
  • npm v9 or later
  • (Optional) Supabase CLI — only needed for local Edge Functions or a local Supabase instance

Run the Frontend

1

Clone the repository

Clone the Inforario repository and navigate into the project root:
git clone https://github.com/DavidCevallos15/inforario-IA-null.git && cd inforario-IA-null
2

Install frontend dependencies

Move into the frontend directory and install all npm packages:
cd frontend && npm install
This installs React 19, pdfjs-dist, Tesseract.js, Framer Motion, Supabase JS client, jsPDF, Three.js, and the rest of the dependency tree defined in frontend/package.json.
3

Configure environment variables

Create a .env.local file inside the frontend/ directory with your Supabase project credentials:
# frontend/.env.local

VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-key
You can find both values in your Supabase project dashboard under Settings → API.
The app works without Supabase for core PDF parsing. If you leave these variables empty or skip this file entirely, the local sguRegexParser.ts will still parse and render your UTM SGU schedule. Supabase is only required for cloud save, user authentication, and Google Calendar sync features. Guest mode is fully functional.
4

Start the Vite development server

From inside the frontend/ directory, run:
npm run dev
Vite will compile the project and start a local server. Open your browser and navigate to:
http://localhost:3000
5

Upload your UTM SGU schedule PDF

Once the app loads, you’ll see the Inforario landing page with a drag-and-drop upload zone. Drop your UTM SGU schedule PDF onto the zone (or click to browse). The app will:
  1. Extract text from your PDF using pdfjs-dist in the browser.
  2. Run the local sguRegexParser to identify subjects, time blocks, classroom codes, and teachers.
  3. Fall back to the Groq AI Edge Function if the regex parser can’t parse the document confidently.
  4. Render your timetable in the interactive Dashboard view.

Run with Backend Services

For the full experience — including the AI extraction fallback (extract-schedule Edge Function) and Google Calendar sync — you can run both the Vite dev server and the Supabase Edge Functions simultaneously. The dev:web script uses concurrently to spin up both processes in a single terminal session:
# From the frontend/ directory
npm run dev:web
This command runs two processes in parallel:
ProcessDescription
FUNCServes the extract-schedule Supabase Edge Function locally using the Supabase CLI, with its own .env file at backend/supabase/functions/extract-schedule/.env
VITEStarts the Vite dev server on http://localhost:3000
The output is color-coded (magenta for the Edge Function, cyan for Vite) so you can distinguish logs from each process.
Make sure your backend/supabase/functions/extract-schedule/.env file includes a valid GROQ_API_KEY for the AI fallback to work. The Edge Function calls the llama-3.3-70b-versatile model on the Groq API.

Option B: Local Supabase Instance

If you want a fully self-contained local environment with a local PostgreSQL database and auth server, start the local Supabase stack first:
# From the frontend/ directory — starts Docker-based local Supabase
npm run start:supa
This calls cd ../backend && supabase start under the hood and launches the full Supabase local stack (database, auth, storage, and Edge Functions runtime) via Docker. Once it’s running, the CLI will print your local SUPABASE_URL and ANON_KEY — update your frontend/.env.local with those values, then run npm run dev or npm run dev:web as usual.
npm run start:supa requires Docker to be running and the Supabase CLI to be installed globally (npm install -g supabase). This step is entirely optional — the app parses PDFs and renders schedules without it.

Available npm Scripts

ScriptCommandDescription
devviteStarts the Vite dev server on port 3000
buildtsc && vite buildType-checks and builds the production bundle
dev:webconcurrently ...Runs Vite + extract-schedule Edge Function concurrently
start:supacd ../backend && supabase startStarts the local Supabase Docker stack

Build docs developers (and LLMs) love