Maverick Docs
Technical Reference

Architecture

Service topology, Celery queues, Docker services, and system diagrams

System Overview

Maverick is a lead-generation and client-management platform for insurance marketing. It processes contacts through a multi-stage pipeline: scraping, filtering, verification, batching, and upload to Email Bison campaigns.

graph TB
    Internet["Internet"]-->|HTTPS :443|Nginx["Nginx<br/>SSL Termination"]
    Nginx-->|:3000|Dashboard["Dashboard<br/>Next.js 14"]
    Nginx-->|:8000|API["API<br/>FastAPI + Uvicorn"]
    Nginx-->|:5555|Flower["Flower<br/>Task Monitor"]
    Nginx-->|:3003|Docs["Docs Site<br/>Fumadocs"]
 
    API-->Redis[("Redis<br/>Message Broker")]
    API-->Supabase[("Supabase<br/>PostgreSQL + Auth")]
 
    Redis-->W1["Scraping Worker<br/>Playwright Browser"]
    Redis-->W2["CSV Processing Worker"]
    Redis-->W3["Filtering Worker"]
    Redis-->W4["Verification Worker<br/>Debounce API"]
    Redis-->W5["Batching + Bison Worker"]
 
    W1-->|CSV files|W2
    W5-->Bison["Email Bison<br/>Campaign Platform"]
 
    API-->Pushgateway["Pushgateway"]-->Prometheus["Prometheus"]-->Grafana["Grafana"]

Docker Services

Production (docker-compose.production.yml)

ServiceContainerPortsDepends OnHealth Check
redismaverick-redis-prod127.0.0.1:6379:6379---Yes
apimaverick-api-prod127.0.0.1:8000:8000redisYes
celery-scrapingmaverick-celery-scraping-prod---redis, apiYes
celery-csvmaverick-celery-csv-prod---redis, apiYes
celery-filteringmaverick-celery-filtering-prod---redis, apiYes
celery-verificationmaverick-celery-verification-prod---redis, apiYes
celery-webhooksmaverick-celery-webhooks-prod---redis, apiYes
celery-reconnectcelery-reconnect-prod---redis, apiYes
celery-reconnect-maintmaverick-celery-reconnect-maint-prod---redis, apiYes
celery-reconnect-2celery-reconnect-2-prod---redis, apiYes
celery-uploadcelery-upload-prod---redis, apiYes
celery-notificationsmaverick-celery-notifications-prod---redis, apiYes
celery-batchingmaverick-celery-batching-prod---redis, apiYes
celery-syncmaverick-celery-sync-prod---redis, apiYes
celery-sync-heavymaverick-celery-sync-heavy-prod---redis, apiYes
celery-audit-heavymaverick-celery-audit-heavy-prod---redis, apiYes
celery-beatmaverick-celery-beat-prod---redis, apiYes
flowermaverick-flower-prod127.0.0.1:5555:5555redis, celery-filtering, celery-verification, celery-batchingYes
pushgatewaymaverick-pushgateway-prod127.0.0.1:9091:9091------
alertmanagermaverick-alertmanager-prod127.0.0.1:9093:9093---Yes
prometheusmaverick-prometheus-prod127.0.0.1:9090:9090api, pushgateway, alertmanagerYes
grafanamaverick-grafana-prod127.0.0.1:4000:3000prometheusYes
node-exportermaverick-node-exporter-prod---------
frontendmaverick-frontend-prod127.0.0.1:3000:3000apiYes
docsmaverick-docs-prod127.0.0.1:3003:3003---Yes
client-portalmaverick-client-portal-prod127.0.0.1:3004:3004---Yes
statusmaverick-status-prod127.0.0.1:3005:3005---Yes
nginxmaverick-nginx-prod80:80, 443:443api, frontend---
certbotmaverick-certbot---------

Worker Configuration (Production):

WorkerQueue(s)ConcurrencyMax Tasks/Child
celery-scrapingscraping325
celery-csvcsv_processing4100
celery-filteringfiltering2100
celery-verificationverification1500
celery-webhookswebhooks,email_bison4200
celery-reconnectreconnect_execute110
celery-reconnect-maintreconnect_maint120
celery-reconnect-2reconnect_ms365110
celery-uploadupload_execute110
celery-notificationsnotifications,email_events4200
celery-batchingbatching,bison_uploads350
celery-syncsync_periodic550
celery-sync-heavysync_heavy120
celery-audit-heavyaudit_heavy120
celery-beatdefault1---
flowerdefault1---

Local (docker-compose.local.yml)

ServiceContainerPortsDepends OnHealth Check
redismaverick-redis-local6379:6379---Yes
apimaverick-api-local8000:8000redisYes
celery-scrapingmaverick-celery-scraping-local---redis, api---
celery-csvmaverick-celery-csv-local---redis, api---
celery-filteringmaverick-celery-filtering-local---redis, api---
celery-verificationmaverick-celery-verification-local---redis, api---
celery-batchingmaverick-celery-batching-local---redis, api---
celery-beatmaverick-celery-beat-local---redis, api---
flowermaverick-flower-local5555:5555redis---
pushgatewaymaverick-pushgateway-local9091:9091------
prometheusmaverick-prometheus-local9090:9090api, pushgatewayYes
grafanamaverick-grafana-local4000:3000prometheusYes
landingmaverick-landing-local3000:3000---Yes
dashboardmaverick-dashboard-local3001:3001apiYes
client-portalmaverick-client-portal-local3004:3004apiYes
docsmaverick-docs-local3003:3003---Yes
statusmaverick-status-local3005:3005------
node-exportermaverick-node-exporter-local---------

Worker Configuration (Local):

WorkerQueue(s)ConcurrencyMax Tasks/Child
celery-scrapingscraping110
celery-csvcsv_processing250
celery-filteringfiltering150
celery-verificationverification225
celery-batchingbatching,email_bison150
celery-beatdefault1---
flowerdefault1---

Celery Queue Architecture

Task Routing

Task PatternQueue
app.workers.tasks.scraping.*scraping
app.workers.tasks.processing.*csv_processing
app.workers.tasks.filtering.*filtering
app.workers.tasks.verification.*verification
app.workers.tasks.batching.*batching
app.services.pipeline_service.*batching
webhook.process_lead_interestednotifications
webhook.process_lead_repliednotifications
webhook.process_email_bouncednotifications
webhook.recover_interest_for_replynotifications
sentiment.*notifications
auto_reply.*notifications
auto_forward.*notifications
app.workers.tasks.webhook_processing.*webhooks
webhook.*webhooks
app.workers.tasks.announcements.*email_bison
app.workers.tasks.email_bison_integration.*bison_uploads
email_bison.upload_batchbison_uploads
email_bison.generate_and_upload_batchesbison_uploads
audit.*audit_heavy
diagnostics.*sync_periodic
billing.*sync_heavy
operating_intake.index.*sync_heavy
operating_intake.promote.*sync_heavy
operating_intake.timeline.*sync_heavy
operating_intake.backfill.*sync_heavy
mcp_workflows.nightly_volume_auditsync_heavy
mcp_workflows.validate_all_tokenssync_periodic
mcp_workflows.*email_bison
email_bison.sync_nowemail_bison
operating_intake.email.*sync_periodic
operating_intake.conversations.*sync_periodic
email_bison.*sync_periodic
analytics.*email_bison
daily_metrics.*sync_periodic
infra_orders.*sync_periodic
infra_disconnect.*sync_periodic
daily_infra_reports.send_disconnected_csvsreconnect_execute
daily_infra_reports.close_reconnect_cohortsreconnect_execute
daily_infra_reports.ingest_expired_snapshotnotifications
daily_infra_reports.*sync_periodic
spam_block.*sync_periodic
bounce_wave.*sync_periodic
slack_operating_intake.*email_bison
verification_maintenance.*sync_periodic
volume_tracking.refresh_failed_sendsemail_bison
volume_tracking.*sync_periodic
reconcile_interested.*sync_periodic
og_portal.*sync_periodic
portal_enrichment.*sync_periodic
weekly_digest.*sync_periodic
app.workers.tasks.daily_metrics.*sync_periodic
daily_audit.*sync_periodic
warmup_health.*sync_periodic
burnt_cohorts.*sync_periodic
ms365_panel_capacity.*sync_periodic
hall_of_fame.weekly_digestnotifications
lead_drought.*sync_periodic
monitoring.*notifications
carrier_scrub.*sync_periodic
reconnect.hourly_reconcilereconnect_maint
reconnect.execute_ms365reconnect_ms365
reconnect.*reconnect_execute
upload.*upload_execute
optionsreconnect_ms365

Autodiscovered Task Modules

  • app.workers.tasks.scraping
  • app.workers.tasks.processing
  • app.workers.tasks.filtering
  • app.workers.tasks.verification
  • app.workers.tasks.batching
  • app.workers.tasks.email_bison_integration
  • app.workers.tasks.carrier_scrub_tasks
  • app.workers.tasks.announcements
  • app.workers.tasks.webhook_processing
  • app.workers.tasks.campaign_sync
  • app.workers.tasks.tag_burnt_accounts
  • app.workers.tasks.quarantine_burnt_accounts
  • app.workers.tasks.sentiment
  • app.workers.tasks.auto_reply
  • app.workers.tasks.auto_forward
  • app.workers.tasks.daily_metrics
  • app.workers.tasks.infra_pipeline_v2
  • app.workers.tasks.infra_reconciler
  • app.workers.tasks.hall_of_fame_backfill
  • app.workers.tasks.hall_of_fame_digest
  • app.workers.tasks.hall_of_fame_rescore
  • app.workers.tasks.master_db_fill
  • app.workers.tasks.daily_infra_reports
  • app.workers.tasks.infra_disconnect
  • app.workers.tasks.spam_block_publisher
  • app.workers.tasks.bounce_storm_watch
  • app.workers.tasks.bounce_wave_watch
  • app.workers.tasks.verification_maintenance
  • app.workers.tasks.task_notifications
  • app.workers.tasks.task_comment_notifications
  • app.workers.tasks.task_slack_cleanup
  • app.workers.tasks.slack_inbound
  • app.workers.tasks.slack_operating_intake
  • app.workers.tasks.slack_event_dedup
  • app.workers.tasks.operating_intake_email
  • app.workers.tasks.operating_intake_conversations
  • app.workers.tasks.operating_intake_index
  • app.workers.tasks.operating_intake_timeline
  • app.workers.tasks.operating_intake_backfill
  • app.workers.tasks.audit_discover
  • app.workers.tasks.audit_ingest_replies
  • app.workers.tasks.audit_ingest_sequence_steps
  • app.workers.tasks.audit_ingest_senders
  • app.workers.tasks.audit_attribute
  • app.workers.tasks.audit_aggregate_rankings
  • app.workers.tasks.audit_generate_recommendations
  • app.workers.tasks.audit_expire_recommendations
  • app.workers.tasks.audit_render_briefings
  • app.workers.tasks.audit_audience
  • app.workers.tasks.audit_reply_timing
  • app.workers.tasks.audit_refresh
  • app.workers.tasks.volume_tracking
  • app.workers.tasks.account_stats_snapshot
  • app.workers.tasks.reconcile_interested_leads
  • app.workers.tasks.og_portal_sync
  • app.workers.tasks.reconnect
  • app.workers.tasks.reconnect_executor
  • app.workers.tasks.upload_executor
  • app.workers.tasks.portal_enrichment
  • app.workers.tasks.billing_audit
  • app.workers.tasks.interested_signal_learner
  • app.workers.tasks.reply_autopilot_learner
  • app.workers.tasks.weekly_client_digest
  • app.workers.tasks.lead_drought_digest
  • app.workers.tasks.daily_audit
  • app.workers.tasks.workspace_diagnostics
  • app.workers.tasks.burnt_cohorts
  • app.workers.tasks.warmup_health
  • app.workers.tasks.infra_order_checkers
  • app.workers.tasks.ms365_panel_capacity
  • app.workers.tasks.mcp_workflows
  • app.workers.tasks.intraday_snapshots
  • app.workers.tasks.window_stats_sync

Beat Schedule (Periodic Tasks)

NameTaskScheduleQueue
operating-intake-gmail-polloperating_intake.email.poll_enabled_accountscrontab(unknown)default
spam-block-rollup-publisherspam_block.publish_rollupscrontab(minute='*')sync_periodic
bounce-storm-watchspam_block.bounce_storm_watchcrontab(minute=35)sync_periodic
bounce-wave-watchbounce_wave.watchcrontab(minute='3,13,23,33,43,53')sync_periodic
infra-orders-scan-onboardings-hourlyinfra_orders.scan_staging_workspacescrontab(minute=20)sync_periodic
infra-orders-warmup-timer-dailyinfra_orders.warmup_timercrontab(hour=6, minute=15)sync_periodic
infra-orders-ramp-executor-dailyinfra_orders.ramp_executorcrontab(hour=7, minute=30)sync_periodic
infra-orders-ramp-reality-check-dailyinfra_orders.ramp_reality_checkcrontab(hour=7, minute=45)sync_periodic
infra-orders-stage-ground-truth-hourlyinfra_orders.stage_ground_truth_checkcrontab(minute=50)sync_periodic
infra-orders-launched-at-sanity-weeklyinfra_orders.launched_at_sanity_checkcrontab(hour=9, minute=0, day_of_week='mon')sync_periodic
infra-orders-matched-ids-drift-nightlyinfra_orders.matched_account_ids_driftcrontab(hour=3, minute=15)sync_periodic
mcp-nightly-volume-auditmcp_workflows.nightly_volume_auditcrontab(hour=2, minute=30)sync_heavy
mcp-validate-all-tokens-nightlymcp_workflows.validate_all_tokenscrontab(hour=3, minute=30)sync_periodic
infra-orders-bison-campaign-active-dailyinfra_orders.bison_campaign_active_checkcrontab(hour=8, minute=15)sync_periodic
infra-orders-onboarding-stage-cascade-hourlyinfra_orders.onboarding_stage_cascadecrontab(minute=53)sync_periodic
infra-orders-adopt-launched-hourlyinfra_orders.adopt_launched_orderscrontab(minute=48)sync_periodic
infra-orders-reconcile-hourlyinfra_orders.reconcile_inventorycrontab(minute=40)sync_periodic
infra-orders-auto-confirm-hourlyinfra_orders.auto_confirm_proposalscrontab(minute=55)sync_periodic
infra-orders-gap-report-dailyinfra_orders.inventory_gap_reportcrontab(hour=8, minute=20)sync_periodic
infra-orders-deletion-queue-digest-dailyinfra_orders.deletion_queue_digestcrontab(hour=8, minute=25)sync_periodic
carrier-scrub-auto-send-dailycarrier_scrub.auto_sendcrontab(hour=6, minute=0)sync_periodic
interested-signal-learner-dailyinterested.signal_learnercrontab(hour=4, minute=45)sync_periodic
reply-autopilot-learner-dailyreply_autopilot.learnercrontab(hour=5, minute=10)sync_periodic
sync-campaigns-hourlyemail_bison.sync_campaigns_allcrontab(minute=15)sync_periodic
sync-accounts-every-4hemail_bison.sync_accounts_allcrontab(minute=25, hour='3,7,11,15,19,23')sync_periodic
classify-sentiment-hourlysentiment.classify_batchcrontab(minute=0)default
hall-of-fame-weekly-digesthall_of_fame.weekly_digestcrontab(hour=15, minute=0, day_of_week='fri')notifications
audit-discover-campaigns-nightlyaudit.discover_campaignscrontab(hour=0, minute=0)audit_heavy
audit-ingest-replies-nightlyaudit.ingest_repliescrontab(hour=0, minute=15)audit_heavy
audit-ingest-sequence-steps-nightlyaudit.ingest_sequence_stepscrontab(hour=0, minute=30)audit_heavy
audit-ingest-senders-nightlyaudit.ingest_senderscrontab(hour=0, minute=45)audit_heavy
audit-attribute-nightlyaudit.attributecrontab(hour=1, minute=0)audit_heavy
audit-aggregate-rankings-nightlyaudit.aggregate_rankingscrontab(hour=1, minute=30)audit_heavy
audit-generate-recommendations-nightlyaudit.generate_recommendationscrontab(hour=2, minute=0)audit_heavy
audit-expire-recommendations-nightlyaudit.expire_recommendationscrontab(hour=2, minute=15)audit_heavy
audit-render-briefings-nightlyaudit.render_briefingscrontab(hour=2, minute=30)audit_heavy
audit-audience-stats-nightlyaudit.audience_statscrontab(hour=3, minute=0)audit_heavy
audit-reply-timing-nightlyaudit.reply_timingcrontab(hour=3, minute=15)audit_heavy
lead-drought-digest-dailylead_drought.send_digestcrontab(hour=7, minute=0)sync_periodic
diagnostics-scandiagnostics.scancrontab(hour=5, minute=15)sync_periodic
daily-audit-rundaily_audit.runcrontab(hour=5, minute=45)sync_periodic
daily-audit-digestdaily_audit.send_digestcrontab(hour=7, minute=15)sync_periodic
billing-audit-dailybilling.audit_dailycrontab(hour=6, minute=0)sync_heavy
billing-monthly-summarybilling.monthly_summarycrontab(hour=6, minute=30, day_of_month=1)sync_heavy
daily-client-metricsdaily_metrics.generate_daily_client_metricscrontab(minute='10,40')sync_periodic
reset-api-counters-dailydaily_metrics.reset_daily_api_counterscrontab(hour=0, minute=1)sync_periodic
daily-revenue-snapshotdaily_metrics.generate_daily_revenue_snapshotcrontab(hour=0, minute=15)sync_periodic
reconcile-daily-revenue-snapshots-hourlydaily_metrics.reconcile_daily_revenue_snapshotscrontab(minute=30)default
cleanup-slack-notifications-weeklydaily_metrics.cleanup_old_slack_notificationscrontab(hour=3, minute=0, day_of_week=0)sync_periodic
refresh-pipeline-stats-cachedaily_metrics.refresh_pipeline_stats_cachecrontab(minute=0)sync_periodic
sync-daily-statsemail_bison.sync_daily_statscrontab(minute='5,35')sync_periodic
sync-window-stats-hourlyemail_bison.sync_window_statscrontab(minute=22)email_bison
snapshot-account-daily-statsemail_bison.snapshot_account_daily_statscrontab(hour=0, minute=10)sync_periodic
daily-infra-disconnected-reportdaily_infra_reports.send_disconnected_csvscrontab(minute=5)reconnect_execute
reconnect-cohort-closeoutdaily_infra_reports.close_reconnect_cohortscrontab(minute=25)reconnect_execute
reconnect-expired-ingestdaily_infra_reports.ingest_expired_snapshotcrontab(minute=15)notifications
infra-launch-ready-alert-dailydaily_infra_reports.launch_ready_alertcrontab(hour=8, minute=10)sync_periodic
infra-disconnect-subscription-driftinfra_disconnect.normalize_webhook_subscriptionscrontab(hour=9, minute=30, day_of_week=1)default
infra-disconnect-spike-watchinfra_disconnect.spike_watchcrontab(minute='*/15')sync_periodic
infra-send-failure-spike-watchinfra_disconnect.send_failure_spike_watchcrontab(minute='*/15')sync_periodic
poll-scheduled-volume-hourlyvolume_tracking.poll_scheduledcrontab(minute=0)sync_periodic
finalize-daily-volumevolume_tracking.finalize_dailycrontab(hour=0, minute=20)sync_periodic
reconcile-finalize-volume-hourlyvolume_tracking.reconcile_finalizecrontab(minute=50)default
portal-enrichment-nightlyportal_enrichment.enrich_portal_lead_contactscrontab(hour=4, minute=10)default
reconcile-interested-leads-15minreconcile_interested.from_bisoncrontab(minute='5,20,35,50')default
report-queue-depthsdaily_metrics.report_queue_depthscrontab(unknown)notifications
alert-failing-sync-tasks-every-30mdaily_metrics.alert_failing_sync_taskscrontab(minute='*/30')notifications
kpi-pipeline-freshness-watch-every-30mdaily_metrics.kpi_pipeline_freshness_watchcrontab(minute='10,40')notifications
beat-heartbeat-every-minutemonitoring.beat_heartbeatcrontab(unknown)notifications
purge-slack-event-dedupslack_event_dedup.purgecrontab(unknown)email_bison
weekly-client-lead-digestweekly_digest.send_lead_digestscrontab(hour=17, minute=0, day_of_week=5)sync_periodic
slack-operating-intake-sweeper-10mslack_operating_intake.sweep_recent_historycrontab(minute='*/10')email_bison
slack-operating-intake-discovery-30mslack_operating_intake.discover_channelscrontab(minute='*/30')email_bison
slack-operating-intake-private-membership-4hslack_operating_intake.sweep_private_membershipcrontab(minute=17, hour='*/4')email_bison
slack-operating-intake-coverage-hourlyslack_operating_intake.audit_coveragecrontab(minute=23)email_bison
slack-operating-intake-digest-15mslack_operating_intake.digest_recent_threadscrontab(minute='*/15')email_bison
slack-operating-intake-brain-writeback-30mslack_operating_intake.queue_brain_writebackscrontab(minute='7,37')email_bison
operating-intake-queue-maintenance-weeklyoperating_intake.timeline.queue_maintenancecrontab(minute=0, hour=12, day_of_week='mon')sync_heavy
operating-intake-promote-client-events-weeklyoperating_intake.timeline.promote_client_eventscrontab(minute=30, hour=12, day_of_week='mon')sync_heavy
operating-intake-backfill-controlleroperating_intake.backfill.tickcrontab(minute='*/10')sync_heavy
burnt-cohorts-mark-expired-hourlyburnt_cohorts.mark_expired_clockcrontab(minute=35)sync_periodic
warmup-health-scan-mon-thuwarmup_health.scan_nowcrontab(hour=6, minute=0, day_of_week='mon,thu')sync_periodic
ms365-panel-capacity-sweepms365_panel_capacity.sweep_nowcrontab(hour=5, minute=30)sync_periodic
og-portal-bison-key-sweepog_portal.sync_bison_keyscrontab(hour=5, minute=45)sync_periodic
analytics-intraday-snapshotanalytics.intraday_snapshotcrontab(minute='12,42')email_bison

Worker Defaults

SettingValue
task_soft_time_limit21600
task_time_limit28800
worker_prefetch_multiplier1
worker_max_tasks_per_child50

Contact Pipeline

The core business process: acquire contacts, clean them, and upload to campaigns.

graph LR
    XD["Xpressdocs<br/>X-Dates Platform"]-->|"Playwright<br/>scraping queue"|Raw[("raw_contacts")]
    Raw-->|"csv_processing queue"|Parsed["Parsed + Inserted"]
    Parsed-->|"filtering queue"|Filtered[("filtered_contacts")]
    Filtered-->|"verification queue<br/>Debounce API"|Verified[("verified_contacts")]
    Verified-->|"batching queue"|Batches[("contact_batches")]
    Batches-->|"email_bison queue"|Bison["Email Bison<br/>Campaigns"]

Each stage is a separate Celery queue with dedicated workers. Stages communicate via database tables (not direct task chaining), so any stage can be re-run independently.

Port Map

ServiceContainer PortHost PortEnvironment
API8000127.0.0.1:8000production
Dashboard3000127.0.0.1:3000production
Beta API8000127.0.0.1:8001beta
Beta Dashboard3001127.0.0.1:3002beta
Docs Site3003127.0.0.1:3003production
Redis6379127.0.0.1:6379shared
Flower5555127.0.0.1:5555production
Grafana3000127.0.0.1:4000production
Prometheus9090127.0.0.1:9090production
Pushgateway9091127.0.0.1:9091production

On this page