Use case · Full-stack apps
Deploy a full-stack app in one project.
A full-stack app is a frontend, a backend API, and a database working together. On Runex, you deploy all three in one project: the frontend and API from GitHub, the database as a managed service, connected over a private network.
- Frontend + API from GitHub
- Managed PostgreSQL
- Private network between them
- web
- https://app.acme.com · public
- api
- api.internal:8080 · private
- database
- postgres.internal:5432
- env
- DATABASE_URL · injected
- previews
- one per pull request
- status
- running
Definition
What is a full-stack app?
An app with a user interface, server-side logic, and stored data. Each layer is usually its own service.
The frontend is what users see in the browser, often built with Next.js or React. The backend API handles business logic and talks to the database. The database stores the data.
Hosting a full-stack app means running all three, connecting them securely, and giving the frontend a public HTTPS address.
On Runex, a project groups those services. Each one runs in its own isolated container, and they reach each other over the project's private network.
Architecture
How is a full-stack app structured on Runex?
One public service, the rest private. Users reach the frontend; the API and database stay internal.
browser │ https://app.acme.com ▼ web Next.js public │ http://api.internal:8080 ▼ api Node · Python · Go private │ DATABASE_URL ▼ postgres managed private
If the browser calls your API directly, give the API its own public domain, such as api.acme.com. If only your frontend's server calls it, keep it private.
How to deploy
How do you deploy a full-stack app on Runex?
Deploy the database, then the API, then the frontend. Each step takes a few minutes.
-
You
Create a database
Add managed PostgreSQL to the project.
-
Runex
Inject the connection
DATABASE_URL appears in your API's variables.
-
You
Deploy the API
Connect its repo or folder via the GitHub App.
-
You
Deploy the frontend
Point it at the API URL and add your domain.
One push, whole stack.
After setup, pushing to GitHub redeploys the service that changed, and each pull request gets its own preview.
Compare
Monorepo or separate repos: which is better?
Both work on Runex. A monorepo keeps changes together; separate repos keep services independent.
| Monorepo | Separate repos | |
|---|---|---|
| Where the code lives | Frontend and API in one repository | One repository per service |
| Changing both layers | One pull request | Two coordinated pull requests |
| Access control | Everyone sees everything | Per-repo GitHub access |
| Good for | Small teams moving fast | Larger teams or shared APIs |
Example
Example: a SaaS dashboard on Runex
A Next.js frontend, a FastAPI backend, and PostgreSQL.
- Create PostgreSQL in project acme
- Deploy acme/api (FastAPI): it reads DATABASE_URL
- Deploy acme/web (Next.js) with API_URL set
- CNAME app.acme.com → cname.runex.cloud
- Open a pull request → a preview of the whole change
- Merge → production redeploys with zero downtime
- web
- acme/web · Next.js
- api
- acme/api · FastAPI
- db
- PostgreSQL · managed
- domain
- app.acme.com
- deploys
- on push to main
Features
Which features does a full-stack app use?
These four do most of the work.
FAQ
Full-stack questions
Common questions before the first deploy.
Can I deploy the frontend and backend separately?
Yes. On Runex the frontend and API are separate services in one project, so each deploys, scales, and rolls back on its own.
Does Runex provide managed databases?
Yes. Runex runs managed PostgreSQL, MySQL, Redis, and MongoDB, and injects the connection string into your app as an environment variable.
How does my frontend call my backend API?
Server-side code can use the API's internal hostname on the private network. Code running in the browser needs the API's public URL, such as api.example.com.
Can I use my own external database instead?
Yes. Set your provider's connection string as DATABASE_URL in the dashboard and your app connects to it like any other database.
Next step
Ship your whole stack.
Frontend, API, and database: one project, one push.
