projects

1 min read

April 21, 2024

Spatz
A fullstack Sveltekit template for building FAST.

Description

A complete, fullstack template for Svelte.

Features

Getting Started

Pocketbase Setup

1: Create a directory for your Pocketbase instance and navigate to it.

mkdir pb-spatz
cd pb-spatz

2: Download the latest release of Pocketbase, unzip it, and start the server.

wget https://github.com/pocketbase/pocketbase/releases/download/v0.22.9/pocketbase_0.22.9_linux_amd64.zip
unzip pocketbase_0.22.9_linux_amd64.zip
./pocketbase serve --http="0.0.0.0:8090"

3: Log in to the Pocketbase admin console at http://localhost:8090/_/ and create a new database.

4: Go to settings > Import collections, then paste in the contens of ./pocketbase/pb_schema.json (from this repo) and click import.

Client Setup

1: Clone the repo and navigate to the project directory.

git clone https://github.com/engageintellect/spatz
cd spatz

2: Set your Pocketbase URL and OpenAI API key in a .env.local file.

touch 'PUBLIC_POCKETBASE_URL=http://localhost:8090' > .env.local
touch 'OPENAI_API_KEY=<YOUR API KEY>' >> .env.local

3: Install the dependencies and start the development server.

pnpm i && pnpm run dev --host

4: Open your browser to http://localhost:5173 to see the app.