How jaicode25/smart-recommendation-system-backend works
This is a content-collection and personalized recommendation application. Its main workflow accepts collected items, normalizes their tags, stores item/tag relationships, records user interactions, and generates ranked, explainable recommendations. The graph also exposes user/authentication, tag-graph, statistics, configuration, and health APIs. Source excerpts show the main recommendation and item-persistence paths; several other API capabilities are represented from the file tree and router registrations, but their internal behavior is not inferred.
Main entry points: main.py FastAPI application · item_service.py Item service · engine.py Recommendation engine · models Domain records
Components 21
API and UI
- Web interface
frontend/src/main.jsx - FastAPI application
app/main.py - Items API
app/api/items.py - Collection API
app/api/collect.py - Recommendations API
app/api/recommendations.py - Other APIs
app/api
Content ingestion
- Collector factory
app/collectors/factory.py - Collector base
app/collectors/base.py - Tag extraction
app/tagging/extractor.py - Tag normalization
app/tagging/normalizer.py
Personalization
- Interaction service
app/services/interaction_service.py - Interest profile
app/recommendation/profile_builder.py - Tag graph
app/graph/tag_graph.py - Interest expansion
app/recommendation/interest_expander.py - Recommendation engine
app/recommendation/engine.py - Recommendation explainer
app/recommendation/explainer.py
Domain and storage
- Item service
app/services/item_service.py - Domain records
app/models - Database
app/database.py - Statistics service
app/services/stats_service.py
Other components
- User
Connections 23
- User → Web interface: uses
- Web interface → FastAPI application: requests
- FastAPI application → Items API: registers
app/main.py - FastAPI application → Collection API: registers
app/main.py - FastAPI application → Recommendations API: registers
app/main.py - FastAPI application → Other APIs: registers
app/main.py - Items API → Item service: calls
app/api/items.py - Collection API → Collector factory: selects
app/api/collect.py - Collection API → Item service: persists through
app/api/collect.py - Collector base → Tag extraction: uses
app/collectors/base.py - Collector base → Tag normalization: uses
app/collectors/base.py - Item service → Tag normalization: normalizes
app/services/item_service.py - Item service → Tag graph: updates
app/services/item_service.py - Item service → Domain records: reads and writes
app/services/item_service.py - Recommendations API → Recommendation engine: calls
app/api/recommendations.py - Recommendation engine → Interest profile: computes interests
app/recommendation/engine.py - Recommendation engine → Interest expansion: expands interests
app/recommendation/engine.py - Recommendation engine → Recommendation explainer: builds explanations
app/recommendation/engine.py - Interest expansion → Tag graph: traverses
app/recommendation/interest_expander.py - Interest profile → Domain records: reads interactions and tags
app/recommendation/profile_builder.py - Interaction service → Domain records: records interactions
app/services/interaction_service.py - Other APIs → Statistics service: serves statistics
- Database → Domain records: provides ORM base
app/models/item.py