BlogFull stack

How to deploy a full-stack app.

A full-stack app has a frontend, a backend and a database. Here is how each piece deploys, and the one layout that needs a decision.

How the Agent API works
  • FrontendBuilt to files, or served by your server
  • BackendOne long-running process
  • DatabasePostgres, created for you
  • SecretsSet once, write-only

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.

  1. Make the API serve the frontend. Build the frontend and have the server send the built files. Everything runs as one app.
  2. 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

  1. Tell your agent the layout

    Say which folder is the frontend and which is the API, or say that one server serves both.

  2. 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 .env without printing them, and saves the other variables you give it. Values are write-only.

  3. 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 PORT environment variable and listen on 0.0.0.0
  • Read the database from DATABASE_URL instead of a hardcoded localhost
  • 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.

01Before you commit

Here's where it stops.

A platform that only tells you what it is good at is one you find the edges of in production. These are the ones to know before your first deploy.

  1. One instance, no previews

    Each app is one instance with 1 shared vCPU and 1 GB of memory, and a Java app gets 1 dedicated vCPU and 2 GB. There are no preview deployments and no per-branch URLs.

  2. The disk forgets

    Anything written to local disk is gone on the next deploy. Apps that speak S3 get a bucket instead.

  3. Postgres only

    Antideploy creates Postgres databases. Redis, MySQL and MongoDB are not provided today, so an app that needs one brings its own.

  4. One app per repository

    A repository that holds several apps deploys one app at a time. Choose the folder to build.

02Questions

Full-stack questions, answered.

Anything else? Write to us and a person answers.

support@antideploy.com
Does a full-stack app cost more than a static site?

A static site is free and unlimited. An app with a server counts as a live app. The Free plan includes 1 live app with a server and 1 Postgres database. Go is ₹399 a month for 3 live apps, Pro is ₹1,999 for 9 and Scale is ₹6,999 for 20.

Can I deploy the frontend and backend from one GitHub repository?

Yes, one app at a time. A repository that holds several apps deploys one app at a time, and you choose the folder to build.

Where does the database live?

In Singapore, beside your app, on Postgres 17. It belongs to your application.

Will the app keep my data between deploys?

Yes, if the data is in the database. Only the container's disk is replaced on every deploy, so uploads and SQLite files belong in a bucket or a database.

Deploy something. Start with one sentence.

Paste one sentence into your coding agent, click Approve once, and get a live link. No card, no trial clock.

Start from GitHub or a folder
Prompt copied Paste it into Claude Code, Codex or Cursor and press Enter.