Prerequisites
Before installing the Siigo Corprecam Scraper, ensure you have the following installed on your system:- Node.js 18.x or higher
- npm or pnpm package manager
- MySQL 5.7 or higher (for database connectivity)
- Git (for cloning the repository)
This application uses TypeScript and requires Node.js with ESM module support.
Clone the Repository
First, clone the project repository to your local machine:Install Dependencies
Install all required Node.js packages using your preferred package manager:- express (v5.1.0) - Web server framework
- @playwright/test (v1.57.0) - Browser automation
- mysql2 (v3.15.3) - MySQL database client
- @ngrok/ngrok (v1.6.0) - Secure tunnel for webhooks
- dotenv (v17.2.3) - Environment variable management
- cors (v2.8.5) - Cross-origin resource sharing
- typescript (v5.9.3) - TypeScript compiler
Install Playwright Browsers
Playwright requires browser binaries to be installed separately. Run the following command to install Chromium, Firefox, and WebKit:System Dependencies (Linux)
On Linux systems, you may need to install additional system dependencies for Playwright:MySQL Database Setup
The application requires a MySQL database connection. Follow these steps:1. Create a Database
Connect to your MySQL server and create a database (if required by your setup):2. Create a Database User
Create a dedicated user for the application:Replace
corprecam_db, corprecam_user, and your_secure_password with your actual database name, username, and password.Ngrok Setup
The application uses ngrok to expose the local server to the internet for webhook callbacks.1. Create an Ngrok Account
Sign up for a free account at ngrok.com2. Get Your Auth Token
- Log in to your ngrok dashboard
- Navigate to “Your Authtoken” section
- Copy your authtoken
Environment Configuration
Create a.env file in the project root directory. See the Configuration page for detailed information about all required environment variables.
Basic .env template:
Verify Installation
To verify that everything is installed correctly, you can run:Next Steps
Once installation is complete, proceed to:- Configuration - Configure all environment variables
- Running the Application - Start the application in development or production mode
Troubleshooting
Playwright Installation Issues
If Playwright fails to install browsers:MySQL Connection Issues
If you encounter MySQL connection errors:- Verify MySQL is running:
sudo systemctl status mysql - Check your database credentials in
.env - Ensure the database user has proper permissions
- Check if MySQL is listening on the correct port:
netstat -tlnp | grep 3306