A Python-based Budget Document Management System that automates the scraping of budget documents from the Kenya National Treasury and Parliament websites. The application stores document metadata in MongoDB Atlas and provides a user-friendly CustomTkinter interface for searching, viewing, managing, and exporting budget document records to CSV.
# Budget Document Management System
## Project Overview
The Budget Document Management System is a Python desktop application that automatically scrapes public budget documents from the Kenya National Treasury and Parliament of Kenya websites. The application stores document metadata and document links in MongoDB Atlas, allowing users to search, manage, and export the collected information through a user-friendly graphical interface built with CustomTkinter.
**Note:** This application stores only document metadata (title, URL, source, and viewed status). The PDF documents themselves are not downloaded.
---
## Features
- Scrape budget documents from the Kenya National Treasury website.
- Scrape budget documents from the Parliament of Kenya website.
- Store document metadata in MongoDB Atlas.
- Search documents by title.
- Open document links directly in a web browser.
- Mark documents as viewed.
- Delete documents from the database.
- Export document information to a CSV file.
- Display the total number of stored documents.
- Simple and professional graphical user interface using CustomTkinter.
---
## Technologies Used
- Python 3
- CustomTkinter
- MongoDB Atlas
- PyMongo
- BeautifulSoup4
- Requests
- Pandas
---
## Project Structure
```text
End_of_Module_Project/
│
├── database/
│ ├── __init__.py
│ └── mongodb.py
│
├── gui/
│ ├── __init__.py
│ └── dashboard.py
│
├── scraper/
│ ├── __init__.py
│ ├── parliament_scraper.py
│ └── treasury_scraper.py
│
├── exports/
│ └── documents.csv
│
├── config.py
├── export.py
├── main.py
├── requirements.txt
└── README.md
```
---
## How the Application Works
1. The user launches the application.
2. The dashboard loads all saved documents from MongoDB Atlas.
3. Clicking **Scrape Documents** runs both web scrapers.
4. The Parliament scraper collects document links from the Parliament website.
5. The Treasury scraper collects document links from the Treasury website.
6. The collected document metadata is st …