Skip to content

InstaNode-dev/instanode-nextjs-starter

Repository files navigation

instanode-nextjs-starter — a Next.js + Prisma app that provisions its own database

A Next.js 14 + Prisma starter for instanode.dev that provisions its own Postgres database in a single API call — no signup, no Docker, no connection-string hunting. Built for AI coding agents and humans alike: clone, run one script, and you have a live database. Free anonymous tier (24h TTL, pgvector pre-installed). Docs + deploy: https://instanode.dev.

Clone and run

git clone https://github.com/InstaNode-dev/instanode-nextjs-starter.git
cd instanode-nextjs-starter
./scripts/setup-db.sh && pnpm install && pnpm prisma migrate dev --name init && pnpm dev

setup-db.sh calls POST https://instanode.dev/db/new and writes the returned postgres://...sslmode=require URL into .env as DATABASE_URL. The whole flow needs no account and no local Postgres. Under the hood it's just one call:

curl -s -X POST https://instanode.dev/db/new -H 'Content-Type: application/json' -d '{"name":"nextjs-app"}' | jq

Free tier: 10 MB, 24 h TTL, 5 provisions per day per /24. Works equally well with npm install / yarn install.

Quickstart (existing checkout)

./scripts/setup-db.sh && pnpm install && pnpm prisma migrate dev --name init && pnpm dev

setup-db.sh is idempotent — it writes DATABASE_URL=... into .env on first run and no-ops on subsequent runs.

What this gives you

  • A real Postgres 16 database in under 2 seconds, no account required.
  • A working Prisma schema (User + Post) with a GET/POST /api/posts route.
  • Zero cloud-console clicks — the database is provisioned by a script, not by a human.

Upgrading

Free databases expire after 24 hours. To keep your data permanently, upgrade at instanode.dev/pricing.html.

Files

  • scripts/setup-db.sh — provision a DB and write DATABASE_URL to .env.
  • scripts/provision-and-test.sh — end-to-end smoke test using psql.
  • prisma/schema.prismaUser + Post models.
  • app/api/posts/route.ts — minimal typed API.
  • lib/prisma.ts — singleton Prisma client.

License

MIT

About

Next.js 14 + Prisma starter that provisions its own free Postgres from instanode.dev on first run — no account, no Docker, one curl. Clone-and-ship template for developers and AI agents.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors