---
title: "Contentstack"
description: "Contentstack"
url: "https://www.contentstack.com/docs/developers/sdks/datasync-sdk-filesystem/typescript/reference/contentstack"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-09-22"
---

# Contentstack

## Contentstack

The Contentstack module creates an instance of the Contentstack class, which serves as the entry point for initializing a stack.

## Stack

A [stack](/docs/headless-cms/about-stack) is a repository or a container that holds all the [entries](/docs/headless-cms/about-entries)/[assets](/docs/headless-cms/about-assets) of your site. It allows multiple users to [create](/docs/headless-cms/create-an-entry), [edit](/docs/headless-cms/edit-an-entry), [approve](/docs/headless-cms/send-an-entry-for-publish-or-unpublish-approval), and [publish](/docs/headless-cms/publish-an-entry) their content within a single space.

The Stack instance provides access to all query methods for fetching entries, assets, and content type data from the local filesystem.

```
Example:
import { Contentstack } from "@contentstack/datasync-filesystem-sdk";
const config = {
  contentStore: {
    baseDir: './_contents',
    defaultSortingField: 'updated_at',
    locale: 'en-us',
    projections: {
      _content_type_uid: 0,
    },
    referenceDepth: 2,
  },
}

const Stack = Contentstack.Stack(config);
```

Base directory of the folder where data is stored

Default locale to use when .language() is not specified in a query

The default nested reference field depth considered when calling .includeReferences(). This can be overridden by passing a numerical argument to .includeReferences(n)

Keys that by default would be removed from results. Pass key: 0 to remove, key: 1 to override the existing