A starter template to help developers quickly build and deploy React components in HubSpot's CMS. This boilerplate includes a modern setup with Tailwind CSS for styling and provides a streamlined development experience.
- 🚀 React-based component development for HubSpot CMS
- 🎨 Tailwind CSS integration for modern, utility-first styling
- 📦 Pre-configured build and deployment scripts
- 🔧 Development server with hot reloading
- 📱 Responsive design support out of the box
- 🔄 Server-side request example
- Node.js (v14 or higher)
- npm or yarn
- HubSpot account with CMS access
- HubSpot CLI installed (
npm install -g @hubspot/cli
)
- Clone this repository:
git clone [your-repo-url]
cd hubspot-react-cms-boilerplate
- Install dependencies:
npm install
- Configure your HubSpot account:
hs init
- Deploy your templates to HubSpot (IMPORTANT: This step is required before starting the dev server. Without running deploy, your templates won't show up in the local development environment):
npm run deploy
- Start the development server:
npm run dev
├── src/
│ ├── components/ # React components
│ ├── templates/ # HubSpot templates
│ └── styles/ # Global styles and Tailwind config
├── dist/ # Compiled output
└── hubspot.config.yml # HubSpot configuration
npm run dev
- Start development servernpm run build
- Build for productionnpm run deploy
- Deploy to HubSpot
- Always run
npm run deploy
after making changes to ensure your templates are updated in HubSpot - Make sure your HubSpot account has the necessary permissions for CMS development
- The development server runs on
localhost:3000
by default
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - feel free to use this boilerplate for your HubSpot projects.