Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jianyuan/pocketbase-nextjs-auth
Sample Next.js app with PocketBase integration
https://github.com/jianyuan/pocketbase-nextjs-auth
nextjs nextjs-template pocketbase
Last synced: 9 days ago
JSON representation
Sample Next.js app with PocketBase integration
- Host: GitHub
- URL: https://github.com/jianyuan/pocketbase-nextjs-auth
- Owner: jianyuan
- License: mit
- Created: 2024-12-17T21:13:48.000Z (30 days ago)
- Default Branch: main
- Last Pushed: 2025-01-01T15:19:23.000Z (15 days ago)
- Last Synced: 2025-01-03T15:57:36.409Z (13 days ago)
- Topics: nextjs, nextjs-template, pocketbase
- Language: TypeScript
- Homepage:
- Size: 219 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-pocketbase - Next.js PocketBase Auth - Sample Next.js 15 application with PocketBase integration, a typed client, server-side and client-side rendering techniques, and server actions. ![GitHub Repo stars](https://img.shields.io/github/stars/jianyuan/pocketbase-nextjs-auth) (React)
README
# pocketbase-nextjs-auth
This is a [Next.js](https://nextjs.org) project integrated with [PocketBase](https://pocketbase.io).
## 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](https://github.com/patmood/pocketbase-typegen).## Getting Started
First, run the PocketBase using Docker compose:
```bash
docker compose up --detach
```Then, run the development server:
```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```Open [http://localhost:3000](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.