> For the complete documentation index, see [llms.txt](https://docs.elentra.org/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.elentra.org/api/automated-testing/seed-data/folder-structure.md).

# Folder Structure

#### Seed Data Directory

Each module contains a `Database/Seeds` directory containing all files to seed the database for that module, including the`Seeder` class that specifies each seed data class. The seed data classes themselves are located in the `Database/Seeds/Data` directory.

#### Example:

```
- app
  - Modules
    - Events
      - Database
	- Seeds
	  - Data
    - Exams
      - Database
	- Seeds
	  - Data
```

#### Seed Data Location:

Seed data should be located in the module responsible for managing that data.&#x20;

{% hint style="success" %}
For instance, the Cases module uses Events, Courses, Curriculum Periods, Course Units and Weeks.

The seed data for Event models and tables used for the Cases tests should be under the Events module's seed data.
{% endhint %}

Sub-folders within the module's seed directory can be created for the purpose of organizing the files according to which other module depends on them. For instance:

```php
- app
  - Modules
    - Events
      - Database
	- Seeds
	  - Data
	    - Cases
	      - EventSeedData.php
	    - Exams
	      - EventSeedData.php
```

{% hint style="info" %}
Sub-folders for module-dependencies reduces confusion about which module is some seed data being inserted for.
{% endhint %}

{% hint style="warning" %}
Be mindful not to duplicate IDs across the different module sub-folders for the same entity.
{% endhint %}
