Skip to content

Latest commit

Β 

History

492 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Film Friends

Film Friends is a film sharing and reviewing app, where users can save and rate films, add each other as friends, and share recommendations. The back end is built using node.js and the Express framework, while the front end is built in React. The film data is taken from the Open Movie Database (OMDB) API.

Further previews of the site can be found in Testing.

🌐 Live Site

https://film-friends.onrender.com/

Users can search and view film details while not logged in. To access the full functionality of the site, an account must be created. Alternatively, clicking 'Continue as Guest' will log the user in to a shared guest account. Guests can save and rate films, add friends, and send recommendations. In order to preserve data, destructive actions like profile updates, film removal, and account deletion are disabled for guests.

The site is currently deployed to Render, defaulting to its free tier. During application periods, the paid starter tier is used to eliminate loading times.

Repository

https://github.com/AlexSmall96/Film-Friends

Author

Alex Small | GitHub | LinkedIn

Table of Contents

πŸ§ͺ Testing

See Testing

πŸ₯… Project Goals and Planning

The goal of this project was to develop my skills in React, Node.js and automated testing, while creating a website that real film lovers would use to organise their films and connect with others.

➑️ Process Flow Diagrams

To plan the end to end processes involved in the site, the following diagrams were created.

Login and Sign Up

Login and Sign up

Save a new Film

Save a new Film

Search for Users and Send Friend Requests

Search for Users and Send Friend Requests

Send a Recommendation

Search for Users and Send Friend Requests

πŸ—ƒοΈ Database Schema

The below diagram was used to model the database schema. An interactive version can be found here. Descriptions of the database tables and fields are as follows:

  • Users Contains User's login and profile data.
  • Films Films that the user has saved. The public field determines whether or not others can see the film on the user's list. The watched field is true or false depending on whether the user has watched the film or not.
  • Requests Friend requests between users. Sender is the user ID of the requester, and receiver is the user ID of the user receiving the friend request. Accepted is true or false depending if the user has accepted the friend request.
  • Recommendations Film recommendations between users. Sender is the id of the user that sends the recommendation and receiver is the id of the user that receives the recommendation. A request must be made and accepted prior to sending a recommendation.

Database Schema

πŸ“‘ Methodology

The project used an agile methodology and was divided into 5 sprints. Throughout, a kanban board was used to plan and track progress.

Initial Kanban Board Final Kanban Board

Sprint 1: πŸ“– Planning and Documentation

This phase involved the brainstorming of the initial idea as well as designing the theme and layout of the user interface. The process flow diagram was created to plan a high-level overview of the functionality of the site. The process flow diagram was then used as a guide in deciding the database schema, creating the wireframes, and the backend site logic.

Sprint 2: πŸ”§ Backend Functionality

The backend logic for the project was written in Node.js. The Express framework was used to create all the HTTP endpoints required based on the process flow diagram and the database schema. MongoDB was used for both the development and production database. A local database was used for development, with Postman being used to test the Express code and simulate HTTP requests before the front-end section of the site was built. Studio 3T was used to validate requests made through postman, and monitor changes in the local database during development.

Postman HTTP Requests Studio 3T Database Analysis

Collections in Studio 3T:

Automated testing using vitest and the supertest package was implemented for all HTTP requests (with the exception of those requiring external APIs or emails) in parallel to development, and an associated test file can be found alongside each of the router files in this folder. See Testing for details.

The methodology in this section was inspired by the Udemy course: https://www.udemy.com/course/the-complete-nodejs-developer-course-2

Sprint 3: πŸ’» Frontend Functionality

This phase began by creating the basic page layout used to implement the processes required. As the project grew in complexity, sub components were added to pages and the react architecture was refined. With many layers of subcomponents, contexts became useful to better manage state. Throughout this phase some of the backend routers were updated to accommodate new functionality. A diagram detailing the final structure of the react architecture is given below. Components are coloured according to their level in the hierarchy. Grey components have no subcomponents, and arrows travel in the direction of parent -> child.

Sprint 4: 🎨 Frontend Styling

Once the layout had been finalised and the functionality was working as expected, the visual appearance of the site was refined. This included font choice, colours, margins, images and responsiveness.

Sprint 5: πŸ§ͺ Remaining Documentation and Testing

This phase involved updating some backend router tests before creating unit tests and integration tests for the front end using vitest and react testing library. After this, manual tests were carried out to test features not covered in automated testing. End to end testing was then implemented to verify that the models in the database had full CRUD functionality and the user was given visual feedback to represent these changes.

πŸ‘€ UX

πŸ‘₯ User Stories

Allow me to sign up for Film Friends

  • Users can sign up using a chosen email, username, and password.

Allow me to log in to Film Friends with my account

  • After a user has signed up, they can log in to access the full functionality of the site.

Allow me to delete my account

  • Users can choose to delete the account.

Allow me to save films, rate them, mark them as watched and remove them from my list

  • User can save a film to their watchlist, rate it, and mark it as watched.
  • User can view all their films in a list.
  • User can decide which of their films in the list can be viewed by others.

Allow me to add friends and view their film lists

  • Users can find each other on the app by username.
  • Users can add and accept friend requests.
  • Users can view friends' public film lists.

Allow me to make recommendations to my friends

  • Users can send a film recommendation to friends.
  • Users are unable to send recommendations to other users who have not accepted their friend requests.

Allow me to view and customize my profile

  • Users can edit their name and profile image.
  • Users can change their email or password.

🎯 Target Audience

The target audience of this site is anyone who is passionate about films, and enjoys organising and planning their film viewing, as well as connecting with others over common film interests.

πŸ–ΌοΈ Wireframes

The wireframes below were created to plan the app's front-end layout. A large view and a mobile view have been made for each page.

Home Page

Film Search

Profile Page

Friends Page

Recommendations Page

Sign up

Login Page

Films Page

πŸ”€ Fonts

The fonts used in this site are; Josefin Sans for the heading, Gudea for the film plots and Roboto Flex for everything else.

πŸ“· Images

The film images used in this site come from the Open Movie Database (OMDB) API, while the placeholder images were created on https://pixelied.com.

πŸ–₯️ Programming Languages, Frameworks, and Libraries used

  • Backend
    • Node.js
    • Express
  • Frontend
    • React
    • React Bootstrap Testing
    • Vitest
    • Supertest
    • React Testing Library
    • Mock Service Worker

Other technologies used

  • Deployment
    • Render
  • Database
    • MongoDB
    • MongoDB Compass
    • Studio 3T
  • Images
    • Cloudinary
  • Development
    • VS code
    • GitHub
  • Documentation
    • dbdocs
    • Balsamiq
    • lucidchart
    • screentogif

🀝 Credits

Courses

APIs

The film data is taken from the Open Movie Database (OMDB) API.

Code

Code was taken from/inspired by the below articles. Whenever the code is used, it is referenced as a comment.

About

A film sharing and reviewing app built using React and NodeJS.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages