An API for uploading, bookmarking & obtaining movie data from TMDB
Note
This project requires bun & node.js installion beforehand
Returns list of movies
Query parameters
searchTerm
- Searches through- Title
- Director
- Country
- Genre
- Colour
pageSize
- Specify page sizepageNumber
- Specify page number
Returns movie for given id
Parameters
id
- Movie id
Uploads csv file with specified movie fields to store in the database
Form fields
file
- the csv file containing the records
Generates a token for a uniquely registered username, can only be generated once & will not be retrieved if lost
Body values
username
- Desired username associated with token
- Allows a user to add movie to their collection of bookmarks
- Once a movie is bookmarked, additional info is obtained & permanently stored from TMDB's API.
- Bookmarked movies will only be bookmarked once
Body values
username
- User's usernametoken
- Associated tokenmovieId
- Movie id to be bookmarked
Returns a list of bookmarked movie ids associated to the user
Body values
username
- User's usernametoken
- Associated token
- DATABASE_URL: Database connection url
- TMDB_KEY: TMDB API key
- Clone the repository
- Run
bun i
bun run build
bun dev
docker compose up -d
- MongoDB:
27019:27017
- App:
8080
- Lack of endpoint body & query parameter type checking
- Error handling edge cases
- Lack of CRUD endpoints
- API security is too simple
- Relying token generation per user
- Tokens are generated once and cannot be changed
- No token encryption in database
- No database seeds for movies