- Create app/public/index.php as front controller (bootstrap + Dispatcher) - Rewrite app/router.php for PHP dev server → all non-asset requests to index.php - Update Dispatcher to render full page layouts (head+header+view+footer) - Move public view templates into templates/public/ (home, search, tfe, about, repertoire) - Delete dead direct-access public/*.php files (apropos, search, tfe, licence, repertoire) - Add clean URL routes to Dispatcher (/search, /tfe, /repertoire, /apropos, /licence, /media) - Remove .php extensions from all internal links (header, views, templates, URLs) - Update OG tags in controllers to use clean URLs - Update nginx posterg.conf → front-controller try_files pattern, block direct .php access - Update header.php and search-bar.php form actions to clean URLs - Switch AboutController nav key from 'nav' to 'currentNav' for consistency
3.5 KiB
TODO
-
Replace inline alert CSS in admin.css with floating bottom-center toast styles (fixed, z-index, animation)
-
Update flash-messages.php partial to output
.toastmarkup in hidden container for footer JS -
Add toast container HTML + JS to admin footer.php (centralised, 4s auto-dismiss with fade-out)
-
Remove redundant flash-messages.php includes from all admin pages (8 files)
-
Convert hardcoded alerts in login.php, thanks.php, index.php import to
.toastclass -
Update admin.css dialog rule from
[role=alert/status]to.toast -
Commit with jj
-
Move DB export from admin/index.php to admin/parametres.php (maintenance section)
-
Reorganize src/ - move 7 controllers to src/Controllers/
- Create Controllers directory
- Move controller files (Home, Tfe, Search, ThesisCreate, ThesisEdit, Export, System)
- Update all require_once paths across codebase
-
Move stray test.db from root to storage/
-
Store admin password hash in DB (site_settings) instead of config file
- Create migration 013
- Update AdminAuth to read hash from DB
- Update bootstrap.php — remove credential file loading
- Update parametres.php — status check from DB
- Update actions/account.php — write hash to DB
- Update login.php — dev-mode check
- Update header.php — dev check
- Delete config/admin_credentials.example.php
Now: Single Entry Point Routing
Phase 1: Dispatcher refinement
- MediaController: extract media.php logic into MediaController class
- Create src/Controllers/MediaController.php
- Move path validation + storage jail + MIME check + streaming
- Wire into Dispatcher for /media route
- Delete app/public/media.php
- Update Dispatcher to handle all routes directly (no require APP_ROOT/public/*.php)
Phase 2: Single entry point
- Create app/public/index.php as front controller
- Move bootstrap logic into entry point (bootstrap.php stays for admin)
- Load and invoke Dispatcher
- Move old public/*.php views into templates/public/
- search.php → templates/public/search.php
- tfe.php → templates/public/tfe.php
- apropos.php → templates/public/about.php
- repertoire.php → templates/public/repertoire.php
- Delete old direct-access public/*.php files
- Delete public/index.php (replaced by front controller)
- Delete public/search.php
- Delete public/tfe.php
- Delete public/apropos.php
- Delete public/licence.php
- Delete public/repertoire.php
- Update Dispatcher.render to use templates/public/ views
- Update Dispatcher to render full pages (head + header + view + footer) instead of requiring bootstrap
- Ensure admin/index.php bootstraps its own path (not affected by front controller)
Phase 3: Server config
- Update router.php — route all PHP requests to Dispatcher
- Update nginx config — point all public routes to index.php via try_files
- Replace per-file
location ~ \.php$with front-controller pattern
- Replace per-file
- Clean URL updates
- Remove .php from all internal links (header, views, controllers)
- Add clean routes to Dispatcher (/search, /tfe, /media)
- Update og:url tags in controllers to use clean URLs
- Update TfeController redirect to /
- Update header.php action URLs
- Commit current state
- Test all routes (/, /search, /tfe, /repertoire, /apropos, /licence, /media, /live-reload)