The short answer
Paste one sentence into your coding agent. It reads the whole project, creates a Postgres database if your code needs one, sets the variables, deploys, and tells you the address. A full-stack app deploys as one app when one server serves both the frontend and the API. If the frontend and the API are separate folders, you choose between one combined app or two apps.
Say this to your coding agent
Set this project up to deploy on Antideploy. Fetch https://antideploy.com/agent.md and follow it.
The three pieces
-
The frontend. Files that run in the browser. A framework like Vite or Create React App builds them to a folder. Next.js and similar frameworks build and serve them from one server.
-
The backend. Code that runs on the server, such as Express, FastAPI, Flask, Django or the API routes of Next.js. It runs as one long-running process.
-
The database. Where data that must last is kept. If your code needs Postgres, Antideploy creates one beside your app and sets
DATABASE_URL.
Which layout do you have?
One project that serves everything. Examples are Next.js, or an Express app that serves the built frontend and the API. This deploys as one app with no extra work.
Separate frontend and API folders. Antideploy reads both, but deploys one service from one folder. It warns you, because this only works if the API serves the built frontend.
For separate folders, you have two good choices.
- Make the API serve the frontend. Build the frontend and have the server send the built files. Everything runs as one app.
- Deploy two apps. Deploy the frontend folder as a static site, which is free and unlimited. Deploy the API folder as a second app, which counts as one live app. The frontend then calls the API at its public address, and the API must allow that origin with CORS.
Tell your agent which one you want. If you point it at a folder inside a larger repository, Antideploy builds that folder as if it were the whole project.
Step by step
-
Tell your agent the layout
Say which folder is the frontend and which is the API, or say that one server serves both.
-
Let it set up the database and variables
Your agent creates the Postgres database before it tests the code, writes the connection details into your
.envwithout printing them, and saves the other variables you give it. Values are write-only. -
Deploy and open the link
The deploy packages the code, builds it, runs your migration command if you have one, starts the app, checks that it answers and opens it. Your agent tells you the address.
What your code needs to do
- Read the port from the
PORTenvironment variable and listen on0.0.0.0 - Read the database from
DATABASE_URLinstead of a hardcodedlocalhost - Save uploads to a bucket, never to the app's own disk
- Use relative URLs or an environment variable for the API address instead of
localhost
Add the rest when you need it
Sign-in, file uploads, email and an AI key are all created by your agent, with nothing else to sign up for. See login, file uploads, email and AI.