Skip to content

html-proof/Data-fetch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Music Hub Backend (FastAPI + Firebase Realtime DB + yt-dlp)

Production-style backend for a Spotify-like music app.

Features

  • Google Sign-In verification via Firebase Auth (/auth/google)
  • Backend JWT session tokens
  • YouTube search + audio stream URL extraction via yt-dlp
  • Firebase Realtime DB user/library/history/playlists
  • Recommendations based on preferences + history + likes
  • Railway-ready Docker deployment

API Endpoints

  • POST /auth/google
  • GET /search?q=...
  • GET /stream?videoId=...
  • GET /recommendations?uid=...
  • POST /user/update-preferences
  • POST /user/like-song
  • POST /user/history
  • POST /playlist/create
  • POST /playlist/add
  • POST /playlist/remove
  • GET /playlist/get

Compatibility aliases:

  • POST /user/preferences
  • POST /user/like
  • GET /playlist/list

Local Run

  1. Install dependencies:
pip install -r requirements.txt
  1. Configure environment:
copy .env.example .env
  1. Start server:
uvicorn app.main:app --reload --port 8000

Open docs at http://localhost:8000/docs.

Railway Deployment

  1. Create a Railway project and connect this repo.
  2. Add environment variables from .env.example.
  3. Deploy; Railway will build from Dockerfile.

Firebase Realtime DB

Expected root collections:

  • /users/{uid}
  • /songsCache/{songId}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages