⚠️ 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 three types of example project:
- Base Projects: We have two of these, a blog and a task manager. We don't need any more of these
- Feature Projects: Should be built off a base, and be a minimal demonstration of how to use a specific feature. They should only include what is needed to show off the feature, and should not become "kitchen sink" demos.
- Solution Projects: Should be a complete demonstration of a solution such as an e-commerce project. These projects combine a collection of features in a cohesive way that makes sense for the use case.
- Decide which base project to use. This is up to you, and will depend on what feature you're trying to demonstrate and where it makes most contextual sense to add it.
- Create a new project directory:
cd examples; cp -R task-manager <example-name>
. - Add to git;
git add <example-name>
- Edit
package.json
for the new project. You'll need to updatename
, setversion
to0.0.0
, 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. - Make sure your base example runs.
cd <example-name>; yarn dev
. - Add a changeset with the initial major version of the example.
cd ../..; yarn changeset - major “Initial version of the <example-name> example.”
- Draw the rest of the owl. Write and test your example, making sure that it's clearly commented.
- 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.