Web app and APIs that fetch Press Information Bureau (PIB) press releases for a given date, parse article HTML, and produce short text summaries. The repo includes a Vue frontend and two backend implementations (Node/TypeScript and Python/FastAPI) that share the same data source and caching idea.
frontend/— Vue 3 + Vite + TypeScript UI. Seefrontend/package.jsonfor scripts.backend/— Express 5 + TypeScript API. Seebackend/README.md.backend_python/— FastAPI + httpx API. Seebackend_python/README.md.
The root package.json is minimal; install dependencies inside frontend/ and backend/ as documented below.
- Node.js (LTS recommended) and npm — for the frontend and Node backend.
- Python 3.10+ — for the FastAPI backend only.
cd frontend
npm install
npm run devVite serves the app (default URL is usually http://localhost:5173). Build for production with npm run build and preview with npm run preview.
cd backend
npm install
npm run devThe server listens on port 3000 (http://localhost:3000).
cd backend_python
python -m venv .venv
# Windows: .venv\Scripts\activate
# macOS/Linux: source .venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reloadBy default Uvicorn serves at http://127.0.0.1:8000.
| Backend | Docs | Example |
|---|---|---|
| Node | backend/README.md |
GET /api/pib?date=YYYY-MM-DD |
| Python | backend_python/README.md |
GET /articles?date=YYYY-MM-DD |
The frontend calls http://localhost:3000/api/pib (see frontend/src/App.vue). To use the Python service instead, point the client at the FastAPI base URL and adjust the path/query to match /articles, or add a proxy in Vite.
Both backends cache responses for past dates as JSON files under each backend’s cache/ directory. Today’s date is not written to cache so listings stay fresh.