AtlatestRepositorysigil-web-demo
1# sigil-web-demo
2
3Demo web application showcasing [sigil-web](https://codeberg.org/sigil/sigil-web) features. Implements "Vinyl Vault", a vinyl record collection CRUD app demonstrating routing, forms, data tables, pagination, flash messages, modals, SSE streaming, and server-driven UI.
4
5## Features
6
7- **CRUD operations** on a SQLite-backed vinyl record database
8- **Search and pagination** with server-driven partial updates
9- **Flash messages** for user feedback on create/update/delete
10- **Modal dialogs** for delete confirmation
11- **SSE streaming** for live stats updates on the home page
12- **Live-coding support** via nREPL and SSE reload
13- **CSS-in-Sigil** styles using [sigil-css](https://codeberg.org/sigil/sigil-css)
15## Dependencies
17- [sigil-stdlib](https://codeberg.org/sigil/sigil) (core library)
18- [sigil-http](https://codeberg.org/sigil/sigil) (HTTP server)
19- [sigil-web](https://codeberg.org/sigil/sigil-web) (web framework, routing, middleware, UI components)
20- [sigil-nrepl](https://codeberg.org/sigil/sigil) (network REPL for live-coding)
21- [sigil-sqlite](https://codeberg.org/sigil/sigil) (SQLite bindings)
22- [sigil-sxml](https://codeberg.org/sigil/sigil-sxml) (SXML processing for HTML generation)
23- [sigil-css](https://codeberg.org/sigil/sigil-css) (CSS-in-Sigil DSL)
25## Usage
27Add as a dependency in your `package.sgl`:
29```scheme
30(from-git url: "codeberg:sigil/sigil-web-demo")
31```
33Or clone and run directly:
35```bash
36sigil deps install
37sigil build
38sigil run run.sgl
39```
41The app starts a web server (default port 3000) and opens Vinyl Vault in your browser.
43## Modules
45### `(sigil web demo)`
47Main entry point. Call `(start-demo)` to launch the web server with all routes configured.
49### `(sigil web demo db)`
51SQLite database layer with schema initialization, seed data, and CRUD operations:
53- `init-db` - Create table and seed sample records
54- `list-records` - Paginated listing with optional search
55- `count-records` - Count with optional search filter
56- `get-record` / `create-record` / `update-record` / `delete-record`
58### `(sigil web demo views)`
60SXML view functions for all pages and partials:
62- `page-layout` - Full HTML page shell with navigation
63- `home-page` - Welcome page with collection stats
64- `records-list-page` - Searchable, paginated record table
65- `record-detail-page` - Single record view with edit/delete actions
66- `record-form-page` - New/edit form with validation
68## License
70BSD-3-Clause