# What should be included in an OPF file?

**URL:** <https://forum.openpecha.org/t/what-should-be-included-in-an-opf-file/27>\
**Category:** 💁‍♂️ Pecha API WG\
**Tags:** docs\
**Created:** [August 16, 2024, 7:18am UTC](https://forum.openpecha.org/t/what-should-be-included-in-an-opf-file/27 "2024-08-16T07:18:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tenzin\_Tsundue](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.openpecha.org/tenzin_tsundue/32/9_2.png) [@Tenzin\_Tsundue](https://forum.openpecha.org/u/Tenzin_Tsundue)\
**Post date:** [August 16, 2024, 7:18am UTC](https://forum.openpecha.org/t/what-should-be-included-in-an-opf-file/27/1 "2024-08-16T07:18:18Z")

</div>

Base folder including text resource of one work. This could be in one .txt file or in more than one .txt file with volumes.

Metadata file in STAM JSON format containing information about the text resource file.

Layer folder including annotations in STAM JSON format.

---

<div class="post-metadata">

**Author:** ![Trinley](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.openpecha.org/trinley/32/3_2.png) [@Trinley](https://forum.openpecha.org/u/Trinley)\
**Post date:** [August 16, 2024, 7:23am UTC](https://forum.openpecha.org/t/what-should-be-included-in-an-opf-file/27/2 "2024-08-16T07:23:50Z")

</div>

Please add a folder structure illustration and list what can be included in resources (i.e. several volumes of the same text) and what shouldn’t be included (i.e. multiple version of the same text, a text and its commentaries etc).

Do the same for annotation stores (i.e. stores pointing to another base/text resources or alignment mapping should not be included)

---

<div class="post-metadata">

**Author:** ![Tenzin\_Tsundue](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.openpecha.org/tenzin_tsundue/32/9_2.png) [@Tenzin\_Tsundue](https://forum.openpecha.org/u/Tenzin_Tsundue)\
**Post date:** [August 20, 2024, 9:35am UTC](https://forum.openpecha.org/t/what-should-be-included-in-an-opf-file/27/3 "2024-08-20T09:35:32Z")

</div>

OPF Folder structure explanation  
 ![image](https://canada1.discourse-cdn.com/flex003/uploads/openpecha/original/1X/04b2c0295670f70b6540a24fb1cb39172b9678ee.png)

An opf contains the following

- pecha id: it is assigned uniquely to each pecha/ opf in the time of that particular pecha stam data creation.
- base folder contains the text files where the annotations are based on.
- layers folder contains all the annotation files, note that all annotations files are placed in an another folder structure with the same name as their base file.
- metadata json contains the details or metadata about the base files.
