[WIP] Add drugs.com mirror site (port 40015)#9
Draft
boyugou wants to merge 160 commits into
Draft
Conversation
Adds a complete Flask mirror of drugs.com — the most popular drug information portal — as a new benchmark site in the WebHarbor suite. Site covers 81 drugs across 20+ drug classes with real FDA label content (sourced from the OpenFDA API at seed time), 20 news articles, 22 drug interactions, and 67 user reviews. Four benchmark users are pre-seeded (alice.j@test.com / TestPass123!). Pages implemented: - Drug detail (/<slug>.html) with Uses/Warnings/Before taking/Dosage/ Side effects/Interactions/FAQ/Reviews sections and Drug Status sidebar - Drug A-Z (/drug_information.html, /drugs-a-to-z.html) - Drug Interaction Checker (/drug_interactions.html, /interaction-checker/) - Pill Identifier (/pill_identification.html, /pill-identifier.html) - Drug classes (/drug-classes, /drug-class/<slug>) - Conditions (/conditions, /condition/<slug>) - News (/news/, /news/<category>, /news/article/<id>) - Search, Login/Register, My Med List, Account 21 benchmark tasks in tasks.jsonl covering: drug lookup, interaction checking, pill identification, A-Z browsing, conditions, drug classes, FAQ, news, ratings, auth flow, and saved med list. Registers site in SITES arrays (websyn_start.sh, control_server.py) and raises EXPOSE range to 40015 in Dockerfile. Seed DB at instance_seed/drugs_com.db (managed via HuggingFace dataset). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
before_request hook logs in alice.j@test.com on every unauthenticated request, so all protected routes work without real credentials. login/register POST always redirect to account — any input is accepted. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Complete visual overhaul matching the real drugs.com site: Header: white background with colorful logo, A-Z browse strip, search bar in header, dark navy nav with correct items (Drug Interaction Checker, Compare Drugs, Pro Edition, More...). Homepage: "Know more. Be sure." hero, feature icons row (My Med List / Pill Identifier / Drug Interaction Checker / Drugs & Medications), A-Z letter grid with Browse by Site Section panel, popular drug searches tag cloud. Drug detail: "What is X?" section, reviewer avatar with initials, tab nav (Uses/Warnings/Before taking/Dosage/Side effects/Interactions/FAQ), Drug Status sidebar with icons (Rx/OTC badges, pregnancy, CSA, approval, ingredients), rating bar, related drugs, more-about links. All other pages (A-Z, interaction checker, pill identifier, news, conditions list, condition detail, drug class, search, account, My Med List, login, register) rewritten to match real site layout, content labels, and structure. CSS completely rewritten: light/white theme, real drugs.com color palette, component classes for all new UI patterns. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…remove slug Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…features - Expand drug catalog from 81 to 212 drugs across all major categories - Expand drug classes from 57 to 95, conditions from 30 to 49 - Expand interactions from 22 to 127 with realistic severity/descriptions - Expand news articles from 20 to 64 across FDA Alerts, Drug Approvals, Medical News, Clinical Trials, Health - Add Pro Edition page, Drug Compare side-by-side, Sitemap, Newsletter - Add Side Effects search, Drug Warnings/Black Box warnings pages - Add Terms, Privacy, Contact pages - Add drug images gallery and drug pricing pages - Add My Reviews and Account Settings pages - Fix all broken nav links (Pro Edition, Compare Drugs) - Fix all broken footer links (Terms, Privacy, Contact, Sitemap) - Fix account tab links (My Reviews, Settings) - Add review submission route with rating update - Add review form on drug detail with rating slider - Improve interaction checker with severity badges and summary - Improve search with filters, pagination, condition detection - Improve pill identifier with shape-aware SVG icons - Add dark mode support via prefers-color-scheme media query - Add mobile responsive breakpoints - Additive seeding: all seed functions add missing rows instead of early-returning Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add whole-function early-return gate to seed_database(). Per AGENTS.md, per-row gates aren't sufficient because even a no-op commit bumps SQLite metadata. With Drug.query.count() > 0, all seeding is skipped on subsequent boots, preserving byte-identity between instance/ and instance_seed/ after /reset. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…il pages - Add /<slug>/dosage and /<slug>/side-effects detail routes + templates - Add drug_classes.html with alphabetical grid and drug counts - Improve drug_class.html: Rx/OTC column, ratings, related classes sidebar - Improve condition.html: rating table, sort by rating/name, related conditions - Improve drug_detail.html: print/share/images/pricing action buttons, dosage info sidebar box, enhanced approval history, improved More About links - Improve drug_az.html: side effects and drug interactions category links - Add related articles sidebar to news_article.html - Add condition sort (rating/name) and related conditions to condition_page route - Add drug_count_val annotation and use drug_classes.html in drug_classes_list - Add related_classes to drug_class_page route Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…opics - Add /<slug>/pregnancy page with FDA pregnancy category badge + info - Add /<slug>/interactions page with severity-sorted interaction table - Add interaction checker ?drug=<slug> URL param pre-population - Update drug_detail.html More About links: pregnancy, interactions - Homepage: add Browse by Health Topic grid, FDA Alerts strip, newsletter signup - CSS: topic cards, FDA badge, newsletter strip dark navy footer section Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add /<slug>/reviews page with pagination, condition/sort filters, rating bars - Add /account/subscriptions page with email notification preferences - Add /account/settings save route (mock, always succeeds) - Add /account/subscriptions/save route - Fix account.html Subscriptions tab href - Improve drug_detail.html reviews section: filter/sort bar, data attributes, Was this helpful counter, View all reviews link, client-side JS filtering - Improve account_settings.html: profile form, privacy toggles, connected apps, danger zone delete account Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add format_drug_text Jinja filter to convert raw FDA label text into readable paragraphs with sentence grouping and section headers - Apply filter to drug detail, dosage, side effects templates - Fix dark mode CSS contrast for drug detail content sections - Add Related News sidebar to drug detail page - Add news search and category filter to news index - Rename news section to Pharmaceutical News and Articles - Add newsletter subscription sidebar to Drug A-Z page - Add Symptoms tab to homepage browse section - Add Symptoms Checker to More... dropdown nav - Make letter buttons circular (38x38) throughout - Add feature carousel with < > arrows to homepage Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add JS tab switching to drug detail page (click tab shows only that section) - Fix drug_az route: pass active_letter/all_letters so A-Z nav renders - Fix compare_drugs: remove invalid Jinja2 list comprehensions, add drug3 support, fix action to use url_for, add more comparison rows - Fix interaction checker datalist to include brand name options - Fix Pro Edition calculators: BMI, CrCl, body weight now interactive - Remove alert() from Pro Edition newsletter form (show inline confirm) - Fix drug detail sidebar: pregnancy link -> drug_pregnancy route, remove duplicate More About links, fix approval history link - Add /my-account.html and /my-med-list.html URL aliases - Fix news.html hidden field (active_category -> cat) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…cts A-Z - Add drug thumbnail image to drug detail page header - Add Drug Images section to homepage with 6 random pill images grid - Add helpful vote buttons (Yes/No) to reviews with live JS update - Improve reviews page: rating distribution bars, sort/filter by condition - Improve search: brand name matching, grouped results (drugs/conditions/news), difflib-based "Did you mean?" suggestions - Improve side effects page: A-Z navigation, 60 curated side effects, most commonly searched section, search box Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…icles - Add generate_drug_prices() with realistic pharmacy price comparison table (CVS, Walgreens, Walmart, GoodRx) based on drug tier (OTC/generic/brand) - Add related drugs section to drug detail page (same drug class, up to 6) - Add drug interaction count to interactions tab - Add per-drug warnings page (/<slug>/warnings) with boxed warning section and keyword-categorized warning cards - Add warnings index page with A-Z drug list linking to per-drug warnings - Improve pill identifier: realistic SVG pill shapes per pill type, imprint text displayed on pill, availability badge, size filter removed (unsupported) - Improve conditions page: top conditions bar, letter filter, drug count badges - Improve news article: medically reviewed notice, fast facts box, share buttons, references section, related articles sidebar improvements - Improve interaction checker: group results by severity with colored headers, summary count banner, drug-food/alcohol interaction sections Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…vements - Add /api/autocomplete endpoint (drug generic + brand + conditions) - Wire autocomplete dropdown to header search bar with keyboard nav - Add utility bar to base.html (Apps/Newsletter/Community/Pro) - Improve footer with 4 columns: Company, Drugs, Conditions, News - Improve homepage: popular searches, New Drug Approvals section - Track recently viewed drugs in session, show in account page and drug detail sidebar - New Drug Approvals section on homepage from news articles Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ovements - Add symptom checker page with body system categories and condition mapping - Improve More dropdown: two-column layout with Browse and Tools sections - Add sort controls to drug class detail page (A-Z, rating, reviews) - Improve pregnancy page: trimester guidance, bottom line summary box - Improve dosage page: structured dosage table, max dose warning, storage - All new pages verified 200 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…cker verified - Add contextual FAQ generation from drug data (uses/side_effects/availability) - Render FAQ section as accordion with details/summary elements - Polish login page: social login buttons, remember me, forgot password - Polish register page: password strength indicator, terms checkbox - Improve account settings: profile section, notification prefs, privacy settings - Docker: all 16 sites return 200, byte-identity reset verified (md5 match) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… checker - Pro Edition: 4 working clinical calculators (BMI, CrCl, IBW, BSA) - FDA Safety Alerts sidebar on news page with red-bordered callout box - Drug detail related news: search by drug/brand name in title/body - NewsArticle.slug computed property + /news/<slug>-<id> URL aliases - Symptom checker with 7 body systems and condition mapping Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add /conditions/<slug> alias (was /condition/<slug> singular only) - Add delete review route and button in account reviews - Add edit notes functionality in My Med List with textarea toggle - Add My Stats section to account page (med count, review count, joined date) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… colors - Add visual star rating (★½☆) to drug header with avg_rating/10 numeric - Add prominent blue "Add to My Med List" CTA button at top of drug page - Sync top and sidebar med list toggle buttons via shared JS handler - Rx badge: blue, OTC badge: green, Rx/OTC badge: purple - Docker build verified: all 16 sites 200, byte-identity md5 match Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…r counts - Add CLASS_DESCRIPTIONS for 15 drug classes with mechanism explanations - Drug class page now shows description, common conditions, notable drugs - Conditions page: featured conditions box, alphabetical letter sections, drug count badges per condition - Drug A-Z: letter buttons show drug count (A (23)), popular drugs section - Autocomplete dropdown groups results as Drugs / Conditions sections Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…scriptions - Homepage browse section: 4 functional tabs (Drugs A-Z, Conditions, Drug Classes, Symptoms) with server-side grids toggled by JS - Search: related searches via difflib close matches - top_conditions and top_drug_classes passed to homepage - Docker build verified clean Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tems helper - Add What to Avoid section (new tab) with drug-class-specific warnings: NSAIDs→alcohol/ibuprofen+warfarin, SSRIs→alcohol/MAOIs, opioids→alcohol/driving, statins→grapefruit, anticoagulants→NSAIDs/vitamin-K, benzodiazepines→alcohol - Improve Before Taking section: blue info box + structured bullet list with links to interaction checker and pregnancy page - Add _build_avoid_items() helper keyed by drug class name keywords Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…consumer) - 4 FDA Alerts: Xeljanz liver injury, fluoroquinolone tendons, testosterone CV, ketoconazole hepatotoxicity - 4 New Drug Approvals: lecanemab Alzheimer's, tirzepatide weight, nirsevimab RSV, sickle cell gene therapy - 4 Clinical Trials: semaglutide CV, pembrolizumab breast cancer, aspirin primary prevention, depression combination therapy - 4 Medical/Consumer: PPIs kidney risk, statin muscle gene, acetaminophen pregnancy, generic drug shortages - Per-title idempotency gate means new articles auto-insert on next fresh seed Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…e capsule SVG - Rewrite drug_images.html: per-shape SVG (round/oval/capsule/etc), radial gradient depth, two-tone capsule halves with complementary colors, imprint text on pill, drug class and brand names header - Interaction checker empty state: How it works info box, 6 common interaction quick-fill buttons (Warfarin+Aspirin, Fluoxetine+Tramadol, etc.) - Interaction checker results: allergy reminder callout at top of results Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Print button uses window.print() with @media print CSS hiding nav/sidebar/tabs - Share button uses Web Share API with clipboard fallback ("Link copied!" feedback) - Speaker icon near drug name triggers SpeechSynthesisUtterance at rate 0.8 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ovements - Drug prices: 30/60/90 quantity tabs with deterministic pricing (md5 seed) - GoodRx-style coupon section with inline code reveal - "What affects the price?" 4-card info grid - Account reviews: star rating display, drug name linked, date, Edit button - Account: saved searches section with 3 example queries Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…r checkboxes - Drug A-Z: rich drug cards (class badge, Rx/OTC, rating, description excerpt) - Drug A-Z sidebar: Browse by Drug Type, Popular Drug Classes, Popular Conditions - Sitemap: 4-column layout (Drug Info, Tools, News, User Tools) with url_for links - Contact: full contact form with subject dropdown, 911 emergency warning, editorial/medical team info, JS submit confirmation - Newsletter: 4 subscription options (daily/weekly/monthly/trials), recent topics Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…p drugs - Pro Edition: professional drug lookup widget, clinical monographs grid, professional resources grid (interactions, FDA, prescribing, calculators) - Drug classes list: class data dict with drug count, top 3 drugs, description - Drug classes template: count badge, description excerpt, top drug links, alphabetical grouping - CSS: .tag-class pill style (blue, rounded) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…unter - 10-star clickable rating selector with hover/click JS (replaces slider) - Review form: duration dropdown (1mo/1-6mo/6mo-1yr/1-2yr/2yr+) - Review form: character counter (0/1000) for body textarea - Review cards: 5-star visual display, condition/duration pill tags, full-month date format, helpful votes retained - CSS: .star-selector, .star-btn, .review-stars, .review-tag, .char-count Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The drug classes list links use /drug-class/<slug> (singular) but agents may navigate directly to /drug-classes/<slug> (plural). Add the plural alias. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
detail-grid was using 2fr/1fr which allowed the sidebar to become too narrow at mid-range viewport widths. Switch to minmax(0,2fr)/minmax(280px,1fr) so the sidebar holds a minimum of 280px before the responsive breakpoint. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…lass pages Agents may navigate to /conditions/high-blood-pressure when the DB slug is hypertension, or /drug-classes/nonsteroidal-anti-inflammatory-drugs vs nonsteroidal_anti_inflammatory_drugs. Try the hyphen↔underscore alternate if the direct slug lookup returns nothing, before returning 404. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When /advil, /ozempic, /zoloft etc. are not found as slugs, scan brand_names to find the matching drug and issue a 301 redirect. Agents commonly navigate directly to brand name URLs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… inhibitors), regenerate seed DB Ezetimibe is a cholesterol absorption inhibitor, not a statin. Corrects the drug_class assignment in DRUGS_DATA. New seed DB MD5: 51c89b6795a94cdd02aa1fbebfff388a. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… of full scan Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Regenerated after correcting ezetimibe classification from Statins to Cholesterol absorption inhibitors. MD5: 51c89b6795a94cdd02aa1fbebfff388a Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add section-tabs--subpage nav to drug_side_effects, drug_interactions_page, drug_pregnancy, drug_images templates (was only on dosage page) - Add page-with-sidebar layout + section tabs + sidebar to drug_warnings template - Fix news article key takeaways sentence splitter to handle abbreviations like "U.S." that contain periods (accumulate fragments until >= 50 chars) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Agents often navigate to /ibuprofen/drug-interactions; route was only registered as /ibuprofen/interactions. Added the hyphenated alias. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Real drugs.com uses /pro/<drugname> paths. Route was only at /drugs/pro/<slug>. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
FAQ items now use <details>/<summary> elements, matching the interactive collapsible pattern on drugs.com. First item is open by default. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… drugs When a drug's entire warnings text is a boxed warning (e.g., lisinopril), the page was showing "No specific warnings recorded" alongside the boxed warning. Now: - Warning cards are populated by categorizing sentences from the warnings text (not skipped because they appear within boxed_warning text) - The "No specific warnings" fallback is suppressed when a boxed warning is already displayed Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add `_trunc_at_sentence()` helper that cuts at sentence boundaries (up to 600 chars) instead of a raw 400-char slice which produced answers ending mid-word. Update FAQ builder to use the new helper. Rebuilt seed DB. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add diclofenac, doxazosin, memantine, naltrexone, trimethoprim to DRUGS_DATA — these drugs were listed in the homepage top-drugs row but returned 404 because they were absent from the seed list. Rebuilt seed DB (250 drugs total). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The footer links to /terms.html and /privacy.html; add route aliases so these resolve correctly instead of returning 404. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds .html suffix aliases for all drug subpage routes (dosage, side-effects, warnings, interactions, pregnancy, images, prices, reviews) so external links using the drugs.com URL pattern work without 404s. Also adds /compare-drugs.html alias and news shortcuts: /mednews, /new-drug-approvals, /fda-alerts, /clinical-trials all route to the appropriate news pages. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds aliases: /advanced-search, /side-effects.html, /dosage-guide.html, /dosage, /black-box-warnings, /drug-identifier(.html), plus /compare-drugs.html. Adds 'What to avoid' tab to drug_detail.html section nav (was present as a section in the page but missing from the nav tabs). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds /advertise as an alias for the about page, matching drugs.com's URL structure. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add lecanemab (Leqembi) to DRUGS_DATA so /lecanemab.html resolves - Add dementia, alzheimers, addiction to CONDITIONS_DATA to fix silent skip in seed_drug_conditions() for memantine/naltrexone links - Fix feature-icons carousel: overflow:hidden -> overflow-x:auto with hidden scrollbar so partially-scrolled items are not clipped at edge - Rebuild instance_seed/drugs_com.db (251 drugs, b32970be) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add /<slug>/reviews/write and /<slug>/reviews/write.html as aliases for the existing drug_review_new route (/<slug>/reviews/new), matching common URL patterns agents may navigate to. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add autocomplete=current-password/new-password to the three password fields on the Account Settings page to satisfy browser hints. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add .claude/ralph-loop.local.md to .gitignore so the loop state file is not included in PRs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Expose /<slug>/monograph and /<slug>/monograph.html as aliases for the existing drug_pro_monograph route (/pro/<slug>). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add 60+ more drugs to the seed review list (aspirin, meloxicam, diclofenac, acetaminophen, ACE inhibitors, statins, antibiotics, etc.) so Similar Medications sections show ratings instead of "No ratings" - Raise early-return gate from 300 → 1200 reviews so new drugs in the list actually get seeded after the initial DB already has reviews - Raise inner cap from 800 → 2000 to accommodate the larger list - Call recompute_drug_ratings() after seeding so Drug.avg_rating and Drug.review_count stay in sync with the new review rows Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nhydramine ratings Extends the seed list with 30+ additional drugs covering commonly-searched categories: triptans, opioids, sleep aids, tricyclic antidepressants, OTC supplements, and GLP-1 drugs (tirzepatide/Mounjaro). Also adds laxatives, vitamins, and opioid antagonists. Raises the early-return gate from 1200 → 2400 and the inner loop cap from 2000 → 4000 to accommodate the larger list. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace native <datalist> on Compare Drugs inputs with a custom JS autocomplete that hits /api/autocomplete, eliminating the non-functional browser ▼ arrow and giving real suggestion dropdowns on keystroke. Fix my_med_list.html Rx/OTC stat counters: selectattr(..., 'equalto') failed for drugs with availability 'Rx and/or OTC'. Replaced with namespace-based loop counters using 'in' membership check, so both the stats bar at the top and the summary section now show correct counts. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Same fix as compare_drugs: removes the browser's native <datalist> ▼ arrow on the drug input and replaces it with a custom dropdown hitting /api/autocomplete. Selecting a suggestion immediately triggers addDrug() so the drug tag appears without an extra click. CSS added for the .checker-ac-drop and .checker-ac-item classes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Each reviewer could only review each drug once but the gate checked total review count rather than per-pair existence, causing 4x duplicate reviews when the app restarted with count < 2400. Fix: pre-load existing pairs into a set, skip already-seeded (drug_id, user_id) combos, gate on reviewer-only count >= 700. Cleaned DB has 748 unique reviews (from 2520 with dupes). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
Adds a fully functional drugs.com mirror site to WebHarbor at port 40015, with 21 benchmark tasks.
Motivation
drugs.com is the most-visited drug information portal (24,000+ drugs). It covers a domain — pharmaceutical/medical information — not represented in the existing 15 sites, making it a high-signal addition for web-agent benchmarks.
Design
Flask application (
sites/drugs_com/app.py)Ten SQLAlchemy models:
User,DrugClass,Drug,DrugImage,DrugInteraction,DrugReview,Condition,DrugCondition,NewsArticle,SavedDrug. All seeded idempotently (eachseed_*()function gates on populated DB to preserve the byte-identical reset invariant).Route coverage mirrors the real site's navigation:
/<slug>.htmland/drug/<slug>/drug_information.htmland/drugs-a-to-z.html/drug_interactions.html,/interaction-checker//pill_identification.html,/pill-identifier.htmlSeed database
81 drugs (diverse Rx and OTC, multiple drug classes), 22 drug interactions, 67 user reviews, 12 users, 20 news articles. Benchmark users:
alice.j@test.com/TestPass123!. Seed DB committed atinstance_seed/drugs_com.dband managed via HuggingFace assets.Templates
All 17 templates modeled closely on real drugs.com content, layout, and language: drug detail with tabbed sections (Uses, Warnings, Before taking, Dosage, Side effects, Interactions, FAQ), drug status sidebar (Pregnancy/Lactation risk, CSA Schedule, Approval History), interaction checker with severity badges, pill identifier, A-Z index with category browse, and news with category filter tabs.
Benchmark tasks (
tasks.jsonl)21 tasks (IDs
Drugs.com--0throughDrugs.com--20) covering: drug lookup, interaction checking, pill identification, condition browsing, drug class navigation, news reading, user reviews, account management, and search.Verification
All pre-PR checks passed:
py_compile sites/drugs_com/app.py./scripts/build.sh webharbor:devGET /health→ drugs_com aliveGET http://localhost:41015/→ 200POST /reset/drugs_com+ md5sum matchdf914e1c2f46998a5fd9fd0309217e3aNon-goals
drugs_com.tar.gz)HuggingFace assets
The seed DB tarball (
drugs_com.tar.gz, 266 KB) has been prepared atscripts/extract_assets.shoutput. It needs to be uploaded toChilleD/WebHarborand.assets-revisionupdated — this will be done as a follow-up once HF credentials are available.Registration
Site registered in all three required locations:
websyn_start.shSITES=(...)— index 15, port 40015control_server.pySITES=[...]DockerfileEXPOSE 40000-40015🤖 Generated with Claude Code