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

exam-proctor-sdk

v1.1.2

Published

A Node.js SDK for integrating exam proctoring features(Registration + verification) into your applications.

Downloads

504

Readme

exam-proctor-sdk

Lightweight Express middleware for in-page exam proctoring — no iframes, no sidecars, no separate processes.

npm version


How It Works

exam-proctor-sdk mounts directly into your existing Express app as middleware. It handles registration, session verification, and client-side proctoring inside your app's same-origin flow without iframes or a sidecar service.

Your Express App
    └── app.use(examProctor.middleware(config))
            ├── GET  /proctor/register
            ├── GET  /proctor/verify
            ├── GET  /proctor/api/session-token
            └── GET  /proctor/proctor-bundle.js   ← injected client SDK

Install

npm install exam-proctor-sdk

Quick Start

const express = require('express');
const examProctor = require('exam-proctor-sdk');

const app = express();

// 1. Mount the middleware
app.use(examProctor.middleware({
  // your config here
}));

// 2. Inject the config tag and bundle in your HTML response
app.get('/exam', (req, res) => {
  res.send(`
    <html>
      <head>
        ${examProctor.configScriptTag({ /* config */ })}
      </head>
      <body>
        <script src="/proctor/proctor-bundle.js"></script>
        <!-- your exam UI here -->
      </body>
    </html>
  `);
});

app.listen(3000);

Exam Flow

/  →  /proctor/register  →  /proctor/verify  →  /exam  →  /result
  1. Student lands on / and is redirected to /proctor/register
  2. After registration, identity is verified at /proctor/verify
  3. On success, student proceeds to /exam
  4. On submit, session ends and student sees /result

Server API

These are exported directly from require('exam-proctor-sdk'):

| Export | Type | Description | |---|---|---| | middleware(config) | function | Express middleware — mounts all /proctor/* routes into your app | | configScriptTag(config) | function | Returns an inline <script> tag with runtime config for the client | | registerUrl() | function | Returns the registration route path (/proctor/register) | | verifyUrl(sessionId) | function | Returns the verification route path for a given session |


Client API

Once /proctor/proctor-bundle.js is loaded in the browser, the global ExamProctor object is available:

// Start proctoring for a student session
ExamProctor.start(sessionId, studentName);

// Stop proctoring (call on exam submit or timeout)
ExamProctor.stop();

// Get current proctoring mode
ExamProctor.getMode(); // → 'full' | 'basic' | 'tab-only' | 'stopped'

Model Loading

Detection models are loaded from CDN by default:

https://cdn.jsdelivr.net/gh/Murali55-09/violation-detect@models-cdn/

Self-hosting: Place model files locally and point to them via your middleware(config) options. Local models in exam-proctor-sdk/models/* are supported as a fallback for air-gapped or offline environments.


Headers

The SDK expects your Express app to serve pages with the following headers for full browser API access (camera, cross-origin isolation):

Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Resource-Policy: same-origin

Requirements

  • Node.js >= 18
  • Express >= 4

License

MIT