Enjoy our curated collection of examples and solutions. Use these patterns to build your own robust and scalable applications. Find our examples here: https://examples.vercel.live/ we're going to be shipping new examples weekly. Stay tuned!
- Edge Functions – Edge Functions are currently in Public Beta on Vercel. Read the docs here.
- Solutions – Demos, Architectures and Best Practices
To quickly start contributing with a new example, run the following commands:
npm i
npm run new-example
If the script above isn't used, make sure the example complies with the following:
- It has to be located in either the
solutions
oredge-functions
folder - It must have a
.gitignore
similar to plop-templates/example/.gitignore - It must have a
package.json
similar to plop-templates/example/package.json (usage of Next.js is optional). The license should beMIT
- It must have a
README.md
similar to plop-templates/example/README.md. The example has to be able to include a demo URL (the Vercel team will deploy it!) and if it requires environment variables, it must have a.env.example
file and instructions on how to set them up. Take bot-protection-datadome as an example.- To customize the Vercel Deploy Button take a look at the docs, useful if the deployment has required environment variables.
- If using Next.js, it must have a
.eslintrc.json
similar to plop-templates/example/.eslintrc.json - All Next.js examples should be using the same styling and layout provided by
@vercel/examples-ui
, its usage can be seen in the plop template
We use Husky to manage the pre-commit Git hook in this repo. Husky configures hooks automatically during install, so you don't need to do anything special to get them working, but if it fails to install, you can run the following command to install it manually:
npm run prepare
Code changes automatically go through Prettier and Eslint when you make a commit, please do not skip these steps unless they're broken and in that case let us known by creating an issue.
If you have any questions or suggestions about the docs, feel free to open a discussion, or submit a PR with your suggestions!
- Start a Discussion with a question, piece of feedback, or idea you want to share with the team.
- Open an Issue if you believe you've encountered a bug that you want to flag for the team.