๐ Visit the DatoCMS homepage or see What is DatoCMS?
This project is created to demonstrate how to create a React ecommerce using Snipcart and DatoCMS.
Read the full tutorial on DatoCMS blog
To see the fully working example you need to register on Snipcart and get your Snipcart public API key.
You can install this demo right away by clicking on this button:
The wizard will create a new DatoCMS project, will clone the demo repository on your GitHub, and will deploy it on Netlify or Vercel.
For the demo to work you need to go in your Netlify project > settings > build & deploy > environment variables, and create a new env variable called "REACT_APP_SNIPCART_API_KEY". Paste in the value field the key you find in your Snipcart project > account settings > API keys > public API key.
For the demo to work you need to go in your Vercel project > settings > environment variables, and create a new variable called "REACT_APP_SNIPCART_API_KEY". Paste in the value field the key you find in your Snipcart project > account settings > API keys > public API key.
Register on Snipcart and provide your REACT_APP_SNIPCART_API_KEY in your .env.local
file
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.
The page will reload when you make changes.
You may also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
Note: this is a one-way operation. Once you eject
, you can't go back!
If you aren't satisfied with the build tool and configuration choices, you can eject
at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject
will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
You don't have to ever use eject
. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
DatoCMS is the REST & GraphQL Headless CMS for the modern web.
Trusted by over 25,000 enterprise businesses, agency partners, and individuals across the world, DatoCMS users create online content at scale from a central hub and distribute it via API. We โค๏ธ our developers, content editors and marketers!
Quick links:
- โก๏ธ Get started with a free DatoCMS account
- ๐ Go through the docs
- โ๏ธ Get support from us and the community
- ๐ Stay up to date on new features and fixes on the changelog
Our featured repos:
- datocms/react-datocms: React helper components for images, Structured Text rendering, and more
- datocms/js-rest-api-clients: Node and browser JavaScript clients for updating and administering your content. For frontend fetches, we recommend using our GraphQL Content Delivery API instead.
- datocms/cli: Command-line interface that includes our Contentful importer and Wordpress importer
- datocms/plugins: Example plugins we've made that extend the editor/admin dashboard
- datocms/gatsby-source-datocms: Our Gatsby source plugin to pull data from DatoCMS
- Frontend examples in different frameworks: Next.js, Vue and Nuxt, Svelte and SvelteKit, Astro, Remix. See all our starter templates.
Or see all our public repos