Self-Hosted Collaborative Spreadsheet with AI
The backend that turns Jspreadsheet into a private collaborative platform. Multi-user editing, version history, AI agents on your documents, and a full REST API. Your database, your authentication, your servers.
Free trial Documentation$ npm install @jspreadsheet/server
Collaboration is the new part. The spreadsheet is not. A collaborative backend is only as good as the engine it resolves changes with.
A Shared Document, Not a Shared File
The server owns the live document. Browsers, backend jobs and AI agents all reach the same copy of it, under the same rules, and see each other's changes as they happen.
Live multi-user editing
Everyone works on the same document over WebSocket, with presence and cursors. No merge dialogs, no locked files, no copy of a copy landing in someone's downloads folder.
Authoritative formulas
The same formula engine your users see in the browser runs headless on the server, so computed values are consistent for every collaborator, every API consumer and every AI agent.
Sharing and invitations
Share documents by link or embed them in your product. Invitations, ownership and privacy rules are enforced on the server with your own logic: owner, invited user or public viewer.
How a change travels
One Edit, Resolved Once, Seen by Everyone
Conflicts are not negotiated between clients. There is one place where a change becomes real, which is why every screen ends up on the same document.
The edit leaves the browser
Nothing is applied locally and hoped for. The change goes to the server first, over the same WebSocket every other client is listening on.
Applied once, in order
Your access hooks run, the formula engine recalculates, and the operation is applied to the live document a single time. Concurrent edits queue behind it.
Stamped with a revision
Every applied operation gets a revision number. That number is what a client uses to tell whether it is current, behind, or reconnecting into the middle of a session.
Replayed to every screen
The result fans out to everyone connected, and lands in your database through the adapter. Browsers, REST consumers and AI agents all read the same state.
AI That Works on Your Spreadsheets
Because the server owns the live document, AI does not just read a file export. It works on the same spreadsheet your users are editing, in real time.
Document MCP server
Expose your documents to AI agents through the Model Context Protocol. Assistants read, analyze and update spreadsheets under the same authentication rules as any user.
AI agent with spreadsheet tools
A streamed chat endpoint with agent mode, file attachments for Excel, PDF and images, saved chat sessions per document, and token usage tracking you can bill against.
PROMPT formula, server side
Register =PROMPT() as a spreadsheet function and the model call runs server side, inside the formula engine, next to the 500+ Excel formulas.
REST API for automation
Every spreadsheet is an HTTP resource. Pipelines, LLM workflows and backend jobs read values and write cells from any language. No socket required.
Bring Your Own LLM, or Bring No Internet at All
One model layer serves every AI feature the server runs: the chat agent, the spreadsheet functions, and anything your own jobs call. Switching providers is a config change, not a code change.
// one interface, any model
const ai = require('@jspreadsheet/openai');
ai({
endpoint: 'https://your-gateway.internal/v1',
apiKey: process.env.MODEL_KEY,
});
// or a model on your own network
ai({ endpoint: 'http://localhost:11434/v1' });
server({ port: 3000, extensions: { ai } });
Any endpoint
One interface, whichever endpoint you name. The AI features never learn which provider answered, so the same document works against a gateway today and a model you host tomorrow.
Called once, shared with everyone
The model call runs server side, inside the formula engine. The response caches into the cell and reaches every connected client at once, so ten people on one document pay for one call.
Keys never reach the browser
The provider credential sits in server config next to your database credential. The client sends a formula. It never sees a key, an endpoint, or a model name.
Google Sheets runs Gemini in Google's cloud. Excel runs Copilot in Microsoft's. The server never proxies model traffic, so the endpoint stays yours: a hosted gateway, your own GPUs, or a local provider where nothing leaves your network. That is what makes an AI spreadsheet approvable in regulated finance, healthcare, defense and the public sector.
Private by Architecture
A collaborative spreadsheet platform your compliance team will approve: the server is a Node.js service you host, and the two things it never owns are your credentials and your data.
Your authentication
JWT, sessions, OIDC and invitation models all fit. The server never stores your users' credentials and never issues its own.
Your rules on every operation
Three async hooks, connect, load and change, decide who gets in and what they may touch, before anything is applied to the document.
Version history and backups
Snapshot-based version control, compressed into your own S3 bucket. Owners restore from the interface, or you automate it through the History API.
Any Database You Already Run
Persistence is a contract, not a product decision. Three adapters ship ready to use, and five async handlers cover everything else, so documents land in the database your operations team already backs up and monitors.
MongoDB
Ready-made adapter with incremental writes: a one-cell edit updates that cell path, not the whole document. Per-guid write queue keeps one document's operations in order.
PostgreSQL
Ready-made adapter storing each spreadsheet in a JSONB column, with the same incremental model applied through jsonb_set. It manages its own schema on first use.
Redis
Ready-made adapter with snapshot persistence: every change re-serializes the live document under its guid. Right for small documents, not for large ones.
Or your own store
Implement load, change, create, destroy and list, and the server writes wherever you point it. A snapshot adapter is around 60 lines.
Adapters and the persistence contract in the documentation.
Everything a Shared Workspace Needs
Collaboration is more than concurrent cursors. The extensions cover the parts a team actually asks for once the spreadsheet is shared.
Forms that write into cells
Pick which columns appear in a public form, then share a link or embed it. Submissions land as rows in the spreadsheet, live for everyone watching.
Cell comments and threads
Comments are a worksheet property, so they validate, synchronize, persist and appear over the REST API through the same pipeline as any other change.
Documents, invitations and media
Per-user document lists, profiles, owner-only invitation management, and image uploads rewritten to bucket URLs before they reach your database.
Built to Scale
Operations run against a live in-memory document, and the architecture keeps performance predictable as your usage grows.
In-memory speed
Changes apply to the live document in memory, with no storage round-trip on the hot path.
Constant throughput
Performance is independent of how many documents are open, with no per-document contention.
Linear scaling
Partition documents across nodes with consistent-hash routing, so capacity grows with node count.
Guaranteed convergence
Concurrent edits resolve in one place, so every user ends on the same state.
Sizing a deployment? How to size and measure yours.
A Working Server in One File
Five handlers move documents in and out of your storage, and three hooks guard access. Everything else, sequencing, formulas, fan-out and caching, is the server's job.
Read the guideconst server = require('@jspreadsheet/server');
const adapter = require('@jspreadsheet/server-mongodb');
server({
port: 3000,
license: { clientId: '...', licenseKey: '...' },
// Access control: your rules
beforeChange: async (guid, change, auth) => canEdit(auth, guid),
// Persistence: your storage
load: (guid, auth) => adapter.load(guid, auth),
change: (guid, changes, auth) => adapter.change(guid, changes, auth),
create: (guid, config, auth) => adapter.create(guid, config, auth),
destroy: (guid, auth) => adapter.destroy(guid, auth),
// Cache lifecycle
gc: { interval: 30, max: 100 },
});
Proven Solution, Backed by Users
Independent reviews from the platforms developers check before buying.
Customers
What Our Customers
Are Saying
“We struggled when users wanted to bulk insert/edit things (over 100k rows) and we needed performance. Jspreadsheet is probably the fastest spreadsheet component you’ll find, and with a small size. By the way, support is awesome.”
“We vetted 10 JavaScript components and we must say that Jspreadsheet comes out as the best.”
“A powerful data grid tool, providing an excellent front end for our spreadsheet interface. The Jspreadsheet team is helpful and quick to respond.”
Start Building on Your Own Servers
Run the server next to your existing API and keep the documents, the credentials and the model endpoint on your side. Full access during the trial, and no credit card required.
Free trialFind Your Way In
Guides, technical references and complete REST API documentation.
AI & integrations
Running at scale?
Partition documents across nodes with a consistent hash on the guid, so capacity grows linearly and no coordination layer is needed.
FAQs
Server Questions, Answered
Hosting, persistence, authentication and how far the server goes before you write anything yourself.
Still have questions? Talk to the engineers who build it.


