A Python web application for tracking and displaying IKEA product stock levels across Hong Kong and Macau stores.
- Real-time stock checking for IKEA products
- Web interface for easy access to stock information
- Product information stored in CSV format
- Automatic product image management
- 4-hour cache for stock data to reduce API load
.
├── web_app.py # Flask web application
├── stock_checker.py # Stock checking functionality
├── config.py # Configuration settings
├── ikea_products.csv # Product database
├── ikea_products_with_images.csv # Product database with image information
├── templates/ # HTML templates
│ └── index.html # Main web interface
├── static/ # Static assets
│ └── product_images/ # Product images
└── requirements.txt # Project dependencies
- Clone the repository
- Install dependencies:
pip install -r requirements.txt
- Set up your Firecrawl API key in
config.py
Start the web application:
python web_app.py
The web interface will be available at http://localhost:5000
Stock levels are tracked for the following locations:
- Warehouse
- Causeway Bay
- Kowloon Bay
- Macau Taipa
- Shatin
- Tsuen Wan
- Stock data is cached for 4 hours to reduce API load
- Cache is automatically refreshed when expired
- Prices are displayed in HKD with proper formatting
- Handles various price formats including those with commas
- Product images are stored locally
- Automatic symbolic link creation for serving images through Flask
- Built with Flask web framework
- Uses Firecrawl API for stock checking
- CSV-based product database for simplicity and portability
- Implements error handling and rate limiting
- Asynchronous stock checking capabilities
The application includes:
- Graceful handling of API failures
- Cache management for reliability
- Proper error messages for various scenarios
- Fallback mechanisms for missing data