Project Catalog

AI-Powered Political File Management System

Role: Full-Stack Software Engineer (Solo Founder & Developer)
Duration: 13+ months (July 2025 – Present, actively maintained)
Team: Solo Project
Status: In Production — Actively Maintained

Problem

During the 2024 election cycle, designers and account managers were losing 1–5 minutes per file search in Dropbox, adding up to hours of lost time per week across hundreds of daily requests. The root issue wasn't search speed — it was that Dropbox can only match file names and exact keywords, so there was no way to find past creative work by theme, message, candidate, or visual concept. Institutional creative knowledge was effectively locked away in folder hierarchies.

Approach

I designed and built a full-stack AI document intelligence platform, purpose-built for political campaign materials, from the ground up:

  • Multimodal AI analysis pipeline using Claude to read and understand mailers, digital ads, handouts, and posters — extracting structured campaign data like client/opponent names, election year, messaging strategy (attack, comparison, endorsement, GOTV), tone, and calls to action, not just OCR text.
  • Hybrid semantic search combining OpenAI vector embeddings (via pgvector) with PostgreSQL full-text search, so users can query in plain language — "healthcare attack mailers" or "2024 GOTV postcards" — and get relevance-ranked results.
  • Custom political taxonomy engine that automatically classifies and cross-references documents by category, subcategory, and canonical terms specific to campaign work.
  • Automated Dropbox ingestion — a scheduled job polls Dropbox on a cursor-based incremental sync, deduplicates by content hash, and queues new files for processing automatically, so the team's existing file habits didn't have to change.
  • Asynchronous processing architecture with Celery and Redis so uploads, OCR, and AI analysis run in the background without blocking the app.
  • Deployed as four coordinated services on Render (below), backed by managed PostgreSQL and Backblaze B2 (S3-compatible) object storage.

Shipped and iterated solo over 260+ commits, driven by real feedback from designers and account managers using it in live campaign cycles.

Architecture

Dropbox (source files)
   │  polled every 10 min, incremental cursor + content-hash dedup
   ▼
Dropbox Ingest (Render cron job)
   │  downloads new/changed files → writes to storage → queues DB record
   ▼
Backblaze B2 (object storage)  +  PostgreSQL (document metadata, status: QUEUED)
   │
   ▼
Celery Worker (Render background service) ◄──► Redis (task queue)
   │  OCR + AI analysis
   ├──► Anthropic Claude API   (document understanding, OCR, campaign field extraction)
   └──► OpenAI API             (vector embeddings)
   │
   ▼
PostgreSQL + pgvector  (full-text index + semantic vectors, status: PROCESSED)
   │
   ▼
FastAPI Web App (Render web service)
   │  hybrid search, taxonomy filtering, admin dashboard
   ▼
Designers & Account Managers (natural-language search)

Key Technical Challenges

  • Cache invalidation bug tanking search performance. After shipping document deletion, search latency spiked to 15 seconds on a database of only 350 documents. Root cause: deletions weren't invalidating the Redis search cache, so queries kept scanning stale, bloated result sets. Fixed by wiring cache invalidation into the delete path — search returned to sub-second.
  • Session middleware failing silently in production. Starlette's built-in SessionMiddleware would intermittently fail to install on Render, breaking authentication with no clear error. Replaced it with a custom Redis-backed session layer, giving reliable, horizontally-scalable session state instead of depending on in-process middleware behavior.
  • Scaling search past prototype size. As the catalog grew toward 10,000 documents, naive queries started to degrade. Optimized with targeted GIN indexes for full-text search, tuned pgvector indexing for embedding lookups, and query-result caching — keeping search fast within the constraints of a single-CPU, 2GB Render instance.

Outcome

Cut file discovery time from 1–5 minutes to near-instant, giving designers a way to mine past campaigns for creative inspiration by theme or concept — not just file name — and letting account managers fulfill client requests in seconds instead of navigating folder trees by hand.

< 2 sec
Average Search Time
Hours / week
Time Saved for the Team
Natural Language
Query Method