⚠️ Note: we're not accepting public contributions just yet, but you will be able to soon. To learn more reach out in the Community Slack
These docs are for developers who want to add new example projects to the Keystone repository.
If you're looking for instructions on how to use the examples, please consult the README.
There are two types of examples:
- Feature Examples: Standalone keystone examples that demonstrate specific use cases. These should only include what is needed to show off the feature, and should not become "kitchen sink" demos.
- 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.
- Copy paste either
examples/feature-boilerplate
orexamples/e2e-boilerplate
and rename the copy into your example name. Eg.examples/my-new-example
. - Edit
package.json
for the new project. You'll need to updatename
, setversion
to0.0.1
, and edit therepository
link. - Edit
CHANGELOG.md
for the new project. Clear out everything except the top level heading. Update top level heading to match the package name. - Edit
README.md
for the new project. Document what you expect to be showing off here. This will help act as a spec. We will loop back to this once we’re done to make sure it makes sense, but writing it up front helps frame the work. For feature examples, make sure you update the codesandbox link in the readme Try it out in CodeSandbox 🧪 section. - Make sure your example runs.
cd <example-name>; yarn dev
. - Add a smoke test to ensure your example is executed on CI. You will need to edit the
examples_smoke_tests
block intests.yml
- Update the
examples/README.md
with a link to your new example. - Submit a PR for review.
- Once your PR is merged, update the branch protection rules on
main
to require the new smoke test - (For feature examples only) After merge, make sure your example deploys to codesandbox by clicking the View in codesandbox link in the
README.md
Try it out in CodeSandbox 🧪 section.