A complete, fullstack template for Svelte, based on the original spatz.
spatz uses standard forms in svelte and daisyUI. spatz-2 uses svelte-superforms, shadcn-svelte, stripe payments, and svelte-animations.
mkdir pb-spatz-2
cd pb-spatz-2
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"
Log in to the Pocketbase admin console at http://localhost:8090/_/
and create a new database.
Go to settings > Import collections, then paste in the contens of ./pocketbase/pb_schema.json
(from this repo) and click import.
git clone https://github.com/engageintellect/spatz-2
cd spatz-2
cp .env.example .env.local (or .env)
pnpm i && pnpm run dev --host
http://localhost:5173
to see the app./src
├── /lib
│ ├── /schema.ts (Zod schema)
│ └── app.d.ts (global types)
├── /assets
│ └── /images
├── /components
│ ├── /magic-ui (svelte-animations)
│ └── /ui (shared components)
├── /stores (global state)
├── /routes
│ ├── /guestbook
│ │ └── /post
│ │ └── /[id]
│ ├── /users
│ │ └── /[id]
│ ├── /technologies
│ ├── /subscriptions
│ ├── /terms
│ ├── /ai
│ │ ├── /chat
│ │ ├── /context
│ │ ├── /a
│ │ ├── /b
│ │ └── /c
│ ├── /donate
│ │ ├── /cancel (redirect when cancelling stripe payment)
│ │ └── /success (redirect after successful stripe payment)
│ ├── /checkout
│ │ ├── /payment (redirect when cancelling stripe payment)
│ │ ├── /cancel (redirect when cancelling stripe payment)
│ │ └── /success (redirect after successful stripe payment)
│ ├── /api
│ │ ├── /repo-data (fetch github repository stars)
│ │ ├── /fortune (fetch random tech founder quote)
│ │ ├── /chat (OpenAI streaming API)
│ │ └── /donate (for stripe payments)
│ │__ /auth (Pocketbase auth)
│ │ ├── /login
│ │ ├── /register
│ │ ├── /logout
│ │ └── /reset-password
│ └── /my (user-specific routes)
│ ├── /profile
│ ├── /account
│ ├── /billing (for subscriptions)
│ └── /settings
/pocketbase
├── pb_schema.json
/static
└── /docs (general documentation)
Icons are provided by iconify/svelte. You can search for icons on Icones.
Animations are provided by GSAP and are easy to implement. You can find the documentation here.
Contributions are welcomed, and appreciated. If you have a feature request, please add it as an issue or make a pull request.