# Building Blocks

The ScandiPWA theme is separated into several subdirectories with specific responsibilities. This organization is enforced to ensure that the codebase is consistent and easy to navigate.

* `component`: contains definitions of reusable React components defined throughout the theme

{% content-ref url="/pages/-MNctSfba\_-IE\_yzAELr" %}
[Components](/structure/building-blocks-summary/components.md)
{% endcontent-ref %}

* `query`: defines a helper class for each GraphQl query that the theme needs

{% content-ref url="/pages/-MO5QlCvRHPOnhdpWRRa" %}
[GraphQL Queries](/structure/building-blocks-summary/constructing-graphql-queries.md)
{% endcontent-ref %}

* `route`: like `component`, but each route is added to the router, ensuring that it appears as a page in the SPA.

{% content-ref url="/pages/-MNwKSVyvIri6wyH38H\_" %}
[Routes](/structure/building-blocks-summary/routes.md)
{% endcontent-ref %}

* `store`: defines the global state of the application using Redux stores

{% content-ref url="/pages/-MO0Esw0AOpKiwpb\_KD8" %}
[Redux Stores](/structure/building-blocks-summary/redux-stores.md)
{% endcontent-ref %}

* `style`: sets the global styles of the application with SCSS

{% content-ref url="/pages/-MOFmOSS8pR629GGQ4Un" %}
[Global Styles](/structure/building-blocks-summary/global-styles.md)
{% endcontent-ref %}

* `type`: declares JavaScript data structure types using PropTypes

{% content-ref url="/pages/-MOAsI1fsIvYfvTttbBR" %}
[Type Checking](/structure/building-blocks-summary/type-checking.md)
{% endcontent-ref %}

* `util`: utility classes, functions and constants that do not fall in the other categories

{% content-ref url="/pages/-MOFeRtKoc3zIo06LUI4" %}
[The Util Directory](/structure/building-blocks-summary/the-util-directory.md)
{% endcontent-ref %}

{% hint style="warning" %}
When [extending the theme](/developing-with-scandi/override-mechanism.md), it is very strongly encouraged to maintain the same structure. Refrain from adding new directories or nesting directories too deeply.
{% endhint %}


---

# 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://docs.scandipwa.com/structure/building-blocks-summary.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.
