> For the complete documentation index, see [llms.txt](https://lern.sunbird.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lern.sunbird.org/use/developer-guide/discussion-forum/developer-installation/installation-guide/discussion-ui-setup-along-with-demo-application..md).

# Discussion-UI setup along with demo application.

**Background**:

Discussion-UI library is an angular base library that will help any platform to configure and use a discussion forum.

In the Sunbird use case, any of the learning sections can have a discussion forum attached to it like Courses, Groups, etc. This is being achieved by this library.

#### Git Repository: <a href="#git-repository" id="git-repository"></a>

{% embed url="<https://github.com/Sunbird-Ed/discussions-UI>" %}

**Prerequisite**:

1. [Nodebb](/use/developer-guide/discussion-forum/developer-installation/installation-guide/nodebb-setup.md#nodebb) Local setup
2. [Discussion Middleware](/use/developer-guide/discussion-forum/developer-installation/installation-guide/discussion-middleware.md) Local setup

### How to setup Discussions-UI

**Step:1**

Clone the discussion-ui repo from <https://github.com/Sunbird-Ed/discussions-UI.git>.

```
git clone git@github.com:Sunbird-Ed/discussions-UI.git 2> cd discussion-UI
```

**Step:2**

Install dependencies.

```
yarn
```

**Step:3**

Change the configuration of library/application to communicate with local NodeBB & Discussion-middleware\
**Note**: Make sure Local discussion-middeware & NodeBB is running.

the `host` in `urlconfig.json` file. Add below url.

```
host: 'http://localhost:3002'
```

**Step:4**

Build the discussion-ui library using.

```
npm run build-lib
```

This will generate a dist file along with assets. For every change in discussion-ui library you have to run build command.

**Step:5**

Run the demo application using the command.

```
npm run demo
```

This is a simple angular application which is used to test df-library in local.

**Note**: Demo application will run on port **4200.**

\\


---

# 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://lern.sunbird.org/use/developer-guide/discussion-forum/developer-installation/installation-guide/discussion-ui-setup-along-with-demo-application..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.
