Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 2.29 KB

File metadata and controls

42 lines (32 loc) · 2.29 KB

MyFeed beginner demo

Path: examples/MyFeed. Epic #112.

Goal

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

Stack (locked for this demo)

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

Surfaces

  • / 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)

Run

make myfeed
# http://127.0.0.1:8090/

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