Skip to content

SameerArora497/Wavee-Backend

Repository files navigation

Wavee Backend

Laravel API + admin CMS that powers the Wavee mobile app. Serves the home feed, catalog, likes, watchlist, search, and the marketing pages at the public site.

The mobile client lives in a separate repository.

Stack

  • PHP 8.3+ / Laravel 13
  • Sanctum (mobile bearer-token auth, exchanged from a Firebase ID token)
  • Firebase Admin SDK (token verification)
  • TMDB (catalog metadata bootstrap)
  • SQLite by default; MySQL/MariaDB supported via .env

Prerequisites

  • PHP 8.3+ with the standard Laravel extensions (mbstring, xml, curl, pdo, pdo_sqlite or pdo_mysql)
  • Composer
  • A Firebase project (for mobile sign-in)
  • A TMDB API key (free)

Setup

# 0. Clone
git clone https://github.com/SameerArora497/Wavee-Backend.git
cd Wavee-Backend

# 1. Install PHP dependencies
composer install

# 2. Create your local env file
cp .env.example .env

# 3. Generate the Laravel app key
php artisan key:generate

# 4. Create the SQLite database file (skip if using MySQL)
touch database/database.sqlite

# 5. Run migrations
php artisan migrate

# 6. Seed an admin user + landing page
php artisan db:seed

Firebase Admin credentials

The API verifies mobile sign-ins with the Firebase Admin SDK. Download the service-account JSON from Firebase Console → Project Settings → Service accounts → Generate new private key, then save it at:

storage/app/firebase-admin.json

This path is gitignored. The location is configurable via FIREBASE_CREDENTIALS in .env.

TMDB key

Set TMDB_API_KEY in .env for the bootstrap fetch. Once the app is running, operators can rotate the runtime key from the CMS admin UI (/admin); the runtime key lives in the api_keys table and takes precedence over the env value.

Running

php artisan serve --host=0.0.0.0 --port=3002

The mobile app expects the API at the host/port configured in its own buildConfig.

Default seed credentials

php artisan db:seed creates an admin user:

  • Email: admin@wavee.local
  • Password: wavee-admin

Change this immediately after first login.

API surface

All routes are versioned under /api/v1. See routes/api.php for the full list. Highlights:

  • POST /api/v1/auth/firebase — exchange a Firebase ID token for a Sanctum bearer
  • GET /api/v1/home/feed — server-driven home feed
  • GET /api/v1/catalog, GET /api/v1/catalog/{title} — catalog listing & detail
  • GET /api/v1/genres
  • POST /api/v1/me/likes/{title}, DELETE /api/v1/me/likes/{title}
  • GET /api/v1/me/watchlist, POST /api/v1/me/watchlist/{title}

The admin CMS is mounted under /admin and uses Laravel Breeze session auth.

Tests

php artisan test

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors