Commit Graph

846 Commits

Author SHA1 Message Date
ajaysi
66faff9051 fix: Add podcast-only demo mode frontend integration
- Skip onboarding in demo mode, redirect to podcast-maker
- Demo mode checks localStorage and env vars
- Remove mock subscription - use real subscription flow
2026-03-31 06:48:24 +05:30
ajaysi
f0b78f5cbe fix: Skip subscription check in demo mode, allow access with mock subscription 2026-03-30 16:32:18 +05:30
ajaysi
43c6ceab2f fix: Skip onboarding calls in podcast-only demo mode
- Add demoMode utility for consistent demo mode detection
- Skip onboarding API calls in OnboardingContext when in demo mode
- Redirect to /podcast-maker instead of /onboarding in demo mode
2026-03-30 09:38:48 +05:30
ajaysi
92bbe1d878 Merge PR #456: Add forced user_id lint check and demo router gating 2026-03-30 08:18:50 +05:30
ي
636989f75b Add forced user_id lint check and demo router gating 2026-03-30 08:13:48 +05:30
ajaysi
5706b85a4e Merge PR #455: Use tenant sessions for API key context and add startup key readiness check 2026-03-30 08:11:35 +05:30
ي
3a92c4af1a Use tenant sessions for API key context and add startup key readiness check 2026-03-30 08:09:28 +05:30
ajaysi
2a41e94c07 Merge PR #454: Use tenant-scoped dubbed audio paths with safe file resolution 2026-03-30 08:07:39 +05:30
ي
27c167ebe8 Use tenant-scoped dubbed audio paths with safe file resolution 2026-03-30 08:07:01 +05:30
ajaysi
e3ba7893ca Merge PR #453: Restrict podcast task status access by owner 2026-03-30 08:06:27 +05:30
ي
b54c2978c3 Restrict podcast task status access by owner 2026-03-30 08:05:44 +05:30
ajaysi
92cbd682a5 Merge PR #452: Add podcast billing verification sequence runner 2026-03-30 08:02:50 +05:30
ي
6555a722d3 Add podcast billing verification sequence runner 2026-03-30 08:01:57 +05:30
ajaysi
cbcb896d24 Merge PR #451: Fail demo startup when required API routes are missing 2026-03-30 07:56:43 +05:30
ي
ef7874dcdc Fail demo startup when required API routes are missing 2026-03-30 07:56:05 +05:30
ajaysi
e64aea484f Merge PR #450: Add strict Stripe checkout guard via env flag 2026-03-30 07:54:42 +05:30
ajaysi
8828e982f8 Merge PR #449: Feature-flag pricing tier availability for alpha/demo modes 2026-03-30 07:52:39 +05:30
ي
4e0f176842 Add strict Stripe checkout guard via env flag 2026-03-30 07:51:45 +05:30
ajaysi
bbb46ca9d1 fix: Add podcast-only demo mode readiness patches
- Patch pricing redirect to route to podcast-maker instead of onboarding
- Allow all plan tiers in demo mode (remove alpha restriction)
- Add Stripe mode warning in demo when key is missing
- Add startup router mount assertions for subscription and podcast
- Add smoke test script for demo mode validation
2026-03-30 07:50:58 +05:30
ي
d1ff406d03 Feature-flag pricing tier availability for alpha/demo modes 2026-03-30 07:49:56 +05:30
ajaysi
643e9ad2f3 Merge PR #448: Add mode-aware pricing redirect for podcast demo flow 2026-03-30 07:48:37 +05:30
ي
cadcb8077d Add mode-aware pricing redirect for podcast demo flow 2026-03-30 07:48:00 +05:30
ajaysi
2b11814fb8 Merge PR #447: Add podcast demo mode deployment flag guidance 2026-03-30 07:44:35 +05:30
ajaysi
5965e123b9 Merge PR #446: Add podcast-only demo mode visibility and router status 2026-03-30 07:43:46 +05:30
ي
b93a4d2a67 docs: add podcast demo mode deployment flag guidance 2026-03-30 07:41:46 +05:30
ajaysi
c652c0d149 Merge PR #445: Ensure subscription router is always mounted without duplicates 2026-03-30 07:39:33 +05:30
ي
d13cce7a46 Ensure subscription router is always mounted without duplicates 2026-03-30 07:38:19 +05:30
ajaysi
6596a0515a Merge PR #444: Guard onboarding manager behind podcast-only demo mode 2026-03-30 07:36:26 +05:30
ي
4d948e0222 Guard onboarding manager behind podcast-only demo mode 2026-03-30 07:15:08 +05:30
ajaysi
e8e2a7fea0 Merge PR #443: Add podcast-only demo mode guards in app router setup 2026-03-30 07:11:25 +05:30
ي
ec9d2f922e Add podcast-only demo mode guards in app router setup 2026-03-30 07:07:24 +05:30
ي
af5a6e0ee3 Add podcast-only demo startup flag and CLI toggle 2026-03-30 06:56:57 +05:30
ajaysi
557f700f68 fix: Resolve APIProvider enum mismatch causing dashboard errors
- Fix import path in subscriptions.py (pricing_service location)
- Add values_callable to APIUsageLog.provider enum column
- Normalize provider values to lowercase in usage trends helpers
- Add migration script for existing databases
2026-03-29 12:50:50 +05:30
ajaysi
d6ad903e3d feat: Improve image generation prompts with visual data extraction
- Add dedicated image_generation module with statistical extraction
- Support 16 industry domains with visual concept detection
- Add model-specific guidance for Ideogram, FLUX, GLM, Qwen, MAI
- Extract statistics, rankings, comparisons, and trends automatically
- Refactor backend/api/images.py to use new module
2026-03-29 10:16:40 +05:30
ajaysi
f503a24b3b feat: Add Auto-Dubbing feature for Podcast Maker
This commit adds the Auto-Dubbing feature for Podcast Maker with support
for translating podcast audio to different languages with optional voice
cloning to preserve the original speaker's voice.

New Features:
- Translation Service (common module): DeepL integration for low-cost
  translation, WaveSpeed integration for high-quality translation
- Audio Dubbing Service: STT -> Translate -> TTS pipeline with
  voice cloning support
- 9 new API endpoints for dubbing and voice cloning
- Support for 34+ languages
- Cost estimation utilities
- Comprehensive documentation

Files Added:
- services/translation/ (5 files): Translation service module
- services/dubbing/: Audio dubbing service
- api/podcast/handlers/dubbing.py: API endpoints
- docs/AUTO_DUBBING.md: Feature documentation
- CHANGELOG.md: Change log

Files Modified:
- api/podcast/models.py: Added dubbing request/response models
- api/podcast/router.py: Added dubbing routes
- services/__init__.py: Export translation and dubbing services
- scene_animation.py: Fixed missing Path import
2026-03-24 15:45:51 +05:30
ajaysi
3c58fd555b Add AI marketing and writing tools from PRs #220, #310
New tools added to ToBeMigrated/ directory:

ai_marketing_tools/:
- ai_backlinker: AI-powered backlink generation
- ai_google_ads_generator: Google Ads generation with templates

ai_writers/:
- ai_blog_faqs_writer: FAQ generation for blogs
- ai_copywriter: Multiple copywriter frameworks (AIDA, PAS, 4C, 4R, etc.)
- ai_finance_report_generator: Financial report generation
- ai_story_illustrator: Story illustration
- ai_story_video_generator: Story video generation
- ai_story_writer: AI story writing
- github_blogs: GitHub blog integration
- speech_to_blog: Audio to blog conversion
- twitter_writers: Twitter/X content generation
- youtube_writers: YouTube content generation

These tools are in ToBeMigrated/ for future migration to the main backend.
2026-03-22 12:47:23 +05:30
ajaysi
1fd9720dac Cleanup: Add migration scripts to gitignore and remove from tracking
- Add debug_usage.py, fix_database.py, migrate_usage_summaries.py,
  simple_migrate.py, validate_implementation.py to .gitignore
- Add CAMERA_SELFIE_IMPLEMENTATION.md to .gitignore
- Remove these files from git tracking (keep locally)
2026-03-22 12:47:00 +05:30
ajaysi
51bc76345f Add new analytics modules from PR #436
- backend/services/analytics/opportunity_scorer.py: Functions for scoring and ranking
  opportunities from search queries (high_impression_low_ctr_queries,
  rising_queries, declining_pages, score_and_rank_opportunities,
  categorize_opportunities)
- backend/services/gsc_service.py: GSC (Google Search Console) service
2026-03-22 11:36:38 +05:30
ajaysi
b28dc4b5f6 Add startup health module and readiness endpoint from PR #434
- Add services/startup_health.py with health check functions:
  - get_startup_status(): Returns current startup status
  - readiness_under_auth_context(): Validates tenant DB under auth context
  - run_startup_health_routine(): Runs all startup health checks
- Add /health/readiness endpoint for tenant DB validation
- Update startup_event() to use run_startup_health_routine()
- Add raise to startup_event to fail fast on errors
2026-03-22 11:33:20 +05:30
ajaysi
70d3677ac6 Fix environment_setup directory creation from PR #433
- Remove dependency on workspace_dirs module
- Use direct Path().mkdir() for directory creation
- Configure development directories correctly (lib/workspace/...)
- Skip directory creation in production mode
2026-03-22 11:29:25 +05:30
ajaysi
fdbba8f186 Add content strategy state models from PR #433
New models for managing content strategy runtime state:
- StrategyGenerationTaskState: Task lifecycle/status for polling-based AI generation
- LatestGeneratedStrategyState: References to latest generated strategy per user/resource
- StreamingCacheState: Short-lived streaming cache entries with TTL semantics

These models provide persistent state management for content strategy operations.
2026-03-22 11:28:18 +05:30
ajaysi
e8f282b7a9 Enhance main_text_generation with APIKeyManager and improved provider routing
- Import APIKeyManager for provider key checking
- Use APIKeyManager.get_api_key() instead of get_api_key() function
- Add wavespeed provider to available_providers check
- Add detailed provider preflight logging with flow_type tag
- Improve fallback logic when preferred provider is unavailable

These improvements come from PRs #423-#431 while maintaining the modular textgen_utils structure.
2026-03-22 11:23:38 +05:30
ajaysi
a26fa84263 Extract useful LLM provider improvements from PRs #423-#429
huggingface_provider.py:
- Add retry logic with _should_retry_hf_error and _is_non_retryable_hf_error
- Update default models from :groq to :cerebras (HF_FALLBACK_MODELS)
- Add fallback_models parameter to huggingface_text_response
- Add get_available_models with updated model list

main_text_generation.py:
- Add GPT_PROVIDER and TEXTGEN_AI_MODELS env var support
- Add preferred_provider and flow_type parameters to llm_text_gen
- Add HF_MODEL_MAPPING for short model name resolution
- Add flow_type logging tag for better observability

sif_agents.py:
- Add LOW_COST_SHARED_REMOTE_MODELS for SIF agents
- Update SharedLLMWrapper to use preferred_hf_models and flow_type

These changes preserve the modular textgen_utils structure while incorporating
the useful routing and retry logic improvements from the pending PRs.
2026-03-22 11:16:48 +05:30
ajaysi
16be2b21f4 Fix user data endpoints to require authenticated user ID
- Add get_current_user authentication to all user data endpoints
- Pass authenticated user_id from auth context to service methods
- Add proper HTTPException handling for missing data
- Fix user_id type from int to str in service methods
- Ensure endpoints only return data for authenticated user
2026-03-22 11:02:35 +05:30
ajaysi
1a2ec68095 Enhance logging with exception handlers and context tracking
- Add InterceptHandler to route stdlib logging to Loguru
- Add _patch_record_context for request/job/user ID tracking
- Add _uncaught_exception_hook to capture top-level exceptions
- Add _asyncio_exception_handler for asyncio task exceptions
- Add _register_global_exception_handlers to register all hooks
- Add _configure_uvicorn_loggers for unified uvicorn logging
- Improve log format with contextual fields (req, job, user)
2026-03-22 10:59:46 +05:30
ajaysi
d557bd4918 Fix merge conflicts and resolve circular import issues
- Resolve conflict markers in logging_config.py, main.py, app.py
- Fix circular imports in story_writer services (image/audio/video generation)
  by using lazy imports for get_story_media_write_dir
- Restore clean versions of:
  - sif_agents.py
  - tenant_provider_config.py
  - personalization_service.py
  - huggingface_provider.py
  - main_text_generation.py
  - logger_utils.py
- Use setup_clean_logging() consistently across app.py and main.py
- Restore verbose_mode handling in start_alwrity_backend.py
2026-03-22 10:45:05 +05:30
ajaysi
d412275748 "Merge_PR_422_unify_backend_logging_configuration" 2026-03-12 17:32:50 +05:30
ajaysi
c429c90860 "Merge_PR_421_structured_routing_logs_with_clean_modular_architecture" 2026-03-12 17:19:44 +05:30
ajaysi
27700ce272 "Add_structured_routing_logs_to_modular_text_generation" 2026-03-12 17:15:11 +05:30
ajaysi
482a600e14 "Add_structured_routing_logs_to_text_generation_modular" 2026-03-12 17:12:15 +05:30