Skip to content

Latest commit

 

History

History
167 lines (153 loc) · 5.25 KB

PROJECT_STRUCTURE.md

File metadata and controls

167 lines (153 loc) · 5.25 KB

Table of Contents

Project Structure

SocioSell/
├── 📜 main.py                      # FastAPI application entry point
├── 📁 .github/                     # GitHub specific files
│   └── ISSUE_TEMPLATE/              # Issue templates for contributions
├── 📁 static/                      # Static assets and files
├── 📁 templates/                   # HTML templates
│   ├── 📊 index.html                  
├── 📁 models/                      # Models folder
│   ├── 📊 analytics.py             # Analytics model
│   ├── 📊 listing.py               # Listing model
│   ├── 📊 product.py               # Product model
│   ├── 📊 review.py                # Review model
│   ├── 📊 video.py                 # Video model
│   ├── 📊 analytics_video.py       # Analytics Video model
│   ├── 📊 video_listing.py         # Video Listing model
├── 📁 routes/                      # Routes folder
│   ├── 🖼️ image.py                 # Image routes
│   ├── 🎥 video.py                 # Video routes
│   ├── 🔗 combined.py              # Combined routes
├── 📁 schema/                      # Schema folder
│   ├── 🖼️ image.py                 # Image schema
│   ├── 🎥 video.py                 # Video schema
│   ├── 🔗 combined.py              # Combined schema
├── 🔧 content_processor.py         # Content analysis and processing
├── 💾 database_setup.py            # Database initialization
├── 🖼️ image_processor.py           # Image processing module
├── 📊 image_data.py                # Image data structures
├── 🎥 video_processor.py           # Video processing module
├── 📊 video_data.py                # Video data structures
├── 🧪 test_image_processor.py      # Image processing tests
├── 🧪 test_video_processor.py      # Video processing tests
├── 📋 requirements.txt             # Project dependencies
├── 📝 README.md                    # Project documentation
├── 🔒 .env                         # Environment variables
└── 📝 .gitignore                   # Git ignore rules

API Endpoints

Image Endpoints

Endpoint Method Description
/upload/image/ POST Upload & analyze a product image
/upload/image/search/{title} GET Search product database by title
/upload/image/listings/{product_id} GET Get listing details for a product
/upload/image/compare/{product_id} GET Compare products
/upload/image/product/details/{product_id} GET Get detailed information about a product
/upload/image/product/analytics/{product_id} GET Get product analytics
/upload/image/product/recommendations/{product_id} GET Get product recommendations based on a specific product
/upload/image/categories GET Get list of all available categories for products and videos
/upload/image/product/reviews/{product_id} GET Get reviews for a product

Video Endpoints

Endpoint Method Description
/upload/video/ POST Upload & analyze a product video
/upload/video/search/{title} GET Search for videos by title
/upload/video/listings/{video_id} GET Get video listings details
/upload/video/compare/{video_id} GET Compare videos
/upload/video/analytics/{video_id} GET Get video analytics

Combined Endpoints

Endpoint Method Description
/search/all/{query} GET Search both products and videos across all categories


Indexing Overview

The indexing strategy is designed to:

  • Speed Up Queries: Makes searching faster for fields like id, title, and timestamps.
  • Handle Complex Searches: Uses combined indexes for multi-field lookups.
  • Prepare for the Future: Supports flexible data searches, including text-based queries.
  • Keep Data Clean: Ensures no duplicate records with unique constraints.

This makes the system faster, reliable, and ready for future needs.