---
title: ModelDocument
framework: swiftdata
role: symbol
role_heading: Structure
path: swiftdata/modeldocument
---

# ModelDocument

A document type that uses SwiftData to manage its storage.

## Declaration

```swift
struct ModelDocument
```

## Overview

Overview important: Don’t create instances of this type. Instead, use one of the initializers on DocumentGroup.

## See Also

### Model storage

- [Maintaining a local copy of server data](swiftdata/maintaining-a-local-copy-of-server-data.md)
- [DefaultStore](swiftdata/defaultstore.md)
- [DataStore](swiftdata/datastore.md)
- [DataStoreBatching](swiftdata/datastorebatching.md)
- [HistoryProviding](swiftdata/historyproviding.md)
- [Building a document-based app using SwiftData](swiftui/building-a-document-based-app-using-swiftdata.md)
