How cesar0k/smart-recipe-finder-backend works
Smart Recipe Finder is a FastAPI backend for recipe discovery and social cooking. A user submits a search or recipe request to the API; recipe services apply semantic search, filters, and ranking, then return results. Other major workflows cover recipe drafts and moderation, accounts and profiles, engagement, and notifications. The README documents service-layer coordination with PostgreSQL, Redis, vector search, object storage, email, and WebSockets. Several subsystem links below are documented rather than verified in unsampled endpoint code.
Main entry points: recipe_service.py Recipe and search · notification_service.py In-app notifications · api.py REST API · auth.py Auth endpoints
Components 22
API and identity
- REST API
app/api/v1/api.py - Auth endpoints
app/api/v1/endpoints/auth.py - Authentication
app/services/auth/auth_service.py - Google OAuth
app/services/auth/google_auth_service.py - User profiles
app/services/social/user_service.py
Recipe discovery
- Recipe endpoints
app/api/v1/endpoints/recipes.py - Recipe and search
app/services/recipe/recipe_service.py - Tag classification
app/services/recipe/tag_service.py - Semantic vector search
app/core/vector_store.py - Recipe records
app/models/recipe/recipe.py - Search cache keys
app/services/recipe/cache_keys.py
Community and moderation
- Follows and engagement
app/services/social/follow_service.py - Comments
app/services/comment/comment_service.py - Content moderation
app/services/moderation/moderation_service.py
Notifications and delivery
- In-app notifications
app/services/notification/notification_service.py - Transactional email
app/services/notification/email_service.py - WebSocket delivery
app/core/ws_manager.py
Runtime infrastructure
- Redis cache
app/core/cache.py - PostgreSQL sessions
app/db/session.py - Image object storage
app/core/s3_client.py
Other components
- Platform user
- SMTP relay
Connections 23
- Platform user → REST API: requests
- REST API → Auth endpoints: routes to
app/api/v1/api.py - REST API → Recipe endpoints: routes to
app/api/v1/api.py - Auth endpoints → Authentication: calls
app/api/v1/endpoints/auth.py - Auth endpoints → Google OAuth: calls
app/api/v1/endpoints/auth.py - Authentication → User profiles: uses
app/services/auth/auth_service.py - Recipe endpoints → Recipe and search: delegates to
- Recipe and search → Recipe records: reads and writes
app/services/recipe/recipe_service.py - Recipe and search → Semantic vector search: searches
app/services/recipe/recipe_service.py - Recipe and search → Search cache keys: invalidates
app/services/recipe/recipe_service.py - Search cache keys → Redis cache: keys cache
app/services/recipe/cache_keys.py - Recipe and search → Tag classification: delegates to
app/services/recipe/tag_service.py - Recipe and search → Image object storage: uploads images
app/services/recipe/recipe_service.py - Recipe and search → PostgreSQL sessions: uses sessions
- Recipe and search → Redis cache: caches results
app/services/recipe/recipe_service.py - Recipe and search → Semantic vector search: semantic retrieval
app/services/recipe/recipe_service.py - Follows and engagement → In-app notifications: notifies
app/services/social/follow_service.py - Comments → In-app notifications: notifies
app/services/comment/comment_service.py - Content moderation → In-app notifications: alerts users
app/services/moderation/moderation_service.py - In-app notifications → WebSocket delivery: pushes updates
app/services/notification/notification_service.py - In-app notifications → Transactional email: schedules email
app/services/notification/notification_service.py - Transactional email → SMTP relay: sends via SMTP
- In-app notifications → PostgreSQL sessions: persists
app/services/notification/notification_service.py