# This service runs on Turn Zero Cloud The service in this folder is hosted on Turn Zero Cloud. It started from the platform's `functions-sign-in` template: a notes app with sign-in, each user's own notes in the platform's database, served as a serverless application with functions. The `server-sign-in` template is the same app on a server. This file describes the template the service started from: keep it current as the service changes. ## Where you build - Edit the page's files under `client/`. A file's path below `client/` is its path on the site; `/` serves `client/index.html`. - Each file under `functions/` is one function. `functions/api/notes.js` handles `/api/notes` and the paths beneath it: each request reads the signed-in user, and keeps, lists, and deletes that user's own rows. - Put shared code under `lib/`, which serves no path. `lib/notes.js` holds the routes, `lib/session.js` the signed-in user, and `lib/db.js` the database. - Put each database schema change in a new file under `migrations/`. The platform applies these files before a deployed version serves. ## Where the rules are Turn Zero Cloud serves its rules to a coding tool through the MCP server `turnzero`, one connection to the products your account holds. The rules change with the platform, so none is repeated here. - 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 deploy: the `deploy` skill gives each step and the line to run, in this order: `tzcloud_submit_manifest`, `tzcloud_deploy_command`. - Sign-in: on the deployed application's own address.