{"id":14155490,"url":"https://github.com/TYPO3-Headless/headless","last_synced_at":"2025-08-06T01:31:35.435Z","repository":{"id":37467066,"uuid":"197149814","full_name":"TYPO3-Headless/headless","owner":"TYPO3-Headless","description":"TYPO3 Headless JSON API providing content for PWA application (e.g. javaScript apps like nuxt-typo3)","archived":false,"fork":false,"pushed_at":"2024-10-24T09:51:10.000Z","size":1226,"stargazers_count":159,"open_issues_count":31,"forks_count":60,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-10-25T06:13:03.408Z","etag":null,"topics":["hacktoberfest","headless","headless-cms","php","typo3"],"latest_commit_sha":null,"homepage":"https://t3headless.io","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TYPO3-Headless.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.rst","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"custom":["https://buy.stripe.com/bIYcPX1wd9hrawUfZ0"]}},"created_at":"2019-07-16T08:09:26.000Z","updated_at":"2024-10-18T22:07:14.000Z","dependencies_parsed_at":"2023-02-18T00:31:40.911Z","dependency_job_id":"5092d818-68c0-40d7-8b38-f2fb3361990f","html_url":"https://github.com/TYPO3-Headless/headless","commit_stats":{"total_commits":328,"total_committers":41,"mean_commits":8.0,"dds":0.5579268292682926,"last_synced_commit":"0d6d92b25dd58a6ba4e45afd80d05a9b1547768c"},"previous_names":[],"tags_count":54,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TYPO3-Headless%2Fheadless","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TYPO3-Headless%2Fheadless/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TYPO3-Headless%2Fheadless/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TYPO3-Headless%2Fheadless/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TYPO3-Headless","download_url":"https://codeload.github.com/TYPO3-Headless/headless/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228821405,"owners_count":17977166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","headless","headless-cms","php","typo3"],"created_at":"2024-08-17T08:03:28.847Z","updated_at":"2024-12-09T02:31:25.512Z","avatar_url":"https://github.com/TYPO3-Headless.png","language":"PHP","funding_links":["https://buy.stripe.com/bIYcPX1wd9hrawUfZ0"],"categories":["php"],"sub_categories":[],"readme":"# TYPO3 Extension `headless` - JSON Content API for TYPO3 Headless solution\n\n[![TYPO3 13](https://img.shields.io/badge/TYPO3-13-orange.svg)](https://get.typo3.org/version/13)\n[![TYPO3 12](https://img.shields.io/badge/TYPO3-12-orange.svg)](https://get.typo3.org/version/12)\n[![TYPO3 11](https://img.shields.io/badge/TYPO3-11-orange.svg)](https://get.typo3.org/version/11)\n[![CI Status](https://github.com/TYPO3-Initiatives/headless/workflows/CI/badge.svg)](https://github.com/TYPO3-Initiatives/headless/actions)\n[![Latest Stable Version](https://poser.pugx.org/friendsoftypo3/headless/v)](//packagist.org/packages/friendsoftypo3/headless)\n[![Total Downloads](https://poser.pugx.org/friendsoftypo3/headless/downloads)](//packagist.org/packages/friendsoftypo3/headless)\n[![License](https://poser.pugx.org/friendsoftypo3/headless/license)](//packagist.org/packages/friendsoftypo3/headless)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](CODE_OF_CONDUCT.md)\n[![Coverage Status](https://coveralls.io/repos/github/TYPO3-Headless/headless/badge.svg?branch=master)](https://coveralls.io/github/TYPO3-Headless/headless/badge.svg?branch=master)\n\n[![Headless](https://github.com/TYPO3-Headless/.github/blob/main/profile/headless.jpeg?raw=true)](https://extensions.typo3.org/extension/headless)\n\nHeadless allows you to render JSON from TYPO3 content. You can customize output by changing types, names and nesting of fields.\n\nThis extension provides backend part (JSON API) for TYPO3 PWA solution. Second part is a JavaScript application [nuxt-typo3](https://github.com/TYPO3-Headless/nuxt-typo3) which consumes JSON API and renders the content using Vue.js and Nuxt. See frontend documentation here: https://typo3-headless.github.io/nuxt-typo3/\n\nIf you have any questions just drop a line in #initiative-headless-pwa Slack channel.\n\n|                  | URL                                                               |\n|------------------|-------------------------------------------------------------------|\n| **Repository:**  | https://github.com/TYPO3-Headless/headless                        |\n| **Read online:** | https://docs.typo3.org/p/friendsoftypo3/headless/main/en-us/      |\n| **TER:**         | https://extensions.typo3.org/extension/headless/                  |\n| **Slack:**       | https://typo3.slack.com/channels/initiative-headless-pwa          |\n\n## Features\n\n- JSON API for content elements\n- JSON API for page and meta data\n- JSON API for navigation, layouts\n- taking into account all language and translation configuration (e.g. fallback)\n- easily extendable with custom fields or custom content elements\n- custom data processors directly for headless usage\n- support for EXT:form\n- support for EXT:felogin\n- support for EXT:redirects\n- support for EXT:seo\n\n### Additional extensions and integrations\n\n- headless support for EXT:news [headless_news](https://github.com/TYPO3-Initiatives/headless_news)\n- headless support for EXT:solr [headless_solr](https://github.com/TYPO3-Initiatives/headless_solr)\n- headless support for EXT:powermail [headless_powermail](https://github.com/TYPO3-Initiatives/headless_powermail)\n- headless support for EXT:gridelements [headless_gridelements](https://github.com/itplusx/headless_gridelements)\n- small tools/tweaks for local headless development [headless_dev_tools](https://github.com/TYPO3-Headless/headless_dev_tools)\n- headless support for EXT:container [headless-container-support](https://github.com/TYPO3-Headless/headless-container-support) and [headless_container](https://github.com/itplusx/headless-container)\n\n## Requirements and compatibility\n\n| EXT:headless version  \t | TYPO3 support | PHP support       | Status \t                      |\n|-------------------------|---------------|-------------------|-------------------------------|\n| `\u003e= 4.0`  \t             | `12`, `13` \t  | `\u003e= 8.1`  \t       | Active development \u0026 support\t |\n| `\u003e= 3.0`                | `11`\t         | `\u003e= 7.4, \u003c= 8.2`\t | Critical bugfixes only \t      |\n| `\u003e= 2.0` \t              | `9`, `10`\t    | `\u003e= 7.2, \u003c=7.4`\t  | Critical bugfixes only\t       |\n\n\n## Quickstart / Demo\n\nIf you want to take a look at working demo including frontend, backend and demo data, use our DDEV based demo project here:\n[https://github.com/TYPO3-Initiatives/pwa-demo](https://github.com/TYPO3-Headless/pwa-demo)\n\n## Installation\nInstall extension using composer\n\n``composer require friendsoftypo3/headless``\n\n## Documentation\n[Extension documentation](https://docs.typo3.org/p/friendsoftypo3/headless/main/en-us/Index.html)\n\n## How to start with TYPO3 Headless video tutorial\n\nWhether you are a developer, content manager, or a tech enthusiast, this tutorial is tailored to provide a comprehensive introduction to TYPO3 Headless, helping you to get started on your journey with confidence.\n\n[![video still](https://i.ytimg.com/vi/7MOwugAyHkY/hq720.jpg)](https://www.youtube.com/watch?v=7MOwugAyHkY)\n\n## Configuration\n\nSince versions: `4.2` | `3.5` Flag `headless` is required to configure in site configuration!\n\nThis flag instructs how `EXT:headless` should behave in multisite instance.\n\nFor each site you can set in which mode site is operated (standard aka HTML response, headless, or mixed mode).\n\nYou can set `headless` flag manually in yaml file or via site configuration in the backend:\n\n```yaml\n'headless': 0|1|2\n```\n\n### Possible values:\nWhile the legacy flag (`true`|`false`) is still recognized, transitioning to the integer notation is recommended.\n- **0** (formerly: `false`) = headless mode is deactivated for the site within the TYPO3 instance. **Default value!**\n- **1** (formerly: `true`) = headless mode is fully activated for the site within the TYPO3 instance.\n- **2** = mixed mode headless is activated (both fluid \u0026 json API are accessible within a single site in the TYPO3 instance).\n\n### Configuration steps\nFor a chosen site in TYPO3, follow these steps:\n\n#### To enable Headless Mode:\n- In the typoscript template for the site, load the \"Headless\" setup file.\n- Set `headless` flag to a value of `1` in the site configuration file or configure the flag via editor in the Site's management backend.\n\n#### To enable Mixed Mode:\n- In the typoscript template for the site, load the \"Headless - Mixed mode JSON response\" setup file instead of the default headless one.\n- Set `headless` flag to a value of `2` in the site configuration file or configure the flag via editor in the Site's management backend.\n\nThe mixed mode flag (value of `2`) instructs the EXT:headless extension to additionally check for the `Accept` header with a value of `application/json` when processing requests to the particular site in the TYPO3 instance.\n\n- In cases where a request lacks the `Accept` header or `Accept` has a different value than `application/json`, TYPO3 will respond with HTML content (standard TYPO3's response).\n- In cases where a request's header `Accept` matches the value of `application/json`, TYPO3 will respond with a JSON response.\n\n## JSON  Content Object\nIn headless extension we implemented new JSON Content Object, which allows you to specify what fields you want to output, and how they will look. First, let's take a look at simple example\n```\nlib.page = JSON\nlib.page {\n  fields {\n    header = TEXT\n    header {\n      field = header\n    }\n  }\n}\n```\nOutput\n```\n{\n    \"header\" : \"headerFieldValue\"\n}\n```\nin addition, keyword `fields` allow you to nest multiple times fields in json, e.g.\n\n```\nlib.page = JSON\nlib.page {\n  fields {\n    data {\n      fields {\n        foo = TEXT\n        foo {\n          field = bar\n        }\n\n        foo1 = TEXT\n        foo1 {\n          field = bar1\n        }\n      }\n    }\n  }\n}\n```\nOutput\n```\n{\n    \"data\": [\n        {\n            \"foo\": \"bar\",\n            \"foo1\": \"bar1\"\n        }\n    ]\n}\n```\n## INT, FLOAT \u0026 BOOL Content Objects for use in JSON Content Object\n\nWe introduce new simple content objects to improve JSON API response for frontend developers.\nWe can set correct property types, so frontend does not have to deal with string values for fields with numeric values or field that should be true/false.\n```\nlib.page = JSON\nlib.page {\n  fields {\n    data {\n      fields {\n        foo = INT\n        foo {\n          # db value of foo_field = 1\n          field = foo_field\n        }\n        bar = BOOL\n        bar {\n          # db value of bar_field = 0\n          field = bar_field\n        }\n      }\n    }\n  }\n}\n```\nOutput\n```\n{\n    \"data\": [\n        {\n            \"foo\": 1,\n            \"bar\": false\n        }\n    ]\n}\n```\n## Customizing\nYou can override every field in output using typoscript. This extension allows you to use standard typoscript objects such as TEXT, COA, CASE.\n\n## Example page response  ⬇️\n\n![image](https://user-images.githubusercontent.com/15106746/136414744-88d54d44-2f3c-4d7d-9911-832ceefcfe16.png)\n\n## DataProcessing\n\nYou can use Data Processors just like in `FLUIDTEMPLATE` Content Object, e.g.\n\n```\nlib.languages = JSON\nlib.languages {\n  dataProcessing {\n    10 = TYPO3\\CMS\\Frontend\\DataProcessing\\LanguageMenuProcessor\n    10 {\n      languages = auto\n      as = languages\n    }\n  }\n}\n```\n\n## Built in data processors\n\nWe provide multiple data processors for headless rendering purposes.\n\n### DatabaseQueryProcessor\nUsed for fetching records from the database.\n\n### FilesProcessor\nThis processor should be used to process files (standard or media files).\n\nAlso, it allows you to process images. See [docs chapter: Images](https://docs.typo3.org/p/friendsoftypo3/headless/main/en-us/Developer/Images.html) for details.\n\n### GalleryProcessor\nShould be used along with `FilesProcessor` (chained). Used for processing mutliple media files.\n\n### MenuProcessor\nUsed for navigation. Works just like standard menu processor.\n\n### FlexFormProcessor\nUsed for processing flexforms.\n\n### RootSitesProcessor\nRender your all headless sites configuration for your frontend application.\n\n## Contributing\n![Alt](https://repobeats.axiom.co/api/embed/197db91cad9195bb15a06c91fda5a215bff26cba.svg)\n\n## Development\n\nDevelopment for this extension is happening as part of the TYPO3 PWA initiative, see https://typo3.org/community/teams/typo3-development/initiatives/pwa/\nIf you have any questions, join the #initiative-headless-pwa Slack channel.\n\n## Credits\n\nA special thanks goes to [macopedia.com](https://macopedia.com) company, which is sponsoring development of this solution.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTYPO3-Headless%2Fheadless","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTYPO3-Headless%2Fheadless","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTYPO3-Headless%2Fheadless/lists"}