Giter Club home page Giter Club logo

full-stack-project-assessment's Introduction

Video Recommendation App

Background

To apply to The Launch you must show you can meaningfully contribute to a technical project. This means that you must clearly demonstrate that you can create and deploy full stack applications. If you cannot yet complete this full stack assessment, you are not ready to apply to The Launch.

Challenge

In this project, you will be building up a small application that allows you to share your favourite YouTube videos with the world. We will begin with a very small MVP (Minimal Viable Product), and build on top of it to make it nicer and more useful.

User stories πŸ‘©πŸ½β€πŸ’»

Most of the core features for this project have been captured as user story issues. You can view all the user story issues on the project planning board: User story issues. User story issues define a particular feature through a user story. They also link through to other issues you'll need to implement for this user story to be complete.

Requirements

All the requirements for this project are captured as issues that you can find on this planning board: Full Stack Assessment Planner

Tip

Some of the issues are optional which means that you can build a working project without them. However, make something really impressive: complete as much as you can. We value excellence and so do employers.

Week 1 - Minimal Viable Product

Week 1 issues

Week 2 - Additional features

Week 2 issues

Week 3 - Finalizing project

Week 3 issues

Week 4 - Stretch goals

Use extra time this week to implement missing required and optional features from previous weeks. Week 4 issues

Sample Solution

Here is an example solution for both frontend and backend, including all optional features:

https://cyf-fsa-solution.netlify.app/

Note

You can design the website to look however you like.

Using this project for the launch project and other portfolio pieces

While you are free to use this codebase for your future projects we recommend against it. This project is set up in a way to make it easy to understand, but lacks a lot of features that would be otherwise helpful.

For launch projects and future portfolio pieces, look at the Code Your Future Starter Kit. This assessment project is a simplified version of the starter kit, with a lot of the features removed to keep it light and more understandable. In fact, some of the challenges in this project are to re-add these features yourself, like support for linting.

Since these features will already be present in the starter kit, it will be a much better starting point. And since it uses the same libraries and setup that you will learn here, you should feel immediately familiar with it.

full-stack-project-assessment's People

Contributors

abadi11 avatar chrisowen101 avatar dedekind561 avatar domvinyard avatar illicitonion avatar sallymcgrath avatar sztupy avatar textbook avatar youssef910 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

full-stack-project-assessment's Issues

Update videos endpoint

Acceptance criteria

  • There is an endpoint available for updating video ratings
  • The endpoint accepts an appropriate HTTP method
  • The endpoint has an appropriate URL
  • The endpoint updates the ratings of videos in the database

Delete videos endpoint

Description

HTTP Method: DELETE

Route: /api/videos/{id}

This endpoint is used to delete a specific video from the database. DELETE endpoints don't require a request body, and they don't even need to return a response body! While you can return a confirmation message: however, if you don't want to, you can use the HTTP status code 204 to tell the client that the action was successful, but there is no response body.

To make the endpoint nicer, you can also change it so if you try to call this endpoint on an id that doesn't exist, the system may respond with a HTTP 404 status code designating that the video did not exist in the first place or was already deleted.

Acceptance Criteria

  • A DELETE /api/videos/{id} backend endpoint is implemented to remove specific videos.
  • The endpoint handles non-existent video IDs gracefully, returning an appropriate HTTP status code (e.g., 404).
  • The endpoint returns a confirmation message or uses an HTTP status code 204 to indicate successful deletion.

[TECH ED] Levels 400

Link to the coursework

https://github.com/CodeYourFuture/Full-Stack-Project-Assessment

Why are we doing this?

Find the levels 400 (all 400 levels) and break down the work into tickets. Plan out your approach and get cracking.

Maximum time in hours

4

How to get help

Open draft PRs and ask for review, stating clearly where your blocker is.

Work on your project in Study Group class time and get live help from mentors.

How to submit

Find the submission steps and follow them.

New video form

Acceptance Criteria

  • There is a user-friendly form for capturing new video recommendations
  • The form supports fields for video titles and YouTube URLs

Deployed prototype

Check the deployed prototype to see how this issue could be implemented

Get all videos endpoint

Dependencies

This issue depends on #477 and #476 completing first

Context

For this level, you need to design an endpoint that will list all videos. Endpoint designs are usually separated into the HTTP Request Method type and the route that the endpoint should exist on. For a recap on HTTP Request Methods you can read this guide here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods

Endpoint Definition

HTTP Method: GET
Route: /api/videos

Acceptance criteria

  • The endpoint successfully connects to the configured database
  • The endpoint fetches and responds with all video records from the database
  • The endpoint returns a status code of 200

Example

Check https://lvl199--cyf-fsa-solution.netlify.app/api/videos for an example implementation of this issue.

Check and improve accessibility with lighthouse

Acceptance Criteria

  • A Lighthouse accessibility audit is conducted and achieves above 80 on Accessibility.
  • The Lighthouse report (HTML) is included in the Pull Request.
  • CSS provides clear focus states to visually indicate the currently active control.
  • All website controls can be navigated and activated using only the keyboard.

Check out the resources section below to figure out how to implement this requirement.

Guidance 🧭

Lighthouse Accessibility Testing: https://supercooldesign.co.uk/blog/how-to-run-a-lighthouse-audit

Video voting buttons

Acceptance Criteria

  • Each video displays its current rating in a visually clear manner (e.g., thumbs up /thumbs down icons, numeric display).
  • Users can increase the rating of a video ("thumbs up").
  • Users can decrease the rating of a video ("thumbs down").
  • A user's rating actions are recorded and persist across sessions.

Example

Check this example Video voter example to see how this issue could be implemented.

Delete a video recommendation

Acceptance criteria

  • On page load, the website should display a list of video recommendations
  • For each video recommendation:
    • It should show the video's title
    • If you click on the title it should redirect you to the YouTube page for that video

Deployed prototype

Check the deployed prototype to see how this issue could be implemented

Post new video endpoint

HTTP Method: POST

Route: /api/videos

Acceptance Criteria

  • There is a POST /api/videos backend endpoint to facilitate adding videos to the database.
  • The endpoint generates and attaches a unique ID to each newly added video.
  • The endpoint accepts video data in JSON format (example provided).
  • The endpoint responds with a JSON response that includes the generated id (example provided)

[TECH ED] Levels 300

Link to the coursework

https://github.com/CodeYourFuture/Full-Stack-Project-Assessment

Why are we doing this?

This project requires you to do a lot of reading and finding out where docs are. You will have to do this all the time in your job as a developer. It's a daily task.

Find the levels 300 (all 300 levels) and break down the work into tickets. Plan out your approach and get cracking.

Work on your project during the week, during class day, and in study sessions. Ask for online study sessions with mentors on Slack.

Maximum time in hours

6

How to get help

Open draft PRs and ask for review, stating clearly where your blocker is.

Work on your project in Study Group class time and get live help from mentors.

How to submit

Find the submission steps and follow them.

missing .gitignore file

repo needs .gitignore file with the as below line:

**/node_modules/

along with this change server/node_modules/ needs to be removed as well.

Sorting the video recommendations

Description

When you return all of the videos from the /api/videos endpoint your API should support an optional query parameter that will change the ordering of the data

/?order=asc

and

/?order=desc

Acceptance criteria

  • When you receive asc the videos should be returned in ascending order by the number of votes. i.e. starting with the lowest number of votes.
  • When you receive desc the videos should be returned in descending order by the number of votes. i.e. starting with the highest number of votes.
  • If no parameter is passed, the order should be by ID.
  • Users can select an ordering in the frontend

Example

Please check https://lvl499c--cyf-fsa-solution.netlify.app for an example solution of this level

User story: Allow rating of videos πŸ‘ πŸ‘Ž

Description

You pass around your project among your friends, and they like it better than the first version you showed them last week. They are enthusiastic and want to let you know which videos they also liked, and which they didn't! Implement ratings - allowing other users to give your videos a thumbs up or a thumbs down!

User story πŸ‘©πŸ½β€πŸ’»

As a user, I want to vote on a video recommendation, so other users will know which videos are the highest recommended

Required issues 🎫

[TECH ED] Levels 100

Link to the coursework

https://github.com/CodeYourFuture/Full-Stack-Project-Assessment

Why are we doing this?

This solid walk through of a full stack project is to prepare you for the Launch Module. You will be working in teams and you will need to be able to build features on any part of the stack. Use this time to secure your understanding of the basic concepts you will be applying in your team project.

Team members that do not contribute are removed from Launch Projects.

Maximum time in hours

6

How to get help

Open draft PRs and ask for review, stating clearly where your blocker is.

Work on your project in Study Group class time and get live help from mentors.

How to submit

Find the submission steps and follow them.

How to review

Your project will be reviewed by an independent team of mentors. If you haven't gotten any code review, please post in Slack and get one.

πŸš€ Deploy backend on Netlify

Acceptance criteria

  • There is a public URL to reach your backend on the internet
  • /health endpoint on your deployed backed responds with "OK"

Guidance 🧭

Deploy your backend on Netlify. This project is set up to work with Netlify, so please follow the Netlify deployment guide to deploy your app. Make sure to read the notes on backend deployment as well.

Issues with dependency management

  • client/yarn.lock suggests that Yarn should be used
  • server/package-lock.json suggests that NPM should be used

The syllabus only covers the latter, so the CRA app should be migrated over - I think it's just a matter of deleting yarn.lock, npm installing and committing the package-lock.json instead, none of the scripts reference npm/yarn.

Also server/node_modules/ is under version control, we need a .gitignore somewhere.

πŸš€ Check frontend deployment

Dependencies

#477

Acceptance criteria

  • There is a public URL to reach your frontend on the internet
  • The public frontend URL is available on your Github repo About section. See the guidance below.

Guidance 🧭

If you have set up Netlify deployment in #477 this should now work automatically for the frontend as well. Once you have the url to your deployed frontend, add it to the About section on your Github repo . Paste the URL to your deployed frontend into the website section
Screenshot 2024-04-12 at 11 56 57

Deployed prototype

Check the deployed prototype to see how this issue could be implemented.

Embed videos

Acceptance Criteria

  • Users can view YouTube videos directly within the website, without external redirects.
  • Videos are embedded using HTML <iframe> tags.

Check out the resources section below to figure out how to implement this requirement.

Guidance 🧭

Embedding YouTube Videos: https://support.google.com/youtube/answer/171780?hl=en

Example solution

Check out this example solution to see how this issue could be implemented

πŸš€ Deploy database on supabase

Acceptance criteria

  • The videorec database is deployed on supabase
  • The deployed database contains the videos table and at least 2 rows of sample data

Depends on #464

Guidance 🧭

Follow the Supabase deployment guide in the curriculum to register and deploy your database. After finishing the steps make sure you load up the db/initdb.sql

Review Wk1

Full-Stack-Project-Assessment

Level 100

  1. Videos should be loaded from a local javascript variable containing the data included in exampleresponse.json
    Good

  2. For each video, display a React component that contains

    • The videos title - Good
    • An embedded video - Good
    • The number of votes the video has - Good
    • A button that when clicked removes the video - Good
  3. On each video submission there should be two buttons

    • "Up Vote" - This increases the vote score when clicked - Good
    • "Down Vote" - This decreases the vote score when clicked - Good - but it goes negative
  4. On the page there must be another React component that will add a Video.
    Not working yet

  5. Your website must follow accessibility guidelines (see below for more details)
    Not done

Clear code, mostly works. Personally I would have made a component that represented a single video.

Completeness 6/10
Code Style 4/5
Clarity 4/5

Error handling for get videos

Description

You should design your system with error handling in mind. For example if the database cannot be accessed when you call GET /api/videos, then your backend endpoint should return a properly formatted error message with a HTTP 500 error code.

Acceptance criteria

Given a client calls the /api/videos endpoint,
When the server cannot connect to the database ,
Then:

  • The server should respond with a 500 status code
  • The server should respond with a json object indicating the type of error

Here is an example JSON response:

{ "success": false, "error": "Could not connect to the database" }

User story: Video recommendation listings

Background

In the first week, we will build an MVP - a Minimum Viable Product. This product has the bare minimum of features to demonstrate a concept to an end user. It will likely not be nice, but it can already be shown to your peers to check and comment on. The MVP for the project we are doing is the ability to show a list of pre-defined videos to the user.

User story πŸ‘©πŸ½β€πŸ’»

As a user, I want to view a list of video recommendations, so I can work out what to watch next on YouTube

Required issues 🎫

Example implementation

Here is an example implementation of how this user story could be implemented: https://lvl130--cyf-fsa-solution.netlify.app/

Format and lint code

Description

It is a good idea to make sure that your code is formatted based on a single standard throughout your project. There are two packages that can usually help you with that:

  • prettier is a formatter that makes sure that your code is formatted the same way throughout. For example all files use tab characters for indenting.
  • eslint is a linter that checks the code for common coding mistakes and warns you if it encounters any of them. It can also automatically fix some mistakes.

Acceptance criteria

  • Code is formatted using prettier config .prettierrc
  • Code is lintted using eslint config .eslintrc

Guidance 🧭

Check the code quality guide for steps on how to format and form

Store date created on new videos

Acceptance criteria

  • When a user adds a new video, store the date and time they posted it in the database.
  • The date created value is displayed in the frontend

Guidance 🧭

This might require a change to your database schema - you should make sure you can deploy this change without breaking existing videos, the same way the rating system was done.

Example

Check this example implementation to see how this feature could be implemented.

βš™ Setup local database

Acceptance criteria

  • You have a functional videorec database with title and a src columns
  • Your local videorec database is populated with the initial data from initdb.sql.
  • You can drop and recreate a local videorec database each time you run initdb.sql
  • You can successfully create backups of your database and restore from them.

Guidance 🧭

Check the db setup guide for steps to set up your local database

User story: Add new video recommendations

Background

Your website is getting better and better every day. You feel good and decide to watch some tutorial videos on YouTube. One of them catches your eye and you decide to add it to your video recommendations. However, you realise that currently the only way to add new items is to edit the database directly. That's not too convenient, so you set up to change this! Enhance your website's functionality by enabling users to add video recommendations directly and improving user experience.

User story πŸ‘©πŸ½β€πŸ’»

As a user, I want to add new videos, so I can save new video recommendations for later viewing

Required issues 🎫

[TECH ED] Levels 200

Link to the coursework

https://github.com/CodeYourFuture/Full-Stack-Project-Assessment

Why are we doing this?

200 and 250 are concerned with Databases, so we will do a short workshop in class getting started with Level 200. Come to class prepared by reading the day plan, project files, and writing down your questions.

Share your questions by Friday so mentors can prepare to help you.

Maximum time in hours

6

How to get help

Open draft PRs and ask for review, stating clearly where your blocker is.

Work on your project in Study Group class time and get live help from mentors.

How to submit

Find the submission steps and follow them.

Backend unit tests

Acceptance criteria

  • All backend tests in api.test.js are passing

Guidance 🧭

Check out the testing guide to setup your backend unit tests

List video recommendations

Acceptance criteria

  • On page load, the website should display a list of video recommendations
  • For each video recommendation:
    • It should show the video's title
    • If you click on the title it it should redirect you to the YouTube page for that video

Guidance 🧭

API access from React

Since we are using a monorepo, the API is accessible on the same domain as the frontend. This means you can use calls like fetch("/api/videos") to call the endpoint you created in your backend. You don't need to worry about CORS requirements either.

Checkout this cheat sheet to help you with the types of requests you'll need to be use with fetch: https://www.freecodecamp.org/news/fetch-api-cheatsheet/

Example

Check https://lvl130--cyf-fsa-solution.netlify.app for an example implementation of this issue

User story: Delete video recommendations πŸ—‘οΈ

Background

You are now starting to add a lot of videos to your site. You soon realise your recommendations have grown hugely and some of the videos you don't really want to recommend any more. This is a good time to implement a new feature to allow them to be deleted!

User story πŸ‘©πŸ½β€πŸ’»

As a user, I can delete any video recommendation, so I keep track of the video recommendations that matter the most

Required issues 🎫

Deployed prototype

Check the deployed prototype to see how this user story could be implemented

[TECH ED] Define your MVP

From Module-Template created by SallyMcGrath: CodeYourFuture/Module-Template#8

Link to the coursework

https://github.com/CodeYourFuture/Full-Stack-Project-Assessment

Why are we doing this?

Before we start we need to describe what we want to achieve. One way to do that is using user stories.

User stories are often expressed in a simple sentence, structured as follows:

As a [persona], I [want to], [so that].

Let's try to define user stories for our MVP:

As a CYF trainee I want to show my favourite videos so my friends know what videos I like
As a friend I want to see my friend's recommended videos so I can watch them myself

You can also break down into a bit more detail:

As a friend I want to see the title of each video so I know what the video is about
As a friend I want to be able to go to YouTube by clicking any of the titles so I can actually watch the recommendation

This is what we will define as the MVP and what we will try to implement during the first week

Maximum time in hours

1

How to submit

Make your user stories as tickets on your project board

How to review

Come back to your user stories after you've completed your project. Do they describe what your project does and why? Use them to write your readme.

βš™ Setup your local development environment

Acceptance criteria

  • You can run your server locally on port 3100
  • The endpoint http://127.0.0.1:3100/health returns OK
  • You can access your frontend locally on port 3000.
  • The endpoint http://127.0.0.1:3000 returns the web page for the video recommendations

Guidance 🧭

Check the Setup guide for steps on how to set up your local development environment

[TECH ED] Levels 100

From Full-Stack-Project-Assessment created by SallyMcGrath: #456

Link to the coursework

https://github.com/CodeYourFuture/Full-Stack-Project-Assessment

Why are we doing this?

This solid walk through of a full stack project is to prepare you for the Launch Module. You will be working in teams and you will need to be able to build features on any part of the stack. Use this time to secure your understanding of the basic concepts you will be applying in your team project.

Team members that do not contribute are removed from Launch Projects.

Maximum time in hours

6

How to get help

Open draft PRs and ask for review, stating clearly where your blocker is.

Work on your project in Study Group class time and get live help from mentors.

How to submit

Find the submission steps and follow them.

How to review

Your project will be reviewed by an independent team of mentors. If you haven't gotten any code review, please post in Slack and get one.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.