This page holds every rule your AI assistant needs to get your project ready for Ai to App. You do not have to read it; just give your assistant the message below.
Read the guide at https://aitoapp.com/upload-guide. Get my project ready for Ai to App by following it, go through the checklist item by item and prepare the zip file.
Ai to App reviews and publishes websites and apps that are uploaded as zip files. Uploaded files are not executed during the review. Server applications run live in their own isolated space, separate from other projects. This guide contains all the rules needed for your project to pass the first upload without problems.
1. Determine the Project Type
Ai to App detects the type itself from the files inside the zip. If more than one type matches, the order below applies; the one higher up wins.
| Order | Type | How It Is Recognized | What Goes in the Zip |
|---|---|---|---|
| 1 | Dockerfile | A Dockerfile in the root | Source code + Dockerfile |
| 2 | Next.js (server) | next in the package.json dependencies | Source code |
| 2 | Next.js (static export) | output: 'export' in next.config.* | The INSIDE of the out folder after the build |
| 3 | Node.js server | express, fastify, koa, hono, @nestjs/core, @hapi/hapi, restify, socket.io | Source code |
| 4 | Built site | vite, react-scripts, vue, @angular/core, astro, @sveltejs/vite-plugin-svelte, parcel, webpack + a build script | The INSIDE of the dist folder after the build (build for react-scripts) |
| 5 | Node.js (generic) | A start script or a main field in package.json | Source code |
| 6 | Python | requirements.txt, pyproject.toml, Pipfile or manage.py | Source code |
| 7 | .NET | A .csproj / .fsproj in the root | Source code |
| 8 | Static site | Only index.html and HTML/CSS/JS files | The files themselves |
Important:
- For built sites (React, Vue, Vite, Angular, Svelte, Astro), run
npm run buildfirst. Zip the files INSIDE the resultingdist(orbuild) folder.index.htmlmust be directly in the root of the zip. - Go projects are published only with a
Dockerfile. - docker-compose is not supported; only the main application (Dockerfile) runs. Ai to App provides the database separately (see Section 4).
2. Zip Rules
Limits
| Rule | Limit |
|---|---|
| Size of the zip file | at most 50 MB |
| Total size of the files extracted from the zip | Up to 200 MB for a static site, up to 300 MB for a server app (100 MB on the Free plan) |
| Size of a single file | at most 25 MB |
| Number of files | Up to 2000 for a static site, up to 5000 for a server app |
Folder Structure
- The project files must be in the root of the zip or inside a single top-level folder.
- For a static site,
index.htmlmust be in the root of the zip or inside the single top-level folder. - Two files at the same path and unsafe paths containing
../are not accepted.
Do NOT Put in the Zip (automatically discarded, only wastes space)
- Dependencies:
node_modules,.venv,venv,__pycache__,bower_components,.pytest_cache,.mypy_cache - Tool and version control folders:
.git,.svn,.hg,.idea,.vscode,.vs,.cache,.turbo,.parcel-cache,.gradle - Build output:
.next,.nuxt,.svelte-kit. In .NET, alsobinandobj. - System files:
__MACOSX,.DS_Store,Thumbs.db,desktop.ini,*.pyc
NEVER Put in the Zip (discarded and not stored)
.envfiles: such as.env,.env.local,.env.production. Example files may stay:.env.example,.env.sample,.env.template. If your zip has a.env, the file is not stored; only public values with theVITE_,NEXT_PUBLIC_,PUBLIC_,REACT_APP_prefixes go to the build. Enter secrets in the panel.- Key and credential files:
*.pem,*.key,*.p12,*.pfx,*.ppk,*.jks,*.keystore,id_rsa,id_ed25519,.npmrc,.pypirc,.netrc. If any of these was shared before, rotate the key.
Files That Stop the Upload
- In application source: Windows script and installer files (
.bat,.cmd,.ps1,.vbs,.scr,.msi). Compiled program files (.exe,.dll,.soand similar) are discarded; the server builds the project from source. - In a static site:
- Server code and executable files are forbidden:
.php,.py,.rb,.pl,.cgi,.asp,.aspx,.cshtml,.jsp,.exe,.dll,.sh,.jar,.htaccess,.config. - Allowed types:
.html,.htm,.css,.js,.mjs,.json,.webmanifest,.txt,.xml,.csv,.svg,.png,.jpg,.jpeg,.gif,.webp,.avif,.ico,.bmp,.woff,.woff2,.ttf,.otf,.eot,.mp4,.webm,.mp3,.ogg,.wav,.pdf. .mapand.mdfiles are skipped.
- Server code and executable files are forbidden:
3. Required Settings for Server Applications
Port and Address
Ai to App provides the port the application must listen on through the PORT environment variable. The application must bind to the address 0.0.0.0; localhost or 127.0.0.1 cannot be reached from outside.
| Language | Correct Usage |
|---|---|
| Node.js | app.listen(process.env.PORT || 3000, '0.0.0.0') |
| Python (FastAPI) | uvicorn main:app --host 0.0.0.0 --port $PORT |
| Python (Flask) | gunicorn app:app --bind 0.0.0.0:$PORT |
| Python (Django) | gunicorn config.wsgi --bind 0.0.0.0:$PORT |
| Go | ":" + os.Getenv("PORT") |
| .NET | There must be NO UseUrls(...) line in the code |
Start Command
- Node.js:
- The
startscript inpackage.jsonmust start the production server, e.g."start": "node server.js". - Development commands must NOT be in
start:vite,next dev,nodemon,ts-node-dev,tsx watch,webpack serve,react-scripts start,npm run dev. Leave these in thedevscript. - TypeScript: Add
"build": "tsc"and set"start": "node dist/index.js". Compiling TypeScript at run time is slow. - Include the lock file (
package-lock.json,pnpm-lock.yaml,yarn.lockorbun.lockb) in the zip. - Specify the Node version with
package.json→engines.nodeor.nvmrc.
- The
- Python:
- FastAPI, Flask, Django, Streamlit and Gradio are detected automatically.
- If you use a different structure, create a
Procfilein the root:web: <start command>. The command must use0.0.0.0and$PORT. - Flask:
gunicornmust be inrequirements.txt. - Django:
ALLOWED_HOSTSmust not be empty,DEBUG = Falsemust be set, andSECRET_KEYmust be read from an environment variable. - Specify the Python version with
runtime.txtor.python-version.
- .NET: There must be a
.csprojin the root. Ai to App builds withdotnet publish -c Release; the target version is read fromTargetFrameworkin the.csproj. - Dockerfile: Specify the application's port with
EXPOSE. The application must still read thePORTvariable.
4. Database
Ai to App sets up the database itself and provides the connection details through an environment variable. Do not hard-code the connection address; read it from the variable below.
| Database | Environment Variable | Note |
|---|---|---|
| PostgreSQL | DATABASE_URL | A separate database and user are allocated to you |
| MySQL | DATABASE_URL | A separate database is allocated to you |
| MongoDB | MONGODB_URI | A separate database is allocated to you |
| Redis | REDIS_URL | |
| SQLite | DATABASE_PATH | The file is kept in the persistent folder (/data/app.db) |
| SQL Server | — | Not provided; enter the address of your own server as an environment variable, or switch to PostgreSQL |
| Supabase, Firebase, Neon, PlanetScale, Turso | your own variables | Enter the connection details as environment variables in the dashboard |
- Prisma: Include the
prisma/migrationsfolder in the zip; otherwise the tables may not be created automatically. - Alembic: If
alembic.iniexists,alembic upgrade headruns automatically before publishing. - SQLite file: The SQLite file in the zip is used only as starting data on the first publish; later uploads do not overwrite live data. Do not put a test database containing personal data in the zip.
- Updates: When you upload a new version, the data in the database is preserved.
5. Persistent Files
The disk of the space where the application runs is not persistent; it is wiped on every new publish. The only persistent folder is /data.
- Save photos and documents uploaded by visitors, generated files and the SQLite database under
/data. - Read the folder path from the
DATA_DIRenvironment variable; Ai to App sets it to/datafor you.
6. Secrets and Environment Variables
- Do not hard-code passwords, API keys and tokens; read them from environment variables. You enter the values in the Ai to App dashboard; they are stored encrypted.
- Public prefixes: Variables with the prefixes
VITE_,NEXT_PUBLIC_,REACT_APP_andPUBLIC_are embedded in the code at build time and every visitor can see them. Do not put secret values in these. - Login system (NextAuth / Auth.js):
NEXTAUTH_URL(orAUTH_URL) must be the real address of the site, andNEXTAUTH_SECRET(orAUTH_SECRET) must be filled in. - OAuth (Google, GitHub): Add the published address as an authorized redirect URI in the provider's settings.
- Supabase sign-in: In Supabase, under Authentication > URL Configuration, set Site URL to your published address and add the exact address to Redirect URLs (
https://your-app.aitoapp.com/). Otherwise links in confirmation and sign-in emails go tolocalhost:3000and sign-in does not complete. For Google sign-in, in Google Cloud add your published address to Authorized JavaScript origins andhttps://PROJECT.supabase.co/auth/v1/callbackto Authorized redirect URIs. - Variables Ai to App provides itself:
PORT,HOST=0.0.0.0,DATA_DIR=/dataand the database variables (Section 4). In Node.js,NODE_ENV=production.
7. What Must Not Be in the Code
localhostaddresses: Code that sends requests tohttp://localhost:...orhttp://127.0.0.1:...will go to the visitor's own computer once published and will not work. Read the address from an environment variable (e.g.import.meta.env.VITE_API_URL) or, if it is on the same server, use a relative path (fetch('/api/...'))./api/...requests in a static site: A static site has no server behind it. If you need an API, prepare the project as a single server application (e.g. Express) that runs together with its API.- Fixed port:
const PORT = 3000must not stand alone; useprocess.env.PORT || 3000. - Debug mode:
debug=TrueorDEBUG = Truemust not be on in production. - Secrets embedded in code: Any key found there is considered shared; rotate it.
8. Checklist for the Assistant
- The project type has been determined (Section 1).
- If it is a built site, the build was run and only the inside of the
dist/build/outfolder was zipped;index.htmlis in the root. - If it is a server application, the
startscript (or Procfile) starts the production server. - The port is read from the
PORTenvironment variable; the server binds to0.0.0.0. - No
localhost/127.0.0.1address is left in the code. - Passwords and keys have been removed from the code; they are read from environment variables.
- The database connection is read from
DATABASE_URL/MONGODB_URI/REDIS_URL/DATABASE_PATH. - Persistent files are written under
/data. - A lock file is present (
package-lock.jsonetc.). node_modules,.git,.venv,.next,bin,obj,.envand key files are NOT in the zip.- The zip is under 50 MB and each single file is under 25 MB; at most 2000 files.
9. When You Are Done, Tell Me the Following
- The exact location of the prepared zip file.
- The type of the project and the language or framework used (e.g. "Node.js + Express").
- The list of environment variables I need to enter in the dashboard: the name of each and what it is for. Do not write the values; I will enter them.
- A short summary of the changes you made.
If there is a problem after you upload the zip, Ai to App explains it in plain language; paste that text into your assistant.
