# Anatomy of a site application

Source: https://zotonic.com/docs/2920/anatomy-of-a-site-application

URI: https://zotonic.com/id/2920

Language: en

A typical site contains the following directories. Create only the extension directories you actually need.

```text
garden/
├── rebar.config
├── src/
│   ├── garden.app.src
│   ├── garden.erl
│   ├── controllers/
│   ├── models/
│   ├── filters/
│   ├── scomps/
│   ├── actions/
│   ├── validators/
│   └── support/
└── priv/
    ├── zotonic_site.config
    ├── dispatch/
    ├── templates/
    ├── lib/
    ├── lib-src/
    └── translations/
```

`garden.erl` contains the site's Zotonic module declarations and lifecycle hooks. A generated site can also have an OTP application callback and supervisor when created with that option.

Keep template-facing business operations in models and focused implementation helpers in `support`. Do not turn the main site module into a collection of unrelated functions. See [What belongs in src and priv](/id/2176).

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2920?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/2920?language=en>)
