Skip to content

demo-html (HTML mode demo)

MyFeed. alias to demo-html to align the folder with the HTML front mode. Package name is serenade-demo-html; CLI binary is also serenade-demo-html. See FRONT-MODES.md for the full mode tree and CLI contract.

Path: examples/demo-html. Epic #112.

cargo run -p serenade-demo-html → open a public scrollable feed. Same journey as Symfony Demo / Fast Track: framework forms, security habits, HTML pages - not a SPA tutorial.

Layer Choice
UI Server-rendered HTML + Bootstrap 5 + Quill + light Clitorine helpers
HTTP Actix via serenade-http-actix::listen
Forms serenade-form (CSRF default-on, escape_html)
View serenade-view (path / asset / partial for HTML builders)
Search serenade-search (MemorySearchAdapter; /search?q=)
i18n serenade-translation catalogues en + fr; /locale/{code} cookie
Profiler serenade-profiler toolbar + /_profiler (disable with MYFEED_PROFILER=0)
Rich text Quill HTML sanitized with ammonia before store/render
Admin Cookie login on /admin; categories via serenade-admin CRUD
Data SQLite file (default .myfeed.sqlite) so restarts keep posts
  • / feed + expandable composer + likes + comments
  • GET /search?q= in-memory post search (body + category)
  • GET /locale/{code} sticky UI locale cookie (en / fr); post bodies stay author language
  • POST /posts create post (optional allowlisted media)
  • POST /posts/{id}/like public like
  • POST /posts/{id}/comments pending comment
  • /admin login + pending queue; categories use serenade-admin list panel + CRUD under /admin/categories
  • /_profiler request list and /_profiler/{token} detail (toolbar on HTML pages)
Terminal window
make html
# or: cargo run -p serenade-demo-html
# or: make myfeed (legacy alias)
# http://127.0.0.1:8080/

Embeds: YouTube (nocookie embed), SoundCloud, direct image / .mp4 URLs. See FORMS.md, VIEW.md, SECURITY.md, I18N.md, SEARCH.md, and ADMIN.md.