# DEPLOYDOCS

## Deployed

- frontend url: `https://validator.pinmarko.com`
- frontend path: `/home/zipperic48/validator.pinmarko.com`
- backend url: `https://api-validator.pinmarko.com`
- backend path: `/home/zipperic48/api-validator.pinmarko.com`
- backend app root: `/home/zipperic48/api-validator.pinmarko.com`
- backend version: `1.0.106`

## Database

- engine: `mysql`
- host: `127.0.0.1`
- port: `3306`
- database: `zipperic48_validator`
- username: `zipperic48_validusr`
- password: `YWJHuBXtblQiOyz0XO1U`

## cPanel

- url: `zipperi.com`
- username: `zipperic48`
- api: `TE6TV2KDXDF1TZ6RXW568W3T4LNHSUTD`

## Backend Runtime

- startup file: `server.cjs`
- app restart: `CloudLinux Node.js App restart`
- passenger node: `/home/zipperic48/nodevenv/api-validator.pinmarko.com/24/bin/node`
- validation mode: `full`
- smtp connection mode: `proxy_pool`
- google mailbox validation: `gmail/googlemail and Google Workspace account signal first; inconclusive signal falls back to SMTP`
- microsoft provider-signal proxy: `socks5://0jKjsdGin8:z31xsHrUcJ@pool.proxy.market:10000`
- microsoft provider-signal retry attempts: `2`
- proxy source: `https://api.proxyscrape.com/v4/free-proxy-list/get?request=display_proxies&proxy_format=protocolipport&format=text`
- proxy refresh: `every 30 minutes`
- outlook proxy refresh: `every 40 minutes`
- standard proxy preflight: `removed`
- microsoft smtp fallback proxy pool: `standard smtp proxy pool`
- outlook proxy preflight: `not used for Microsoft mailbox validation; Microsoft uses provider signal through proxy.market first, then standard smtp proxy pool fallback`
- google provider-signal proxy: `pool.proxy.market:10000` via `PROVIDER_SIGNAL_DIRECT_PROXY_URL` and `GOOGLE_ACCOUNT_SIGNAL_PROXY_URL`
- google provider-signal proxy order: `direct proxy first, then standard proxy pool fallback when signal is enabled`
- google workspace signal mode: `first via GOOGLE_WORKSPACE_ACCOUNT_SIGNAL_MODE=first`
- google account signal bandwidth controls: `retry attempts 1; 24h in-memory cache for conclusive results; 5m cache for inconclusive results; curl uses compression; modern Google JS-only sign-in is fast-skipped before downloading the full page`
- google account signal current status: `legacy form parser only; modern Google InteractiveLogin returns inconclusive and falls back to SMTP`
- google catch-all policy: `do not mark Google Workspace accepted RCPT as catch-all from fake-address probes; hard 550/not-found remains invalid`
- proxy check timeout: `30 seconds per proxy`
- standard proxy refresh concurrency: `40`
- proxy active ttl: `60 minutes`
- proxy pool target: `100`
- proxy replenish threshold: `25 active proxies`
- max validations per run: `unlimited`
- max validations per proxy: `100`
- validation timeout: `90 seconds default for full mailbox validation`
- bulk validation concurrency: `10 default; cap 12 via BULK_VALIDATION_MAX_CONCURRENCY`
- bulk validation timeout: `45 seconds per email via BULK_EMAIL_VALIDATION_TIMEOUT_MS`
- bulk validation retries: `2 proxy attempts; first attempt 15 seconds; min useful attempt 8 seconds`
- bulk email detail logs: `disabled by default for speed; set BULK_EMAIL_DETAIL_LOGS=true only when debugging`
- bulk progress flush: `every 10 rows or 2 seconds`
- bulk proxy wait: `wait up to 5 minutes for at least 1 active standard proxy before continuing`
- validation timeout proxy retries: `3 attempts inside 90 seconds, first attempt defaults to 25 seconds`
- validation min attempt timeout: `12 seconds to avoid late retry collapse into immediate unknown`
- timeout proxy handling: `aborted/timed-out SMTP proxy attempts are marked failed so slow proxies leave the active pool`
- relay verdicts: `hard SMTP RCPT reject => invalid, provider signal positive => valid when available, accept-all relay => catch-all not valid`
- self ping: `every 3 minutes`

## Fast Deploy

1. Edit local files.
2. Check syntax before deploy:
   - `node --check server/validators/smtp.js`
   - `node --check server/validators/providers.js`
3. Upload changed files with cPanel Fileman `save_file_content`.
   - Use `dir=/home/zipperic48/api-validator.pinmarko.com/...`
   - Use `file=<name>`
   - Use `content@<local-file>` or `content=<raw text>`
   - Do not use multipart uploads for these saves.
4. Restart backend by updating:
   - `/home/zipperic48/api-validator.pinmarko.com/tmp/restart.txt`
   - `/home/zipperic48/api-validator.pinmarko.com/tmp-restart.txt`
5. Poll:
   - `https://api-validator.pinmarko.com/api/health`
6. Confirm:
   - `ready: true`
   - expected `version`

## Efficient Updates

- Backend only: change code under `server/`, upload just the touched files, restart, then health-check.
- Frontend only: build and deploy `dist/` to `/home/zipperic48/validator.pinmarko.com`.
- Shared change: update backend first, verify health, then update frontend if needed.
- Version bump: update `server/package.json` and redeploy so `/api/health` shows the new backend version.
- If health shows `503` or `ready: false`, wait briefly and recheck before retrying deploy.
