JobFlow is a web application designed to help Python developers find job opportunities efficiently while monitoring real-time weather conditions. It scrapes job listings from the official Python Job Board, caches them in a PostgreSQL database to prevent redundant requests, and displays them alongside live weather data.
| Team Member | Responsibilities |
|---|---|
| Şevval | • Database Layer (Repository Pattern Implementation) • Controller Logic • Unit Tests & Code Robustness • Documentation |
| Tuana | • Data Models (DTOs) • Application Entry Point (Main) • Co-development of Database Logic |
| İlayda | • Scraper Service Logic (BeautifulSoup) • Data Parsing & Error Handling |
| Dila | • UI Design & HTML Implementation |
| Nilsu | • Weather Service Integration (OpenWeatherMap API) |
The project follows a strict MVC (Model-View-Controller) architecture and utilizes the Repository Pattern to decouple business logic from data access.
- Design Patterns: Repository Pattern, Dependency Injection.
- Code Quality: The project strictly follows PEP-8 standards and achieves a high Pylint score (9.16/10).
- Robustness: Includes Unit and Integration tests using
unittestandunittest.mock.
JobFlow/
├── controller/ # Flask Blueprints & Route logic
├── database/ # Repository Pattern Implementation
│ ├── irepository/ # Interface (Abstract Base Class)
│ ├── repository/ # Concrete Implementation
│ └── database_manager.py
├── model/ # Data Transfer Objects (JobPosting, WeatherInfo)
├── scraper/ # BeautifulSoup logic for scraping
├── weather_api/ # OpenWeatherMap Service
├── tests/ # Unit and Integration Tests
├── ui/templates/ # HTML Files
├── main.py # Application Entry Point
├── requirements.txt # Dependencies
└── README.md # Documentation
To run this project, you need the following installed on your system:
- Python 3.10+
- PostgreSQL (Local installation or Cloud URL)
- Git
Follow these steps to get the project running on your local machine.
1. Clone the Repository
git clone https://github.com/Sevvalm/JobFlow.git
cd JobFlow
2. Create a Virtual Environment
python -m venv .venv
.venv\Scripts\activate
python3 -m venv .venv
source .venv/bin/activate
3. Install Dependencies
pip install -r requirements.txt
4. Configure Environment Variables
# Flask Configuration
PORT=5000
# Database Configuration (PostgreSQL)
# Ensure you have created a database named 'JobFlowDb' in your Postgres server.
DB_HOST=localhost
DB_NAME=JobFlowDb
DB_USER=postgres
DB_PASS=your_db_password
# Scraper Configuration
JOB_BASE_URL=https://www.python.org
# Weather API Configuration (OpenWeatherMap)
# Get a free key from: https://openweathermap.org/api
WEATHER_API_KEY=your_actual_api_key_here
WEATHER_API_BASE_URL=https://api.openweathermap.org/data/2.5/weather?
- Start the Flask server:
python main.py
- Access the Web Interface:
Open your web browser and navigate to: http://127.0.0.1:5000/ - Manual Data Refresh:
If the database is empty, the app scrapes automatically. To force a database clear and re-scrape:
http://127.0.0.1:5000/scrape
To verify the robustness of the code and ensure all services are working correctly (including Mock tests for offline scenarios), run the following command:
python -m unittest discover tests
Expected Output:
....
----------------------------------------------------------------------
Ran 4 tests in 0.00Xs
OK