Skip to content

Conversation

@shuemon4
Copy link

Summary

Major feature release adding a modern React-based web UI and numerous backend improvements:

  • React UI: Complete rebuild using React 18 + TypeScript + Vite + Tailwind CSS
  • Authentication: Session-based auth with bcrypt password hashing and CSRF protection
  • Media Management: Folder-based browsing, thumbnails, pagination, and delete functionality
  • Configuration: JSON API endpoints, batch config updates, configuration profiles
  • Streaming: Client-side MJPEG parser with FPS display
  • System Integration: systemd watchdog support, automated installer
  • Security: CSRF protection, session tokens, secure cookie handling

Key Changes

Frontend (React)

  • Dashboard with camera streaming and quick settings
  • Settings page with scope filtering (global vs camera)
  • Media browser with folder navigation and thumbnails
  • Visual schedule picker for motion detection
  • Hardware encoding warnings and recommendations
  • Configuration profiles for presets

Backend (C++)

  • Migrated from legacy POST processor to JSON API
  • Added session token authentication for streams
  • Thumbnail generation for media library
  • libmicrohttpd static file serving with SPA support
  • Removed legacy webu_html and webu_post modules

Infrastructure

  • systemd service installation with watchdog integration
  • Automated installer script with dependency management
  • bcrypt-based password management CLI tool
  • Comprehensive installation guide

Test plan

  • Verify React UI loads at webcontrol port
  • Test authentication flow (login/logout)
  • Verify camera streaming works
  • Test configuration changes persist
  • Verify media browser shows recordings
  • Test on Raspberry Pi 4 and Pi 5

🤖 Generated with Claude Code

shuemon4 and others added 3 commits January 24, 2026 00:47
Major feature release adding a modern React-based web UI and numerous
backend improvements for the Motion video surveillance daemon.

Frontend (React 18 + TypeScript + Vite + Tailwind CSS):
- Dashboard with camera streaming and quick settings bottom sheet
- Settings page with scope filtering (global vs camera parameters)
- Media browser with folder navigation, thumbnails, and pagination
- Visual schedule picker for motion detection and recording
- Hardware encoding warnings and device-aware recommendations
- Configuration profiles for save/load/delete presets

Backend (C++):
- Migrated from legacy POST processor to JSON API endpoints
- Session-based authentication with bcrypt password hashing
- CSRF protection with session tokens for streams
- Thumbnail generation for media library
- libmicrohttpd static file serving with SPA routing support
- Removed legacy webu_html and webu_post modules

Infrastructure:
- systemd service installation with watchdog integration
- Automated installer script with dependency management
- bcrypt-based password management CLI tool (motion-setup)
- Comprehensive installation guide and Quick Start docs

Security:
- Session token authentication for all API endpoints
- CSRF protection with dual token validation
- Secure cookie handling with HttpOnly flags
- Auto-detection of config paths with secure defaults

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The file data/webcontrol/samplepage.html is a static HTML file that doesn't
require autoconf processing. Automake was looking for samplepage.html.in
template file which doesn't exist and isn't needed.

This fixes the autoreconf error:
configure.ac:739: error: required file 'data/webcontrol/samplepage.html.in' not found
The file was referenced in Makefile.am but missing from the working tree,
causing build failure. Restored from git history (commit 756b22b).

Fixes make error: No rule to make target 'doc/motion.png', needed by 'all-am'
@Mr-Dave
Copy link
Member

Mr-Dave commented Jan 26, 2026

Thanks for PR. There is a lot here so it will take some time to review and pull this in. I'm currently busy with "life" but from just an initial look, I think we'd need the following:

  1. On my server it did not compile. Looks like some of the compatibility with prior versions of ffmpeg were removed and need to be restored.
  2. On my dev machine, I noticed the the M4 directory isn't in the UI branch and is needed. (Note that some of the custom clean scripts need to get adjusted to prevent this from be cleaned away)
  3. The branch seems to have some problems with the webcontrol vs webui being installed.
  4. Since Motion isn't just PI software (it is all platform, etc), we'd need to remove the PI specific things like the scripts.
  5. I see the webu_post was remove in favor of JSON. I think that may be too much for some of our users and we'd need to bring that back to be alongside of the JSON. The change from GET to POST was already almost too much for our users. (Note that the previous processing had some unresolved problems with the url encoding requirements)
  6. I think the default directories need a discussion. Historically it was in /etc/motion but that prevented users from accessing/changing things while the app is running. In V5 I was inclined to go to /var/lib/motion so configurations as well a runtime data could be stored. I think I saw in the PR that it was using /usr/local/etc/motion.
  7. There were a few compiler warnings. I've gone with the approach that Motion doesn't have any warnings.
  8. I was able to get the point of seeing the start page but only got a "Unable to connect to Motion. Please check the server." Probably due to some of the new authorization items added but I didn't do. We probably need to think about legacy users as well as new ones.

Since this is pretty big and there seem to be a few issues to resolved. How do you want to go about discussing/resolving them? Separate discussions for each item? (I don't know a way to have separate discussions/resolutions to each topic/issue in a PR and I want the discussion somewhere in the Motion repo for tracking)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants