Skip to content

CoderAcademy-DEV-MERN-Group/DEV1003-Assessment02

Repository files navigation

The Reel Canon Backend API

Image of Cinema with 'The Reel Canon' text overlay

Table of Contents

In This Document

  1. Overview
  2. Programming Style Guide
  3. Contributing
  4. Version Pipeline
  5. Database Deployment
  6. Contributors

Other Documents

  1. Installation & Deployment
  2. Technologies
  3. Troubleshooting
  4. Usage

1. Overview

The Reel Canon is a backend API built for our MERN project, using mongoDB, Node.js and express. This API provides CRUD functionality to handle data for movies, users and their associated relationships and nested attributes, allowing us to provide data to our front end react project through HTTP requests.

This database uses centralized error handling middleware, authorized routes, JWT token validation and robust validation, to provide a fully functional, RESTful API to store and work with all the database data we need.

Passing 173 tests in 10 test suites, this API has over 90% overall test coverage, and utilizes a mix of unit, end-to-end and integration/route functionality testing.


2. Programming Style Guide

This project adheres to the Airbnb JavaScript Style Guide, enforced through ESLint configuration and Prettier formatting to ensure quality and maintainability. This style guide allows our code to be more consistent, readable, predictable and efficient.

Specific settings for the styling can be found in the prettier configuration file and the eslint configuration file. The eslint-config-airbnb-base was installed as a dev dependency to expedite the style guide setup process.


3. Contributing

For other devs looking to contribute to the project, please follow the following guidelines:

  • Branching and Forking: Fork the repository and create feature branches from main using descriptive names (feature/user-auth, fix/rating-bug)
  • Conventional Commits: Follow conventional commit format (feat:, fix:, docs:, style:, refactor:, test:, chore:) for clear commit history
  • Pull Requests: Pull requests with no explanation will not be merged, please leave detailed comments in your code!
  • Issues: Issues must be clear and concise, vague issues are non-issues!

4. Version Pipeline

Below is a list of future plans for improving functionality and features of this project:

Current Version:

V.0.1.0 - Core functionality created and tested

  • User authentication/authorisation & profiles
  • Reel Canon with 100 movies
  • Rating system & progress tracking
  • Basic friend system
  • Leaderboard

Examples:

The full reel canon is able to be seeded to the chosen database, and a get route created to send all movie data to the client.

Figure 1: GET /movies/reel-canon GET movies/reel-canon/ presents the entire 100 movie list to the user

A user seeding script creates users with reelProgress, ensuring data to manage front end state, and to calculate leaderboard standing are correct and accessible.

Figure 2: GET /leaderboard GET /leaderboard presents all users who have watched movies ranked from highest watched to lowest

Login route for authorisation has been fully completed, and ensures users with incorrect details or non-existent accounts receive a generic ambiguous message for added account protection.

Figure 3: POST /auth/login POST /auth/login accepts email and password, accepts valid users and returns JSON web token, invalid users are blocked

Register route for new users has been fully completed, with validation for password complexity, pre save password hashing, and query level protection from accidental password exposure.

Figure 4: POST /auth/register: Token obscured for data security purposes POST /auth/register accepts username email and password, valid data returns success and a JSON web token, obscured in this image for data security


Planned Releases:

V.0.2.0 - Custom lists

  • User-created custom lists
  • List sharing between friends
  • List subscriptions without friendship
  • List comparison features

V.0.3.0 - Recommendation Engine

  • Smart movie suggestions
  • Friend-based recommendations
  • "Next to watch" features

V.0.4.0 - Achievements & Advanced Leaderboards

  • Genre-specific leaderboards
  • Enhanced leaderboards accounting for social features
  • Challenge system
    • Trophies based on Genre
    • Base trophy implementation for Reel Canon completion

V.0.5.0 - Enhanced Social & Notification System

  • Movie discussions and user reviews
  • Social interactions
  • Notifications for friend requests

V.1.0.0 - Production release

  • Real-time notifications
  • Production optimization

5. Database Deployment

Evidence of deployment of database to Mongo Atlas: Reel Canon cluster in Mongo Atlas

Example of seeded movie in deployed Mongo Atlas database: Seeded movie in Mongo Atlas


6. Contributors


About

Backend API for a Full Stack MERN project!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors