[{"data":1,"prerenderedAt":534},["ShallowReactive",2],{"navigation_docs":3,"-api-recommendations-cache":100,"-api-recommendations-cache-surround":529},[4,35,80,90],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Getting Started",false,"\u002Fgetting-started","1.getting-started",[10,15,20,25,30],{"title":11,"path":12,"stem":13,"icon":14},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F2.introduction","i-lucide-house",{"title":16,"path":17,"stem":18,"icon":19},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F3.installation","i-lucide-download",{"title":21,"path":22,"stem":23,"icon":24},"Project Structure","\u002Fgetting-started\u002Fproject-structure","1.getting-started\u002F4.project-structure","i-lucide-folder-tree",{"title":26,"path":27,"stem":28,"icon":29},"Backend Server","\u002Fgetting-started\u002Fbackend","1.getting-started\u002F6.backend","i-lucide-server",{"title":31,"path":32,"stem":33,"icon":34},"Troubleshooting","\u002Fgetting-started\u002Ftroubleshooting","1.getting-started\u002F8.troubleshooting","i-lucide-wrench",{"title":36,"icon":6,"path":37,"stem":38,"children":39,"page":6},"API","\u002Fapi","2.api",[40,45,50,55,60,65,70,75],{"title":41,"path":42,"stem":43,"icon":44},"API Overview","\u002Fapi\u002Foverview","2.api\u002F1.overview","i-lucide-zap",{"title":46,"path":47,"stem":48,"icon":49},"TMDB Integration","\u002Fapi\u002Ftmdb-proxy","2.api\u002F2.tmdb-proxy","i-si-movie-line",{"title":51,"path":52,"stem":53,"icon":54},"Watched and My List APIs","\u002Fapi\u002Fwatched-movies","2.api\u002F3.watched-movies","i-lucide-eye",{"title":56,"path":57,"stem":58,"icon":59},"Recommendation Generation","\u002Fapi\u002Fgemini-recommendations","2.api\u002F4.gemini-recommendations","i-lucide-sparkles",{"title":61,"path":62,"stem":63,"icon":64},"Movie Search API","\u002Fapi\u002Fmovie-search","2.api\u002F5.movie-search","i-lucide-search",{"title":66,"path":67,"stem":68,"icon":69},"TMDB Import","\u002Fapi\u002Ftmdb-import","2.api\u002F6.tmdb-import","i-lucide-database",{"title":71,"path":72,"stem":73,"icon":74},"Movie Details & Caching","\u002Fapi\u002Fmovie-details","2.api\u002F7.movie-details","i-lucide-film",{"title":76,"path":77,"stem":78,"icon":79},"Recommendations (Cached)","\u002Fapi\u002Frecommendations-cache","2.api\u002F8.recommendations-cache","i-lucide-brain",{"title":81,"icon":6,"path":82,"stem":83,"children":84,"page":6},"Frontend","\u002Ffrontend","4.frontend",[85],{"title":86,"path":87,"stem":88,"icon":89},"Components","\u002Ffrontend\u002Fcomponents","4.frontend\u002F1.components","i-lucide-layout",{"title":91,"icon":6,"path":92,"stem":93,"children":94,"page":6},"Reference","\u002Freference","5.reference",[95],{"title":96,"path":97,"stem":98,"icon":99},"Rate Limiting","\u002Freference\u002Frate-limiting","5.reference\u002F2.rate-limiting","i-lucide-shield",{"id":101,"title":76,"body":102,"description":522,"extension":523,"links":524,"meta":525,"navigation":526,"path":77,"seo":527,"stem":78,"__hash__":528},"docs\u002F2.api\u002F8.recommendations-cache.md",{"type":103,"value":104,"toc":506},"minimark",[105,113,118,128,131,152,156,163,167,173,233,236,240,249,266,273,281,288,298,302,422,428,431,434,437,454,458,502],[106,107,108,112],"p",{},[109,110,111],"code",{},"GET \u002Fapi\u002Frecommend"," is the primary recommendations endpoint used by the home feed. It combines watched history, My List-aware filtering, AI generation, and Supabase caching, reducing cost and latency by reusing valid recommendations for 7 days.",[114,115,117],"h2",{"id":116},"endpoint","Endpoint",[119,120,126],"pre",{"className":121,"code":123,"language":124,"meta":125},[122],"language-text","GET \u002Fapi\u002Frecommend\n","text","",[109,127,123],{"__ignoreMap":125},[106,129,130],{},"Optional query flags:",[132,133,134,144],"ul",{},[135,136,137,140,141],"li",{},[109,138,139],{},"?refresh=true"," or ",[109,142,143],{},"?refresh=1",[135,145,146,140,149],{},[109,147,148],{},"?getNew=true",[109,150,151],{},"?getNew=1",[114,153,155],{"id":154},"auth","Auth",[106,157,158,159,162],{},"Requires ",[109,160,161],{},"Authorization: Bearer \u003Csupabase_access_token>",".",[114,164,166],{"id":165},"cache-strategy","Cache Strategy",[106,168,169,170,162],{},"The route stores and reuses recommendation sets in Supabase table ",[109,171,172],{},"recommendations",[174,175,176,189],"table",{},[177,178,179],"thead",{},[180,181,182,186],"tr",{},[183,184,185],"th",{},"Field",[183,187,188],{},"Purpose",[190,191,192,203,213,223],"tbody",{},[180,193,194,200],{},[195,196,197],"td",{},[109,198,199],{},"user_id",[195,201,202],{},"Per-user cache key",[180,204,205,210],{},[195,206,207],{},[109,208,209],{},"tmdb_ids",[195,211,212],{},"Cached recommendation TMDB IDs",[180,214,215,220],{},[195,216,217],{},[109,218,219],{},"watched_hash",[195,221,222],{},"Hash of watched movies used to validate freshness (My List is applied during generation, not in this cache-key hash)",[180,224,225,230],{},[195,226,227],{},[109,228,229],{},"expires_at",[195,231,232],{},"Cache expiration timestamp",[106,234,235],{},"Cache TTL is 7 days.",[114,237,239],{"id":238},"behavior-by-mode","Behavior by Mode",[241,242,244,245,248],"h3",{"id":243},"default-apirecommend","Default (",[109,246,247],{},"\u002Fapi\u002Frecommend",")",[132,250,251,260],{},[135,252,253,254,256,257,248],{},"If cache is fresh and ",[109,255,219],{}," matches current watched history: returns cached recommendations (",[109,258,259],{},"cached: true",[135,261,262,263,248],{},"Otherwise generates a new set and stores it (",[109,264,265],{},"cached: false",[241,267,269,270,248],{"id":268},"refresh-apirecommendrefreshtrue","Refresh (",[109,271,272],{},"\u002Fapi\u002Frecommend?refresh=true",[132,274,275,278],{},[135,276,277],{},"Skips cache reuse",[135,279,280],{},"Generates a fresh set and overwrites cache",[241,282,284,285,248],{"id":283},"get-new-apirecommendgetnewtrue","Get New (",[109,286,287],{},"\u002Fapi\u002Frecommend?getNew=true",[132,289,290,292,295],{},[135,291,277],{},[135,293,294],{},"Loads previous cached recommendations and excludes them from the next AI generation round",[135,296,297],{},"Generates a new set (still applying My List filtering rules) and stores it",[114,299,301],{"id":300},"response-shape","Response Shape",[119,303,307],{"className":304,"code":305,"language":306,"meta":125,"style":125},"language-json shiki shiki-themes material-theme-lighter github-light github-dark","{\n  \"recommendations\": [157336, 603],\n  \"cached\": false,\n  \"stale\": false,\n  \"regenerationError\": null,\n  \"staleRecommendations\": null\n}\n","json",[109,308,309,318,350,368,384,401,416],{"__ignoreMap":125},[310,311,314],"span",{"class":312,"line":313},"line",1,[310,315,317],{"class":316},"sP7_E","{\n",[310,319,321,325,328,331,334,337,341,344,347],{"class":312,"line":320},2,[310,322,324],{"class":323},"s39Yj","  \"",[310,326,172],{"class":327},"sseR_",[310,329,330],{"class":323},"\"",[310,332,333],{"class":316},":",[310,335,336],{"class":316}," [",[310,338,340],{"class":339},"srdBf","157336",[310,342,343],{"class":316},",",[310,345,346],{"class":339}," 603",[310,348,349],{"class":316},"],\n",[310,351,353,355,358,360,362,365],{"class":312,"line":352},3,[310,354,324],{"class":323},[310,356,357],{"class":327},"cached",[310,359,330],{"class":323},[310,361,333],{"class":316},[310,363,364],{"class":323}," false",[310,366,367],{"class":316},",\n",[310,369,371,373,376,378,380,382],{"class":312,"line":370},4,[310,372,324],{"class":323},[310,374,375],{"class":327},"stale",[310,377,330],{"class":323},[310,379,333],{"class":316},[310,381,364],{"class":323},[310,383,367],{"class":316},[310,385,387,389,392,394,396,399],{"class":312,"line":386},5,[310,388,324],{"class":323},[310,390,391],{"class":327},"regenerationError",[310,393,330],{"class":323},[310,395,333],{"class":316},[310,397,398],{"class":323}," null",[310,400,367],{"class":316},[310,402,404,406,409,411,413],{"class":312,"line":403},6,[310,405,324],{"class":323},[310,407,408],{"class":327},"staleRecommendations",[310,410,330],{"class":323},[310,412,333],{"class":316},[310,414,415],{"class":323}," null\n",[310,417,419],{"class":312,"line":418},7,[310,420,421],{"class":316},"}\n",[106,423,424,425,162],{},"Successful responses return TMDB IDs only. The frontend hydrates details separately through ",[109,426,427],{},"GET \u002Fapi\u002Fmovies\u002F:id",[114,429,96],{"id":430},"rate-limiting",[106,432,433],{},"Recommendation generation is limited to 20 requests\u002Fday per authenticated user.",[106,435,436],{},"Headers returned on generation requests:",[132,438,439,444,449],{},[135,440,441],{},[109,442,443],{},"X-RateLimit-Limit",[135,445,446],{},[109,447,448],{},"X-RateLimit-Remaining",[135,450,451],{},[109,452,453],{},"X-RateLimit-Reset",[114,455,457],{"id":456},"error-codes","Error Codes",[132,459,460,466,472,478,484,490,496],{},[135,461,462,465],{},[109,463,464],{},"400"," no watched movies found",[135,467,468,471],{},[109,469,470],{},"401"," missing or invalid bearer token",[135,473,474,477],{},[109,475,476],{},"409"," recommendation request already in progress",[135,479,480,483],{},[109,481,482],{},"429"," daily recommendation limit reached",[135,485,486,489],{},[109,487,488],{},"500"," Supabase or internal failure",[135,491,492,495],{},[109,493,494],{},"502"," AI output could not be parsed, validated, or resolved into enough TMDB matches",[135,497,498,501],{},[109,499,500],{},"503"," no provider is configured, or all configured provider\u002Fmodel attempts are unavailable",[503,504,505],"style",{},"html pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s39Yj, html code.shiki .s39Yj{--shiki-light:#39ADB5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sseR_, html code.shiki .sseR_{--shiki-light:#9C3EDA;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .srdBf, html code.shiki .srdBf{--shiki-light:#F76D47;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":125,"searchDepth":320,"depth":320,"links":507},[508,509,510,511,519,520,521],{"id":116,"depth":320,"text":117},{"id":154,"depth":320,"text":155},{"id":165,"depth":320,"text":166},{"id":238,"depth":320,"text":239,"children":512},[513,515,517],{"id":243,"depth":352,"text":514},"Default (\u002Fapi\u002Frecommend)",{"id":268,"depth":352,"text":516},"Refresh (\u002Fapi\u002Frecommend?refresh=true)",{"id":283,"depth":352,"text":518},"Get New (\u002Fapi\u002Frecommend?getNew=true)",{"id":300,"depth":320,"text":301},{"id":430,"depth":320,"text":96},{"id":456,"depth":320,"text":457},"Main recommendation endpoint with per-user Supabase caching","md",null,{},{"icon":79},{"title":76,"description":522},"ZJrkNaMEw1bK-gSWVlQifQSRBFixITz633-F_5FJmwM",[530,532],{"title":71,"path":72,"stem":73,"description":531,"icon":74,"children":-1},"Fetch enriched movie metadata with Supabase-backed caching",{"title":86,"path":87,"stem":88,"description":533,"icon":89,"children":-1},"Vue components and pages structure",1782138812900]