Skip to content

CodeByPinar/VisaSlotAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

� VisaSlotAI 🌟

πŸš€ Next-Generation Autonomous Visa Appointment Scraper & Intelligence Dashboard

Track Slots in Real-Time, and Never Miss an Appointment Again.
Built for Automation and Scale.


Python FastAPI React Celery Playwright PostgreSQL Tailwind Redis Docker

VisaSlotAI is a robust, distributed, and high-performance automated system designed to continuously monitor, parse, and alert on visa appointment slot openings. Built with a unified full-stack architecture, it includes a modern "Neon Cyber" dashboard for real-time monitoring.


✨ Key Features

  • πŸ•΅οΈ Stealth Automation: Utilizes Playwright with Stealth plugins to mitigate standard headless browser detections.
  • ⚑ Distributed Task Processing: Powered by Celery and Redis to handle concurrent scraping targets efficiently without blocking the main event loop.
  • πŸ“¦ Unified Pip Package: The entire system operates as a globally installable CLI tool (visa-api, visa-worker, visa-beat).
  • πŸŽ›οΈ Neon Cyber Dashboard: A React-built, internally served Single Page Application (SPA) offering beautiful widgets, real-time analytics, and manual scan triggers.
  • 🌍 Timezone-Aware Logging: Accurate DB event creation locked to Europe/Istanbul (or customizable) regardless of server location.
  • πŸ”” Notification Ready: Built-in architecture designed to be extensible for Telegram, Email, and SMS alerts.

πŸ—οΈ Architecture & Tech Stack

The project operates under a seamless Monolith-like execution but maintains Microservice-like separation of concerns internally.

Backend (/backend)

  • Core API: FastAPI (High-performance async Python web framework).
  • Task Queue: Celery (Workers and Beat scheduler).
  • Message Broker: Redis.
  • Database: PostgreSQL (Accessed via pg8000 & SQLAlchemy ORM).
  • Browser Automation: playwright + playwright-stealth.

Frontend (/frontend)

  • Framework: React (TypeScript).
  • Styling: Tailwind CSS v4.
  • Icons: Lucide-React.
  • Integration: Compiled as static files (npm run build) and injected directly into FastAPI's StaticFiles router. No separate Node.js server required in production!

πŸ“ˆ Dashboard & Widgets

The built-in Cyber Dashboard (accessible at http://localhost:8000 when the API is running) features dynamic widgets:

  1. System Statistics Widget: Real-time display of Total Scans, Active Targets, and System Errors (Bot blocked metrics).
  2. Targets Manager: View currently configured visa endpoints (Country, Visa Type, Target URL).
  3. Live Log Viewer: Scrollable, real-time fetching of PostgreSQL scan logs detailing exactly when slots are found, with timezone-accurate timestamps.
  4. Manual Trigger Control: "Scan Now" buttons to forcefully dispatch Celery worker tasks via the API bypassing the Cron schedule.

οΏ½ Comprehensive Budget & Infrastructure Analysis

VisaSlotAI is engineered for Extreme Cost Efficiency, designed to bypass the exorbitant fees of traditional Scraping-as-a-Service platforms. By leveraging scalable open-source tools and containerization, your operational costs drop to near-zero.

πŸ†š SaaS vs. Self-Hosted Cost Comparison (Monthly)

βš™οΈ Service Component πŸ›‘ Traditional SaaS APIs βœ… VisaSlotAI (Self-Hosted) 🌟 Free-Tier Alternative
Web Scraping / Anti-Bot πŸ”΄ $50 - $200+ 🟒 $0.00 (Local Playwright) Playwright Local
Database (PostgreSQL) πŸ”΄ $15 - $50 🟒 $0.00 (Docker Local) Supabase/Neon (Free Tier)
Task Queue (Redis) πŸ”΄ $10 - $30 🟒 $0.00 (Docker Local) Upstash (Free Tier)
Hosting (Compute) πŸ”΄ $20+ 🟒 $4.00 - $7.00 (VPS) Render/Fly.io (Limited)
Proxies (Optional) πŸ”΄ $20 - $100 🟒 $2.00 - $5.00 (Custom) Free/Shared Proxies
Notifications πŸ”΄ $10+ 🟒 $0.00 (Telegram/SMTP) Telegram Bots
πŸ† TOTAL ESTIMATED πŸŸ₯ $125 - $400+ / mo 🟩 $4.00 - $12.00 / mo 🟩 $0.00 / mo

πŸ—οΈ Recommended Deployment Architectures

Tip

🌱 1. The "Zero-Cost" Hobbyist (Local Machine)

  • πŸ’» Hardware: Your personal computer (Windows/Mac/Linux).
  • πŸ› οΈ Setup: Run visa-api, visa-worker, and visa-beat via terminal. PostgreSQL and Redis via Local Docker.
  • πŸ’Έ Cost: $0.00
  • 🎯 Best for: Part-time monitoring while you work.

Note

πŸš€ 2. The "Budget Cloud" (High Availability)

  • ☁️ Provider: Hetzner (CX11 - €3.79/mo) or DigitalOcean ($4/mo Basic Droplet).
  • βš™οΈ Specs: 1 vCPU, 2GB RAM (Minimum required for Headless Chromium).
  • πŸ› οΈ Setup: Ubuntu 22.04 LTS, Docker Compose for DB/Redis, Systemd or PM2 for CLI.
  • πŸ’Έ Cost: ~$4.00 / month
  • 🎯 Best for: 24/7 continuous monitoring of 5-10 visa targets.

Important

🏒 3. The "Distributed Enterprise" (Massive Scale)

  • 🌐 Provider: AWS, GCP, or Azure.
  • βš™οΈ Specs: Dedicated API Server (ECS/EC2), Managed DBs, Dedicated Redis, Auto-scaling Celery Workers.
  • πŸ›‘οΈ Proxy Pool: Rotating Residential IP Proxies.
  • πŸ’Έ Cost: $50.00+ / month
  • 🎯 Best for: Tracking hundreds of targets across dozens of countries concurrently.

πŸ”Œ Integrations & Extensibility

VisaSlotAI is built with a decoupled architecture, allowing you to easily snap-in additional modules:

  • Telegram Alerts: Create a free Telegram Bot via BotFather. Inject your TELEGRAM_BOT_TOKEN and CHAT_ID into .env to receive instant messages the millisecond a slot opens.
  • Email Notifications: Standard Python smtplib can be configured to use Gmail App Passwords for free email alerts.
  • Discord Webhooks: Easily push JSON payloads to a Discord channel.
  • Custom Proxy Rotation: Connect the Playwright engine to proxy services like Smartproxy or IPRoyal by simply updating the proxy arguments in the base scraper class.

πŸ›‘οΈ Security & Anti-Detect Mechanics

Modern visa appointment websites employ various bot protections. VisaSlotAI currently uses a foundational layer to avoid basic detection:

  1. Playwright Stealth: Injects specific scripts to mask headless browser signatures (e.g., overriding navigator.webdriver).
  2. Configurable Intervals: Configurable Celery Beat intervals ensure the system doesn't spam endpoints, blending in with standard human traffic.

(Note: Advanced WAFs like strict Cloudflare or Datadome configurations may still require additional custom proxy combinations or CAPTCHA solving integrations in future updates.)


�️ Roadmap & Future Features

We are constantly working to improve the resilience and capabilities of VisaSlotAI. Here is what we are planning for upcoming releases:

  • 🧩 Advanced WAF Bypass: Integration with robust solvers (e.g., FlareSolverr) and deeper Datadome evasion techniques.
  • πŸ€– Smart CAPTCHA Solving: Hook-ins for 3rd-party CAPTCHA solving services (2Captcha, AntiCaptcha) or local AI vision models natively.
  • πŸ–±οΈ Humanized Interactions: Implementation of Bezier-curve mouse movements, randomized typing speeds, and natural scrolling algorithms.
  • πŸͺ Session Persistence: Advanced profile management to cache and re-use cookies, avoiding repetitive logins and "new device" security flags.
  • πŸ”„ Smart Proxy Pooling: Built-in architecture to automatically rotate residential/mobile proxies upon rate-limit detection or bans.
  • πŸ“± Expanded Notifications: Direct integrations for SMS (Twilio) and WhatsApp alerts alongside Telegram and Email.

οΏ½πŸš€ Installation & Deployment

VisaSlotAI supports both Local Development and One-Click Cloud Deployments.

☁️ Option 1: One-Click Cloud Deployment (Free Tier)

VisaSlotAI is built with Infrastructure-as-Code (render.yaml) to support free, automated cloud scaling.

  1. Sign up on Render.com
  2. Go to New -> Blueprint
  3. Connect your GitHub repository.
  4. Render will automatically parse the render.yaml file and deploy the App, Postgres DB, Redis, and Background Workers seamlessly.

πŸ’» Option 2: Docker Full-Stack (VPS / Local)

Deploy the entire integrated system using the production Docker Compose manifest:

git clone https://github.com/CodeByPinar/VisaSlotAI.git
cd VisaSlotAI
docker-compose -f docker-compose.prod.yml up -d

πŸ› οΈ Option 3: Developer Setup (Manual)

  1. Prerequisites: Python 3.10+, Node.js v18+, Docker.
  2. Infrastructure:
cd docker
docker-compose up -d

3. Application Installation

Install the project as an editable pip package. This will expose the custom CLI commands globally in your environment.

cd backend
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

pip install -e .
playwright install  # Download the headless browser binaries

4. Compiling the Frontend (Optional - if making UI changes)

cd frontend
npm install
npm run build
# The build output is automatically configured to be read by the backend

πŸ’» Usage & CLI Commands

Because VisaSlotAI is packaged via setup.py, you can manage the entire ecosystem directly from your terminal using simple commands. Make sure your virtual environment is activated.

Start the API & Dashboard

Boots the FastAPI server on port 8000 and serves the React Cyber Dashboard.

visa-api

πŸ‘‰ Visit http://localhost:8000 in your browser.

Start the Scraping Worker

Initializes the Celery worker that executes the Playwright stealth scripts in the background.

visa-worker

Start the Scheduler (Cron)

Initializes Celery Beat, which automatically pushes scan tasks to the worker based on your defined intervals.

visa-beat

βš™οΈ Configuration

Targets are managed via a JSON configuration file located at: backend/app/config/scan_targets.json

Example structure:

[
  {
    "id": "trk_schengen_01",
    "country": "Germany",
    "visa_type": "Schengen - Tourist",
    "url": "https://example-visa-provider.com/appointments",
    "check_interval_minutes": 15
  }
]

⚠️ Legal & Ethical Disclaimer

This software is provided for educational and personal use only. Automated accessing of appointment booking systems may violate the Terms of Service of specific providers (e.g., VFS Global, iDATA, TLScontact). The developers assume no liability for IP bans, account suspensions, or legal repercussions resulting from the use of this software. Please configure reasonable check_interval_minutes to avoid overloading targeted servers.


Built with ❀️ by AI.

About

Next-generation autonomous visa appointment scraper and intelligence dashboard. A self-hosted, distributed system built with FastAPI, React, Playwright, and Celery to track slots in real-time.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors