AtlatestRepositorysigil-web-demo
sigil-web-demo / treeREADME.md
1
# sigil-web-demo3
Demo 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.5
## Features7
- **CRUD operations** on a SQLite-backed vinyl record database8
- **Search and pagination** with server-driven partial updates9
- **Flash messages** for user feedback on create/update/delete10
- **Modal dialogs** for delete confirmation11
- **SSE streaming** for live stats updates on the home page12
- **Live-coding support** via nREPL and SSE reload13
- **CSS-in-Sigil** styles using [sigil-css](https://codeberg.org/sigil/sigil-css)15
## Dependencies17
- [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
## Usage27
Add as a dependency in your `package.sgl`:29
```scheme30
(from-git url: "codeberg:sigil/sigil-web-demo")31
```33
Or clone and run directly:35
```bash36
sigil deps install37
sigil build38
sigil run run.sgl39
```41
The app starts a web server (default port 3000) and opens Vinyl Vault in your browser.43
## Modules45
### `(sigil web demo)`47
Main entry point. Call `(start-demo)` to launch the web server with all routes configured.49
### `(sigil web demo db)`51
SQLite database layer with schema initialization, seed data, and CRUD operations:53
- `init-db` - Create table and seed sample records54
- `list-records` - Paginated listing with optional search55
- `count-records` - Count with optional search filter56
- `get-record` / `create-record` / `update-record` / `delete-record`58
### `(sigil web demo views)`60
SXML view functions for all pages and partials:62
- `page-layout` - Full HTML page shell with navigation63
- `home-page` - Welcome page with collection stats64
- `records-list-page` - Searchable, paginated record table65
- `record-detail-page` - Single record view with edit/delete actions66
- `record-form-page` - New/edit form with validation68
## License70
BSD-3-Clause