Deploy
Static sites
HTML, CSS and browser JavaScript, with npm packages bundled for you.
A static site is any app with an index.html. Inhaus looks for it in this order:
- the root of the files
public/dist/static/
Every other file in that folder is served as is, with the right content type.
Scripts, TypeScript and React
<script> tags that point at TypeScript, JSX or ES modules are bundled for the browser and served from /_assets/. npm packages listed in package.json are installed and bundled in. You do not need to run a build step first.
my-app/
├── index.html <script type="module" src="./src/main.tsx"></script>
├── package.json { "dependencies": { "react": "^19", "react-dom": "^19" } }
└── src/
├── main.tsx
└── App.tsxSecrets and files from a static site
A static site has no server code, so it cannot use secrets or files. Add a small server next to it: static files keep being served first, and requests like /api/... go to the server.
Knowing who is signed in
Every visitor has already signed in at the gateway. Read their name and email in the browser with getUser():
import { getUser } from '@inhaus/sdk';
const user = await getUser();
document.querySelector('#hello').textContent = `Hi ${user.name}`;