# Source code organization

Smartstore's repository keeps concerns separated and supports modular development.

## Solutions

* `Smartstore.sln` – main solution containing application projects, modules, and tests.
* `Smartstore.Tools.sln` – separate solution for tooling and utilities.

## Top-level directories

| Path     | Purpose                                                                                           |
| -------- | ------------------------------------------------------------------------------------------------- |
| `src/`   | Application source code: core libraries, domain layer, web host, database providers, and modules. |
| `test/`  | Unit and integration tests mirroring the structure of `src/`.                                     |
| `build/` | Build automation scripts and configuration.                                                       |
| `tools/` | Additional tools used during development and build.                                               |

## `src/` breakdown

* **Smartstore** – cross-cutting infrastructure (caching, I/O, routing, engine runtime).
* **Smartstore.Core** – domain models, business logic, migrations, and service abstractions.
* **Smartstore.Web** – ASP.NET Core host with controllers, views, and configuration.
* **Smartstore.Web.Common** – shared web helpers, MVC components, theming, and bootstrapping.
* **Smartstore.Modules** – optional features like payment or shipping providers. Each module is a separate project with its own resources and optional migrations.
* **Smartstore.Data.**\* – database provider packages (SQL Server, MySQL, PostgreSQL, SQLite) keeping data access provider-specific.

During a build, modules from `src/Smartstore.Modules` are compiled and copied to `src/Smartstore.Web/Modules` for runtime loading.

## Tests

Test projects reside in the `test/` directory and follow the layout of `src/`. Typical projects include `Smartstore.Tests`, `Smartstore.Core.Tests`, and module-specific tests. All tests run via:

```bash
dotnet test Smartstore.sln
```


---

# 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://dev.smartstore.com/readme/source-code-organization.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.
