Football App
Example of custom front-end component fetching data from an external source (Sportmonks) manageable via VTEX CMS (Site Editor).
- Front-end customization
- Site Editor integration (CMS)
- External API calls
- GraphQL on VTEX IO
- Admin extension
- App settings
-
Clone/Download this repository and open it with a code editor of your choice, eg. VSCode
-
Open the terminal and login to your VTEX account
vtex login {{account}}
- Create a new development workspace or use an existing one
vtex use {{workspace}}
- Add the account name as the vendor on
manifest.json
file
{
"name": "football-app",
"vendor": "{{account}}",
"version": "0.0.1",
"title": "Football App",
"description": "Example of custom front-end component fetching data from an external source (Sportmonks) manageable via VTEX CMS (Site Editor).",
"mustUpdateAt": "2018-01-04",
...
...
}
- Link the project
vtex link
- After the linking, open the admin panel and show that we extended it with a brand new section
Navigate to:
https://{{workspace}}--{{account}}.myvtex.com/admin/football
-
Input a valid "Sportmonks API Token", eg.
****************
and save. (You can generate a valid one here) -
Download the VTEX Store theme or another store theme of your choice
-
Add the Football App as peer dependency on the Store theme
manifest.json
file (line 71)
- Add the Football App front-end component
teams-list
on the Store themehomepage.jsonc
file (line 14)
- Link the Store theme project
vtex link
- Navigate to the Storefront and show the new Football component on the homepage
- Open the Site Editor and show that we can edit the configuration of the Football App front-end component