This project tracks news and updates from major Canadian financial institutions. It automatically scrapes news from bank websites, analyzes content using OpenAI's API, and presents the findings in a clean web interface.
- Automated news scraping from major Canadian financial institutions (RBC, TD, BMO, Scotiabank, CIBC)
- Content analysis using OpenAI's GPT models
- Clean web interface to view and filter articles
- Database storage with PostgreSQL
- Article relevance scoring and reasoning
- Clone the repository
- Install dependencies:
npm install
- Set up your environment variables in
.env.local
:
OPENAI_API_KEY=your_key_here
POSTGRES_USER=your_user
POSTGRES_HOST=localhost
POSTGRES_DB=your_db
POSTGRES_PASSWORD=your_password
POSTGRES_PORT=5432
- Set up the database:
npx tsx src/scripts/test-db.ts
- Run the development server:
npm run dev
npm run dev
- Start the development servernpx tsx src/scripts/reset-and-analyze.ts
- Reset and analyze all articlesnpx tsx src/scripts/generate-articles-report.ts
- Generate an HTML reportnpx tsx src/scripts/test-bmo-scraper.ts
- Test the BMO scrapernpx tsx src/scripts/test-td-scraper.ts
- Test the TD scrapernpx tsx src/scripts/test-rbc-scraper.ts
- Test the RBC scraper
- Next.js 14 with App Router
- TypeScript
- PostgreSQL
- OpenAI API
- Puppeteer for web scraping
- TailwindCSS for styling