> For the complete documentation index, see [llms.txt](https://wiki.berkie.ee/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.berkie.ee/techops/getting-started-projects/web-demo-project/assignment-3-frontend.md).

# Assignment 3: Frontend

We're going to jump straight into React! React is one of the most popular modern frameworks powering most modern websites. Here's a quick place to get started learning how React works

{% embed url="<https://react.dev/learn>" %}

This guide will have sections that walk you through the process of setting up a new React project. However, we will *not* be doing this for our intro assignment. We will be working out of an existing project, which is more often the case when inheriting codebases.

## Setup

To get started, pull the latest changes from the repository. Make sure you're in the `nodejs-demo` project folder and run:

```bash
git pull
```

You might get an error saying that you will be overwriting changes in your database file. That's okay! Unless you have some important stuff to save, just run:

```bash
git stash # this will temporarily remove your changes
```

and then pull from the repository again.

You should now see a new folder called `ieee-library-react`. This is where our React codebase lives! Typically, we separate the frontend and backend of our project into different folders, but right now let's just have it this way.

### Installing dependencies

Navigate into the folder. Install the dependenices for the project by running

```bash
npm install
```

Please be used to this workflow from now on. When dealing with JS projects, if you see a `package.json` file, you're likely going to need to install dependencies with `npm`.&#x20;

### Starting the React app

Now, you will run

```bash
npm start
```

and this will start the React development server. After maybe \~30 seconds, visit:

```
http://localhost:3000
```

to access the development server.

Lastly, **make sure your backend is running**. Look at [Assignment 1: HTTP Requests](/techops/getting-started-projects/web-demo-project/assignment-1-http-requests.md)to recall how to start the server.&#x20;

Now let's move on to navigating the project!&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://wiki.berkie.ee/techops/getting-started-projects/web-demo-project/assignment-3-frontend.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
