This is a Job Scraper application built with React for the frontend and Flask for the backend. The application allows users to search for job listings by selecting a keyword, and it scrapes job data from a backend API. The data is displayed in a table with links to the company's job listings.
Before setting up the project, make sure you have the following installed on your system:
- Node.js: Download and Install Node.js
- Python: Download and Install Python
- pip: Python package installer (usually installed with Python)
Start by cloning the repository to your local machine:
git clone https://github.com/yourusername/DexiAI-Assignment.git
cd DexiAI-Assignment
The backend is built using Flask and will serve as an API to scrape job listings.
Navigate to the Backend
directory and create a virtual environment:
cd Backend
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
Install the required Python packages using pip
:
pip install -r requirements.txt
Once the dependencies are installed, run the Flask backend:
python app.py
By default, the Flask API will run on http://127.0.0.1:5000/
.
Navigate to the Frontend
directory:
cd ../Frontend
Install the required dependencies:
npm install
Start the React development server:
npm start
The React app will run on http://localhost:3000/
.
Once both the backend and frontend servers are running:
- Open your browser and navigate to
http://localhost:3000/
to access the Job Scraper UI. - The UI will allow you to select a keyword and fetch job listings based on that keyword from the backend.
- Choose a keyword (e.g.,
software-engineer
) from the dropdown. - Click the "Search Jobs" button.
- The job listings will be fetched from the backend and displayed in a table with clickable links to job postings.
DexiAI-Assignment/
│
├── Backend/ # Backend directory containing the Flask API
│ ├── app.py # Flask API for scraping job data
│ ├── requirements.txt # Backend dependencies
│ ├── scraper.py # web scraping logic
│
└── Frontend/ # Frontend directory containing the React app
├── src/
│ ├── App.js # Main React component
│ ├── App.css # Styles for the frontend
│ └── index.js # React entry point
├── package.json # Frontend dependencies
- Make sure that both the frontend and backend are running on different ports to avoid conflicts. React runs by default on
http://localhost:3000/
and Flask on `http://127.0.0.1:5000/
`.
- The backend scraping logic uses lxml and requests to scrape job listings.