index.php
Front controller: every request enters here (see `public/.htaccess`, which rewrites non-file requests to this script) and is dispatched by URL path to a view template, which is rendered inside `layout.php`. Paths are relative to `BASE` (see `config.php`), so the app works at a domain root or in a sub-directory.
Routes:
/Home: public bookmark feed + tag cloud./tag/NAMESThe feed filtered by tags, comma-separated (/tag/php,docslists bookmarks carrying both). The sidebar cloud shows the tags of the listed bookmarks; its links add to the filter./tagsTag index: every visible tag with its count, paginated;?q=TERMnarrows it to the matching tags./user/NAMEThe feed filtered by one user (your own page shows your private bookmarks too when logged in)./user/meis a reserved alias for the logged-in user's own page./loginLogin form (GET) + handler (POST)./logoutDestroy the session, redirect home./addCreate bookmark (POST action). Login required./edit/IDSave bookmark (POST action). Owner/admin only./delete/IDDelete bookmark (POST action). Owner/admin only.
Editing is inline: on any list, ?edit=ID renders that row as an in-place
form and ?add renders an empty one on top (a GET to /add or /edit/ID
redirects to the user's own page with that state). The forms POST to the
action routes above and return to the list they were on.
Later features add their own routes here (/bookmark/ID, ...); any
unmatched path renders the 404 view.