https://github.com/sitecoreops/experience-edge-emu
Lightweight Experience Edge emulator for local (offline) development and test automation.
https://github.com/sitecoreops/experience-edge-emu
graphql-server sitecore
Last synced: 16 days ago
JSON representation
Lightweight Experience Edge emulator for local (offline) development and test automation.
- Host: GitHub
- URL: https://github.com/sitecoreops/experience-edge-emu
- Owner: sitecoreops
- License: mit
- Created: 2025-10-30T20:06:42.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-12-30T11:21:30.000Z (5 months ago)
- Last Synced: 2026-01-03T00:52:30.914Z (5 months ago)
- Topics: graphql-server, sitecore
- Language: C#
- Homepage:
- Size: 2.19 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# πͺΆ Experience Edge Emu (EEE) πͺΆ
Lightweight Sitecore Experience Edge emulator for local (offline) cross-platform development and test automation.
[](https://github.com/sitecoreops/experience-edge-emu/actions/workflows/cicd.yml)
[](https://github.com/sitecoreops/experience-edge-emu/releases/latest)
[](https://ghcr.io/sitecoreops/eee)
## Features
- GraphQL endpoint
- Experience Edge compatibility:
- `site` queries.
- `layout` queries.
- `item` queries.
- `search` queries **NOT SUPPORTED**β οΈ.
- Extras:
- `crawl` mutation, crawls existing Experience Edge endpoint to seed emulator with data and media π.
- Hosting media items.
- [GraphiQL UI](https://github.com/graphql-dotnet/server) 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).
- Native binaries for Windows x64 and Linux x64.
- Predefined "skatepark" dataset, use argument `--dataset skatepark`.
## Data layout
Under your data root (default `./data`, configured with the `EMU__DATAROOTPATH` environment variable) the following rules apply:
```text
./data
βββ /items/**/*.json (any structure supported, files must contain at least the required fields of type Item in the schema)
βββ /site
βββ /**/.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 `crawl` mutation to get some data to learn from.
## Crawling preview endpoints (preview context id's or local SitecoreAI CMS instances)
If you want to crawl Experience Edge with *preview** context id's or a local SitecoreAI CMS instances, then you will hit a CM server. This requires the following patch to increase the Sitecore GraphQL complexity configuration:
```xml
50
500000
```
## Limitations & known issues
Currently there a few limitations/gotchas, some may be fixed in the future:
1. When running `eee` in Docker, you cannot crawl a local SitecoreAI CMS instance *unless* they share the same Docker network.
1. Using the `maxWidth` and `maxHeight` on `src` property fields does nothing.
1. `SiteInfo.RoutesResult` only supports the `language` and `first` parameters, `excludedPaths`, `includePaths` and `after` does nothing.
1. `SiteInfo.DictionaryResult` only supports the `language` and `first` parameters, `after` does nothing.
## Quick start
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.
### Docker
run without SSL:
```powershell
docker run -e "EMU__MEDIAHOST=http://localhost:5710" -p 5710:8080 ghcr.io/sitecoreops/eee
```
or with persistence:
```powershell
docker run -v "./data/eee:/app/data" -e "EMU__MEDIAHOST=http://localhost:5710" -p 5710:8080 ghcr.io/sitecoreops/eee
```
or with the skatepark dataset:
```powershell
docker run -e "EMU__MEDIAHOST=http://localhost:5710" -p 5710:8080 ghcr.io/sitecoreops/eee --dataset skatepark
```
or with SSL:
1. Use [./compose.yml](./compose.yml) as reference, modify as needed, for example change image data volumes. Add `command: --dataset skatepark` to use the skatepark dataset.
1. Then `docker compose up -d`.
1. Make your machine trust the certificate, run `certutil -addstore -f "ROOT" ".\\docker\\caddy\\data\\caddy\\pki\\authorities\\local\\root.crt"`.
### Native binary
1. Download one of the binaries from .
1. Without SSL, run `.\eee.exe` (Windows) or `eee` (Linux).
1. For SSL, add the arguments:
1. `--Kestrel:Endpoints:HttpsDefaultCert:Url=https://localhost:5711` to use the developer certificate from `dotnet dev-certs`.
1. or `--Kestrel:Endpoints:Https:Url=https://localhost:5711 --Kestrel:Endpoints:Https:Certificate:Subject=localhost` to use your own.
### Usage
Run `query`:
```powershell
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:
```powershell
curl -k "https://localhost:5711/graphql" -H "Content-Type: application/json" --data-raw '{"query":"mutation{crawl(edgeContextId:\"\",languages:[\"en\"]){success,itemsProcessed,sitesProcessed,durationMs,message}}"}'
```
Or open to use the GraphiQL UI.
When you have seeded some data, change your local head application to use instead of your usual Experience Edge url.