src/: Backend source code and API logic.frontend/: Frontend React application.crawler/: Scripts for scraping movie location data.data/: JSON files containing scraped data ready for indexing.deployment/: Deployment configurations and documentation.index_data.py: Script to index JSON data into Solr.run_api.py: Entry point to start the Flask API server, which serves the application.docker-compose.yml: Docker configuration for running Solr.
Create virtual enviornment for python 3.10 or newer and install python dependencies (or be a gigachad and do it globally)
pip install -r requirements.txtMake sure you have node and yarn installed. Go into the frontend dir
cd ./frontendInstall frontend dependencies
yarn installBuild the frontend
yarn buildThis project uses Apache Solr for search functionality. To install Solr and create the movies core, follow one of the options below. Java 11+ is required to be installed.
Option 1: Using Docker (Recommended)
docker-compose up -dOption 2: Manual Installation
Download Solr, extract it, and run the following from the bin directory:
# Windows
.\solr.cmd start
.\solr.cmd create -c movies
# Linux/MacOS
./solr start
./solr create -c moviesOption 3: Using Homebrew (MacOS)
brew install solr
solr start
solr create -c moviesThe Solr admin UI should now be available at http://localhost:8983/solr/.
The repository already contains data that is ready to be indexed in the data directory. This data has been scraped from the following sources:
- movie-locations.com
- cinemapper.com
- TO BE ADDED
Before running the indexer, make sure Solr is running. Then run:
python index_data.pyTo get updated data, run the crawler using
python ./crawler/movielocations_crawler.py
python ./crawler/cinemapper_crawler.pyafter which new data will be available in the temp directory. Move the files from temp to data and run the indexer again.
python run_api.pyThe app will be available at 127.0.0.1:5000 by default
The GitHub Actions workflow automatically sets up Solr, creates the movies core, and indexes data. See deployment/DEPLOYMENT.md for details.
No search results?
curl "http://localhost:8983/solr/movies/select?q=*:*&rows=0"Solr not starting?
- Ensure Java 11+ is installed:
java -version - Check port 8983 is available Sonar Check test