> For the complete documentation index, see [llms.txt](https://razortheory.gitbook.io/action-points-dashboard/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://razortheory.gitbook.io/action-points-dashboard/technical-documentation/frontend/module-structure.md).

# Module structure

## Files structure

{% tabs %}
{% tab title="application\_root/:" %}
I\
\- `.circleci/` \
\- `gulp-tasks/` \
\- `images/` \
\- `src/` \
&#x20;       I\
&#x20;       \- `elements/` \
\- `tests/` \
\- `index.html` \
\- `package.json` \
\- `bower.json` \
\- `polymer.json` \
\- ...Other configuration files
{% endtab %}
{% endtabs %}

In the application root directory you can find all configuration files for development and build process. Here you can find Docker config files, configs for code linting, tests, gulp config, node server. Code for gulp tasks is placed in  `gulp-tasks/` directory. You can find all application elements in `src/elements/` directory. In `tests/` directory you can find entry point for tests.

## Elements directory structure

{% tabs %}
{% tab title="application\_root/src/elements/ :" %}
I\
\- `app-mixins/` \
\- `common-elements/` \
\- `core-elements/` \
&#x20;       I\
&#x20;       \- `app-config/` \
&#x20;       \- `app-shell/` (main application component)\
&#x20;       \- `app-main-header/` \
&#x20;       \- `app-sidebar/` \
\- `data-elements/`  \
\- `pages/` \
&#x20;       I\
&#x20;       \- `action-points-page-components/` \
&#x20;       \- `not-found-page-view/` \
\- `styles-elements/`&#x20;
{% endtab %}
{% endtabs %}

In `elements/` you can find:

1. `app-mixins/` directory with all application mixins (permission, common-methods, error-handler and ect.)
2. `common-elements/` directory with elements that are used in different pages several times
3. `core-elements/` directory with application config element, application main element and base elements common to all modules (header, sidebar)
4. `data-elements/`  directory with elements used to request static data from server (user-data, static-data)
5. `pages/` directory with elements divided by pages, which will be lazy loaded
6. `styles-elements/` with common styles elements

## Component structure

Almost all application components are split into 3 separate files:&#x20;

* html file with component template
* js file with components logic
* scss file with component styles

### Polytempl

Polytempl plugin helps combine separate components files and resolve imports.

You need to specify the special html comment to combine your html template file with js and scss files:

```
<!-- inject styles './path_to_styles.scss'-->
```

or&#x20;

```
<!-- inject scripts './path_to_logic.js'-->
```

You can specify the special html comment for imports. Polytempl will look for this components in your src files at first and than in `bower_components/` . See more details about Polytempl [here](https://www.npmjs.com/package/polytempl).

```
<!--import [polymer]-->
<!--import [module-styles, page-layout-styles, shared-styles, list-tab-main,
            static-data-behavior, search-and-filter, engagements-list-data, 
            pages-header-element, permission-controller, etools-app-config]-->
```


---

# 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://razortheory.gitbook.io/action-points-dashboard/technical-documentation/frontend/module-structure.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.
