# Design of our code

When it comes to building for us, we follow clear and consistent engineering practices. From predictable folder structures and reusable components to type safety and performance-first decisions, our goal is to keep the codebase easy to understand and safe to extend.

Understanding a codebase by jumping randomly between files can be overwhelming, especially for first-time contributors. To address this, we have documented how our code is structured, how individual modules are built, and the patterns we expect contributors to follow.

This section is designed to give you a solid mental model of the project before you start making changes, so you can contribute with confidence and without unnecessary friction.\\

***

#### What you will find here

This section is split into smaller, focused pages that cover how the codebase works in practice:

* [**Organization of code**](/contributing-to-betterbugs/design-of-our-code/organization-of-code.md)
* [**Routing and navigation**](/contributing-to-betterbugs/design-of-our-code/routing-and-navigation.md)
* [**Shared UI and layout system**](/contributing-to-betterbugs/design-of-our-code/page-shared-ui-and-layout-system.md)
* [**State, utilities, and constants**](/contributing-to-betterbugs/design-of-our-code/state-utilities-and-constants.md)
* [**Styling and theming**](/contributing-to-betterbugs/design-of-our-code/styling-and-theming.md)
* [**PWA and offline behavior**](/contributing-to-betterbugs/design-of-our-code/pwa-and-offline-behavior.md)
* [**Feature and module structure tour**](/contributing-to-betterbugs/design-of-our-code/feature-and-module-structure-tour.md)

Each page reflects how the project is built today, and will evolve as the codebase grows.


---

# 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.betterbugs.io/contributing-to-betterbugs/design-of-our-code.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.
