Skip to Content

Setup Web Development Environment

The following section describes the lightweight setup process for the web app, which allows faster development and testing. For native features and not web related bug fixes, refer to the full setup guide, which includes the setup of the mobile app environment.

Prerequisites

  1. Fork the repository and clone it to your local machine.

  2. Install the required software:

  3. Install the required dependencies:

    • Node.js  22 LTS or higher
    • Bun  or use npm if you dont’t change dependencies
  4. In addition is recommended to use the Biome  extension for your IDE to get real-time feedback on your code.

  5. Install project dependencies by running the following command in the project directory:

    bun install
  6. Copy the .env.local.example file to .env.local and fill in the variables.
    See the notes on the API key.

.env.local
EXPO_PUBLIC_THI_API_KEY=abc123

Development

  1. Create a new branch from your fork to contribute to the project. Use a descriptive branch name.

  2. Make your changes and ensure that the code follows our coding style and conventions.

  3. Run the app locally with Expo by running the following command in the project directory:

    bun web

Detailed information about contributing to the project and the code style can be found in the full setup guide.

Due to the CORS rules of the THI API, which do not allow localhost, you need to use a proxy or a browser extension to use the API in the browser.

Setting up the CORS Proxy

To use the THI API during local development, it is recommended to use the Neuland CORS Proxy .

The proxy is intended for local development only and should not be used in production environments!

The easiest way to run the proxy is using Docker:

docker run -p 3001:3001 ghcr.io/neuland-ingolstadt/neuland-next-proxy:latest

The proxy is now running on http://localhost:3001.

Optional: Use a different port:

docker run -p 8080:8080 -e PORT=8080 ghcr.io/neuland-ingolstadt/neuland-next-proxy:latest

Manual Installation

Alternatively, you can install the proxy manually:

  1. Clone the proxy repository:

    git clone https://github.com/neuland-ingolstadt/neuland-next-proxy.git cd neuland-next-proxy
  2. Install the dependencies:

    pnpm install
  3. Start the proxy server:

    pnpm dev

Configuring Neuland Next Web

Add the following environment variable to your .env.local file:

.env.local
EXPO_PUBLIC_ENDPOINT_HOST=http://localhost:3001

Now you can start the web app with bun web and the THI API will be accessed through the proxy.

Last updated on