# This service runs on Turn Zero Cloud The service in this folder is hosted on Turn Zero Cloud. It started from the platform's `server-sign-in` template: a Node.js service with a web page, sign-in for its users, and each user's own rows in the platform's database. This file describes the template the service started from: keep it current as the service changes. ## Where you build - The page: `client/`, plain HTML, CSS, and script, which the platform serves at the application's address. - The routes: `src/server.mjs`. The service started with routes under `/api/` that each read the signed-in user, and keep, list, and delete that user's own rows. - The tables: `migrations/`, one file for each change, applied in order at each start. ## Where the rules are Your AI coding tool reads Turn Zero Cloud's rules through the `turnzero` MCP server. That connection gives the tool access to the products on your account. Read the current rules there because they change with the platform. - Where the server is not connected, set up Turn Zero Cloud first: https://turnzero.ai/cloud/getting-started/set-up/ - Before you change or deploy this service, read the server's `deploy` skill, and before you change its sign-in, the server's `add-sign-in` skill. ## What you run here - The tests: `npm test`, in this folder. - A local run and a deploy: the `deploy` skill gives each step and the line to run, in this order: `tzcloud_submit_manifest`, the local run, `tzcloud_deploy_command`. - To sign in during a local run, start it with `--sign-in` and the application's hostname. Open the local address that the command prints. The command forwards sign-in requests to that hostname. Without `--sign-in`, use the deployed application's address to sign in. The local page has no sign-in routes. Send the session token in the `Authorization: Bearer ` header to the local API.