jianyuan/pocketbase-nextjs-auth

Sample Next.js app with PocketBase integration

24

stars

174

commits

TypeScript

primary language

Sep 3, 2026

updated

nextjs
nextjs-template
pocketbase

README

pocketbase-nextjs-auth

This is a Next.js project integrated with PocketBase.

Features

  • Dockerized PocketBase server.
  • Basic registration and login pages.
  • Example of server actions.
  • Techniques for both server-side and client-side rendering.
  • Typed PocketBase client using pocketbase-typegen.

Getting Started

First, run the PocketBase using Docker compose:

docker compose up --detach

Then, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser to see the result.

Middleware

src/lib/pocketbase/middleware.ts

It is important to note that the project uses Next.js middleware to check authentication on the server side. Make sure to adjust the middleware to allow unrestricted access to specific pages as needed.

Contributors

renovate[bot]

163 commits

jianyuan

11 commits

jianyuan/pocketbase-nextjs-auth

Sample Next.js app with PocketBase integration

24

stars

174

commits

TypeScript

primary language

Sep 3, 2026

updated

nextjs
nextjs-template
pocketbase

README

pocketbase-nextjs-auth

This is a Next.js project integrated with PocketBase.

Features

  • Dockerized PocketBase server.
  • Basic registration and login pages.
  • Example of server actions.
  • Techniques for both server-side and client-side rendering.
  • Typed PocketBase client using pocketbase-typegen.

Getting Started

First, run the PocketBase using Docker compose:

docker compose up --detach

Then, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser to see the result.

Middleware

src/lib/pocketbase/middleware.ts

It is important to note that the project uses Next.js middleware to check authentication on the server side. Make sure to adjust the middleware to allow unrestricted access to specific pages as needed.

Contributors

renovate[bot]

163 commits

jianyuan

11 commits

Languages

TypeScript

93.0%

CSS

4.0%

JavaScript

3.0%