# Getting started

## Dashboard

Welcome to the IDPT wiki page. This wikipedia will get you started with the development work.

![image](https://user-images.githubusercontent.com/2022919/103443628-831a2700-4c61-11eb-93b5-9f77e15c8f4a.png)

## Prerequisite <a href="#prerequisite" id="prerequisite"></a>

1. You need to have `[`[`nodejs`](https://nodejs.org/en/)`](https://nodejs.org/en/)` installed. Any version between 8-latest should work. If you do not have `nodejs` installed, follow their documentation site it get it installed.
2. Make sure you have [`yarn`](https://classic.yarnpkg.com/en/docs/install/#mac-stable) or [`npm`](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) installed.
3. Intall [`MongoDB`](https://www.mongodb.com/try/download/community).
4. Install and configure `git` on your computer.
5. Getting started. [Follow the instruction here:](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)

Once you have Prerequisite installed, you are ready to get started.

Step 1: Clone the repository.

```
git clone https://github.com/sureshHARDIYA/idpt.git
```

Step 2: Get inside the backend folder inside the repository.

```
cd idpt/backend
```

step 3: Make sure your `mongoDB` is up and running. Copy `.env_example` and create a new file `.env`. You need to add following environment variables to `.env` file.

```
MONGODB_URI=ADD_YOUR_MONGODB_LOCALHOST_URI_HERE
CLOUDINARY_URL=ASK_ME
cloud_name=ASK_ME
api_key=ASK_ME
api_secret=ASK_ME
```

**Note** `MONGODB_URI` is mandatory one so, if you just have the correct `mongodDB` URI, the application should run.

step 4: Run the backend.

```
yarn && yarn start
```

If your configuration and everything is correct, it should run the API at given port. You should be able to see the screenshot as shown below. Note the message that says `MongoDB connected`.

![Screenshot 2020-10-07 at 15 13 46](https://user-images.githubusercontent.com/2022919/95335498-c4dc4100-08af-11eb-8a59-93d42ecb8b86.png)

* If you have error message and does not say `mongodb connected`, try to verify if `mongoDB` is running correctly.&#x20;

step 5: Run the frontend. Navigate inside the frontend folder in a `NEW` terminal:

```
cd frontend && yarn
```

To run the frontend, run `yarn start`

```
yarn start
```

Once it compile, you should have frontend running at a given PORT, `3000` usually. By now, you should have 2 terminal, once running backend server and one running frontend.

![image](https://user-images.githubusercontent.com/2022919/95336008-65326580-08b0-11eb-8f02-3911c25f87b6.png)

Open the link in any browser and you should be able to see the frontend.

![image](https://user-images.githubusercontent.com/2022919/95336141-9c087b80-08b0-11eb-9a72-8877e94b868e.png)

Congratulations! you were able to run the framework.

**Happy Coding !**


---

# 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://idpt.gitbook.io/web/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.
