Explore products · Documentation · What’s New · OpenAPI JSON
Report a bug · Request a feature · Contribute
Version 2.0.0 provides native Angular, Vue and React workspaces. React users upgrading from version 1 must migrate from iframe props to the adapter API.
Identify any type of document and turn PDFs and scanned images into document identities, editable fields, tables, and structured JSON. Use the web workspace, run your own API, or integrate the MIT-licensed packages.
Guides · PDF to JSON · Integrations
Open the PDF extractor · Documentation · What’s New · OpenAPI JSON · Source
The hosted workspace requires GitHub or configured LinkedIn sign-in before uploads, samples, local OCR, AI extraction, or document questions. LinkedIn uses OpenID Connect and appears when its credentials are configured. Email sign-in remains reserved for a later phase. GitHub and LinkedIn automatically use the same existing account when the incoming provider confirms the same verified email and the existing PageSignal email is also verified. Account ID, existing data and allowance are preserved. Missing or unverified email claims cannot link accounts; use your original provider or verify the email first. Account also offers an explicit Connect LinkedIn option. Sign in before uploading when using a social provider, because social sign-in reloads the tab.
Use the web app for PDFs and scans. Choose the core package to call OpenAI from your server, the SDK to call a self-hosted PageSignal server, or native React, Angular and Vue packages to add a workspace to your application.
| Interface | What it does | Credential |
|---|---|---|
| Web workspace | Upload, identify, review, ask, export | Hosting access, if enabled |
| Community HTTP API | Extract a rendered page; ask about supplied page text | PageSignal service key |
| @pagesignal/core | Call the extraction engine in Node.js | Your OpenAI key |
| @pagesignal/sdk | Call your Community extraction endpoint | PageSignal service key |
| @pagesignal/react | Native React document workspace | Host-owned extraction adapter |
| @pagesignal/angular | Native Angular 21 document workspace | Host-owned extraction adapter |
| @pagesignal/vue | Native Vue 3.5 document workspace | Host-owned extraction adapter |
AI attempts open-vocabulary document identification, including ACORD, USCIS, invoices, receipts, and custom documents. Results depend on scan quality and visible evidence. Ambiguous forms and unreadable values need human review; complete or accurate extraction is not guaranteed.
- Open PageSignal and drag documents into the upload area, or choose Browse files. Try sample documents creates synthetic samples locally.
- Local processing starts immediately. PDFs use their text layer where possible; scanned pages and images use English OCR in your browser. Progress appears on each document card.
- To run AI immediately on new uploads, enable Use OpenAI vision extraction before uploading. Otherwise use the primary action at the top right of Extraction review. Its label is Extract all fields for one eligible file, or Identify N files with AI for multiple files. Confirm sending page images and OCR text to OpenAI.
- The queue processes up to three documents concurrently. Pages within each PDF run sequentially; the shared local OCR worker processes one recognition task at a time. You do not need to click each document to start batch AI processing.
- Select a completed card. The full-width workspace places extracted fields on the left and a large document preview on the right. Compare AI review, Fields, Raw text, and JSON with the preview. AI review includes the form title, number, revision, issuer, field states, tables, and review notes where detected. Edit incorrect values before exporting.
- In Ask this document, enter requested labels such as policy number, effective date, and premium. Click Find specific fields to add editable key/value results with source evidence. Click Ask for a follow-up answer with page citations. The first question asks permission to send the extracted document text to OpenAI.
- Click a field or citation to navigate to its source page and highlight matching PDF text or OCR words with an arrow. The preview supports page navigation, zoom and fit width. Repeated matches are identified; if no reliable position is found, the page is shown without a highlight. Handwriting and poor OCR can prevent precise matching. Supported atomic values returned with an answer can be added to fields; the answer sentence itself is not used as a field value. Ask further questions whenever needed.
- Click Export JSON for the selected document. Export each document separately. Documents, edits, and conversation are held in this tab; export before closing or refreshing.
Without AI, local classification and template-based fields are available for a limited set of document types. Ask and Find specific fields require the server's OpenAI configuration. A failed AI page remains visible as an error or needs-review result; check every page before using its output.
These are PageSignal application limits, not a statement of OpenAI's maximum upload limits. The UI renders PDFs locally and sends individual JPEG pages rather than uploading the PDF to OpenAI as a file.
| Limit | Value |
|---|---|
| Browser file types | PDF, PNG, JPG/JPEG, WEBP, BMP |
| Files per upload batch | 10 |
| Size per original file | 30 MiB |
| Combined original batch size | 100 MiB |
| PDF pages per file | 40 |
| API request body (Community server) | 4,000,000 bytes |
| JPEG data URL | At most 3,800,000 characters |
| OCR text per extraction request | At most 20,000 characters |
| Question | At most 2,000 characters |
| Query context | At most 6,000 characters |
| Query pages | 1–40 unique page numbers, each 1–40 |
| Total query page text | At most 160,000 characters |
| Concurrent Community API requests | 3 per server process |
Split larger PDFs or batches. Reduce page image dimensions or JPEG quality when a rendered page exceeds the request limit. API requests do not accept PDF binaries or multipart file uploads.
Use Node.js 22 or later. Clone the repository and configure secrets in the server environment. Install the pinned dependencies before running the Node server.
git clone https://github.com/akhi-ninja/page-signal.git
cd page-signal
npm ci --ignore-scripts
export OPENAI_API_KEY='your-openai-key'
export PAGESIGNAL_API_KEY='your-random-service-secret-at-least-24-characters'
npm startOpen http://localhost:3000. The browser login username is pagesignal and its password is PAGESIGNAL_API_KEY. The default bind address is 127.0.0.1 and port is 3000. Set HOST and PORT when needed; use HTTPS through a reverse proxy for network access. The service uses one shared credential, not per-user accounts.
# Put OPENAI_API_KEY and PAGESIGNAL_API_KEY in a local .env file.
# The Docker runner reads it; npm start does not automatically load .env.
docker build -t pagesignal-community .
docker run --rm -p 3000:3000 --env-file .env pagesignal-communityOPENAI_DOCUMENT_MODEL optionally selects a compatible vision model with Structured Outputs. The current default is gpt-4.1-mini. Keep .env files and both keys outside version control. Self-hosted users pay their model and hosting charges.
The examples below target your self-hosted Community Node server. Send Authorization: Bearer YOUR_PAGESIGNAL_API_KEY. The service credential is not your OpenAI key. The Community server authenticates all routes, including status and documentation, and also accepts the browser's Basic authentication.
The Vercel web deployment uses verified account sessions for both extraction and document queries. Its extraction handler requires a matching Origin header, JSON content type, and a verified email. A PageSignal service bearer token does not authenticate the hosted handler. Hosted AI fails closed until the account database, migrations, secrets, and providers are configured. Use the Community service mode for SDK/API integrations. Keep deployment protection enabled on previews as an additional boundary.
Hosted accounts default to 20 AI requests per day and 6 per minute, with a global cap of 200 per day. These are request attempts, not document counts or paid credits. Each page and question counts separately; attempts may count even if they fail. The account dialog shows remaining daily requests. Quotas use PostgreSQL and reset at 00:00 UTC; limits are configurable by the operator. See authentication setup. Set PAGESIGNAL_AUTH_MODE=accounts on the Node runner to use the same account flow instead of shared service mode.
GET /api/ai/status reports whether the server has a provider credential. It does not make a provider request or validate billing or model access.
curl http://localhost:3000/api/ai/status \
-H "Authorization: Bearer $PAGESIGNAL_API_KEY"{"configured": true, "provider": "OpenAI"}POST /api/ai/extract accepts JSON with image (a base64 JPEG data URL) and text (an OCR transcription; pass an empty string if unavailable). Render PDFs to JPEG pages in your application and call once per page. The raw HTTP handler requires text; the core and SDK methods default it to an empty string.
Create a request from a local JPEG using Node.js, then submit it:
node --input-type=module -e 'import {readFileSync,writeFileSync} from "node:fs"; writeFileSync("page-request.json", JSON.stringify({image:"data:image/jpeg;base64,"+readFileSync("page.jpg").toString("base64"),text:""}));'
curl http://localhost:3000/api/ai/extract \
-H "Authorization: Bearer $PAGESIGNAL_API_KEY" \
-H 'Content-Type: application/json' \
--data-binary @page-request.jsonIllustrative page response (shortened values, complete top-level shape):
{
"document_type": "invoice",
"document_title": "Invoice",
"form_number": null,
"form_revision": null,
"issuer": "Example Company",
"classification_status": "identified",
"classification_evidence": ["Invoice heading"],
"page_role": "standalone",
"fields": [{"section": null, "label": "Invoice number", "value": "INV-1042", "state": "filled", "evidence": "Invoice number INV-1042"}],
"tables": [{"title": "Items", "columns": ["Description", "Amount"], "rows": [["Service", "125.00"]]}],
"review_notes": []
}Classification status is identified, needs_review, or unidentified. Page role is first, continuation, standalone, or unknown. Field state is filled, blank, illegible, checked, or unchecked. Extracted page values remain strings or null; visible tables preserve column/row structure. Classification evidence and field evidence should still be compared with the original.
Use the same POST /api/ai/extract route with operation: document_query. Supply numbered page text yourself; the server does not remember a previous extraction or store a document ID. For mode: fields, request the desired labels in question. For mode: chat, ask a natural-language question. Always include context, even if it is empty.
{
"operation": "document_query",
"mode": "fields",
"question": "Find the notice period and termination fee",
"context": "",
"pages": [{"page": 1, "text": "Provide 60 days written notice. The termination fee is $250."}]
}Save that JSON as query-request.json and submit:
curl http://localhost:3000/api/ai/extract \
-H "Authorization: Bearer $PAGESIGNAL_API_KEY" \
-H 'Content-Type: application/json' \
--data-binary @query-request.jsonIllustrative field result:
{
"answer": "The notice period is 60 days and the termination fee is $250.",
"citations": [{"page": 1, "excerpt": "60 days written notice"}],
"fields": [
{"label": "notice period", "value": "60 days", "source": {"page": 1, "excerpt": "60 days written notice"}},
{"label": "termination fee", "value": 250, "source": {"page": 1, "excerpt": "termination fee is $250"}}
]
}Query values can be string, number, boolean, or null. Missing or unsupported values return null with source: null. Citations contain a page number and verbatim excerpt checked against supplied text. Excerpt validation is not a guarantee that every answer is semantically correct. For a follow-up, resend pages, set mode to chat, and include relevant prior conversation in context. Chat responses use answer and citations and may include supported atomic values in fields. Returned field values must be supported by their cited excerpts; malformed or guessed emails are rejected. Queries search supplied text, not the original page images. The web app includes successful AI-extracted page fields when available. Run vision extraction before questioning unclear scans; unreadable values may remain null.
The API returns a single page's extraction or a query result. The web UI builds a separate document-level export with schema_version: 3.0. Do not expect the HTTP API to return the same wrapper as Export JSON.
A UI export includes fields (normalized snake_case keys), evidence keyed the same way, source (file_name, page_count, ocr_pages), document_type, form_number, raw_text, and local extraction data. AI exports also include pages, document_title, classification_status, processing_status, and local_classification. The document may be mixed_documents when distinct forms are found in one file. Pages with errors remain in pages. Repeated extracted labels receive suffixes such as _2. Requested field labels use normalized keys and may replace a matching existing field key.
{
"schema_version": "3.0",
"document_type": "invoice",
"fields": {"invoice_number": "INV-1042", "is_paid": false, "due_date": null},
"evidence": {"invoice_number": {"page": 1, "excerpt": "INV-1042", "reviewed": false, "status": "filled"}},
"source": {"file_name": "invoice.pdf", "page_count": 1, "ocr_pages": []}
}This is an abbreviated UI example. Checkbox states become booleans in normalized fields; other extracted page values remain strings or null. Manually edited requested values become strings or null. Export results after reviewing and correcting values.
Run the extraction engine directly in your Node.js 22+ backend. It calls OpenAI using your own provider credential and does not require a running PageSignal server.
npm install @pagesignal/coreimport { readFile } from 'node:fs/promises';
import { extractPage, PageSignalError } from '@pagesignal/core';
const jpeg = await readFile('page.jpg');
try {
const result = await extractPage(
{ image: `data:image/jpeg;base64,${jpeg.toString('base64')}`, text: '' },
{ apiKey: process.env.OPENAI_API_KEY }
);
console.log(JSON.stringify(result, null, 2));
} catch (error) {
if (error instanceof PageSignalError) console.error(error.status, error.message);
else throw error;
}extractPage({ image, text = '' }, { apiKey, model }) returns a page response. Optional model overrides the default. HTTP failures expose PageSignalError.status. PDF rendering, OCR, authentication, storage, billing, and multi-page orchestration belong to your application. Use queryDocument for specific fields or document questions. Never put OPENAI_API_KEY in browser code.
Call a running Community server from a Node.js 22+ backend. Use the PageSignal service key; the provider key stays on that server.
npm install @pagesignal/sdkimport { readFile } from 'node:fs/promises';
import { PageSignalClient } from '@pagesignal/sdk';
const client = new PageSignalClient({
baseUrl: 'http://localhost:3000',
apiKey: process.env.PAGESIGNAL_API_KEY,
timeoutMs: 120000
});
const jpeg = await readFile('page.jpg');
try {
const result = await client.extractPage({
image: `data:image/jpeg;base64,${jpeg.toString('base64')}`,
text: ''
}, { signal: AbortSignal.timeout(60000) });
console.log(result.document_type, result.fields);
} catch (error) {
console.error(error.status, error.message);
}The constructor also accepts fetch for a custom transport. baseUrl is reduced to its origin, so path prefixes are not supported. It rejects embedded URL credentials and redirects. The default timeout is 120,000 ms. Service errors expose error.status; cancellation/network errors may not. SDK extractPage processes one JPEG page, not a PDF file. Use client.queryDocument for specific fields or document questions. Keep the SDK and service key on your server.
Version 2 replaces the React iframe API and adds native Angular and Vue components. There is no iframe and no dependency on the hosted PageSignal website. Each framework renders its own DOM. Upload validation, queue state, bounded parallel extraction, cancellation, editable fields, queries and JSON export are shared through the browser-safe @pagesignal/sdk/workspace entry point.
The packages provide multiple upload/drag-and-drop, per-document status and errors, cancel/retry/remove, fields on the left, PDF/image preview on the right, field source text, query responses and JSON download. They do not bundle account login, admin pages, OCR, PDF rasterization, a provider key, or a backend. Native PDF preview uses the browser's PDF object viewer with an open-file fallback. Precise source overlays, page-level preview controls and OCR progress are features of the full web app, not these initial native components.
Pass an adapter with extract({file, signal}) and optional query({file, result, question, mode, signal}) async functions. Extraction returns an object with optional fields: [{label, value, source: {page, excerpt}}]; additional classification/text/table properties are retained and exported. Query returns your application's structured result. Field edits are marked edited: true; edits from text inputs are strings. The query result is exported separately from extraction. Removing a document or unmounting aborts outstanding work and revokes local preview URLs. Adapters must honor AbortSignal to stop upstream work.
Defaults: 10 files retained, 30 MiB per file, 100 MiB across retained files, and 2 concurrent extractions. Accepted types: PDF, PNG, JPEG, WebP and BMP. SDK controller options expose all limits; components expose maxFiles and concurrency. These are UI limits; enforce file/page/size limits and authentication again on the server. A PDF page limit requires PDF parsing in your adapter.
A host-owned backend adapter can look like this:
// Browser module. No OpenAI or PageSignal service keys here.
export const adapter = {
async extract({file, signal}) {
const form = new FormData();
form.append('file', file);
const response = await fetch('/api/documents/extract', {
method: 'POST', body: form, signal, credentials: 'same-origin'
});
const result = await response.json();
if (!response.ok) throw new Error(result.error || 'Extraction failed');
return result;
},
async query({result, question, mode, signal}) {
const response = await fetch('/api/documents/query', {
method: 'POST', credentials: 'same-origin', signal,
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({result, question, mode})
});
const answer = await response.json();
if (!response.ok) throw new Error(answer.error || 'Query failed');
return answer;
}
};The two /api/documents routes above are examples you implement in your application; they are not new endpoints in the Community server. Your extraction route validates the upload, renders PDF pages or converts images to JPEG, obtains OCR text if needed, and calls server-side core.extractPage or SDK.extractPage for each page. Preserve numbered page text for core.queryDocument or SDK.queryDocument in the query route. Authenticate and authorize both routes, bound concurrent requests and costs, and do not trust client-supplied extraction results for permissions or source verification. Alternatively implement the adapter with your own existing document service.
No data is sent anywhere until your adapter runs. Do not import the SDK root client into browser code with a service key. Browser applications should import only the workspace entry point, or just a framework component. AI results require review against the source.
React 18 and 19 native component. Version 1 src/title/height iframe props are removed in version 2. In Next.js, use a client component. Keep adapter and configuration stable; changing them recreates the React workspace and clears its documents.
npm install @pagesignal/react@2 @pagesignal/sdk@2 react react-domimport { PageSignalWorkspace } from '@pagesignal/react';
import { adapter } from './document-adapter.js';
export default function Documents() {
return <PageSignalWorkspace adapter={adapter} maxFiles={10} concurrency={2}
onResultsChange={documents => console.log(documents)} />;
}Standalone Angular 21 component, built in Angular Package Format with partial compilation. Import it in the consuming standalone component. Angular configuration inputs are read on initialization; adapter callbacks use the latest adapter input. Use maxFiles and concurrency before initialization.
npm install @pagesignal/angular@2 @pagesignal/sdk@2import { Component } from '@angular/core';
import { PageSignalWorkspaceComponent } from '@pagesignal/angular';
import { adapter } from './document-adapter';
@Component({
selector: 'app-documents', standalone: true,
imports: [PageSignalWorkspaceComponent],
template: '<pagesignal-workspace [adapter]="adapter" [concurrency]="2" (resultsChange)="onResults($event)" />'
})
export class DocumentsComponent {
adapter = adapter;
onResults(documents: unknown) { console.log(documents); }
}Native Vue 3.5 component. Configuration inputs are read on mount; adapter callbacks use the latest adapter prop. Use maxFiles and concurrency before mount.
npm install @pagesignal/vue@2 @pagesignal/sdk@2 vue<script setup>
import { PageSignalWorkspace } from '@pagesignal/vue';
import { adapter } from './document-adapter.js';
const onResults = documents => console.log(documents);
</script>
<template>
<PageSignalWorkspace :adapter="adapter" :max-files="10" :concurrency="2"
@results-change="onResults" />
</template>Both core and SDK now expose queryDocument for source-supported field lookup and document questions. Core uses your OpenAI credential; SDK uses your self-hosted Community service credential. Neither library uploads PDF binaries or persists documents. Render pages and provide numbered text in your application.
import { queryDocument } from '@pagesignal/core';
const result = await queryDocument({
pages: [{page: 1, text: 'Policy number: P-1042. Renewal date: 12/01/2026.'}],
question: 'Find policy number and renewal date',
mode: 'fields',
context: ''
}, {apiKey: process.env.OPENAI_API_KEY});
console.log(result.fields);
// SDK: await client.queryDocument({pages, question, mode: 'chat', context: ''});The GitHub source includes the complete hosted workspace and backend. Core and SDK root exports remain server libraries. The new framework packages provide native UI through a host adapter; hosted login, community/admin pages and SEO are application features.
API errors use {"error":"message"}. The status table below describes the Community server and shared engine. Browser UI validation may stop a file before making a request.
| HTTP status | Meaning | Next step |
|---|---|---|
| 400 | Invalid image, JSON, question, or empty readable page text | Check the request shape and OCR text |
| 401 | Missing/incorrect Community service credential | Check PAGESIGNAL_API_KEY |
| 403 | Invalid origin or content type in the shared/Vercel handler | Use JSON and the supported hosting/access path |
| 405 | Unsupported method on an API route | Use GET for status, POST for extraction |
| 413 | Body, rendered image, or query text exceeds limits | Split or reduce the request |
| 429 | Community process already has three active requests | Retry later with bounded backoff |
| 502 | Provider rejected, timed out, or returned incomplete/invalid output | Check billing, model access, scan quality, and provider status |
| 503 | OPENAI_API_KEY is missing | Set it in the server runtime and restart/redeploy |
A provider-side 429 is currently wrapped as a 502 by the shared engine. Status configured: true only means a key exists. OCR startup requires network access to its library and English language data; PDF rendering loads PDF.js from a CDN. An unreadable or password-protected PDF may fail; upload an accessible copy. Retry transient failures carefully because a repeated AI request can incur another provider charge.
Original uploads and results remain in the browser session in the current UI; there is no durable document library. With AI enabled, rendered page images and OCR text go through your server to OpenAI. Questions send numbered page text and conversation context. Provider requests set store: false; that flag alone does not define the provider's full retention policy. OCR/PDF dependencies are loaded from third-party CDNs when needed; interface fonts use the system font stack. Apply your own access, retention, and compliance policies for the documents you process.
Keep provider and service keys server-side. The Community runner defaults to shared service credentials and a per-process concurrency cap. Optional account mode and the Vercel handlers use Better Auth sessions, database-backed sign-in rate limits, and atomic AI request quotas. Account database records and counters persist; they do not contain uploaded document contents. Paid managed Cloud plans, durable submission IDs, webhooks, polling, and npm PDF-upload helpers are not implemented; core and SDK expose queryDocument for text-based field lookup and chat. The standalone npm packages do not enforce hosted account allowances; hosted API guards enforce request quotas separately. Paid credits and distributed in-flight concurrency accounting are not implemented. MIT code can be self-hosted; model and hosting usage are separate.
GitHub development → reviewed PR → main → Vercel is the web deployment flow. Package releases use a stable vX.Y.Z GitHub release from main and publish all five packages via the trusted publish.yml workflow. See release setup. Existing npm versions cannot be overwritten; documentation changes on npm require a new package release.
Open https://www.pagesignal.studio/community to optionally share your organization, use case and integration. Sign in with GitHub or configured LinkedIn first. Your registration is private to the maintainer, and a separate checkbox permits contact about your use case. You can update or withdraw the registration at any time. Package downloads do not require registration, and no npm install telemetry is included.
The private admin view is https://www.pagesignal.studio/admin. Set PAGESIGNAL_ADMIN_GITHUB_IDS to a comma-separated list of trusted numeric GitHub account IDs in the server environment, then redeploy. Access is checked against the signed-in user's linked GitHub account on every admin request, not a browser flag or email address. With an empty allowlist, nobody has admin access. Use the same allowlist only where the corresponding deployment's database should be accessible to those maintainers.
The view lists registered accounts, optional registrations and hosted AI attempts for the last 30 UTC dates, with pagination. Attempts include failures and are not document counts, unique installers or self-hosted usage. The last AI activity shown is limited to this window. There is no historical sign-in-event tracker. Raw provider tokens, sessions and document contents are not returned by this API.
The account-mode Node runner and Vercel expose GET /api/community for your own registration and admin availability, PUT for saving explicit consent, and DELETE for withdrawal. GET /api/community?view=admin&page=1 requires allowlisted admin access. Mutations require the canonical Origin, a verified account session, and an 8 KiB body limit. Rapid duplicate saves are throttled. The small pagesignal_community table is created idempotently on first authorized use; the existing auth and usage migrations must already be complete, and the database role must permit table creation. Shared service-key mode does not expose this account feature.
See the contributor guide for setup, pull requests, and bug reports.
npm test
npm run docs:build
npm run docs:check
npm run styles:build
npm run styles:check
npm run pack:packagesREADME.md is the source for the static documentation page. scripts/build-docs.mjs renders web/docs.html; update both by running docs:build after editing this README. The OpenAPI file is web/openapi.json and describes the Community HTTP API.
The document-query handler was reconstructed from the earlier deployment behavior and tested with mocked provider responses. Automated tests do not prove real-world extraction accuracy. Verify your own documents and integration before production use.
MIT licensed. Preserve the license and copyright notices when distributing copies. Questions and bug reports: GitHub issues.
Visit What’s New for all published product versions, package links and the React v2 migration guide. CHANGELOG.md is the source for release notes. docs/releases.json supplies verified publication dates, summaries, package names and GitHub-tag availability; add metadata there when releasing a new version. PageSignal Sync has its own release entries under the sync key. npm staging placeholders are not product releases.
After updating the changelog or release metadata, run npm run releases:build and npm run releases:check. The page is static and does not make runtime GitHub or npm API calls.
The workspace embeds its small stylesheet for the initial render. After changing web/style.css, run npm run styles:build; CI checks that the embedded copy stays synchronized. The UI uses system fonts. OCR downloads on the first recognition request rather than during initial page load.
See the benchmark guide for synthetic fixtures, offline accuracy scoring, and explicit opt-in model runs. No production accuracy claim is established yet. An optional server-side LangGraph workflow is implemented; see setup and limitations. It remains disabled by default while issue #26 tracks the measured adoption decision.
AI review shows scan-quality hints and field evidence status. A transcript match checks text consistency; it does not prove visual accuracy. Different values across pages are flagged for review without overwriting either value. For an uncertain field, choose Recheck source with AI to send a unique source crop for one additional AI request, then review the proposal and choose Use this value only if correct. Ambiguous locations require manual review. Automatic extra AI calls remain disabled by default. See quality tools and limitations.
React, Angular and Vue source integrations share an optional native preview controller for zoom, fit width, page navigation and source evidence overlays. PDF navigation/overlays require a host page renderer; the browser-native PDF fallback remains available. Heavy PDF/OCR dependencies stay outside the UI packages. See runnable examples and contracts for the server adapter, lazy PDF.js example, custom fields, themes, lifecycle rules, supported framework versions and migration guidance. This source improvement is not an npm release.
CI checks packed consumer installs, strict TypeScript exports, DOM-free imports, framework mounts, cancellation, accessibility semantics and keyboard focus. Bundle reports exclude framework peers and optional PDF/OCR runtimes. Automated checks do not establish formal WCAG conformance or replace assistive-technology/device testing.
Optional same-origin document jobs support encrypted persistent state, per-page outcomes, bounded retries, cancellation, explicit review and deletion using Vercel Queues and Neon. Jobs are disabled until configured and migrated. See job API and operational limits. New browser-safe SDK source entry points @pagesignal/sdk/document and @pagesignal/sdk/jobs expose versioned reconciliation and job-client contracts without model credentials. These source additions are not yet an npm release.
Targeted crop rechecks remain opt-in and produce proposals requiring human acceptance. Conflicts, uncertain document boundaries and cross-page table joins remain reviewable rather than silently repaired.
LangGraph-powered server-side document workflows for Node.js 22+. Public developer preview, MIT licensed.
Documentation · Releases · npm
npm install @pagesignal/orchestratorSupply your own server extraction adapter and rendered page in this integration example.
import { createPageWorkflow } from '@pagesignal/orchestrator';
const workflow = createPageWorkflow({
page: { image: jpegDataUrl, text: ocrText },
extractPage: page => myServerExtractionAdapter(page)
});
const state = await workflow.start({ recursionLimit: 16 });
console.log(state.status, state.result, state.issues);The application supplies rendered JPEG pages, OCR, credentials, authentication, quotas and storage. Default is one model call; a second requires maxCalls: 2 and an explicit reserveAdditional callback returning true. Optional prepareRecheck is caller-owned. Evidence checks are review hints, not proof of accuracy.
For human approval, provide a caller-owned LangGraph checkpointer and requireApproval: true. Use workflowConfig with authenticated tenantId and unique page/document workflow ID; reuse the same configuration and original page on resume. Authorize each resume server-side. Do not run concurrent invocations on the same thread. Checkpoints contain sensitive extracted results; enforce access controls, encryption, retention and deletion. External tracing is blocked unless explicitly authorized. No database is created by this package.
Migration and deployment:
Existing core, SDK, framework and Sync consumers need no changes. This preview is opt-in and does not replace the hosted server engine. Self-hosted server operators should follow LangGraph configuration and durable jobs for server configuration and applicable database migrations. Do not enable durable jobs until infrastructure and migrations are ready. No browser imports or provider secrets in client code.
PageSignal Sync is a standalone open-source product for offline-first web apps. It stores records in IndexedDB, lets the app subscribe to changes, and queues edits for a developer-run backend. Enable automatic sync to resume when the browser reconnects, or trigger sync explicitly. It can be used with React, Angular, Vue, or a browser app that uses TypeScript directly.
Run the inventory demos from the repository with Node.js 24.
git clone https://github.com/akhi-ninja/page-signal.git
cd page-signal/pagesignal-sync
npm ci
npm run build
npm run previewOpen React, Angular, or Vue. Set Widget to 1, wait for the app shell to finish caching, then go offline, increment the quantity, and reload. The edit stays in the browser.
Install the public PageSignal Sync developer preview with:
npm install @pagesignal/sync@0.1.2import { SyncDatabase } from '@pagesignal/sync';
const db = new SyncDatabase<{ tasks: { title: string; done: boolean } }>('my-app');
const tasks = db.collection('tasks');
const subscription = tasks.watch().subscribe(({ records, conflicts }) => {
console.log(records, conflicts);
});
await tasks.put('task-1', { title: 'Count inventory', done: false });
// When the app no longer needs the database:
subscription.unsubscribe();
db.close();Create the database in browser code on localhost or HTTPS. Connect the subscription to your React state, Angular signal, or Vue ref, then unsubscribe when the consuming component is destroyed. Use a distinct database name per local account and dataset.
To try replication, run docker compose up --build from pagesignal-sync/. Open the inventory demo in two separate browser profiles and click Sync now using the local demo token local-demo. If both profiles edit the same record before syncing, the second profile can choose which value to keep and sync again.
To sync automatically, start a controller after sign-in. Supply a token getter bound to the current session.
import { httpTransport } from '@pagesignal/sync';
const transport = httpTransport(serverUrl, getTokenForCurrentSession);
const controller = db.startAutoSync(transport, ({ state }) => {
console.log(state);
});
// On sign-out or account switch:
controller.stop();
subscription.unsubscribe();
db.close();The controller resumes queued edits on reconnect. If credentials expire, refresh them and call controller.retry(). For manual sync, call await db.sync(transport) while connected.
The reference server uses one shared token for local evaluation. Configure application authentication and record-level authorization before exposing a backend to untrusted users. See the Sync source and HTTP protocol for configuration and integration details.
PostgreSQL restore recovery is available in v0.1.2. Update both the client SDK and the self-hosted reference server. When a stale checkpoint is detected, the SDK rebuilds its server cache while retaining queued edits. Acknowledged changes made after the backup require separate database recovery. Follow the PostgreSQL restore guide.
The unpublished @pagesignal/orchestrator source preview provides server-side LangGraph page workflows with caller-owned extraction and checkpoint adapters. See installation, migration and security guidance. Existing npm consumers do not need to migrate. Hosted production selects its orchestration engine independently of package versions. Do not treat this source preview as an npm release.
BuildTrial is an open-source Webpack 5 CLI for JavaScript apps and TypeScript libraries. It can produce a deployable build or report how different loaders and minifiers affect your existing build.
Use Node.js 20 or newer. Run these commands in the directory containing your project's Webpack configuration. Replace the filename and output target with the ones your app supports.
npm install -D buildtrial@0.2.0 esbuild-loader@4
npx buildtrial build --config webpack.config.cjs --target es2020BuildTrial tries your current configuration, an esbuild loader swap, a minifier swap and both changes together. It chooses the passing candidate with the smallest combined gzipped JavaScript and CSS, including lazy chunks. A tie favors the baseline when eligible. The winner’s complete Webpack output replaces dist/, including HTML, images, fonts and declarations your config emits. If every candidate fails, BuildTrial preserves the existing directory.
Add --verify scripts/check-build.cjs to test each candidate before selection. The script receives the candidate directory in process.env.BUILDTRIAL_OUTPUT; a nonzero exit rejects that build. Use --strategy loader to build a single strategy, or --json to read the selection in CI. If your deployment also needs a server or files outside Webpack, include your project's usual packaging step.
Use Node.js 20 or newer. From a terminal, fetch the example source, install its dependencies, and run the included React example:
git clone --branch development https://github.com/akhi-ninja/page-signal.git buildtrial-source
cd buildtrial-source/tools/buildtrial
npm ci
cd examples/react-app
node ../../cli.mjs --config webpack.config.cjs --target es2020 --runs 3 --verify verify.cjsThe four rows report median cold compilation, a second build with no edits, and gzipped initial JavaScript and CSS. The verification script renders the example component and checks the result for each strategy. The chart below shows one Windows run. Measure your own project before changing its configuration.
Install BuildTrial from npm in your Webpack project. Replace the configuration filename and esbuild target with values for your project.
npm install -D buildtrial esbuild-loader@4
npx buildtrial --config webpack.prod.cjs --target es2020 --runs 3Add --verify scripts/check-build.cjs to exercise each candidate using its temporary output directory in process.env.BUILDTRIAL_OUTPUT. Use --json for machine-readable results. BuildTrial flags missing declared entry points and type declarations under the configured output directory. The TypeScript SDK example demonstrates a loader swap that drops the published declarations.
Experimental Node.js 22+ SDK, version 0.1.0 release candidate. npm publication is pending. Use trusted application-owned agent functions, explicit execution plans, model budgets, field/table specialists, evidence checks and conservative multi-page reconciliation. Hosted Agent Studio is separate from the SDK.
import { createAgentRegistry, createSupervisor } from '@pagesignal/agents';
const registry = createAgentRegistry();
registry.register({name:'inspect', execute:({input})=>input});
const run = createSupervisor({registry, maxSteps:1});
console.log(await run({input:'sample', plan:['inspect']}));Agent SDK source and integration guide. Caller owns provider credentials, quotas, authorization and review. No accuracy improvement is claimed.
Experimental Node.js 22+ ESM SDK, version 0.1.0 release candidate. npm publication is pending. Supports synthetic connector contracts, explicit mapping, schema validation and deterministic source reconciliation. Custom endpoint simulation does not fetch live URLs. Hosted credential storage and transport are separate features. TypeScript declarations are not included in this candidate.
import { createConnectorHub } from '@pagesignal/connectors';
const hub = createConnectorHub([{id:'sample',name:'Sample',category:'demo',synthetic:true,execute:async()=>({fields:[{key:'name',value:'Example',evidence:'Fixture'}]})}]);
console.log(await hub.test('sample',{synthetic:true}));Connector SDK source and integration guide.
Open Agent Studio. Explore synthetic graph scenarios or compare supported live engines on a JPEG or PNG page with an optional transcript. Live execution requires a configured server, verified sign-in and available quota. Review outputs against the source; results are not a validated accuracy benchmark. Shared sign-in returns to the originating product page.
