Prerequisites
- Python 3.8 or higher - Required for the Flask backend
- Node.js 18+ and npm - Required for the React frontend
- Git - For cloning the repository
We recommend using a Python virtual environment to avoid dependency conflicts.
Installation Steps
Set up the backend
Navigate to the backend directory and create a Python virtual environment:Activate the virtual environment:Install Python dependencies:The backend uses the following key dependencies:
- Flask - Web framework
- Flask-CORS - Cross-Origin Resource Sharing support
- BeautifulSoup4 - HTML parsing for web scraping
- cloudscraper - Cloudflare bypass for stable data extraction
- adblockparser - Ad blocking functionality
- pytest - Testing framework
Set up the frontend
Navigate to the frontend project directory:Install Node.js dependencies:The frontend uses:
- React 18.3 - UI framework
- Vite 5.4 - Fast build tool and dev server
- TailwindCSS - Utility-first CSS framework
- React Router DOM - Client-side routing
- TanStack Query - Data fetching and caching
- Lucide React - Icon library
Start the development servers
You’ll need to run both the backend and frontend servers simultaneously.Terminal 1 - Backend:The backend will start on port 1234.Terminal 2 - Frontend:The frontend development server will start on port 5173 (or the next available port).
Project Structure
Development Workflow
Running Tests
Backend tests:Building for Production
Build the frontend:frontend/project/dist/.
Preview Production Build
Environment Configuration
The application configuration is managed inbackend/config.py:
- APP_VERSION: Current application version (1.4.8)
- BASE_URL: Target scraping URL (sololatino.net)
- TARGET_URLS: List of content sections and streaming services
The frontend automatically detects the server IP. No additional environment variables are required for basic local development.
Troubleshooting
Port 1234 is already in use
Port 1234 is already in use
If port 1234 is already occupied, you can modify the port in
backend/app.py or stop the conflicting process:CORS errors in browser
CORS errors in browser
Make sure Flask-CORS is properly installed and configured. The backend should automatically allow requests from the Vite dev server.
Module not found errors (Python)
Module not found errors (Python)
Ensure your virtual environment is activated and all dependencies are installed:
npm install fails
npm install fails
Try clearing the npm cache and reinstalling:
Next Steps
Docker Deployment
Deploy using Docker and docker-compose
CasaOS Deployment
Deploy to CasaOS for home server setup