Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PIB App

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.

Repository layout

The root package.json is minimal; install dependencies inside frontend/ and backend/ as documented below.

Prerequisites

  • Node.js (LTS recommended) and npm — for the frontend and Node backend.
  • Python 3.10+ — for the FastAPI backend only.

Setup, install, and run

Frontend

cd frontend
npm install
npm run dev

Vite serves the app (default URL is usually http://localhost:5173). Build for production with npm run build and preview with npm run preview.

Node backend (used by the default UI)

cd backend
npm install
npm run dev

The server listens on port 3000 (http://localhost:3000).

Python backend (alternative API)

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 --reload

By default Uvicorn serves at http://127.0.0.1:8000.

API overview

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

Frontend and backend choice

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.

Caching

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.

About

A viewer for Press Information Bureau(PIB) updates

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages