# New Component/Service/Pipe Creation Process

This section will explain the proper way to create a new component/service/pipe since the refactor. We will use a component as an example but the process is exactly the same for a service or pipe.

Steps:

* Create a folder in src/lib/src/components for your new component and add the necessary files (TS, HTML, SCSS)
* Add a line to the src/lib/src/components/index.ts barrel file that exports your new component
  * `export * from './my-new-component/my-new-component.component';`
* Create a folder in src/demo/app/demos for your new component. This is where you will be creating the demo. It is no longer in the same folder as the component.
* Import your new component into the ui-library component and the app.module.ts and register it with both like you normally would.


---

# 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://cedrus.gitbook.io/project-fusion/new-componentservicepipe-creation-process.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.
