Get started with OpenComponents
Before starting make sure you have:
- A cloud storage solution such as:
- A Node.js hosting platform (Vercel, Netlify, Railway, DigitalOcean, AWS, Azure, Google Cloud, or any VPS)
#1 - Deploy the registry
Deploy your OpenComponents registry to any Node.js hosting platform. You can use the starter kit as a foundation and deploy it to platforms like Vercel, Netlify, Railway, or any cloud provider that supports Node.js applications.
#2 - Build your first component
Install the OpenComponents CLI
$ npm install -g oc
Create your first component
$ oc init my-first-component
Develop/test locally by starting a local dev registry
$ oc dev . 3030
Your component will be available at:
- endpoint: http://localhost:3030/my-first-component
- info: http://localhost:3030/my-first-component/~info
- preview: http://localhost:3030/my-first-component/~preview
#3 Publish the component to the registry
Add the registry using the CLI
$ oc registry add https://your-registry-domain.com/
Publish your component
$ oc publish my-first-component --username=YOURVALUEHERE --password=YOURVALUEHERE
Your component is now published: https://your-registry-domain.com/my-first-component