Commit graph

75 commits

Author SHA1 Message Date
michael
a447994375 feat: Add per-pet-type prompt templates for song generation
Replace the generic song generation prompt with pet-specific prompt
templates. Each pet type (Dog, Cat, Fish, Bird, Hamster, Gerbil,
Guinea Pig, Rabbit, Bearded Dragon, Leopard Gecko, Corn Snake) now
has its own tailored prompt with pet-specific behaviors and content
restrictions.

Also fix typo: "Beared Dragon" → "Bearded Dragon" in schemas.py and
home.js. The prompts.py file includes backwards compatibility for the
old spelling to handle any pending database records.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 09:47:44 -06:00
michael
59357cff06 fix: Fetch Sonauto credits directly if cache is empty
The queue-status endpoint now fetches credits from the Sonauto API
when the Redis cache is empty/zero, making the admin dashboard
more reliable.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 09:21:59 -06:00
DeepakasBTG
3246a51579 Merge pull request #14 from DeepakasBTG/frontend
Waiting: Gif song text updated
2026-02-02 20:50:58 +05:30
Deepak Salunke
8725ea8174 Waiting: Gif song text updated 2026-02-02 20:50:16 +05:30
michael
ce1337028b fix: Add fetch call to load Sonauto credits in admin dashboard
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 09:18:30 -06:00
michael
9a059e8aa9 fix: Transform storage paths in admin dashboard for correct URLs
Converts /app/storage/... container paths to /storage/... web paths
for photos, videos, and audio files.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 09:12:23 -06:00
michael
c01760d8e0 fix: Update admin dashboard API endpoint to use /back/ proxy path
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 09:05:24 -06:00
DeepakasBTG
0ba529cdc9 Merge pull request #13 from DeepakasBTG/frontend
CTA text correction
2026-02-02 20:26:42 +05:30
Deepak Salunke
aa76d12ec4 CTA text correction 2026-02-02 20:25:46 +05:30
michael
9354085694 fix: Remove tags field from Sonauto API request
Sonauto rejects custom tag values. The prompt already contains all
necessary style and content guidance, so tags are not needed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 08:45:53 -06:00
michael
56bc3d6059 fix: Move music vibe from tags to prompt for Sonauto API
Sonauto only accepts specific predefined tags. The custom frontend
music vibes (Hip-Hop, Boy Band, etc.) were being rejected with 422.

Now using fixed tags ["love song", "valentine"] and including the
music vibe in the prompt text instead.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 08:43:10 -06:00
michael
a570ac657f fix: Improve audio streaming reliability and playback
Stream endpoint:
- Increase read timeout to 600s for progressive audio generation
- Use larger 16KB chunks for smoother playback
- Remove misleading Accept-Ranges header (we don't support range requests)
- Add logging for stream start/completion
- Properly close httpx client after streaming

Frontend:
- Wait for 'canplay' event before attempting autoplay
- Add event listeners for play, error, stalled, waiting
- Native audio controls' play button now properly hides tap message
- Add 5s fallback timeout if canplay doesn't fire

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 08:40:02 -06:00
michael
a411f962f0 fix: Sync backend schema with frontend pet types and music vibes
Frontend was updated in 1b26b7a but backend validation wasn't updated,
causing 422 errors on form submission.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 08:29:42 -06:00
michael
9c5b054dcc feat: Add Sonauto streaming audio on waiting page
Enable users to listen to their song while video generation continues
in the background. Backend proxies authenticated Sonauto stream API
since HTML audio elements cannot send auth headers.

- Add streaming_ready_at column to track when stream becomes available
- Enable streaming in Sonauto API request payload
- Handle GENERATING_STREAMING_READY webhook status
- Add /api/stream/{session_id} proxy endpoint using httpx
- Update StatusResponse with streaming_ready and task_id fields
- Add audio player UI with autoplay fallback for mobile
- Fade out audio gracefully before redirect to result page

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 08:23:14 -06:00
DeepakasBTG
8412db0fa6 Merge pull request #12 from DeepakasBTG/frontend
Pet types & Music type list updated
2026-02-02 18:31:35 +05:30
Deepak Salunke
1b26b7a374 Pet types & Music type list updated 2026-02-02 18:30:58 +05:30
DeepakasBTG
4f1b9a8de9 Merge pull request #11 from DeepakasBTG/frontend
Footer: TnC link added
2026-02-02 15:18:37 +05:30
Deepak Salunke
eed7b29e3d Footer: TnC link added 2026-02-02 15:17:53 +05:30
DeepakasBTG
44494d337b Merge pull request #10 from DeepakasBTG/frontend
Footer: Privacy link added
2026-02-02 14:29:24 +05:30
Deepak Salunke
74b512f5bc Footer: Privacy link added 2026-02-02 14:28:54 +05:30
DeepakasBTG
f88179a5ab Merge pull request #9 from DeepakasBTG/frontend
Result: Minor css changes
2026-02-01 23:48:23 +05:30
Deepak Salunke
cc43bf7ff4 Result: Minor css changes 2026-02-01 23:47:39 +05:30
DeepakasBTG
6007b83e8e Merge pull request #8 from DeepakasBTG/frontend
Result: Ad banners added
2026-02-01 23:09:47 +05:30
Deepak Salunke
26d5a46767 Result: Ad banners added 2026-02-01 23:08:40 +05:30
DeepakasBTG
8af7d25c16 Merge pull request #7 from DeepakasBTG/frontend
Header & Footer changes
2026-02-01 21:23:38 +05:30
Deepak Salunke
c673e55090 Header & Footer changes 2026-02-01 21:23:08 +05:30
Harshad
58da81fd73 feat(backend): admin dashboard api 2026-02-01 19:38:11 +05:30
DeepakasBTG
a6dcbacb71 Merge pull request #6 from DeepakasBTG/frontend
Result: Video UI fixed
2026-02-01 17:29:03 +05:30
Deepak Salunke
673f576b06 Result: Video UI fixed 2026-02-01 17:28:29 +05:30
Harshad
9ae4bf63b3 fix(waiting): showTimeoutError UI 2026-02-01 10:59:29 +05:30
DeepakasBTG
5bd5e9a18e Merge pull request #5 from DeepakasBTG/frontend
Banner Image optimize
2026-02-01 01:05:07 +05:30
Deepak Salunke
bf6619accd Banner Image optimize 2026-02-01 01:04:10 +05:30
DeepakasBTG
5e4931b5d7 Merge pull request #4 from DeepakasBTG/frontend
Footer: link added for Music by Sonauto v3 text
2026-01-31 22:53:06 +05:30
Deepak Salunke
b4f8451b23 Footer: link added for Music by Sonauto v3 text 2026-01-31 22:51:56 +05:30
DeepakasBTG
7d5106b59e Merge pull request #3 from DeepakasBTG/frontend
Landing page ui changes
2026-01-31 22:44:53 +05:30
Deepak Salunke
8ae1211bd7 Landing page ui changes 2026-01-31 22:43:53 +05:30
michael
5f9462a91f waiting: increase poll timeout to 10 minutes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 09:17:51 -06:00
michael
48547994cc result: fix download button to use actual video URL
Update href and download attributes directly instead of
using a click handler that races with the default href.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 09:03:26 -06:00
michael
d4376d092b docker: make storage host path configurable
Add STORAGE_HOST_PATH env var for volume mount.
Defaults to ../storage for local dev.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 08:54:54 -06:00
michael
fa58a15e58 video: fix flush of closed file error
Use wait() instead of communicate() after manually closing stdin.
communicate() tries to flush stdin which fails if already closed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 08:42:06 -06:00
michael
29322cb3a5 chore: remove .env from version control
Add **/.env to .gitignore to cover all subdirectories.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 08:31:51 -06:00
michael
318a1e1d8d celery: fix invalid Sonauto tags
Only use the music_vibe as the tag - "love song" and "valentine"
are not valid Sonauto API tags.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 08:22:59 -06:00
michael
3c7f4142aa celery: add error logging for Sonauto API responses
Also update CLAUDE.md to require commit+push after changes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 08:20:40 -06:00
michael
1b2bc8497c celery: bypass credit check for testing
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 08:11:31 -06:00
DeepakasBTG
a4db48b160 Merge pull request #2 from DeepakasBTG/frontend
Few minor changes in frontend
2026-01-31 19:37:26 +05:30
Deepak Salunke
3b4e9c0c77 Few minor changes in frontend 2026-01-31 19:36:37 +05:30
michael
cae11b95d5 deploy: run alembic migrations after db startup
Wait for database health check then run pending migrations.
Idempotent - only applies migrations not yet in alembic_version.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 07:57:38 -06:00
michael
70b0f665cb celery: fix task autodiscovery 2026-01-31 07:30:26 -06:00
Michael Clervi
96b111bd09 added +x permission to deploy.sh 2026-01-31 13:19:32 +00:00
michael
bb43127ab4 deploy: use build cache 2026-01-31 07:16:07 -06:00