# Mock backend

We use a mock backend to provide 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="https://2078200040-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FflrTH6nspDenn8uPkVTP%2Fuploads%2FNhJag6H93hAeJsxDRawP%2Fimage.png?alt=media&#x26;token=f36c9927-523f-4ed2-a554-281ca0264789" alt=""><figcaption></figcaption></figure>

### Setup Local backend server

If you intend to avoid live server and wanted to use same in local, follow below guidelines.

1. Clone 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 backend in local at 3010 ports.
4. Replace the *API\_URL* key in `.env` at root location of Berry package:
   * VITE:&#x20;

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

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