Jev-Examiner

September 20, 2026 · View on GitHub

Jev-Examiner

Version Copyright License

[English] | 简体中文

A general-purpose AI content moderation workflow powered by the TypeSafe/Jev model.

Jev is TypeSafe's first System One model. It does not generate text; it returns structured answers and probability distributions for a set of typed questions. This project builds a layered moderation flow on that capability: a broad "is this a violation" judgment is decomposed into independent atomic questions evaluated in parallel, combined with weights in code, and routed on confidence.


Features

FeatureDescription
Layered atomic moderationDecomposes moderation into category, severity, and independent violation dimensions evaluated in one parallel request
Weighted composite scoreEach dimension is normalized to a 0-1 violation tendency and combined by tunable weights
Confidence-based routingCombines the composite violation score with model confidence to pass, route to human review, or block
Scenario presetsShips with general content moderation and campus mutual-aid presets, ready to use
Custom question setsCallers can supply their own question sets and weight tables to fully override a preset
Batch moderationSubmits multiple items concurrently and returns both a summary and per-item results
No-auth APIThe API server performs no caller authentication; keys are supplied by the caller or configured server-side
Selectable key sourceEach call can specify whether the key comes from the caller or a server-side constant, with caller-first fallback
Encrypted transportCan listen over HTTPS and reject unencrypted requests, keeping keys off plaintext channels
Direct official API accessThe frontend shell can call Jev's official endpoint directly with a key, independent of the backend
Visual test shellA static test page with question-set editing, preset switching, dimension details, and raw responses

Quick Start

Requirements

  • Node.js 20 or newer (the server uses built-in fetch)

Start the API server

cd src/api
npm start

The server listens on http://localhost:8080 by default. It uses only Node.js built-in modules and requires no third-party dependencies.

To configure a key server-side, set the environment variable before starting:

JEV_API_KEY=<your-key> npm start

Enable HTTPS

API keys travel with requests, so plaintext channels carry a leak risk. Provide both a certificate and a private key path to listen over HTTPS:

HTTPS_KEY_PATH=./key.pem HTTPS_CERT_PATH=./cert.pem npm start

Set REQUIRE_HTTPS=true on top of that and the server rejects every unencrypted request, loopback included. When a reverse proxy terminates TLS, the server relies on X-Forwarded-Proto; make sure the service is not directly exposed in that setup.

Choose the key source

Callers may specify the key source per request as auto, client, or server, meaning caller-first with server fallback, caller only, and server only. When omitted, the server default applies (environment variable KEY_SOURCE).

curl -X POST http://localhost:8080/audit \
  -H "Content-Type: application/json" \
  -H "X-Jev-Key-Source: server" \
  -d '{"content":"Content to review"}'

Use the frontend test shell

The frontend is a static page. Open src/pages/index.html directly in a browser, or visit http://localhost:8080/ after starting the API server to load the same page.

Enter your Jev API key and the content to review, then click "开始审核" to see the verdict, dimension details, and the raw official response. The key lives only in the page's runtime UI state and is never persisted.

The frontend calls the official Jev endpoint directly by default. That endpoint only allows whitelisted origins, so a locally opened page is blocked by the browser's cross-origin policy. Point the API base at the local service https://localhost:8080/audit and let it forward the call instead. The local service always uses HTTPS, so trust its self-signed certificate in the browser first.

Call the moderation endpoint

curl -X POST http://localhost:8080/audit \
  -H "Content-Type: application/json" \
  -H "X-Jev-Api-Key: <your-key>" \
  -d '{"content":"Content to review","preset":"general"}'

Directory Structure

Jev-Examiner/
├── .github/                        # GitHub workflows
│   └── workflows/                  # Workflow configuration
│       └── deploy-src-pages-as-pages.yml # Deploy src/pages to Pages
├── .gitignore                      # git ignore rules
├── COPYRIGHT                       # Copyright file
├── LICENSE                         # License file
├── README.md                       # README document (English)
├── README_zh-CN.md                 # README document (Simplified Chinese)
├── docs/                           # Project documents
│   └── api/                        # API documents
│       └── audit.md                # Moderation API reference
└── src/                            # Project source code
    ├── README_zh-CN.md             # Source structure notes
    ├── api/                        # API service (Node.js)
    │   ├── app.js                  # Server entry
    │   ├── package.json            # Service metadata
    │   └── include/                # Internal modules
    │       ├── constants.js        # Global constants and design details
    │       ├── jevClient.js        # Jev API client wrapper
    │       ├── questionSets.js     # Question sets and weights
    │       ├── auditEngine.js      # Moderation engine
    │       ├── httpUtils.js        # HTTP utilities
    │       └── router.js           # Route handling
    └── pages/                      # Static web test shell
        ├── index.html              # Test shell page
        ├── styles.css              # Page styles
        └── app.js                  # Frontend logic

Documentation

Copyright © 2026 JularDepick

See COPYRIGHT for details.

License

This repository is licensed under the Apache-2.0 License.

Contributing

See CONTRIBUTING.md for details.