Skip to content

unicorn_aggregator

Role. Job aggregator #2: a small FastAPI service that pulls jobs from feed providers on a schedule and saves them into the shared job collection.

Stack. Python 3.12, FastAPI, uvicorn, APScheduler, pymongo, requests, BeautifulSoup. Deployed on Railway (railway.toml, Procfile) or in a Dockerfile.

Entry points

  • start.py runs the app with uvicorn on $PORT (default 5000).
  • app/main.py creates the app, registers routers and starts the scheduler.
  • aggregate_jobs.py is a command-line run.
  • python -m app.aggregator.fantastic_jobs runs one provider, with --dry-run.
  • run_project.ps1 and schedule_hourly_task.ps1 are Windows helpers for local runs.

Providers

Chosen with JOB_PROVIDERS (default fantastic):

Provider Module Schedule
Fantastic Jobs app/aggregator/fantastic_jobs.py Hourly
simpleapply, hiring.cafe, builtin app/aggregator/simpleapply_jobs.py Daily

The provider registry is app/aggregator/service.py.

Interfaces

  • GET /api/jobs (filters: source, aggregator, search, limit, offset), GET /api/jobs/{job_id}, POST /api/aggregate, GET /api/providers.
  • GET /admin/dashboard, GET /admin/status, GET /health.

Full list: API catalog.

Data

Writes to MONGODB_DB / MONGODB_COLLECTION. The defaults are smart-apply and jobs. The backend's default database is smart_apply, so the two need the same value to share jobs. See data flows.

The scheduler must run as a single replica.

Documentation and CI

  • README.md is the only document. There is no CLAUDE.md and no CI workflow.
  • output.txt is a sample run log.