Prerequisites
Before you begin, ensure you have:- Node.js 18+ and npm 9+ installed (check requirements)
- A HubSpot account with access to Forms API
- Git installed on your machine
Installation
Install Dependencies
The project uses npm workspaces. Install all dependencies from the root:This installs dependencies for the frontend (React + TypeScript), backend (Express), and shared types package.
Create HubSpot OAuth App
You need to create a HubSpot OAuth application to enable authentication.
- Go to your HubSpot account
- Navigate to Settings → Integrations → Private Apps
- Click Create app
- Give it a name (e.g., “Form Builder Dev”)
- Under Scopes, select:
forms(required)content(required)forms-uploaded-files(required)
- Under Redirect URLs, add:
- Click Create app and copy your Client ID and Client Secret
Keep your Client Secret secure. Never commit it to version control.
Configure Environment Variables
Create environment files for both the backend and frontend.Backend - Create Frontend - Create
main/server/.env:main/frontend/.env:Start the Development Servers
You need to run both the backend and frontend servers. Open two terminal windows:Terminal 1 - Backend Server:You should see:Terminal 2 - Frontend Server:You should see:
Build Your First Form
Now that the application is running, let’s create your first multi-step form.Connect to HubSpot
- Click the “Connect to HubSpot” button in the sidebar
- You’ll be redirected to HubSpot’s OAuth authorization page
- Review the requested permissions and click “Connect app”
- You’ll be redirected back to the Form Builder
The connection status indicator in the sidebar will turn green once connected.
Select a Form
- In the sidebar, you’ll see a “Select form” dropdown
- Click it to see all available forms from your HubSpot account
- Select any form to load its fields
Design Your Layout
Drag fields from the palette to the canvas:
- Drag a field from the “Campos detectados” section in the sidebar
- Drop it on the canvas in one of the drop zones:
- Top of a step (creates new row above)
- Center of an existing row (adds to that row, max 3 fields)
- Bottom of a step (creates new row below)
- Repeat to add more fields
- Click “Agregar Paso” to create additional steps
- Drag fields to different steps to organize your multi-step flow
- Rename steps by editing the title at the top of each step card
Preview Your Form
- Click the “Preview” tab in the top navigation
- Interact with your form:
- Navigate between steps using Next and Back buttons
- Test required field validation
- Try submitting the form
- Switch back to “Edit Layout” to make changes
The preview uses Shadow DOM to isolate styles, so it renders exactly as it will in HubSpot.
Generate and Download Module
Once you’re satisfied with your form:
- Click “Generar Módulo” in the canvas header
- Wait a moment while the module is generated (usually less than 1 second)
- Click “Descargar Módulo” to download the ZIP file
- The ZIP contains all files needed for HubSpot CMS:
fields.json- Module configurationmodule.html- HubL templatemodule.css- Stylesmodule.js- Multi-step navigation logicmeta.json- Module metadata
Upload to HubSpot
- Log in to your HubSpot account
- Go to Marketing → Files and Templates → Design Tools
- Navigate to your theme’s modules folder
- Click Upload and select the downloaded ZIP file
- HubSpot will automatically extract and install the module
For detailed upload instructions, see the Exporting Modules guide.
Troubleshooting
”localhost refused to connect”
Solution: Make sure both servers (backend and frontend) are running. Check that you see output in both terminal windows.”Not allowed by CORS”
Solution: Verify thatFRONTEND_URL in main/server/.env matches the frontend URL (including trailing slash):
“Invalid state or code” during OAuth
Solution: EnsureHUBSPOT_REDIRECT_URI in your .env file matches exactly what you configured in your HubSpot OAuth app:
Forms dropdown is empty
Solution:- Check that you successfully connected to HubSpot (green status indicator)
- Verify your HubSpot account has forms created
- Check the browser console for errors
- Ensure the
formsscope is included in your OAuth app
Next Steps
Explore Features
Learn about the visual editor, field palette, and preview features
Building Forms Guide
Deep dive into form building workflows and best practices
HubSpot Integration
Understand OAuth setup and API integration
Deploy to Production
Learn how to deploy the form builder for production use
