Skip to content

Latest commit

Β 

History

History
122 lines (108 loc) Β· 4.11 KB

File metadata and controls

122 lines (108 loc) Β· 4.11 KB

JobFlow - Python Job Aggregator & Weather Dashboard

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 & Contributions

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)

πŸ— Architecture & Design

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 unittest and unittest.mock.

Project Structure

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 

πŸ›  Prerequisites

To run this project, you need the following installed on your system:

  • Python 3.10+
  • PostgreSQL (Local installation or Cloud URL)
  • Git

βš™οΈ Installation & Setup Guide

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

Windows

python -m venv .venv
.venv\Scripts\activate

macOS

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?

▢️ Running the Application

  1. Start the Flask server:
python main.py
  1. Access the Web Interface:
    Open your web browser and navigate to: http://127.0.0.1:5000/

  2. 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

πŸ§ͺ Running Tests

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