← back to AsSeenInMovies
asseeninmovies: home page — third rail 'Recent SPOTTED' (6 verified placements) + 'spotted' added to stat-row; cards deep-link to /movie/:id#spotted
3a3c2c70cc08f277db55a8f4c66f7ec155bcc874 · 2026-05-12 16:21:09 -0700 · SteveStudio2
Files touched
Diff
commit 3a3c2c70cc08f277db55a8f4c66f7ec155bcc874
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date: Tue May 12 16:21:09 2026 -0700
asseeninmovies: home page — third rail 'Recent SPOTTED' (6 verified placements) + 'spotted' added to stat-row; cards deep-link to /movie/:id#spotted
---
server.js | 28 +++++++++++++++++++++++++---
1 file changed, 25 insertions(+), 3 deletions(-)
diff --git a/server.js b/server.js
index d205411..09e0fa2 100644
--- a/server.js
+++ b/server.js
@@ -1019,20 +1019,28 @@ app.get('/people', async (req, res) => {
// Home — placeholder until tick 1 ships TMDB ingest + real UI.
app.get('/', async (_req, res) => {
// Live-stats home with featured rails of recent movies + people. Read-only.
- let stats = { movies_total: 0, people_total: 0, movies_poster: 0, people_headshot: 0 };
- let featuredMovies = [], featuredPeople = [];
+ let stats = { movies_total: 0, people_total: 0, movies_poster: 0, people_headshot: 0, spotted_total: 0 };
+ let featuredMovies = [], featuredPeople = [], featuredSpotted = [];
try {
const s = await pool.query(`
SELECT
(SELECT count(*) FROM asim_movies) AS movies_total,
(SELECT count(*) FROM asim_movies WHERE poster_url IS NOT NULL) AS movies_poster,
(SELECT count(*) FROM asim_people) AS people_total,
- (SELECT count(*) FROM asim_people WHERE headshot_url IS NOT NULL) AS people_headshot`);
+ (SELECT count(*) FROM asim_people WHERE headshot_url IS NOT NULL) AS people_headshot,
+ (SELECT count(*) FROM asim_spotted WHERE verified_at IS NOT NULL) AS spotted_total`);
stats = s.rows[0];
const fm = await pool.query(`SELECT id, title, release_year, poster_url FROM asim_movies WHERE poster_url IS NOT NULL ORDER BY random() LIMIT 6`);
featuredMovies = fm.rows;
const fp = await pool.query(`SELECT id, full_name, headshot_url, primary_profession FROM asim_people WHERE headshot_url IS NOT NULL ORDER BY random() LIMIT 6`);
featuredPeople = fp.rows;
+ const fs = await pool.query(`
+ SELECT s.id AS spot_id, s.product_name, s.product_category, s.brand, s.scene_timecode,
+ m.id AS movie_id, m.title, m.release_year, m.poster_url, m.poster_source
+ FROM asim_spotted s JOIN asim_movies m ON m.id = s.movie_id
+ WHERE s.verified_at IS NOT NULL
+ ORDER BY s.verified_at DESC LIMIT 6`);
+ featuredSpotted = fs.rows;
} catch (e) {
// home page should never 500; fall back to static.
}
@@ -1048,6 +1056,12 @@ app.get('/', async (_req, res) => {
<div class="rail-title">${esc(p.full_name)}</div>
<div class="rail-meta">${(p.primary_profession || []).slice(0,2).join(' · ')}</div>
</a>`).join('');
+ const spottedCards = featuredSpotted.map(s => `
+ <a class="rail-card" href="/movie/${s.movie_id}#spotted">
+ <div class="rail-poster" style="background-image:url('${esc((s.poster_source||'').toLowerCase()!=='made-with-ai' && s.poster_url ? s.poster_url : '/img/made-with-ai.svg')}')"></div>
+ <div class="rail-title">${esc(s.product_name)}${s.brand ? ' · <span style="color:var(--muted)">'+esc(s.brand)+'</span>' : ''}</div>
+ <div class="rail-meta">${esc(s.title)}${s.release_year ? ' ('+s.release_year+')' : ''}</div>
+ </a>`).join('');
res.type('html').send(`<!doctype html>
<html lang="en"><head>
<meta charset="utf-8"><title>AsSeenInMovies</title>
@@ -1104,6 +1118,7 @@ app.get('/', async (_req, res) => {
<span><b>${Number(stats.movies_poster).toLocaleString()}</b> with posters</span>
<span><b>${Number(stats.people_total).toLocaleString()}</b> people</span>
<span><b>${Number(stats.people_headshot).toLocaleString()}</b> with headshots</span>
+ <span><b>${Number(stats.spotted_total).toLocaleString()}</b> spotted</span>
</div>
</header>
<main>
@@ -1121,6 +1136,13 @@ app.get('/', async (_req, res) => {
</div>
<div class="rail">${peopleCards}</div>` : ''}
+ ${featuredSpotted.length ? `
+ <div class="rail-head">
+ <h2>Recent SPOTTED</h2>
+ <a href="/spotted">Browse all →</a>
+ </div>
+ <div class="rail">${spottedCards}</div>` : ''}
+
<div class="blurb-grid">
<div class="blurb">
<h3>What this is</h3>
← c22b6be asseeninmovies: cross-link /movie/:id ↔ /spotted/submit?movi
·
back to AsSeenInMovies
·
asseeninmovies: /person/:id — surface 'SPOTTED in their film 4f8629c →