👋 Welcome to the Keystone Example Projects – a collection of projects that demonstrate how to use Keystone.
You'll find two types of examples —
- Feature examples
These are standalone keystone examples that demonstrate specific use cases and can usually be deployed to codesandbox with a single click to take a quick peek at the demo.
- E2E examples
These examples showcase how Keystone works with other tools and frameworks and usually have a separate frontend and keystone setup that need to run simultaneously for the example to work.
- Task Manager: A simple task manager with Keystone
- Blog: A simple blog with Keystone
- Authentication: Add password-based authentication.
- Redis session store: Add password-based authentication with a Redis session store.
- Role based access control: Control list access based on user roles.
- JSON field: JSON field in schema.
defaultValue
: Default values in schema.extendGraphqlSchema
: Extending the GraphQL API.extendGraphqlSchema
with graphql-ts: Extend the GraphQL API with graphql-ts.extendGraphqlSchema
with Nexus: Extend the GraphQL API with Nexus.virtual
field: Virtual field in schema.document
field: Document field in schema.- Testing: Add tests with
@keystone-6/core/testing
. - Custom field: Custom field in schema.
- Custom field view: Add a custom Admin UI view to a
json
field. - Custom Admin UI logo: Add a custom logo in the Admin UI.
- Custom Admin UI navigation: Add a custom navigation in the Admin UI.
- Custom Admin UI pages: Add a custom page in the Admin UI.
- REST API: Add custom REST API endpoints
- Storage config "local": Store assets locally
- Storage config "S3": Store assets in S3
- Custom session validation: Customise session validation
- GraphQL subscription: Extend GraphQL schema to add subscriptions
- none yet
Note: Some current feature examples are E2E examples with keystone and next in the same dir. We're gonna update them soon.
To run an example, clone this repo and run the following commands:
yarn
cd examples/<name>
yarn dev
If everything works 🤞 the GraphQL Server and Admin UI will start on localhost:3000. See the README in each example for more specific details.
You can also run our examples from your web browser using the free CodeSandbox service. Just look for the "Try it out in CodeSandbox 🧪" heading in each example project’s README (example).
If you have trouble running these examples, or find a bug, please open an issue and tag it with the examples
tag on GitHub.
Otherwise if you want to ask questions or have a chat with us, join us in Slack!
Follow @KeystoneJS on Twitter for updates.