Skip to content

Commit a7d35a7

Browse files
committed
Docs: English README as default, remove REPOSITORY_METADATA
- Move full English docs to root README.md; docs/README_EN.md redirects - Update Arabic and cross-doc links; fix diagrams paths to root README - Delete .github/REPOSITORY_METADATA.md (maintainer-only content) Made-with: Cursor
1 parent d5b8826 commit a7d35a7

9 files changed

Lines changed: 246 additions & 327 deletions

File tree

.github/REPOSITORY_METADATA.md

Lines changed: 0 additions & 63 deletions
This file was deleted.

README.md

Lines changed: 233 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,248 @@
1-
# VFS Appointment Bot · بوت مواعيد VFS
1+
# VFS Appointment Bot
22

3-
**English:** Automates checks on **VFS Global** appointment flows (DE / IT / PT) with optional **GPM**, **Playwright**, multi-window runs, and **Telegram / Email / Twilio** alerts.
3+
**Default / English** — This file is the main project documentation.
4+
**العربية:** [التوثيق الكامل بالعربية](docs/README_AR.md)
45

5-
**العربية:** أتمتة التحقق من مواعيد **VFS Global** (ألمانيا / إيطاليا / البرتغال) مع **GPM** و**Playwright** اختياريين، نوافذ متوازية، وإشعارات **Telegram / البريد / Twilio**.
6+
Automates checking (and related flows) on **VFS Global** appointment portals for selected destination countries, with optional **GoLogin Profile Manager (GPM)** integration, **multi-window** runs, and **Telegram / Email / Twilio** notifications.
7+
8+
**Repository:** [github.com/code-root/vfs-appointment-bot](https://github.com/code-root/vfs-appointment-bot)
9+
10+
### GitHub: CI & automation
11+
12+
- **Workflow (Actions):** [`.github/workflows/ci.yml`](.github/workflows/ci.yml) — Python **3.10 / 3.12**, `pip install -r requirements.txt`, `compileall`, and a small import smoke test (no Playwright browser download in CI).
13+
- **Dependabot** (optional): [`.github/dependabot.yml`](.github/dependabot.yml) for `pip` and GitHub Actions updates.
614

715
---
816

9-
## Documentation / التوثيق
17+
### Disclaimer
1018

11-
| Language | Guide |
12-
|----------|--------|
13-
| **English** | **[docs/README_EN.md](docs/README_EN.md)** — full documentation, setup, layout, support |
14-
| **العربية** | **[docs/README_AR.md](docs/README_AR.md)** — الشرح الكامل بالعربية |
19+
Use this software **only in line with VFS Global’s terms of service** and applicable law. The authors are not responsible for misuse, account restrictions, or failed appointments. Credentials and automation are **your responsibility**.
1520

16-
**Repository:** [github.com/code-root/vfs-appointment-bot](https://github.com/code-root/vfs-appointment-bot)
21+
### Features
22+
23+
- **Multi-country flows (destination):** Germany (**DE**), Italy (**IT**), Portugal (**PT**), selected by factory routing in `vfs_bot/vfs_bot_factory.py`.
24+
- **Source country** is an ISO 3166-1 alpha-2 code (e.g. **AE**); **VFS login URLs** are mapped in `config/vfs-url.ini` as `SOURCE-DESTINATION` keys.
25+
- **Playwright** automation with **playwright-stealth**, realistic browser fingerprints, and configurable **Chromium / Firefox / WebKit** via `config/browser.ini`.
26+
- **Optional GPM:** start/stop profiles over HTTP API (`config/gpm.ini`), optional **Selenium** helpers for GPM UI operations.
27+
- **Notifications:** Telegram, Email, Twilio (wired through `notification/notification_client_factory.py`).
28+
- **Parallel windows:** `run_vfs_bot.py` can run multiple threads (each driving its own browser session) until an appointment is found or you stop the process.
29+
- **Profile bookkeeping:** optional GPM group **`VFS_Bot`**, `used_profiles.json`, helpers to populate/reset — see [docs/PROFILE_MANAGEMENT_README.md](docs/PROFILE_MANAGEMENT_README.md).
30+
- **Proxy list support** via `utils/proxy_manager.py` and `proxies.txt` (see `.gitignore` — do not commit secrets).
31+
32+
### Requirements
1733

18-
### Quick links
34+
- **Python 3.8+** (3.10+ recommended for recent dependencies).
35+
- **Playwright browsers:** at least **Chromium**; **Firefox** if `browser.ini` uses `firefox`.
36+
- A valid **VFS Global** account and the correct **portal URL** for your source→destination pair.
37+
- **GPM** (optional): default API base `http://127.0.0.1:14517` (configurable).
1938

20-
| Topic | English | العربية |
21-
|--------|---------|---------|
22-
| Run & install | [docs/README_RUN.md](docs/README_RUN.md) | نفس الملف (عربي داخل المستند) |
23-
| GPM | [docs/README_GPM.md](docs/README_GPM.md) | نفس الملف |
24-
| GitHub push | [docs/GITHUB.md](docs/GITHUB.md) | نفس الملف |
25-
| Repo metadata & CI | [.github/REPOSITORY_METADATA.md](.github/REPOSITORY_METADATA.md) | وصف ووسوم مقترحة + إنجليزي |
26-
| **مخططات العملية** | [docs/diagrams/PROCESS.md](docs/diagrams/PROCESS.md) (Mermaid) | [صورة SVG](docs/diagrams/vfs-journey-overview.svg) — من الإعداد إلى الحجز |
39+
### Python dependencies (`requirements.txt`)
40+
41+
| Package | Purpose |
42+
|---------|---------|
43+
| `playwright` | Browser automation |
44+
| `playwright-stealth` | Stealth patches for Playwright |
45+
| `selenium` | GPM UI / profile workflows where used |
46+
| `twilio` | SMS / Twilio-backed notifications |
47+
| `tqdm` | Progress display in batch scripts |
48+
| `requests` | HTTP (GPM API, health checks) |
49+
50+
Install:
2751

2852
```bash
29-
git clone https://github.com/code-root/vfs-appointment-bot.git
30-
cd vfs-appointment-bot
3153
pip install -r requirements.txt
3254
playwright install chromium
33-
python run_vfs_bot.py
55+
# If using Firefox in config/browser.ini:
56+
playwright install firefox
3457
```
3558

36-
*(Configure `config/` first — see the language-specific guides above.)*
59+
### Quick start
60+
61+
1. **Clone**
62+
63+
```bash
64+
git clone https://github.com/code-root/vfs-appointment-bot.git
65+
cd vfs-appointment-bot
66+
```
67+
68+
2. **Configure `config/`** (all `*.ini` in `config/` are merged — see `utils/config_reader.py`)
69+
70+
- Copy GPM example if needed:
71+
```bash
72+
cp config_gpm_example.ini config/gpm.ini
73+
```
74+
- Create or edit **`config/vfs-credential.ini`**: VFS **email** and **password** (sensitive — listed in `.gitignore`).
75+
- Edit **`config/vfs-url.ini`**: add lines `XX-YY = https://...` where `XX` is source and `YY` is destination (e.g. `AE-PT`).
76+
- Edit **`config/notification.ini`** for Telegram / email / Twilio (sensitive — gitignored in template workflow).
77+
- Optional: **`config/appointment-params.ini`** defaults for `visa_center`, `visa_category`, `visa_sub_category` per country prefix (`DE-`, `IT-`, `PT-`).
78+
- Optional: **`config/browser.ini`**: `type` (`chromium` / `firefox` / `webkit`), `headless`, viewport-related options.
79+
- Optional: **`config/gpm.ini`**: `enabled`, `api_url`, `profile_id`, HTTP paths/methods, `auto_stop`, optional `api_token`, optional `group_name` for profile pools (see profile docs).
80+
81+
3. **Run (recommended entry point)**
82+
83+
```bash
84+
python run_vfs_bot.py
85+
```
86+
87+
On Windows you can use **`run.bat`** (UTF-8, dependency checks, then `python run_vfs_bot.py`). On Linux/macOS, **`run.sh`** runs `python3 run_vfs_bot.py` after basic checks.
88+
89+
4. **Adjust behavior in `run_vfs_bot.py`**
90+
91+
At the top of `main()` you will find:
92+
93+
- `source_country_code`, `destination_country_code`
94+
- `appointment_params` dict (or `None`)
95+
- `max_iterations`, `number_of_windows` (parallel threads)
96+
- Profile age window (**20 minutes** by default) before refreshing context
97+
- Inner check interval (**5 seconds** when `continuous_check=True` in `vfs_bot.run`)
98+
99+
### Alternative CLI: `main.py`
100+
101+
`main.py` provides argparse flags:
102+
103+
- `-sc` / `--source-country-code`
104+
- `-dc` / `--destination-country-code`
105+
- `-ap` / `--appointment-params` as `key=value,key2=value2`
106+
107+
It runs a **single** bot instance in a loop with a countdown between iterations based on `config/default.ini` (`interval`).
108+
**Note:** Run **`main.py` from the repository root** (same folder as `run_vfs_bot.py`). The file prepends the project root to `sys.path` so `utils` and `vfs_bot` import correctly.
109+
110+
### Repository layout (detailed)
111+
112+
#### Entry points and `scripts/` helpers
113+
114+
Run **`scripts/*.py` from the repo root** so `config/` and relative paths resolve.
115+
116+
| Path | Role |
117+
|------|------|
118+
| `run_vfs_bot.py` | Main runner: config validation, logging (UTF-8 on Windows), multi-threaded windows, calls `get_vfs_bot()` and `vfs_bot.run()`. |
119+
| `main.py` | Argparse-based CLI loop; logging to `app.log` + stdout. |
120+
| `scripts/create_gpm_profile.py` | Interactive creation of one GPM profile via `GpmSeleniumClient`. |
121+
| `scripts/create_gpm_profiles.py` | Batch creation (e.g. up to **100** profiles in group **`VFS_Bot`**) — see [docs/PROFILE_MANAGEMENT_README.md](docs/PROFILE_MANAGEMENT_README.md). |
122+
| `scripts/populate_used_profiles.py` | Marks existing profiles in the GPM group as used in `used_profiles.json`. |
123+
| `scripts/reset_used_profiles.py` | Resets used-profile tracking. |
124+
| `scripts/test_gpm_connection.py` | Probes GPM HTTP API (`/api/v3/profiles`, etc.) using `config/gpm.ini`. |
125+
126+
#### Packages
127+
128+
| Path | Role |
129+
|------|------|
130+
| `vfs_bot/vfs_bot.py` | Abstract `VfsBot` base: Playwright lifecycle, stealth, GPM integration hooks, login/appointment pipeline, notifications. |
131+
| `vfs_bot/vfs_bot_de.py` | Germany-specific implementation. |
132+
| `vfs_bot/vfs_bot_it.py` | Italy-specific implementation. |
133+
| `vfs_bot/vfs_bot_pt.py` | Portugal-specific implementation. |
134+
| `vfs_bot/vfs_bot_factory.py` | `get_vfs_bot(source, destination)``UnsupportedCountryError` if destination not DE/IT/PT. |
135+
| `notification/notification_client.py` | Notification abstraction. |
136+
| `notification/telegram_client.py` | Telegram bot API client. |
137+
| `notification/email_client.py` | Email notifications. |
138+
| `notification/twilio_client.py` | Twilio client. |
139+
| `notification/notification_client_factory.py` | `get_notification_client`: channels `telegram`, `email`, and `slack` (in code, `slack` is wired to the Twilio client—use `email` or `telegram` unless you rely on that mapping). |
140+
| `utils/config_reader.py` | Loads every `config/*.ini` plus optional `VFS_BOT_CONFIG_PATH` env override. |
141+
| `utils/config_writer.py` | INI write helpers. |
142+
| `utils/timer.py` | Countdown between checks (used by `main.py`). |
143+
| `utils/gpm_client.py` | HTTP client for GPM profile start/stop and related API usage. |
144+
| `utils/gpm_selenium_client.py` | Selenium-based GPM interactions (profile creation, etc.). |
145+
| `utils/profile_manager.py` | Tracks **used** GPM profiles per group (`used_profiles.json`). |
146+
| `utils/proxy_manager.py` | Proxy rotation / loading from `proxies.txt`. |
147+
| `utils/account_manager.py` | Account-related helpers used by the bot flows. |
148+
| `utils/email_reader.py` | Email reading utilities (e.g. OTP / mail workflows where implemented). |
149+
| `utils/date_utils.py` | Date/time helpers. |
150+
151+
#### `config/` INI files
152+
153+
| File | Section(s) | Purpose |
154+
|------|------------|---------|
155+
| `vfs-credential.ini` | `vfs-credential` | VFS login email/password (**do not commit**). |
156+
| `vfs-url.ini` | `vfs-url` | `SOURCE-DEST = full login URL` mappings. |
157+
| `default.ini` | `default` | `interval` (seconds) for `main.py` loop between attempts. |
158+
| `appointment-params.ini` | `appointment-params` | Default `DE-*`, `IT-*`, `PT-*` visa center/category keys. |
159+
| `browser.ini` | `browser` | Engine type, headless, optional UA/locale/timezone/viewport. |
160+
| `gpm.ini` | `gpm` | GPM toggle, API URL, `profile_id`, HTTP paths, `auto_stop`, optional token, optional `group_name`. |
161+
| `notification.ini` | (per implementation) | Telegram, email, Twilio settings (**do not commit** real secrets). |
162+
163+
#### More documentation (`docs/`)
164+
165+
| File | Content |
166+
|------|---------|
167+
| [docs/README_AR.md](docs/README_AR.md) | **Full documentation in Arabic.** |
168+
| [docs/README_GPM.md](docs/README_GPM.md) | GPM setup, troubleshooting. |
169+
| [docs/README_RUN.md](docs/README_RUN.md) | Run commands (batch/shell vs direct `python`). |
170+
| [docs/PROFILE_MANAGEMENT_README.md](docs/PROFILE_MANAGEMENT_README.md) | GPM group `VFS_Bot`, `used_profiles.json`, batch profiles. |
171+
| [docs/GITHUB.md](docs/GITHUB.md) | Creating the GitHub repo, push, auth, common errors. |
172+
| [docs/diagrams/PROCESS.md](docs/diagrams/PROCESS.md) | **Flowcharts (Mermaid):** config → browser/GPM → VFS login → appointment → slots → notify. |
173+
| [docs/diagrams/vfs-journey-overview.svg](docs/diagrams/vfs-journey-overview.svg) | **Illustrative SVG** (same journey, Arabic + English labels). |
174+
175+
#### Quick reference
176+
177+
| Topic | Link |
178+
|-------|------|
179+
| Run & install | [docs/README_RUN.md](docs/README_RUN.md) |
180+
| GPM | [docs/README_GPM.md](docs/README_GPM.md) |
181+
| GitHub push | [docs/GITHUB.md](docs/GITHUB.md) |
182+
| Process diagrams | [docs/diagrams/PROCESS.md](docs/diagrams/PROCESS.md) |
183+
184+
#### Other tracked / generated artifacts
185+
186+
| Item | Notes |
187+
|------|------|
188+
| `app.log` | Log file from runners; **gitignored**. |
189+
| `used_profiles.json` | GPM profile usage tracker; **gitignored**. |
190+
| `proxies.txt` | Proxy list; **gitignored**. |
191+
| `.env` | Environment variables locally; treat as **secret**. |
192+
| `docs/images/error_email_field_not_found.png` | Debug screenshot path (bot may overwrite). |
193+
| `assets/` | Optional static assets (e.g. README QR images). |
194+
195+
### Supported countries (destination)
196+
197+
| Code | Country |
198+
|------|---------|
199+
| DE | Germany |
200+
| IT | Italy |
201+
| PT | Portugal |
202+
203+
Extend by adding a new `vfs_bot_*.py`, registering it in `vfs_bot_factory.py`, and supplying URLs + appointment parameter handling as required by that VFS site.
204+
205+
### Logging & troubleshooting
206+
207+
- Read **`app.log`** for stack traces and step logs.
208+
- Verify **`config/vfs-url.ini`** key matches your `source_country_code` and `destination_country_code` (e.g. `AE-PT`).
209+
- For GPM: run **`python scripts/test_gpm_connection.py`** and see **[docs/README_GPM.md](docs/README_GPM.md)**.
210+
- Windows: **`run.bat`** sets UTF-8 code page and `PYTHONIOENCODING` for Arabic/Unicode console output.
211+
212+
### Contributing
213+
214+
1. Fork the repository
215+
2. Branch: `git checkout -b feature/your-feature`
216+
3. Commit and push
217+
4. Open a Pull Request
218+
219+
### License
220+
221+
Open source — see repository policy. Use responsibly.
222+
223+
### Acknowledgements
224+
225+
- [Playwright](https://playwright.dev/)
226+
- [GoLogin / GPM](https://gologin.com/) (ecosystem)
227+
- Contributors and issue reporters
228+
229+
---
230+
231+
### Support this project
232+
233+
If this tool is useful to you, optional support helps maintain and improve it. Pick whatever works best for you.
234+
235+
| Channel | How to support |
236+
|--------|----------------|
237+
| **PayPal** | [paypal.me/sofaapi](https://paypal.me/sofaapi) |
238+
| **Binance Pay / UID** | **1138751298** — send from the Binance app (Pay / internal transfer when available). |
239+
| **Binance — deposit (web)** | [Deposit crypto (Binance)](https://www.binance.com/en/my/wallet/account/main/deposit/crypto) — sign in, pick the asset, then select **BSC (BEP20)**. |
240+
| **BSC address (copy)** | `0x94c5005229784d9b7df4e7a7a0c3b25a08fd57bc` |
241+
242+
> **Network:** Use **BSC (BEP-20)** only. This address is for **USDT (BEP-20)** and **BTC on BSC** (Binance-Peg / in-app “BTC” on BSC), matching the Binance deposit screens below. **Do not** send **native Bitcoin (on-chain BTC)**, **ERC-20**, or **NFTs** to this address.
243+
244+
#### Deposit QR codes (scan in Binance or any BSC wallet)
245+
246+
| USDT · BSC | BTC · BSC |
247+
|------------|-----------|
248+
| ![USDT deposit QR — BSC](assets/deposit-usdt-bsc.jpeg) | ![BTC on BSC deposit QR](assets/deposit-btc-bsc.jpeg) |

docs/GITHUB.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# GitHub: إنشاء المستودع والرفع
22

3-
للدليل الكامل: [README_AR.md](README_AR.md) · [README_EN.md](README_EN.md)
3+
للدليل الكامل: [README.md (إنجليزي)](../README.md) · [README_AR.md (عربي)](README_AR.md)
44

55
## إنشاء مستودع جديد
66

docs/PROFILE_MANAGEMENT_README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# إدارة بروفايلات GPM
22

3-
للدليل الكامل: [README_AR.md](README_AR.md) · [README_EN.md](README_EN.md)
3+
للدليل الكامل: [README.md (إنجليزي)](../README.md) · [README_AR.md (عربي)](README_AR.md)
44

55
## نظرة عامة
66

0 commit comments

Comments
 (0)