Skip to main content

Build apps

Build web apps with the backend already included

Frontend hosting, REST APIs, a NoSQL database and auth in one project. Deploy it with a single command.

No credit card · Data stored in the EU

What does it take to run a small web app?

A small web app usually needs more services than code. You pick a host for the frontend, a server or functions platform for the API, a database, somewhere to keep files, and then you connect them all with credentials and environment variables.

In Codehooks those are one project. Your frontend build is served from the same deploy as your API routes, and the code talks to the database directly (there is no connection string to manage). Authentication works with API tokens or JWTs from Auth0, Clerk or any JWKS provider.

That makes it a good fit for dashboards, internal tools, form backends and the API behind a mobile or single-page app.

An API and a frontend in one file

A validated REST API for customers, plus the frontend that uses it. The database comes with the project, so there is nothing to configure before the first request.

index.js
import { app } from 'codehooks-js';
import * as Yup from 'yup';

const customer = Yup.object({
name: Yup.string().required(),
email: Yup.string().email().required(),
});

// GET, POST, PUT, PATCH and DELETE under /api/customer, with validation
app.crudlify({ customer }, { prefix: '/api' });

// Your React, Vue or plain HTML build, with client-side routing
app.static({
route: '/',
directory: '/dist',
default: 'index.html',
notFound: '/index.html',
});

export default app.init();

Put your built frontend in /dist and run coho deploy.

Questions about building apps

Common questions about building with Codehooks.

Can I host my frontend on Codehooks?
Yes. app.static() serves files from your deployed source, so a React, Vue, Svelte or plain HTML build runs from the same project as your API. Set notFound to your index.html for client-side routing, and use the headers option for cache control on hashed assets. Paid plans add custom domains with SSL. See frontend hosting in the docs.
How do I add a REST API with a database?
The quickest way is app.crudlify(), which creates REST endpoints for your collections with optional Yup, Zod or JSON Schema validation. For anything custom you write Express-style routes and use the NoSQL database API from your handler. Both can live in the same file.
How do users log in?
Routes need an API token or a valid JWT by default. For user login, connect an identity provider that publishes a JWKS endpoint (Clerk, Auth0, Stack Auth and others) with one command, coho jwks , and every API call is verified against it. For something simpler, such as a shared password on an admin route, your coding agent can write the check in an app.auth() hook. See authentication for the provider URLs.
Is Codehooks a no-code app builder?
No. You write JavaScript or TypeScript (or a coding agent writes it for you), and Codehooks runs it. If you want an app generated from a plain-language description, our sibling product Snill.ai does that.

Building with a coding agent

Your agent can run coho create, write the frontend and the API, and deploy with coho deploy, all from the terminal. Run coho prompt first so it has the full API reference.

Start building your app

Create a project, add your frontend and API, and deploy it in seconds.