Start with Crane app
With the Crane installed in your system, it should take about 5 minutes to get a running Crane application.
Need some examples?
Check out Theme examples built by our team: Github repo
Create Your Application
Scaffold a new Crane application:
npx @lightspeed/crane@latest init --app my-app
cd my-appThis generates a ready-to-use project with a default configuration, an example section, and the required project structure.
Project Structure
After initialisation, your project should look like this:
my-app/
├── crane.config.json # Application credentials
├── package.json # Node.js dependencies
├── sections/ # Custom sections
│ └── example-section/ # Default example section
├── headers/ # Custom header components
├── footers/ # Custom footer components
├── preview/ # Local development preview server
│ ├── sections/ # Section preview setup
│ ├── shared/ # Shared preview utilities
│ ├── ssr-server.ts # SSR server for local testing
│ └── vite.config.js # Vite configuration for preview
├── shared/ # Shared components and utilities
└── dist/ # Built output (generated)Configure Credentials
Before deploying, you'll need application credentials. Create or edit crane.config.json in your application root:
Find the client_id and client_secret values for your custom application to the file. Find these values at the bottom of the Ecwid admin > #develop-apps > Details page.
Build
Compile your custom sections and prepare them for deployment:
Preview Locally
Start a local development server to see your sections in action:
Open the URL shown in your terminal in a browser. After making changes, rebuild and refresh your browser to see the updates.
Deploy
Once you're happy with your sections, deploy to Lightspeed:
To push changes to Ecwid:
Call build and deploy commands every time you need to push some changes into your Crane app.
Make sure your crane.config.json has valid app_client_id and app_secret_key before deploying.
Summary
The core workflow is:
init --app— scaffold a new applicationbuild— compile your sectionspreview— test locallydeploy— push to production
Next Steps
Make your first section — build a hero banner with an image and CTA button from scratch
Make your first template — build a template using previously created hero banner
Last updated
Was this helpful?
