Repository navigation
Home
Welcome to the guide for Litedirecte! Litedirecte is the best SDK for interacting with EcoleDirecte (approved and used by Scolup!).
- 🔑 Authentication | Learn how to log in, handle 2FA, and manage active sessions.
- ⚙️ Configuration | Adjust network behaviors, set up persistent storage, proxy configuration, handle downloads, and configure encryption passkeys.
-
⚠️ Errors & Exception Handling | Understand the error hierarchy, caught exceptions, serialization, and friendly API code mappings.
- 🎓 Grades | Retrieve student grades, competencies, subjects and periods.
- 📅 Timetable | Fetch schedules.
- 📚 Homework | Browse homework, get session content, and mark homework as done.
- ✉️ Messages | Get and write messages.
- 🎒 Attendance | Track absences, late arrivals, and school punishments.
- 📅 Timeline & post-its | Get the latest events and post-its.
- ☁️ Cloud | Work with the cloud space, manage folders, or delete files.
- 📄 Documents | Download administrative docs, invoices, and trimester reports.
- 📝 QCMs | Fetch assigned quizzes, inspect questions, and submit response choices.
- 🔔 Event listening | Hook up real-time event listeners for grades, messages, or activities.
-
💾 Cache & sync | Instant reads,
getAll, built-in polling, offline and sync status.
Note
We won't document responses here, but you can check out Docsdirecte for a full doc of EcoleDirecte's responses. Note that dates are normalized by the SDK and you don't have to handle Base64 encoding/decoding.
Litedirecte works natively across almost all modern runtimes and environments with zero extra configuration.
To install Litedirecte in your project, choose your preferred package manager:
npm install litedirectebun add litedirectedeno add npm:litedirecteyarn add litedirecte| Environment | Supported | Notes |
|---|---|---|
| Node.js (v18+) | ✅ Yes | Full support. |
| Bun | ✅ Yes | Full support. Native speed-up! |
| Deno | ✅ Yes | Full support. |
| Browsers | ✅ Yes | Full support. Default storage : IndexedDB |
| React Native / Expo | ✅ Yes | Fully compatible. Storage can be bound to AsyncStorage. |
| Cloudflare Workers / Vercel Edge | ✅ Yes | Fully compatible. |
| Capacitor / Electron | ✅ Yes | Full support. |
Note on Timer-Based Features: Background processes like automated token keepalives or polling loops rely on intervals. In serverless environments that lack continuous timers (e.g., short-lived Cloudflare Workers or Vercel Edge runs), these processes will quietly no-op. All regular API requests and active session refreshes work identically everywhere!
Here is a super simple script to log in, handle security questions if required, and fetch academic grades:
import { Litedirecte } from "litedirecte";
const ld = new Litedirecte();
// 1. Log in. Litedirecte will handle authentication flow under the hood!
const session = await ld.auth.login("your_username", "your_password");
// 2. If 2FA is needed, respond easily
if ("question" in session) {
console.log(`EcoleDirecte asks: "${session.question}"`);
console.log("Choices are:", session.choices);
// Submit the string value (or index number) of the correct choice:
await session.answer("Cereal before milk");
}
// 3. You are now logged in and verified. Fetch grades instantly!
const gradesInfo = await ld.grades.getGrades();
console.log(`Loaded ${gradesInfo.notes.length} grades!`);© 2026 typeof (Scolup) | Licensed under AGPL 3.0