> For the complete documentation index, see [llms.txt](https://codedthemes.gitbook.io/berry/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codedthemes.gitbook.io/berry/v5.1.0/getting-started/mock-backend.md).

# Mock backend

We use a mock backend to provide the necessary data and handle JWT authentication as well. This mock backend is shared across various apps for consistent data handling. You can find the mock backend server in the following GitHub repository:

* GitHub Repo: <https://github.com/phoenixcoded20/mock-data-api-nextjs>

The provided code of Berry directly uses a deployed URL. You can verify this by observing the network tab, where you'll see this URL being accessed at multiple points.

* Deployed URL: <https://mock-data-api-nextjs.vercel.app/>

<figure><img src="/files/0iima7oss7fta821aoti" alt=""><figcaption></figcaption></figure>

### Set up the Local backend server

If you intend to avoid a live server and want to use the same locally, follow the guidelines below.

1. Clone the GitHub repo to your machine:&#x20;

   ```shell
   git clone https://github.com/phoenixcoded20/mock-data-api-nextjs.git
   ```
2. Install and Run:&#x20;

   ```shell
   npm install
   npm run dev
   ```
3. This will start the backend locally at port 3010.
4. Replace the *API\_URL* key in `.env` at the root location of the Berry package:
   * VITE:&#x20;

     ```json
     VITE_APP_API_URL: http://localhost:3010/
     ```
   * NEXTJS:

     ```json
     REACT_APP_API_URL: http://localhost:3010/
     ```


---

# 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://codedthemes.gitbook.io/berry/v5.1.0/getting-started/mock-backend.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.
