Btwonu / movie-app-api

An api for movie-app using a cloud function

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tasks

  • API

    • Auth
      • register
      • login
        • create POST JSON request containing username && password
        • send request from FE to API @ /login
        • on BE find user in DB
        • sign JWT
        • send response to FE
        • save JWT in local storage
  • Third-party API - The Movie DB

    • GET movies
      • get familiar with API
    • GET genres
      • build genres UI
  • Database

    • Models

      • User

        • userId string required unique USER UID
        • username string required unique
        • age number
        • email string required unique EMAIL
        • createdCollections array [ref: Collection]
        • followedCollections array [ref: Collection]
        • friends array [ref: User]
        • likedMovies array
        • avatar
      • Collection

        • name string required minLength
        • description string required minLength
        • movies array [string: movieId]
        • creator [ref: User]
      • Movie

        depends on third-party

        • title string
        • year string regex
        • genre string
        • rating number
        • summary string minLength
        • trailerUrl string regex

MVP

  • Have the option to switch between couple of different routes to show different movie lists
  • Should have a search function for the lists of movies
  • Should be able to like movies
  • Should be able to register/login
  • Should have a profile and store liked movies
  • Should be able to filter movies
  • Should be able to list users
  • Should be able to add a user as friend
  • Should be able to see friend's liked movies
  • Should be able to suggest a movie to a friend
  • Should be able to add movies to a personal collection
  • Should be able to subscribe to other users' collections

Pages

Movies

  • Popular - /movies/popular
  • Top Rated - /movies/top-rated
  • Upcoming - /movies/upcoming
  • Movie Details - /movies/:movieId

Auth

  • Register - /auth/register
  • Login - /auth/login

User

  • Users - /users
  • Profile - /users/:userId
  • User Collections /users/:userId/collections
  • User Friends /users/:userId/friends

Collections

  • Collections - /collections
  • Collection Details - /collections/:collectionId

Firebase

  • Functions
    • provide the API
    • Express
    • fetch data from third-party APIs
  • Hosting
    • deploy function
    • host front-end
  • Config
    • initialize admin SDK in functions
    • initialize Firebase SDK in functions
  • Firestore
    • store data
  • Auth
    • register with email
    • register with providers
    • trigged Firestore via authentication to store user data inside

About

An api for movie-app using a cloud function


Languages

Language:JavaScript 100.0%