# Check your app with AI

> A prompt for your AI coding assistant. It checks your app against the platform, tells you what to change, and changes only what you approve.

Most apps need one or two small changes before they run here: the port, a start script, a place for files. This prompt finds them for you.

## What the prompt does

- **It looks first.** The first pass is a dry run: your assistant reads the code and changes nothing.
- **It reports in short.** One line with the result, then a numbered list: what is wrong, where, and the fix.
- **You decide.** It asks which fixes to apply. You answer `all`, some numbers, or `none`.
- **It never commits.** Changes stay uncommitted in your folder. You look at them and keep what you want.

## How to use it


1. **Open your app in your AI coding assistant.**

   Use an assistant that can read the files of your project, in the folder of the app.

2. **Paste the prompt.**

   Copy it from the box below and send it as your message.

3. **Read the report.**

   It starts with one line: `Result: ready`, `Result: ready after N fixes` or `Result: not supported yet`. The lists below it are numbered.

4. **Choose the fixes.**

   Answer `all`, the numbers you want (for example `1, 3`), or `none`. Nothing is changed before you answer.

5. **Look at the changes and keep what you want.**

   `git diff` shows what changed. `git restore <file>` undoes one file. Commit when you are happy with it.

6. **Set what the report lists for the dashboard.**

   Some things are settings, not code: variables to add, a Node version, a build command. The report lists them under "Set in the dashboard".


## The prompt

````text
Check whether the app in this repository can run on Orbit (hosting for Node.js apps, https://arrangic.com) and help me make it ready.

How to work

1. Start with a dry run. Read the code and report. Do not change, create or delete any file, and do not install, build or start the app.
2. Before you read, run "git status". If there are uncommitted changes already, tell me, so that your changes and mine stay apart.
3. After the report, ask which fixes to apply and wait for my answer. Apply only the fixes I confirm, each with the smallest change that works. No refactoring, no reformatting, no new packages unless the package is the fix.
4. Never commit, push, stash, reset or switch branches. Leave every change uncommitted, so I can look at it and decide what to keep.
5. Never show the value of a secret. Name the variable only.
6. If you are not sure, say "not sure" and how I can check. Do not guess.
7. Keep answers short and plain: one or two lines for each point, no introduction, no account of what you read.

What the platform expects

The project
- An Express app on Node.js. Next.js, Nuxt, React and Laravel are not supported yet: if the app is one of them, say so and stop.
- package.json is at the top of the repository, or in one folder that I set as the root directory. Only that folder is used. A workspace (the "workspaces" field, pnpm-workspace.yaml) that needs files from other folders does not work.
- The repository is at most 1 GB.
- A Dockerfile, .dockerignore or docker-compose.yml is ignored. Only the packages in package.json are installed: no system packages such as ffmpeg, ImageMagick or the libraries a headless browser needs.

Install and build
- Node.js 18, 20 or 22 (22 when nothing is said). The version is read from .nvmrc, then from "engines.node" in package.json. .node-version is not read. Any other version gets the closest of the three.
- The package manager follows the lockfile: pnpm-lock.yaml means pnpm, yarn.lock means Yarn, otherwise npm. The lockfile is committed and matches package.json. Two lockfiles are a mistake.
- With a build command, everything in package.json is installed, also devDependencies; they are removed after the build. NODE_ENV is "production" for the build and for the running app. Without a build command devDependencies are not installed. Whatever the start command needs (ts-node, for example) has to be in "dependencies". Without a build command, a "prepare" or "postinstall" script must not need a dev tool (husky is the usual case).
- Packages that compile native code during install can fail: there is no compiler. Packages that ship ready binaries are fine.
- Build command: "npm run build" if package.json has a build script, "npx tsc" if there is a tsconfig.json and no build script, none otherwise. A build may take 30 minutes.
- Variables I set in the dashboard reach the deploy commands and the running app. Install and build get a variable only when I turn on "Build" next to it in the dashboard (for a token of a private package in .npmrc, or a value the build puts into the built files). Tell me which variables need that.

Starting
- Start command: "npm run start" if package.json has a start script, otherwise "node" with the "main" file. It runs the server itself, with node: no nodemon, no watch mode.
- The server listens on the port in the PORT variable (the platform sets it: 3000 unless I change it) and on all interfaces: no host at all, or "0.0.0.0". Never "localhost" or "127.0.0.1". Only this one port receives traffic.
- It has to be listening within 2 minutes. Slow one-off work such as database migrations belongs in the deploy commands: they run once for every deployment, before the new version takes traffic, for up to 15 minutes.
- HTTPS is done by the platform. The app serves plain HTTP and loads no certificates of its own.
- To stop the app the platform sends SIGTERM and waits 30 seconds.

While it runs
- The disk is temporary. Files written while the app runs (uploads, SQLite, JSON files, sessions kept in files) are lost when the app is deployed, restarted or put to sleep. Data belongs in a database or a file store outside the app.
- Memory is temporary in the same way, and it is not shared between replicas: sessions (express-session without a store), caches, rate limits and queues kept in memory.
- An idle app sleeps and wakes only for a request. Timers and jobs do not run while it sleeps (node-cron, cron, node-schedule, croner, bree, agenda, bull, bullmq, bee-queue and pg-boss, or work started with setInterval). Such an app needs "Keep one replica always on" in the dashboard. With more than one replica, every replica runs the job.
- Variable names are capital letters, digits and underscores, and do not start with a digit. PORT, NODE_ENV and APP_URL and names that start with PLATFORM_ are set by the platform: I cannot set them. NODE_ENV is always "production" and APP_URL is the address of the app. A .env file that is not committed is not there: every variable the code reads has to be added in the dashboard.

The report

First line, one of:
Result: ready
Result: ready after N fixes
Result: not supported yet

Then up to three lists. Number the fixes in one sequence across the lists. Leave out a list that would be empty.

Must fix (it does not build or start without this)
1. What is wrong, in a few words (file:line)
   Fix: the change, in one line

Should fix (it starts, but something breaks in use)
2. What is wrong, in a few words (file:line)
   Fix: the change, in one line

Set in the dashboard (no code change)
- Node version, port, root directory, build command, start command: only where the platform would not pick the right one by itself
- Variables to add: names only
- Keep one replica always on: only if the app runs jobs

Last line, exactly:
Apply fixes? Answer "all", the numbers (for example "1, 3"), or "none".

After I answer

Apply the confirmed fixes. Then tell me, briefly:
- each file you changed and what changed in it
- that nothing is committed: "git diff" shows the changes and "git restore <file>" undoes one
- the "Set in the dashboard" list again

More on every rule: https://arrangic.com/llms.txt
Prompt version: 2026-10-04
````

## What it checks

| It checks | Read more |
| --- | --- |
| The framework, and where `package.json` is | [Express](https://arrangic.com/docs/frameworks/express.md) |
| Node version, package manager, install and build | [Build settings](https://arrangic.com/docs/build-settings.md) |
| The start command, the port and the address the server listens on | [Express](https://arrangic.com/docs/frameworks/express.md) |
| Slow work at start that belongs in deploy commands | [Deploy commands](https://arrangic.com/docs/deploy-commands.md) |
| Variables the code reads | [Environment variables](https://arrangic.com/docs/environment-variables.md) |
| Files and memory the app relies on | [Sleep and wake](https://arrangic.com/docs/sleep-and-wake.md) |
| Timers and jobs that stop while the app sleeps | [Sleep and wake](https://arrangic.com/docs/sleep-and-wake.md) |

## What to keep in mind

- **It reads, it does not run.** The check does not install, build or start your app. The first deployment is the real test.
- **An assistant can be wrong.** Read each fix before you say yes. If the report says "not sure", check that point yourself.
- **Your secrets stay out of the report.** The prompt tells the assistant to name variables and never show their values.

---

This page on the site: https://arrangic.com/docs/check-your-app  
All pages of the documentation: https://arrangic.com/llms.txt
