This assessment is designed to evaluate your technical proficiency in Node.js and related backend technologies, as well as your ability to apply that knowledge to solve real-world problems.
-
You will be expected to write clean, tested, well-documented, and efficient code that meets the requirements of each part of the assessment.
-
You may use any third-party libraries or tools you deem necessary to complete the assessment.
-
You will be evaluated based on the quality, readability, and maintainability of your code.
You are tasked with developing a RESTful API for Open Study College that allows internal users to retrieve and add data to a database of distance learning courses. The API should create the following endpoints but feel free to add to this should you feel necessary:
Endpoints:
- GET Courses - returns a list of all courses in the database
- GET Specific course - returns the course with the specified ID eg.
/courses/:id
- GET Collections - returns a list of all collections (Categories)
- GET Specific collection - returns a specific collection (along with all contained courses)
Features:
- Limit the return results eg.
?limit=5
- Return results in either Ascending or Descending order (Default to Ascending)
The course data should include at least the following fields: ID, Course Title, Course Description, Course Duration, and Course Outcome. You may use any database of your choice although a form of SQL would be preferable.
Extend the API developed in Task 1 to include authentication and authorisation functionality. The API should require users to authenticate before they can add or modify course data. The following endpoints should be added:
- POST /register - allows users to create a new account
- POST /login - allows users to authenticate and receive an access token
- POST a course - a user can add a new course to the database
- PUT a course - a user can update a course
- DELETE a course - a user can delete a course
The API should use JSON Web Tokens (JWT) to authenticate users and authorise their access to protected resources. You may use any JWT library of your choice.
- Your ability to design and develop a RESTful API using Node.js and related technologies
- Your ability to configure and implement a working database.
- Your ability to implement authentication and authorisation using JSON Web Tokens
- Your ability to optimise the performance of a Node.js application
- Your understanding of best practices for writing clean, maintainable, and efficient code
Please present your work in a Git version control repository hosting service such as Github, Bitbucket, GitLab, Codepen, Codesandbox etc and provide some form of a demo of your submission working.
We want to respect your time, so this should not take you more than 4 hours. If you run out of time, please document how you would finish this assessment in the README.
Best of luck!