Examples

Next.js + Database

Learn how to deploy a full-stack Next.js app with PostgreSQL using Ink.

Create an Ink account and connect Ink

Make sure you have an Ink account and have set up Ink for your agent. Use the CLI, the Ink Skill, or MCP. For MCP auth, choose:

See Quick Start for full setup instructions.

Verify the connection

Once Ink is connected, confirm your agent can reach it by asking it to check.

Prompt

Do you have Ink connected?

Build the app

Ask your agent to build a Next.js app with a database. The agent will deploy a PostgreSQL database via template and build the app with server actions for data operations.

Prompt

Build a Next.js app with a notes feature. Use server actions for the backend and connect to a PostgreSQL database on Ink for persistence. Include create, read, update, and delete operations.

Deploy with Ink

The agent deploys a PostgreSQL database via template first, then deploys the Next.js app with the database credentials as environment variables.

Prompt

Deploy to Ink

Tool Call
(
  : ,
  : 
)
Tool Call
(
  : ,
  : ,
  : ,
  : {
    "0": "[object Object]"
  },
  : {
    "0": "[object Object]"
  }
)

Visit your app

Ink returns a live URL once the build completes. Your Next.js app is connected to a template-backed PostgreSQL service with persistent storage.

Check logs and metrics (optional)

Ask your agent to pull build logs, runtime logs, or metrics for your deployed service.

Prompt

Check metrics and logs

That's it — your full-stack Next.js app is deployed with a PostgreSQL database template. From here you can add a custom domain, explore database templates, or explore more examples.

On this page