Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions eval/fixtures/sveltekit-pms/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copy to .env and fill in. The .env file is gitignored — never commit a real key.
SEAM_API_KEY=
23 changes: 23 additions & 0 deletions eval/fixtures/sveltekit-pms/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# dependencies
node_modules

# sveltekit
.svelte-kit
/build

# production output
/dist

# local sqlite dev database (auto-created on first run)
*.db
*.db-shm
*.db-wal

# env files — never commit real secrets; keep the example
.env
.env.*
!.env.example

# misc
.DS_Store
*.tsbuildinfo
41 changes: 41 additions & 0 deletions eval/fixtures/sveltekit-pms/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# SvelteKit PMS

A tiny property-management app built with [SvelteKit](https://svelte.dev/docs/kit)
(Svelte 5 runes), `better-sqlite3`, and Zod. It manages **spaces** (bookable
rooms, suites, cabins…), takes **reservations** against them, and lists the
**guests** who have booked. It is the SvelteKit counterpart of the `nextjs-pms`
sample, with the same domain so the two exercise the same integration.

## Getting started

```bash
npm install
cp .env.example .env # then fill in SEAM_API_KEY
npm run dev
```

Open [http://localhost:5173](http://localhost:5173). The SQLite database
(`dev.db`) is created and seeded automatically on first run.

## Layout

- `src/routes/+page.*` — the public booking form (home).
- `src/routes/reservations/+page.*` — the front desk: every reservation with its
guest, status, dates, and assigned space.
- `src/routes/spaces/+page.*` — the inventory: add spaces, edit, archive/restore.
- `src/routes/guests/+page.*` — the guest directory (deduped by email).
- `src/routes/+layout.svelte` — the shared header and nav.
- `src/lib/server/db.ts` — the `better-sqlite3` handle; the schema is created and
seeded on import.
- `src/lib/server/availability.ts` — the overlap / capacity checks shared by
booking and the front desk.
- `src/lib/server/queries.ts` — the read queries behind each page's `load`.
- `src/lib/server/actions.ts` — the write path called from each `+page.server.ts`
form action.
- `src/lib/schemas.ts` — the Zod schemas that validate every form post.
- `src/lib/space-kinds.ts`, `src/lib/format.ts` — shared, client-safe helpers.

Everything under `src/lib/server/` is server-only: SvelteKit keeps it (and the
SQLite driver) out of the client bundle. Pages load their data in `+page.server.ts`
`load` functions and mutate through form `actions`, progressively enhanced with
`use:enhance`.
5 changes: 5 additions & 0 deletions eval/fixtures/sveltekit-pms/fixture.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "sveltekit-pms",
"sdk": "javascript",
"framework": "SvelteKit"
}
27 changes: 27 additions & 0 deletions eval/fixtures/sveltekit-pms/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "sveltekit-pms",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json"
},
"dependencies": {
"@sveltejs/adapter-auto": "^3.3.1",
"@sveltejs/kit": "^2.16.0",
"better-sqlite3": "^12.6.2",
"seam": "^1.231.0",
"svelte": "^5.19.0",
"vite": "^5.4.11",
"zod": "^4.3.6"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^4.0.4",
"@types/better-sqlite3": "^7.6.0",
"svelte-check": "^4.1.4",
"typescript": "^5.7.3"
}
}
Loading
Loading