Fastrom/taxpension-tracker-romania
0
# TaxPension Tracker Romania
A web application that scrapes and aggregates latest Romanian news about taxes, fiscality, employment and pension.
## Features
- Scrapes news from multiple Romanian government sources
- Filters for tax and pension related content
- Provides a clean web interface to browse news
- Admin panel to approve/reject articles
- API endpoint for programmatic access
- Responsive design for all devices
## Installation
1. Clone the repository:git clone https://github.com/yourusername/taxpension-tracker.git cd taxpension-tracker
2. Create and activate a virtual environment:python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
3. Install dependencies:pip install -r requirements.txt
4. Set up the database:python backend/app.py
5. Run the application:python backend/app.py
6. Access the web interface at http://localhost:5000
## Configuration
You can configure the following environment variables in a `.env` file:
DATABASEURL=sqlite:///news.db SCRAPESCHEDULE=daily # or 'hourly'
## Running Scrapers
To run the scrapers manually:python backend/scraper.py
Or through the admin interface at http://localhost:5000/admin
## Deployment
For production deployment, it's recommended to use:
1. Gunicorn as the WSGI server:gunicorn -w 4 'backend.app:app'
2. Configure a reverse proxy like Nginx or Apache
3. Set up a cron job for automatic scraping:0 8 * cd /path/to/app && python backend/scraper.py
## API Endpoints
- GET `/api/news` - Get approved news articles
- GET `/api/news?approved=false` - Get pending articles
- GET `/api/search?q=query` - Search news articles
- PATCH `/api/articles/{id}` - Approve/reject an article
- POST `/run-scrapers` - Run all scrapers
## License
MIT LicenseThis implementation provides a complete solution with:
- Backend API using Flask
- Web scraping functionality for Romanian government sites
- Database storage with SQLAlchemy
- Responsive frontend with pagination and search
- Admin interface for content moderation
- Proper documentation and deployment instructions
The application is ready to be deployed and can be extended with additional scrapers as needed. __METADATASTART__ {"repoId":"Fastrom/taxpension-tracker-romania","isNew":false,"userName":"Fastrom"} _METADATAEND___
