A Contentful app for exporting content types and their associated entries with references.
- List all available content types in your Contentful space
- Select specific content types for export
- Choose locale for content export
- Download complete content export including references and assets
- Built with Contentful UI library (@contentful/f36-components)
- Next.js 15 app directory structure
yarn installCreate a .env.local file in the root directory with the following variables:
# Contentful Configuration
CONTENTFUL_MANAGEMENT_TOKEN=your_management_token_hereHow to get these values:
- MANAGEMENT_TOKEN: Generate in Contentful under Settings > API keys > Content management tokens
Note: Space ID and Environment ID are automatically detected from the frontend context and don't need to be configured.
yarn devThe app will be available at http://localhost:3000
- Select Locale: Choose the locale for content export
- Select Content Types: Check the content types you want to export
- Export: Click the export button to download all content as JSON
The exported JSON file contains:
- Export metadata (date, locale)
- Selected content types with field definitions
- All entries for selected content types
- Referenced assets (images, files)
- Reference tracking for nested content
POST /api/export- Handles content export requests
yarn dev- Start development serveryarn build- Build for productionyarn start- Start production serveryarn test- Run testsyarn lint- Run linting
This app is designed to work as a Contentful app. Use the following commands:
yarn create-app-definition- Create app definitionyarn add-locations- Add app locations
- Next.js 15
- React 19
- Contentful UI library (@contentful/f36-components)
- Contentful Management SDK
- TypeScript
- Never commit your
.env.localfile - Keep your management token secure
- The management token has full access to your space
- Consider using environment-specific tokens for different deployments