How luckynest7-beep/lodgetrust-phase-1 works
LodgeTrust verifies hotel-listing photos through a React dashboard and FastAPI service. The principal workflow uploads listing images, runs reuse, AI-generation, and visual-quality checks, then presents per-image and aggregate results; optional trust evaluation adds compliance and price/description analysis. The graph also preserves the documented image-signal stages and compliance retrieval subsystem. Some model and route wiring is represented from README or SOURCE INDEX references rather than fully sampled implementation, so those links are limited to relationships supported there.
Main entry points: main.py FastAPI routes · combine_signals.py Signal aggregation · App.tsx Dashboard · AnalyzeResults.tsx Results view
Components 25
Web dashboard
- Dashboard
frontend/src/App.tsx - Image uploader
frontend/src/components/ImageUploader.tsx - API client
frontend/src/lib/api.ts - Results view
frontend/src/components/AnalyzeResults.tsx - Signal panels
frontend/src/components/FeatureVectorPanel.tsx - Compliance panel
frontend/src/components/CompliancePanel.tsx - Index manager
frontend/src/components/SeedIndexPanel.tsx
HTTP service
- FastAPI routes
backend/api/main.py - API schemas
backend/api/schemas.py - Demo index seeder
backend/api/seed_index.py
Image signals
- Reuse detection
backend/image_analysis/stolen_image.py - CLIP embeddings
backend/image_analysis/clip_utils.py - AI-image detection
backend/image_analysis/ai_image_detector.py - Signal aggregation
backend/image_analysis/combine_signals.py - Style tier
backend/image_analysis/style_tier.py - Aesthetic score
backend/image_analysis/aesthetic_score.py - Furniture detection
backend/image_analysis/furniture_detector.py - Lighting analysis
backend/image_analysis/lighting_analysis.py - Color analysis
backend/image_analysis/color_analysis.py
Trust evaluation
- Trust evaluator
backend/trust_evaluator.py
Compliance RAG
- Compliance check
compliance_rag/compliance_check.py - Criteria retrieval
compliance_rag/retrieval.py - Chroma criteria store
compliance_rag/chroma_db
Other components
- Listing reviewer
- Gemini API
Connections 28
- Listing reviewer → Dashboard: uses
README.md - Dashboard → Image uploader: renders
frontend/src/App.tsx - Dashboard → API client: submits images
frontend/src/App.tsx - API client → FastAPI routes: calls analysis API
frontend/src/lib/api.ts - Dashboard → Results view: renders results
frontend/src/App.tsx - Results view → Signal panels: renders signals
frontend/src/components/AnalyzeResults.tsx - Results view → Compliance panel: renders compliance
frontend/src/components/AnalyzeResults.tsx - Dashboard → Index manager: renders index controls
frontend/src/App.tsx - Index manager → API client: requests index actions
frontend/src/lib/api.ts - FastAPI routes → API schemas: uses schemas
backend/api/main.py - FastAPI routes → Reuse detection: checks reuse
backend/api/main.py - FastAPI routes → AI-image detection: detects generated images
backend/api/main.py - FastAPI routes → Signal aggregation: aggregates image signals
backend/api/main.py - FastAPI routes → Demo index seeder: seeds index
backend/api/main.py - Demo index seeder → Reuse detection: adds demo images
backend/api/seed_index.py - Reuse detection → CLIP embeddings: embeds query images
backend/image_analysis/stolen_image.py - Signal aggregation → Style tier: classifies style
backend/image_analysis/combine_signals.py - Signal aggregation → Aesthetic score: scores aesthetics
backend/image_analysis/combine_signals.py - Signal aggregation → Furniture detection: detects amenities
backend/image_analysis/combine_signals.py - Signal aggregation → Lighting analysis: analyzes lighting
backend/image_analysis/combine_signals.py - Signal aggregation → Color analysis: analyzes color
backend/image_analysis/combine_signals.py - Style tier → CLIP embeddings: uses embeddings
backend/image_analysis/style_tier.py - FastAPI routes → Trust evaluator: evaluates trust
backend/api/main.py - Trust evaluator → Compliance check: checks compliance
backend/trust_evaluator.py - Trust evaluator → Gemini API: requests price analysis
backend/trust_evaluator.py - Compliance check → Criteria retrieval: fetches criteria
compliance_rag/compliance_check.py - Criteria retrieval → Chroma criteria store: queries criteria
compliance_rag/retrieval.py - Compliance check → Gemini API: judges criteria
compliance_rag/compliance_check.py