npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

inovar-client

v1.0.0

Published

A TypeScript client for the Inovar SIGE API

Readme

inovar-client

npm version npm

A TypeScript client for the Inovar SIGE API — the student information system used by Portuguese schools.

⚠️ This project is not affiliated with Inovar or inovarmais.com in any way.
Built by reverse engineering for the Papillon project 🦋


📦 Installation

npm install inovar-client

Compatible with Node.js 18+, React Native and any environment that supports the Fetch API.


🚀 Quick Start

import { InovarClient } from "inovar-client";

const client = new InovarClient();

// Login with your school subdomain, student number and password
await client.auth.login("aeviso", "8275", "mypassword");

// Get grades
const grades = await client.grades.getAll();
console.log(grades[0].subject); // "Português"
console.log(grades[0].p1);      // "3"

// Get absences
const absences = await client.absences.getAll();
console.log(absences[0].subject);    // "História"
console.log(absences[0].isJustified); // true

// Get upcoming tests from teachers
const events = await client.schedule.getTeacherEvents();
console.log(events[0].subject);     // "Matemática"
console.log(events[0].description); // "Teste de Matemática..."

// Get profile photo (data URI, ready for <Image>)
const photo = await client.student.getPhoto();
// "data:image/jpeg;base64,/9j/4AAQ..."

// Logout
client.auth.logout();

📚 API Reference

client.auth

| Method | Description | |--------|-------------| | login(escola, username, password) | Authenticates the user. Returns SessionData. | | logout() | Logs out and clears all stored data. | | refreshToken() | Manually refreshes the JWT token. | | isAuthenticated() | Returns true if the user is logged in. | | getSession() | Returns the current SessionData or null. |

client.grades

| Method | Description | |--------|-------------| | getAll() | Returns all subjects with grades for all periods. |

client.absences

| Method | Description | |--------|-------------| | getAll(startDate?, count?) | Returns absences from startDate (default: Sep 1st). |

client.schedule

| Method | Description | |--------|-------------| | getTeacherEvents(count?) | Returns upcoming tests/events set by teachers. | | getPersonalAgenda() | Returns the personal agenda (raw, more endpoints TBD). |

client.student

| Method | Description | |--------|-------------| | getPhoto() | Returns the student's profile photo as a data URI. | | getMenus() | Returns available meal menus. | | hasBilling() | Returns true if the school has billing enabled. | | hasNotices() | Returns true if there are school notices for the class. |


🔄 Token Refresh

The JWT token expires after 1 hour. The client handles this automatically — before every API call, it checks if the token is about to expire and re-logs in transparently.

You can also trigger a manual refresh (e.g. on app foreground):

await client.auth.refreshToken();

❌ Error Handling

import { InovarClient, AuthError, NetworkError } from "inovar-client";

try {
  await client.auth.login("aeviso", "8275", "wrongpassword");
} catch (err) {
  if (err instanceof AuthError) {
    console.log("Authentication failed:", err.message);
  } else if (err instanceof NetworkError) {
    console.log("Network error:", err.message);
  }
}

🏗️ Project Structure

src/
├── clients/        # InovarClient (main entry point)
├── errors/         # AuthError, NetworkError, InovarError
├── managers/       # RequestManager, TokenManager, EscolaContext
├── modules/        # AuthModule, GradesModule, AbsencesModule, ScheduleModule, StudentModule
├── structures/     # Grade, Absence, ScheduleEvent, Session
├── types/          # Raw API response types
└── utils/          # Encoding helpers (Base64, UUID)

📝 Notes

  • The server runs ASP.NET 4.0 on IIS behind Cloudflare
  • Each school has its own subdomain under inovarmais.com
  • The API was discovered by reverse engineering the Angular web app
  • More endpoints will be added as they are discovered

Part of the Papillon open source school app project 🦋