Skip to content

Saad5400/SvelteElCato

Repository files navigation

Svelte El Cato

Is the new website for El Cato. Using SvelteKit for the frontend and PocketBase for the backend.

Getting started

Prerequisites

  • Node.js v20+

Installation

Clone the repository, using the terminal or via the GitHub 'Code' > 'Download ZIP' option.

git clone https://github.com/Saad5400/SvelteElCato
cd SvelteElCato

Install the dependencies:

npm install

Development

(Optional) download the Svelte extensions for your favourite IDE: VSCode - WebStorm

Checkout the components library, shadcn-svelte

Copy the .env.example file to .env

Copy the pb_src/pb_hooks/env.json.example file to pb_src/pb_hooks/env.json

Start the pocketbase server:

.\pb_src\pocketbase.exe serve # Windows PowerShell
pb_src/pocketbase serve # Windows Command Prompt
./pb_src/pocketbase serve # Linux / macOS / Bash

Start the SvelteKit server (in a new terminal):

npm run dev

Visit the pocketbase server at http://127.0.0.1:8090/_/, create a new Admin user, and add some data to the collections.

You can now visit the SvelteKit server at http://127.0.0.1:5173 to see the website.

Deployment

Backend (Pocketbase)

Deploy:

cd pb_src
flyctl deploy