Blog

How to publish a Vite or React app with no backend, behind a login

A React app your agent built that runs entirely in the browser, and a team who should open it while nobody else can. What static hosts offer, what a real login needs, and how Spryloom builds the app and serves it as a page.

Ask a coding agent for a small tool and there is a good chance you get a Vite and React app. A quote calculator for the sales team. A dashboard of numbers from last quarter's export. A clickable prototype of new onboarding screens for the product team to try. It runs with npm run dev, it looks finished, and there is no server. Everything happens in the browser.

Then you need to put it somewhere the team can open it, and nobody else can. The calculator has your discount rules in it. The dashboard has revenue by customer. The prototype is next quarter's plan.

This article is about that step. We make Spryloom, and the last option below is ours, so read that section knowing who wrote it. The other options are real, and for some teams they are the better answer.

What "no backend" means

npm run build turns the project into a folder of plain files. Vite writes it to dist: an index.html, some JavaScript and CSS, and any images. Anything that can serve files can serve that folder. Two details matter when choosing where.

  1. Client-side routes. React Router handles /reports/q3 in the browser. There is no file at that path. A server that only answers files it has will return a "not found" when someone reloads that page or opens a link to it. The host has to answer unknown paths with index.html.
  2. Everything in the folder goes to every visitor. If the build bakes in a JSON file of prices or salaries, anyone who receives the files can read it. A password box drawn by the app does not help, because the browser already has the whole bundle. We wrote about that in How to put a login in front of an HTML page. The check has to happen before the files are sent.

Option 1: a static host, open to everyone

Netlify, Vercel, Cloudflare Pages and GitHub Pages all build a Vite project and serve dist quickly, and most have a way to send unknown paths to index.html (on GitHub Pages it takes a 404.html workaround). For a public site, such as a product page or docs, this is the right answer. We would use one too.

The catch for a team tool is in the name: by default anyone with the address can open it.

Option 2: the static host's own protection

Most static hosts offer some way to restrict a site. The details differ, and they change, so read your plan's current terms. Common forms are one shared password for the whole site, or access only for members of your account on that host. Some of these are only on paid plans.

A shared password gets forwarded, and you can't take it back from one person without changing it for everyone. Members-only access is a real login, but each viewer usually needs a seat. If the people who need the tool already have accounts on your host, this can be a good answer.

Option 3: an access product in front

Cloudflare Access and products like it put a sign-in page in front of any site. Visitors enter their email, receive a code, and are let in if they are on your list. The app is untouched. This is a sound design, and it is free for small teams. It needs some setup: your domain on that provider, the site hosted somewhere, and a policy saying who may enter. Once it is in place it covers every site behind it.

Option 4: let Spryloom build it and publish it as a page

Spryloom runs software for teams behind sign-in. When a folder has a package.json and a build step but no server, Spryloom runs the build in its own sandbox and publishes what the build writes as a page: plain files, behind the same sign-in as an app, with no machine running for it.

Your folder package.json src/ Build sandbox npm run build reaches nothing else dist/ sign-in no server, no database, nothing running between visits
The build runs once, in a sandbox. What it writes is served as a page, and only after sign-in.

Tell the agent what it is

The agent writes a small manifest, spryloom.yaml, next to package.json. For a quote calculator it looks like this:

app:
  name: Quote calculator
  description: Works out a quote from seats, term and discount, for the sales team.
runtime:
  frontend: react
  backend: none
  build: npm run build
access:
  visibility: invited
  1. One sentence for the people who use it. It appears in their invitation email and on the label page.
  2. backend: none is the line that makes it a page.
  3. The build runs once, in a sandbox.
  4. invited: only people you name.

Three habits make it publish the first time, and the Spryloom skill teaches them to your agent:

  • No start script and no server framework. If the project has a server, it is an app, and it gets a machine of its own.
  • A committed lockfile. The build installs exactly the versions you tested.
  • Libraries bundled, or from an allowed host. Vite bundles your npm packages into dist, so this mostly matters for a script tag in index.html. A page may load scripts from cdnjs, jsDelivr and unpkg, styles from cdnjs, jsDelivr and Google Fonts, and fonts from Google Fonts, cdnjs and jsDelivr. Anything else must be saved into the project. The publish warns about any it can see.

Publish and invite

In Claude Code with Spryloom connected, say "publish this for the sales team, only people I invite". From a terminal, in the project folder:

quote-calculator
npx -y spryloom publish
# preparing, building, storing, switching
# then: https://quote-calculator.yourcompany-com.spryloom.app
spry invite quote-calculator --email dana@yourcompany.com --email chris@yourcompany.com

Dana gets this email:

From Spryloom · To dana@yourcompany.com
Subject you@yourcompany.com invited you to Quote calculator

You have been invited to Quote calculator

What it does: Works out a quote from seats, term and discount, for the sales team.

Open Quote calculator

It signs you in as dana@yourcompany.com. It works once, for 7 days; after that, sign in with an emailed link.

The button leads to one press of Continue. There are no passwords. Anyone not invited gets the sign-in page and then nothing: the files are never sent to them, and your dashboard lists who tried, with a button to invite them.

Reloading /quotes/new works. A built page answers any path without a file extension that matches no file with index.html, so React Router takes it from there. A missing file with an extension, such as an old script, is still a "not found".

To change it, publish again. The address stays the same and the version number goes up. spry rollback quote-calculator returns to the previous version.

For everyone at your company instead of named people, use visibility: company with your domain. That needs a company workspace, which you get by signing in with an address at a business mail provider. With a personal address, invite people by name.

What it doesn't do

  • The page's scripts can talk only to the page itself. A React app that calls Supabase, Firebase, your own API or an AI provider straight from the browser is blocked. That needs a server: add a start script, declare the outside service, and publish again, and it becomes an app at the same address. Outside services come from a fixed list, such as api.openai.com, api.anthropic.com and api.stripe.com. A key in a browser bundle would be readable by every visitor anyway.
  • It is a login, not redaction. Everyone you invite receives the whole bundle. Don't build in data some of them shouldn't see.
  • It isn't a public site. Everyone signs in. A marketing page belongs on a normal static host.
  • Size has limits. A page is at most 1,000 files and 50 MB, and 25 MB a file. Large media is the usual cause of hitting them.
  • Saving needs to be declared. A page can keep lists of records if the manifest declares them, which is enough for a checklist or a tracker (how that works). Anything that needs rules on a server is an app.

Pages also carry a small "Built with Spryloom" badge. Publish with --no-badge to leave it off.

Which one to pick

A public site→A static host
The viewers already have accounts on your host→The host's protection
Many sites, and someone to configure access→An access product in front
One app, now, for people you'll invite by email→A page on Spryloom

Whichever you choose, test it the same way. Open the address in a private browser window, where you are signed in to nothing. If the app appears, it will appear for anyone who has the link.

Start here

In Claude Code, add the plugin once:

/plugin marketplace add spryloom/claude-plugin
/plugin install spryloom@spryloom

In Cursor or another MCP agent, add npx -y spryloom mcp as the server command. Or, from a terminal in the project folder:

npx -y spryloom publish

Spryloom publishes apps and pages built with a coding agent behind sign-in, for the people you invite. This article was written by the people building it.

Get started free