Lightweight Sitecore Experience Edge emulator for local (offline) cross-platform development and test automation.
- GraphQL endpoint
- Experience Edge compatibility:
sitequeries.layoutqueries.itemqueries.searchqueries NOT SUPPORTED⚠️ .
- Extras:
crawlmutation, crawls existing Experience Edge endpoint to seed emulator with data and media 🚀.
- Experience Edge compatibility:
- Hosting media items.
- GraphiQL UI accessible on
/. - Hot reloading data when files in data root is modified.
- Health endpoint
/healthz. - Docker multi platform images
docker image pull ghcr.io/sitecoreops/eee(runs on both Windows x64 and Linux x64).
Under your data root (default ./data, configured with the EMU__DATAROOTPATH environment variable) the following rules apply:
./data
├── /items/**/*.json (any structure supported, files must contain at least the required fields of type Item in the schema)
├── /site
├── /**/<language>.json (language specific siteInfo data such as dictionary and routes)
├── sitedata.json (SiteData.allSiteInfo is stored here )
├── /media/** (stored as the media path)
├── /imported-schema.graphqls (will be create first time the crawl mutation is executed)
💡TIP: Run a
crawlmutation to get some data to learn from.
If you want to crawl Experience Edge with a preview context id's or a local XM Cloud instances you will hit a CM server. This requires the following patch to increase the Sitecore GraphQL complexity configuration:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<sitecore>
<api>
<GraphQL>
<defaults>
<security>
<publicService type="Sitecore.Services.GraphQL.Hosting.Security.GraphQLSecurity, Sitecore.Services.GraphQL">
<complexityConfiguration type="GraphQL.Validation.Complexity.ComplexityConfiguration, GraphQL">
<maxDepth>50</maxDepth>
<maxComplexity>500000</maxComplexity>
</complexityConfiguration>
</publicService>
</security>
</defaults>
</GraphQL>
</api>
</sitecore>
</configuration>Currently there a few limitations/gotchas, some may be fixed in the future:
- When running
eeein Docker, you cannot crawl a local XM Cloud instance unless they share the same Docker network. - Using the
maxWidthandmaxHeightonsrcproperty fields does nothing. SiteInfo.RoutesResultonly supports thelanguageandfirstparameters,excludedPathsandincludePathsdoes nothing andafterthrowsNotSupportedException.SiteInfo.DictionaryResultonly supports thelanguageandfirstparameters,afterthrowsNotSupportedException.
You can run in Docker or download native binaries for Linux and Windows. Running with SSL is important if your head application also runs SSL to avoid the browser blocks loading media on non SSL urls.
run without SSL:
docker run -e "EMU__MEDIAHOST=http://localhost:5710" -p 5710:8080 ghcr.io/sitecoreops/eeeor with persistence:
docker run -v "./data/eee:/app/data" -e "EMU__MEDIAHOST=http://localhost:5710" -p 5710:8080 ghcr.io/sitecoreops/eeeor with SSL:
- Use ./compose.yml as reference, modify as needed, for example change image data volumes.
- Then
docker compose up -d. - Make your machine trust the certificate, run
certutil -addstore -f "ROOT" ".\\docker\\caddy\\data\\caddy\\pki\\authorities\\local\\root.crt".
- Download one of the binaries from https://github.com/sitecoreops/eee/releases.
- Without SSL, run
.\eee.exe(Windows) oreee(Linux). - For SSL, add the arguments:
--Kestrel:Endpoints:HttpsDefaultCert:Url=https://localhost:5711to use the developer certificate fromdotnet dev-certs.- or
--Kestrel:Endpoints:Https:Url=https://localhost:5711 --Kestrel:Endpoints:Https:Certificate:Subject=localhostto use your own.
Run query:
curl -k "https://localhost:5711/graphql" -H "Content-Type: application/json" --data-raw '{"query":"{item(path:\"/sitecore/content/tests/minimal\",language:\"en\"){id,path,name,displayName}}"}'Run crawl mutation:
curl -k "https://localhost:5711/graphql" -H "Content-Type: application/json" --data-raw '{"query":"mutation{crawl(edgeContextId:\"<EDGE-CONTEXT-ID>\",languages:[\"en\"]){success,itemsProcessed,sitesProcessed,durationMs,message}}"}'Or open https://localhost:5711 to use the GraphiQL UI.
When you have seeded some data, change your local head application to use https://localhost:5711/graphql instead of your usual Experience Edge url.