– Increase user engagement, session length, and repeat visits by giving visitors a simple way to bookmark titles they want to watch later and by surfacing highly‑personalized movie/TV suggestions based on their behavior, preferences, and contextual data.
-- Recommendation feedback CREATE TABLE rec_feedback ( user_id BIGINT, title_id BIGINT, feedback ENUM('like','dislike','not_interested') NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (user_id, title_id) ); Guest lists are stored client‑side; on login, the front‑end merges the local list into user_watch_later (deduping by title_id ). | Method | Endpoint | Auth | Description | |--------|----------|------|-------------| | POST | /api/watchlater | JWT (optional) | Body titleId → add. If no token → store in cookie/localStorage. | | DELETE | /api/watchlater/:titleId | JWT (optional) | Remove entry. | | GET | /api/watchlater | JWT (optional) | Return list (merged server + client for guests). | | GET | /api/recommendations?limit=10 | JWT (optional) | Return personalized titles. | | POST | /api/rec/feedback | JWT | Body titleId, feedback – record user reaction. | | POST | /api/notifications/subscribe | JWT | Register Web Push subscription. | | GET | /admin/analytics/watchlater | Admin token | JSON stats. | movies4u.vip official site
-- Watch‑Later list CREATE TABLE user_watch_later ( user_id BIGINT REFERENCES users(id) ON DELETE CASCADE, title_id BIGINT REFERENCES titles(id) ON DELETE CASCADE, added_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (user_id, title_id) ); – Increase user engagement, session length, and repeat
-- Titles (movies/TV) CREATE TABLE titles ( id BIGINT PRIMARY KEY, title VARCHAR(255) NOT NULL, year INT, runtime_min INT, genre VARCHAR(100), director VARCHAR(255), rating DECIMAL(2,1), license_expires DATE, ... ); If no token → store in cookie/localStorage