Pre-requisites of the Project

Pre-requisites For Random Joke Generator

Before diving into development, it's important to know what tools and technologies you'll be working with. This module covers the basic requirements, the tech stack, and what kind of input and output you can expect from this project.

Basic Requirements

Before starting, ensure you have the following installed on your system:

  • Node.js (and npm): Install the LTS (Long Term Support) version from the official Node.js website. After installation, verify with node -v and npm -v in the terminal.
  • Code Editor: A text editor like VS Code or Sublime Text.
  • Web Browser: A modern browser (Chrome, Firefox, etc.) for testing.
  • Git: (Optional) to manage your project repository and version control.

Installing Node.js is important because it provides the npm package manager used for dependencies.

Tech Stack Used in the Project

This project uses the following technologies and tools:

  • ReactJS: Library for building the UI (components, JSX, state).
  • JavaScript (ES6): For writing application logic, using features like fetch, arrow functions, etc.
  • HTML/CSS: Standard markup and styling for the web page.
  • JokeAPI (Sv443): A free REST API that returns jokes in JSON format (no API key required). We use it to fetch random jokes.
  • Node.js: Provides the runtime and npm to manage packages (e.g., React).
  • Netlify: Platform to deploy the static app online.

Input

The app has no traditional text input from the user. The only input action is clicking the “Generate Joke” button, which triggers a function to fetch a new joke from the API.

Output

When the user clicks the button, a new joke string is fetched and displayed on the page. The output is a text paragraph showing a random joke. Each button click updates this paragraph with the latest joke.