Inspiration

I’ve always seen colleagues “solve” messy storage by resetting their computers because it’s faster than cleaning up: downloads are chaotic, installers pile up, duplicate assets spread everywhere, and nobody wants to risk deleting something important. The real pain isn’t disk space it’s decision fatigue + fear of breaking things**. Doctor Agent was inspired by the idea that file cleanup should feel like a safe medical checkup


What it does

Doctor Agent is a local file organizer that helps you safely clean and reorganize your machine:

  • Multi-folder scan: pick multiple folders and list files with metadata (size, modified date, paths).
  • Diagnosis with local AI (LM Studio): classifies selected files and returns:

    • category, confidence, and a short reason
    • a suggested action: Keep, Quarantine, or Cloud (Google Drive)
  • Safe treatment:

    • Quarantine moves files into a Quarantine/ folder inside each selected root.
    • Cloud uploads to Google Drive and then quarantines the local copy.
  • Review-first UX: the user stays in control and can apply actions file-by-file or in batch.


How I built it

  • Frontend: React + TypeScript

    • Uses the File System Access API to pick folders and move files locally.
    • Shows a “medical” workflow UI: Intake → Diagnose → Apply treatment → Report.
    • Image preview for supported image files.
  • Backend: Fastify + TypeScript

    • /classify builds a strict prompt and calls LM Studio’s OpenAI-compatible API.
    • /drive/upload uploads files to a Google Drive folder (service account), then the frontend quarantines locally.
  • AI: LM Studio local server

    • Runs a local model so classification doesn’t require cloud inference.
  • Deployment approach

    • Frontend is hosted (Vercel).
    • Backend runs locally and is exposed through a VS Code forwarded port, so the hosted UI can talk to the local machine.

Challenges I ran into

  • Model output reliability: local LLMs sometimes return markdown fences, partial JSON, or duplicate outputs. We had to harden the prompt and implement robust JSON extraction/parsing.
  • Latency and UX: local inference can be slow, especially on first load. We had to design the experience so “waiting” feels expected and safe.
  • Cloud upload correctness: handling file names, MIME types, and ensuring the file actually lands in the right Drive folder.
  • Keeping actions safe: moving files is inherently risky; the quarantine design and “review-first” approach were essential.
  • Deployed UI + local services: bridging a hosted frontend to a local backend without ngrok required careful coordination (CORS, forwarded URLs, environment config).

Accomplishments that im proud of

  • Built a real scan → diagnose → treat pipeline that works end-to-end.
  • Integrated local AI (LM Studio) instead of relying on external APIs.
  • Implemented a Cloud + Quarantine workflow that is cautious by default (backup-first behavior).
  • Made multi-folder scanning practical while keeping the UX clean and readable.
  • Produced actionable, explainable output (category + confidence + reason), not just labels.

What I learned

  • The hard part of AI file cleanup isn’t classification—it’s trust and safety.
  • Strict prompting isn’t enough; you need defensive parsing and careful failure modes.

What's next for Doctor Agent - File medicine specialist

  • More reliable structured output: function-calling style schemas or stronger validation + retries.
  • Better treatment plan: “prescriptions” per category (e.g., duplicates, large installers, old downloads).
  • Search + filters: sort by size, age, extension, category, and risk level.
  • Deduplication support: detect duplicates via hashing and suggest safe consolidation.
  • Safer rollback: an “undo” log and restoration from Quarantine.
  • Background operations + progress UI: better loading states and operation-level progress (uploading, diagnosing, moving).
  • Optional cloud providers: Drive today, but expand to Dropbox/OneDrive later.
Share this project:

Updates