AI tools make writing the code the easiest part of building an app. The hard parts are around it: where the code is kept, where passwords go, how the database gets created, and how the app runs on a server instead of your laptop. This guide goes through them in order with one example, a small web app for logging customer orders, built with Node.js, Express and MySQL. The same idea applies to PHP or Python.
First: web app or mobile app?
| What you want | What you build | Where it runs |
|---|---|---|
| People open it in a browser or on their phone | A web app | Web hosting |
| An icon on the home screen without an app store | An installable web app (PWA) | Web hosting |
| An APK or a Google Play app | Flutter or React Native | The interface on the phone, the server on hosting |
Even a mobile app usually needs a back end (an API) to store data, and that back end is what you host. Start with the web app: faster to test and no store review.
Before you start
- An AI tool that works on your project files, such as Cursor, Claude Code or Codex (The best vibe coding tools).
- Node.js on your computer, Git, and a GitHub account.
- A short description of the app, as in the vibe coding guide.
Steps
1. Name the stack in your first message
Build a web app for logging customer orders.
Stack: Node.js with Express, a MySQL database through the mysql2 package, and a simple HTML interface in Arabic.
Don't use Docker, TypeScript or outside services.
The server must listen on process.env.PORT and read the database settings from environment variables.
Write a README with the run commands.
The last two lines matter for deployment: hosting that runs Node.js through Phusion Passenger hands the app its port in PORT, and secrets come from the environment, not the code.
2. Start Git and protect secrets
git init
printf "node_modules/\n.env\n" > .gitignore
git add .
git commit -m "First app skeleton"
Then push it to a private GitHub repository (upload a project to GitHub).
3. Put settings in a .env file
# .env (never committed)
DB_HOST=localhost
DB_NAME=orders
DB_USER=orders_user
DB_PASS=a-strong-password
Ask the tool for a .env.example with the same names and no values, so anyone (including future you) knows what the app needs. The concept is explained in environment variables.
4. Create the database
Ask the tool for a schema.sql that creates the tables instead of building them by hand:
CREATE TABLE orders (
id INT AUTO_INCREMENT PRIMARY KEY,
customer_name VARCHAR(120) NOT NULL,
phone VARCHAR(30) NOT NULL,
details TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
utf8mb4 is what makes Arabic text and emoji save correctly. Locally, run the file in your MySQL; on the server, import it in phpMyAdmin after creating the database (create a MySQL database).
5. Test on your computer
npm install
node app.js
Open http://localhost:3000, add an order, and check it appears in the database. If there’s an error, paste it to the tool as is. When it works: commit.
6. Ask for a review before deploying
Before deploying: do the queries use prepared statements? Is any admin page reachable without a password? Are error details shown to visitors? Fix what you find and explain each change.
7. Deploy to the server
The short version on cPanel hosting with Setup Node.js App:
- Create the database and its user in cPanel and import
schema.sql. - Pull the code from GitHub into a folder outside
public_html. - In Setup Node.js App, create an application: pick the version, application root, URL and startup file
app.js. - Add the environment variables (
DB_HOSTand the rest) on the application’s page, not in a file in Git. - Install packages with Run NPM Install, then restart the app.
The full walk-through is in Deploy a Node.js app, variables in Environment variables on hosting, and the database connection in Connect your app to a database.
8. Connect the domain and turn on HTTPS
Point the domain at the hosting, wait for the SSL certificate, then test from your phone on mobile data, not your home Wi-Fi.
Troubleshooting
- A 503 page or a Passenger error: the app didn’t start. Read the app log and check the startup file and that packages are installed (Node.js 503).
ER_ACCESS_DENIED_ERROR: wrong user, password or database name. In cPanel, database and user names usually start with your account name.- Works locally but not on the server: a missing environment variable or a different Node.js version (explained).
- Arabic shows as question marks: the table or the connection isn’t
utf8mb4.
On ArabyHost
A Node.js app like this runs on the AI/Developer plans, which have Node.js 20 and 24, Python 3.9 to 3.12 and PHP 8.1 to 8.3, with apps running through CloudLinux selectors and Phusion Passenger, SSH jailed in CageFS, Git, Composer and MySQL/MariaDB databases. If you build the app in PHP instead of Node.js, it also runs on the regular plans. Deploy from GitHub with cPanel Git Version Control and .cpanel.yml, by ZIP upload, or from Claude and Cursor through Araby MCP, and the Araby AI assistant reads your error logs and explains the fix. There is no Docker, no GPU and no root; if your app needs them, see Where to host a project you built with AI.
FAQ
Can I make an Android APK with AI?
Yes, but an Android app needs build tools such as Flutter or React Native and a device or emulator to test, which is harder for a beginner than a web app. The easy alternative is a web app that works on phones and can be installed from the browser (a PWA). Either way, the back end runs on a server.
Can I build an app with AI for free?
You can write the code on limited free plans in tools like Cursor, Bolt or Antigravity and run it on your own computer for free. Costs start when you want it running for other people on a domain, or when the free quota runs out.
Can you really build an app in minutes?
A working prototype, yes. An app that stores data safely and runs on a server and domain takes hours at least, because setup, testing and security don't compress.
Why not let the tool choose the stack?
It may pick technologies that need Docker, several services or a database your hosting doesn't offer. Naming a well-known stack up front saves a rewrite at deploy time.