arrow-left

All pages
gitbookPowered by GitBook
1 of 6

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Week of September 23th

Learn how to create a Discord chatbot using Node.js, integrate it with OpenAI's API, and implement testing for your bot.

hashtag
Workshops

  • Developer toolingarrow-up-right. Repo name: Work15_DeveloperTooling_YourName Check resources

  • . Repo name: Work16_React_YourName

hashtag
Execute Program

  • .

hashtag
Stretch

hashtag
Topics

  • Express server using Node

  • RESTful API development

  • External API integration and management

  • JSON data handling and mock database operations

  • Server-side logic for quiz generation and processing

  • Error handling and validation in API development

  • CRUD operations implementation

  • API documentation techniques

  • Asynchronous programming in JavaScript

  • Introduce learners to the concept of an ‘elevator pitch’

  • Building client-side apps with Reactarrow-up-right
    Execute Program Everyday TypeScriptarrow-up-right
    Execute Program Advanced TypeScriptarrow-up-right
    Project presentationsarrow-up-right

    week03-project03-server

    Learning Outcomes

    hashtag
    TypeScript and Express

    hashtag
    RESTFUL Api's

    hashtag
    Additional

  • schedule

    resources

    hashtag
    Typescript

    • hashtag

    hashtag
    Devtools

    hashtag
    Express and RESTFUL APIs

    • hashtag

      A guide on setting up the tools for this weeks project. Good explanation on generating and modifying a TS config file

  • hashtag

    Good node tutorial demonstrating using json object as a mock database

  • hashtag

    A brief guide to the different ways you can deal with data in your server

  • hashtag

    Documentation on using Postman to make a collection of tests for api endpoints

  • Official TS handbookarrow-up-right
    How to get the most out of the JavaScript consolearrow-up-right
    Get Started with Debugging JavaScript in Chrome DevToolsarrow-up-right
    Viewing And Changing The DOM in Chrome DevToolsarrow-up-right
    Setting up Typescript and Expressarrow-up-right
    Firefox Page Inspectorarrow-up-right
    Simulate Mobile Devices with Device Mode in Chrome DevToolsarrow-up-right
    A Guide To New And Experimental CSS DevTools In Firefoxarrow-up-right
    Node fs and Expressarrow-up-right
    How to parse data with Expressarrow-up-right
    Testing your serverarrow-up-right

    The Amazin' Quizzer API Backend

    hashtag
    Project Overview

    Your project is to build the backend for a dynamic web application that combines a quiz generator with data from multiple external APIs. This backend will serve as the foundation for a future full-stack application, showcasing your skills in server-side development, API integration, and data manipulation.

    hashtag
    Core Requirements

    1. TypeScript Implementation::

      • The entire backend project must be written in TypeScript.

      • Utilize TypeScript's static typing for all modules, functions, and API interfaces.

    hashtag
    Stretch Goals

    • Implement more complex quiz generation algorithms (e.g., adaptive difficulty).

    • Add a favourite count feature for questions and allow filtering by this criterion.

    • Develop more sophisticated results analysis.

    hashtag
    Project Phases

    hashtag
    Initial Spike Stage

    • Set up the basic structure of your Express server.

    • Implement a single endpoint that interacts with one external API.

    hashtag
    Core Project Development

    • Develop the full set of RESTful endpoints for quiz operations.

    • Integrate multiple external APIs.

    • Implement the quiz generation and results calculation logic.

    hashtag
    API Suggestions

    hashtag
    Easier APIs

    1. Open AI API - https://platform.openai.com/

    2. JokeAPI - https://jokeapi.dev/

    3. The Dog API - https://thedogapi.com/

    4. The Cat API - https://thecatapi.com/

    hashtag
    More Challenging APIs

    1. Twitter API - https://developer.twitter.com/en/docs/twitter-api

    2. Google Maps API - https://developers.google.com/maps

    3. Spotify API - https://developer.spotify.com/documentation/web-api/

    hashtag
    Submission Guidelines

    • Host your code in a Git repository with clear documentation.

    • Deploy your project on GitHub Pages. Feel free to deploy it elsewhere as well if you prefer and have the time.

    • Include a comprehensive README.md file detailing:

    hashtag
    Additional Considerations

    • Design your API with future frontend integration in mind. The frontend part of this project will be added next week.

    • Implement proper error handling and validation for incoming requests and external API responses.

    • Securely store any API keys or sensitive information required by your server.

    By completing this project, you will demonstrate your ability to create a robust backend application that combines original functionality with external data sources, showcasing your skills in API development, integration, and server-side logic implementation.

    hashtag
    Repository naming convention

    Please name your repo following this template: PRO03_BACK_Name1_Name2_Name3_Name4

    Configure the TypeScript compiler (tsconfig.json) for the project's specific needs.
  • Server-Side Setup:

    • Initialize a Node.js project using Express.

    • Implement a RESTful API for quiz-related operations and external API interactions.

  • JSON Endpoints:

    • Create endpoints that fetch data from at least two external APIs and return it in JSON format.

    • Implement endpoints for quiz-related operations (e.g., get questions, submit answers, retrieve results).

  • Quiz Functionality:

    • Develop server-side logic to:

      • Generate quizzes with randomly selected questions based on a chosen subject area.

      • Process quiz answers and calculate results, including areas of strength and weakness.

  • Data Management:

    • Use a JSON object in a separate file as a mock database to store quiz questions.

    • Implement CRUD operations for managing quiz questions in this mock database.

  • External API Integration:

    • Integrate at least two external APIs to enhance the quiz experience or provide additional information related to quiz topics.

    • Implement proper error handling for failed API requests or unavailable data.

  • Implement caching mechanisms for external API calls to improve performance.
  • Create comprehensive API documentation using tools like Swagger.

  • Unsplash it - https://unsplash.it/

  • REST Countries API - https://restcountries.com/

  • UK Police API - https://data.police.uk/docs/

  • Postcode Lookup - https://postcodes.io/

  • Giphy API - https://developers.giphy.com/docs/api/
  • GitHub API - https://docs.github.com/en/rest

  • The Movie DB API - https://developers.themoviedb.org/3/getting-started/introduction

  • The Guardian API - https://open-platform.theguardian.com/documentation/

  • News API - https://newsapi.org/docs/endpoints

  • TfL API - https://api.tfl.gov.uk/

  • Project setup instructions
  • API endpoints and their usage

  • External APIs used and their purpose in the project

  • Any stretch goals implemented

  • Ensure your server is deployable, even though a full deployment isn't required at this stage.

  • Document your API structure and endpoints thoroughly for future development.