Git-ready package of the Job Finder system.
Copy-Item .env.example .env
powershell -ExecutionPolicy Bypass -File .\scripts\start_docker.ps1Open: http://127.0.0.1:5050/
This repo now includes:
render.yaml(free Render blueprint: 1 Postgres + 2 web services).github/workflows/deploy-render.yml(auto deploy onmainpush)
- In Render, create a Blueprint from this GitHub repo.
- Render will create:
job-alert-dbfree Postgresjob-alert-appfree web service for the dashboard/APIjob-alert-discord-botfree web service for Discord commands, queued scans, and notifications
- In Render service settings, copy:
Deploy HookURL- Public app URL (example:
https://job-alert-app.onrender.com)
- In GitHub repo settings, add secrets:
RENDER_DEPLOY_HOOK_URL= Render deploy hook URLRENDER_DISCORD_BOT_DEPLOY_HOOK_URL= Discord bot Render deploy hook URL (recommended)RENDER_PUBLIC_URL= Render app URL (optional but enables health check step)
- In Render service ->
Environment, set values for:
job-alert-appADMIN_API_TOKEN
job-alert-discord-botDISCORD_BOT_TOKENDISCORD_ALERT_CHANNEL_IDDISCORD_ADMIN_ROLE_IDDISCORD_COMMAND_GUILD_IDDISCORD_SYNC_COMMANDS_ON_STARTUP=falseDISCORD_VALIDATE_STARTUP_RESOURCES=falseTELEGRAM_BOT_TOKENTELEGRAM_CHAT_IDEMAIL_PROVIDER=outlook_graphEMAIL_TOOUTLOOK_CLIENT_IDOUTLOOK_TENANT=consumersOUTLOOK_GRAPH_SCOPES=https://graph.microsoft.com/Mail.Send,https://graph.microsoft.com/User.ReadOUTLOOK_TOKEN_CACHE_FILE=.outlook_graph_token_cache.bin
After this, every push to main triggers deploy automatically.
job-alert-app: dashboard, REST API, scheduler, admin fallback APIjob-alert-discord-bot: Discord gateway, queued/job_run, embedded scan worker, notificationsjob-alert-db: shared persistent Postgres database
/job_run no longer runs the scan inline. It creates a queued scan request, replies immediately, and reports the result when processing finishes.
To reduce Discord rate limits on Render restarts, the bot skips slash-command sync and remote channel/guild validation on startup by default.
powershell -ExecutionPolicy Bypass -File .\scripts\setup_local.ps1
powershell -ExecutionPolicy Bypass -File .\scripts\start_local.ps1Open: http://127.0.0.1:5050/
Discord bot health: http://127.0.0.1:5051/health
Discord bot detailed health: http://127.0.0.1:5051/health/details
- Job discovery (ATS + optional board scraping)
- Normalization and dedupe
- Interview probability scoring and ranking
- Scheduler with fixed-time runs + 6-hour interval run
- Dashboard with settings, next scheduled runs, and Excel export
- Persistent queued scan requests with status tracking
- Telegram alerts
- Outlook OAuth (Graph API) email alerts
- Discord alerts for all newly qualified jobs (not only super-priority)
- Discord slash commands to queue scans and manage settings directly from server
- Admin fallback API to trigger scans even if Discord is unavailable
GET /api/healthPOST /api/scan/runGET /api/scan/requests/{request_id}POST /api/admin/scan/runGET /api/admin/scan/requests/{request_id}GET /api/jobs?min_score=70GET /api/analyticsGET /api/scheduler/next-runsGET /api/jobs/export/excel?min_score=70&limit=2000
Set in .env:
EMAIL_PROVIDER=outlook_graph
EMAIL_TO=<receiver_email>
OUTLOOK_CLIENT_ID=<azure_app_client_id>
OUTLOOK_TENANT=consumers
OUTLOOK_GRAPH_SCOPES=https://graph.microsoft.com/Mail.Send,https://graph.microsoft.com/User.Read
OUTLOOK_TOKEN_CACHE_FILE=.outlook_graph_token_cache.bin
TELEGRAM_NOTIFY_ALL_JOBS=true
TELEGRAM_ALERT_MAX_PER_RUN=20
EMAIL_NOTIFY_ALL_JOBS=true
EMAIL_ALERT_MAX_PER_RUN=50For Render deployments, no .env file is committed. Configure these keys in Render Environment.
If Outlook Graph token is missing, the app falls back to SMTP when SMTP settings are present. On free Render, prefer Outlook Graph because outbound SMTP ports are restricted.
One-time auth:
$env:PYTHONPATH='.'
.\.venv\Scripts\python scripts\setup_outlook_graph_auth.pyTest email:
$env:PYTHONPATH='.'
.\.venv\Scripts\python scripts\test_email.py --subject "Email connected" --message "Outlook Graph is working"Set in .env:
DISCORD_BOT_TOKEN=<discord_bot_token>
DISCORD_ALERT_CHANNEL_ID=<channel_id_for_alerts>
DISCORD_ADMIN_ROLE_ID=<optional_admin_role_id>
DISCORD_COMMAND_GUILD_ID=<optional_guild_id_for_fast_command_sync>
DISCORD_ALERT_MAX_PER_RUN=50Bot requirements:
- Invite the bot with
botandapplications.commandsscopes. - Grant
Send Messagespermission in your alert channel. - If you set
DISCORD_ADMIN_ROLE_ID, only members with that role (or server admins) can run settings/scan commands.
After restart, use slash commands in your server:
/job_help/job_run/job_status/job_settings/job_set/job_add/job_remove
/job_run now queues a scan request, acknowledges immediately, and posts the result when complete.
/job_set supports all profile fields. For list fields (roles, locations, skills, scan_times, excluded_companies) use comma-separated values.
If Discord is unavailable, trigger and inspect scans through the API.
Set in .env or Render:
ADMIN_API_TOKEN=<strong_random_secret>Trigger a scan:
curl -X POST https://<your-app>.onrender.com/api/admin/scan/run `
-H "X-Admin-Token: <ADMIN_API_TOKEN>"Cron-friendly trigger when your scheduler only supports GET:
https://<your-app>.onrender.com/api/admin/scan/run?admin_token=<ADMIN_API_TOKEN>
Read request status:
curl https://<your-app>.onrender.com/api/admin/scan/requests/<request_id> `
-H "X-Admin-Token: <ADMIN_API_TOKEN>"- This repo excludes local-only files (
.env,.venv, logs, results, token cache). - The free Render blueprint uses 2 web services and 1 free Postgres database.
job-alert-discord-bot/healthreports both Discord bot health and embedded scan worker health.job-alert-discord-bot/healthis intentionally compact for Render and external cron checks.- Use
job-alert-discord-bot/health/detailswhen you need extra diagnostic fields. - If you get
Not Foundfor a new endpoint, restart from this repository folder or redeploy the Render service. - Detailed instructions are in
run.txt.