Git Product home page Git Product logo

veeramanikandanr48 / nxt-assess Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 226 KB

In this project let's build an Nxt Assess App by applying the concepts we have learned till now. This project allows you to practice the concepts and techniques learned till React Course and apply them in a concrete project.

Home Page: https://veeranxtassess.ccbp.tech/

HTML 5.72% CSS 38.73% JavaScript 55.56%
api bootstrap css html jsx nodejs react-context reactjs router-dom

nxt-assess's Introduction

In this project let's build an Nxt Assess App by applying the concepts we have learned till now. This project allows you to practice the concepts and techniques learned till React Course and apply them in a concrete project.

You will demonstrate your skills by creating an app that will fetch data from an internal server using a component, displaying that data, routing concepts, authentication and authorization, and adding responsiveness to the website

This is an individual assessment. All work must be your own. You can request for the feedback after your project submission in the discussions.

Prerequisites

UI Prerequisites

Click to view
  • What is Figma?

    • Figma is a vector graphics editor and prototyping tool which is primarily web-based. You can check more info on the website
  • Create a Free account in Figma.

    • Kindly follow the instructions as shown in this video to create a free Figma account. Watch the video upto 00:50
  • How to Check CSS in Figma?

    • Kindly follow the instructions as shown in this video to check CSS in a Figma screen. Watch the video upto 02:45.
  • Export Images in Figma screen

    • Kindly follow the instructions as shown in this video to export images from a Figma screen.
    • Click on the Export button to get Export options as shown in the below image.
  • Upload your exported images from Figma to Cloudinary and get image URLs from Cloudinary. Refer this session for better understanding.

Design Files

Click to view
  • You can check the Design Files for different devices here.

Set Up Instructions

Click to view
  • Download dependencies by running npm install
  • Start up the app using npm start

Completion Instructions

Functionality to be added
The app must have the following functionalities
  • Login Route

    • When an invalid credentials are provided and the Login button is clicked, then the respective error message received from the response should be displayed
    • When a valid credentials are provided and the Login button is clicked, then the page should be navigated to the Home Route
    • When an unauthenticated user tries to access the Home Route, Assessment Route and Results Route, then the page should be navigated to Login Route
    • When an authenticated user tries to access the Home Route, Assessment Route and Results Route, then the page should be navigated to the respective route
    • When an authenticated user tries to access the Login Route, then the page should be navigated to the Home Route
    • When the Show Password checkbox is checked, then the password should be shown
    • When the Show Password checkbox is unchecked, then the password should be masked
  • Home Route

    • When an authenticated user opens the Home Route,
      • When the Start Assessment button is clicked, then the page should be navigated to the Assessment Route
  • Assessment Route

    • When an authenticated user opens the Assessment Route,

      • An HTTP GET request should be made to questionsApiUrl

        • loader should be displayed while fetching the data
        • After the data is fetched successfully,
          • The text of the first question, along with its corresponding options from the list of questions received in the response, should be displayed.
            • If the option_type value is DEFAULT, then the default options view should be displayed as shown in the Figma
            • If the option_type value is IMAGE, then the image options view should be displayed as shown in the Figma
            • If the option_type value is SINGLE SELECT, then the single select options view should be displayed as shown in the Figma
          • The Next Question button should be displayed
          • Answered questions count should be 0
          • Unanswered questions count should be equal to the total number of questions received from the response
          • The timer should start running backwards from the timer limit value set
        • If the HTTP GET request made is unsuccessful, then the failure view should be displayed as shown in the Figma
          • When the Retry button is clicked, an HTTP GET request should be made to questionsApiUrl
        • When a question number in the question numbers list is clicked,
          • If the option_type value is DEFAULT, then the default options view should be displayed as shown in the Figma
          • If the option_type value is IMAGE, then the image options view should be displayed as shown in the Figma
          • If the option_type value is SINGLE SELECT, then the single select options view should be displayed as shown in the Figma
      • When the Next Question button is clicked, then the next question text and its corresponding options should be displayed

      • If the active question has the option_type value as either DEFAULT or IMAGE and an option is selected,

        • Selected option should be highlighted as shown in the Figma
        • Answered questions count should be incremented by one
        • Unanswered questions count should be decremented by one
      • If the active question has the option_type value as SINGLE_SELECT

        • First option is selected by default
        • Answered questions count should be incremented by one
        • Unanswered questions count should be decremented by one
      • When a question number in the question numbers list is clicked, if that has already been answered,

        • The user should be able to see the selected option
        • The user should be able to change the selected option
        • Answered questions count and unanswered questions count should remain the same
      • When the last question number in the question numbers list is clicked,

        • The Next Question button should not be displayed
      • When the Submit Assessment button is clicked within the time limit, then the assessment should end, and the page should be navigated to Results Route

      • When the timer has ended,

        • Assessment should end, and the page should be navigated to Results Route
  • Results Route

    • When the Submit Assessment button in the Assessment Route is clicked within the time, then the submit view should be displayed as shown in the Figma

      • The score achieved should be displayed
      • Time taken to submit the assessment should be displayed
    • When the timer has ended, then the time up view should be displayed as shown in the Figma

      • The score achieved before the timer has ended should be displayed
    • When the Reattempt button is clicked,

      • Both score and time taken values should be reset to 0
      • Page should be navigated to Assessment Route
      • User should be able to reattempt the assessment.
  • Not Found Route

    • When a random path is provided as the URL, then the page should navigate to the Not Found Route
  • Header

    • When the website logo image in the Header is clicked, the page should be navigated to the Home Route
    • When the Logout button in the Header is clicked in Home or Assessment or Results Route, then the page should be navigated to the Login Route
  • Users should be able to view the website responsively in mobile view, tablet view as well

API Requests & Responses

loginApiUrl

API: https://apis.ccbp.in/login

Method: POST

Request:

{
  "username": "rahul",
  "password": "rahul@2021"
}

Description:

Returns a response based on the credentials provided

Sample Success Response

{
  "jwt_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InJhaHVsIiwicm9sZSI6IlBSSU1FX1VTRVIiLCJpYXQiOjE2MTk2Mjg2MTN9. nZDlFsnSWArLKKeF0QbmdVfLgzUbx1BGJsqa2kc_21Y"
}

Sample Failure Response

{
  "status_code": 404,
  "error_msg": "Username is not found"
}

questionsApiUrl

API: https://apis.ccbp.in/assess/questions

Method: GET

Description:

Returns a response containing the list of all questions

Sample Response

{
  "total": 10,
  "questions": [
    {
      "id": "4c08f8e2-d69a-4cfa-9245-b76bdf3588d1",
      "options_type": "DEFAULT",
      "question_text": "React JS is developed by?",
      "options": [
        {
          "id": "a8222953-e043-4873-abee-bc5dae13ee51",
          "text": "Facebook",
          "is_correct": "true"
        },
        {
          "id": "0d5470e9-915e-400f-b495-930291046216",
          "text": "Twitter",
          "is_correct": "false"
        },
        "..."
      ]
    },
    "..."
  ]
}

Important Note

Click to view

The following instructions are required for the tests to pass

  • Note:

    • For Mini Projects, You have to use HTML elements to style the React Components. Usage of styled-components (CSS in JS) to style React components are not supported in Mini Projects. Test cases won't be passed, if you use styled components.
    • Refer to the below Example for the usage of data-testid in the HTML elements
      • Example: <div data-testid="questionItem" className="question-item"/>
  • Routes

    • Home Route should consist of / in the URL path

    • Assessment Route should consist of /assessment in the URL path

    • Results Route should consist of /results in the URL path

    • Header

      • The Nxt Assess Logo image in Header should consist of alt attribute value as website logo
  • Login Route

    • The Nxt Assess Logo image should consist of alt attribute value as login website logo
  • Home Route

    • The Assessment image should consist of alt attribute value as assessment.
    • Kindly follow the assessment instructions as shown in figma.
  • Assessment Route

    • Duration of the Assessment must be 10 minutes
    • The Failure View image should consist of alt attribute value as failure view
    • Wrap the Loader component with an HTML container element and add the data-testid attribute value as loader to it
    <div className="loader-container" data-testid="loader">
      <Loader type="ThreeDots" color="#263868" height={50} width={50} />
    </div>
    • The question with options_type is IMAGE, options should have alt attribute value as the value of the key text of each option item in the corresponding question from the list of questions from the received response
  • Results Route

    • The Submit image should consist of alt attribute value as submit
    • The Time Up image should consist of alt attribute value as time up
  • Not Found Route

    • The Not Found image should consist of alt attribute value as not found

Project Submission Instructions

  • For Mini Projects, you can submit the test cases at your own pace. But we suggest you to submit the code to know the percentage of completion through test cases and that score will be considered for your interviews.

  • Also it's important to publish your code frequently using Step - 4 in the Instructions tab.

Things to Keep in Mind

  • All components you implement should go in the src/components directory.
  • Do not remove the pre-filled code
  • Want to quickly review some of the concepts you’ve been learning? Take a look at the Cheat Sheets.

nxt-assess's People

Contributors

veeramanikandanr48 avatar

Watchers

 avatar

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.