# Getting Started

## GitHub

First, make sure to install git and docker on your local machine.

If you do not have git installed, check out <https://git-scm.com/>

If you do not have docker installed, have a look here: <https://www.docker.com/get-started>

For the system to work locally, you need the corresponding infrastructure to run virtually on your system for our backend to connect to the necessary services.

Now we are going to do just that. Pull the newest version of infrastructure to your local machine

```
$ git clone https://github.com/mp-access/Infrastructure.git
```

## Starting Docker Containers

Then in your console, cd into the corresponding directory, and start the docker containers

```bash
$ docker-compose -f .\docker-compose-dev.yml up -d
```

{% hint style="info" %}
You need to have Docker Desktop running for the docker containers to be able to start up.
{% endhint %}

{% hint style="info" %}
Check the console output for docker default machine. If it is not localhost, adapt the application.properties file accordingly.
{% endhint %}

We suggest checking up on the running containers if everything is working as expected

```bash
$ docker-compose ps
```

{% hint style="info" %}
If something did not run as expected, you can have a look at the logs with "docker-compose logs".&#x20;
{% endhint %}

## Starting Backend

Once the infrastructure environment is running locally, we can start the backend server.

As before, pull the newest version of our backend

```bash
$ git clone https://github.com/mp-access/Backend.git
```

Then you can start the server by running the `AccessApplication` file. You find it in ~~`\Course-Service\src\main\java\ch\uzh\ifi\access\AccessApplication.java`~~. If you are using IntelliJ IDEA, simply right click this file and press `Run AccessApplication`.

## Starting Frontend

As before, pull the respective respository in your console

```bash
$ git clone https://github.com/mp-access/Frontend.git
```

Cd into the directory and start the application with

```bash
$ npm start
```

Your default webbrowser should open the application automatically. If not, simply open a webbrowser of your choice and navigate to `localhost:3000`. As shown by the terminal output, you can also access keycloack by navigating to `localhost:9999`.

{% hint style="info" %}
Please check the console output, docker might be running on a different ip than localhost. check you
{% endhint %}

## All done

You are all set now to start coding or using the app locally ;)


---

# Agent Instructions: 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:

```
GET https://mp-access.gitbook.io/access/development/getting-started.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
