PocketStarter Docs

Getting started

Hey there πŸ‘‹ PocketStarter is an easy-to-use boilerplate for PocketBase with Next.js. Installation takes just minutes and the template is ready for you to build your own software.

This guide will walk you through getting PocketStarter up and running.

Prerequisites

Before you begin, make sure you have the following installed:

  • Node.js (version 18 or higher)
  • pnpm (recommended package manager)

Installation

1. Clone the Repository

Clone the repository using the link provided in your purchase email:

git clone [REPOSITORY] # See purchase email for repo instructions
cd pocketstarter

2. Install dependencies

Navigate to the frontend directory and install dependencies:

cd frontend
pnpm install

3. Set up PocketBase

Download a fresh PocketBase instance from the official website and place it in the pocketbase folder.

Next, start the backend server:

cd ../pocketbase
./pocketbase serve

This will start PocketBase on http://localhost:8090

4. Configure Environment Variables

Copy the .env.local.example file to .env.local in the frontend folder:

# In the frontend directory
cp .env.local.example .env.local

You'll need to configure these environment variables with your specific values. See the Configuration page for more info.

5. πŸŽ‰ Start the development server

cd ../frontend
pnpm dev

Congratulations! πŸš€ Your PocketStarter application is now running at http://localhost:3000

PocketStarter Fresh Install

The default homepage you'll see after a fresh installation of PocketStarter

Project structure

pocketstarter/
β”œβ”€β”€ frontend/           # Next.js application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app/        # App router pages
β”‚   β”‚   β”œβ”€β”€ components/ # Reusable components
β”‚   β”‚   β”œβ”€β”€ config/     # App configuration
β”‚   β”‚   β”œβ”€β”€ lib/        # Utility functions
β”‚   β”‚   └── types/      # TypeScript definitions
β”‚   └── public/         # Static assets
β”œβ”€β”€ pocketbase/         # Backend database and API
β”‚   β”œβ”€β”€ pb_hooks/       # Custom hooks
β”‚   └── pb_migrations/  # Database migrations
└── content/            # Documentation content

Next steps

Once PocketStarter is running, make sure to complete the Configuration steps to set up environment variables and essential settings. Then, you're ready to start building your application!

Get started with your PocketBase / Next.js app using PocketStarter