INIT
This commit is contained in:
@@ -1,2 +1,44 @@
|
||||
# Stackq
|
||||
|
||||
Basic Svelte 5 + SvelteKit project with [shadcn-svelte](https://www.shadcn-svelte.com/) and [PocketBase](https://pocketbase.ccllc.pro), using Bun.
|
||||
|
||||
## Stack
|
||||
|
||||
- **Svelte 5** with SvelteKit 2
|
||||
- **Tailwind CSS v4** via `@tailwindcss/vite`
|
||||
- **shadcn-svelte** (new-york style, slate base)
|
||||
- **PocketBase** — auth and API at `https://pocketbase.ccllc.pro`
|
||||
|
||||
## Develop
|
||||
|
||||
```bash
|
||||
bun install # if needed
|
||||
bun run dev
|
||||
```
|
||||
|
||||
Open http://localhost:5173. Unauthenticated users are redirected to `/login`.
|
||||
|
||||
## Login
|
||||
|
||||
- **Login page:** `/login` — email + password, styled like [HRM](https://gitea.ccllc.pro/Cardoza_Construction/HRM).
|
||||
- **Logout:** home page “Log out” or visit `/logout`.
|
||||
- Auth is stored in a `pb_auth` cookie and restored/refreshed in `src/hooks.server.ts`.
|
||||
|
||||
## PocketBase
|
||||
|
||||
- **Client:** `import { pb } from '$lib/pocketbase'` for browser-side API and auth.
|
||||
- **Server:** use `event.locals.pb` and `event.locals.user` in load functions and form actions.
|
||||
- To change the PocketBase URL or auth collection, edit `src/lib/pocketbase.ts` and `src/hooks.server.ts`.
|
||||
|
||||
## Add more components
|
||||
|
||||
```bash
|
||||
bunx shadcn-svelte@latest add <component-name>
|
||||
```
|
||||
|
||||
## Build
|
||||
|
||||
```bash
|
||||
bun run build
|
||||
bun run preview # preview production build
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user