A full-stack news aggregator application built with FastAPI (Backend) and React/Vite (Frontend).
backend/: FastAPI application with PostgreSQL, SQLAlchemy, and a background worker for scraping.frontend/: React + TypeScript application with Redux Toolkit and a modern Glassmorphism UI.
- Docker & Docker Compose (Recommended)
- Or: Python 3.11+, Node.js 20+, PostgreSQL
- Copy the root
.env.exampleto.env:cp .env.example .env
- Update
.envwith your real keys (especiallyGOOGLE_API_KEY).
- Run the stack:
docker-compose up --build
- Access the app:
- Frontend: http://localhost
- Backend API Docs: http://localhost:8000/docs
- Navigate to
backend:cd backend - Create virtual env and install dependencies:
python -m venv venv source venv/bin/activate # or venv\Scripts\activate on Windows pip install -r requirements.txt
- Set up environment variables. You can set
DATABASE_URLdirectly OR set the components:POSTGRES_USER,POSTGRES_PASSWORD,POSTGRES_DB,POSTGRES_SERVER,POSTGRES_PORT
- Run server:
uvicorn app.main:app --reload
- Navigate to
frontend:cd frontend - Install dependencies:
npm install
- Set up
.env(see.env.examplein frontend folder). - Start dev server:
npm run dev
- Linting: A GitHub Actions workflow (
.github/workflows/lint.yml) runs on push to check code quality. - Cleanup: To delete old news (older than 7 days), run:
cd backend python cleanup.py