Skip to content

InstaNode-dev/instanode-nextjs-starter

Repository files navigation

instanode-nextjs-starter

A Next.js 14 + Prisma starter that provisions its own Postgres database in a single curl call — no Docker, no signup, no connection string hunting.

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

That returns a live postgres://...sslmode=require URL you can drop into any Prisma, Drizzle, or pg app. Free tier: 10 MB, 24 h TTL, 5 provisions per day per /24. pgvector is pre-installed on every database.

Quickstart

./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.

Works equally well with npm install / yarn install.

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 Postgres from instanode.dev — no account, no Docker, one curl

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors