diff --git a/.gitignore b/.gitignore index ab8271a..96aa6b3 100644 --- a/.gitignore +++ b/.gitignore @@ -38,7 +38,7 @@ yarn-error.log* prisma/dev.db prisma/dev.db-journal -# local databases / generated -data/ +# local databases / generated (root only — src/data/ holds committed source) +/data/ *.sqlite *.sqlite3 diff --git a/src/data/feeds.ts b/src/data/feeds.ts new file mode 100644 index 0000000..b402080 --- /dev/null +++ b/src/data/feeds.ts @@ -0,0 +1,75 @@ +/** + * Starter Canadian news feeds. These are seeded into the `Feed` table on + * first boot (and by `prisma/seed.js`); officials can add/edit feeds via the + * database or by extending this list — the pipeline only reads from the DB. + */ + +export interface FeedSeed { + name: string; + url: string; + slug: string; + category: string; + siteName: string; +} + +export const STARTER_FEEDS: FeedSeed[] = [ + { + // NOTE: these cbc-stats URLs are the official CBC feed paths from the + // project spec, but as of 2026-08-15 CBC returns 404 for every public + // RSS endpoint (repeatedly re-verified with multiple UAs). Keep them so + // they light up if CBC restores the feeds; disable in `Feed.enabled` + // or swap URLs in the DB if the 404s bother you (see README → Feeds). + name: 'CBC News — Top Stories', + url: 'https://www.cbc.ca/cbc-stats/rss/rss-topstories.xml', + slug: 'cbc-top-stories', + category: 'top-stories', + siteName: 'CBC News', + }, + { + name: 'CBC News — Canada', + url: 'https://www.cbc.ca/cbc-stats/rss/rss-canada.xml', + slug: 'cbc-canada', + category: 'canada', + siteName: 'CBC News', + }, + { + // Live Arc outbound feed (verified 2026-08). The legacy + // ctvnews-ca-top-stories-public-rss-1.822009 URL currently 404s. + name: 'CTV News — National', + url: 'https://www.ctvnews.ca/arc/outboundfeeds/rss/', + slug: 'ctv-national', + category: 'national', + siteName: 'CTV News', + }, + { + name: 'Global News — Canada', + url: 'https://globalnews.ca/canada/feed/', + slug: 'global-canada', + category: 'canada', + siteName: 'Global News', + }, + { + name: 'The Globe and Mail — National', + url: 'https://www.theglobeandmail.com/arc/outboundfeeds/rss/category/canada/', + slug: 'globe-national', + category: 'national', + siteName: 'The Globe and Mail', + }, + { + name: 'National Post — News', + url: 'https://nationalpost.com/category/news/feed', + slug: 'national-post-news', + category: 'top-stories', + siteName: 'National Post', + }, +]; + +/** Sections shown in site navigation (stable, hand-curated). */ +export const SECTIONS = [ + { slug: 'top-stories', label: 'Top Stories' }, + { slug: 'canada', label: 'Canada' }, + { slug: 'national', label: 'National' }, + { slug: 'all', label: 'All' }, +] as const; + +export type SectionSlug = (typeof SECTIONS)[number]['slug'];