Overview
This guide covers setting up a local development environment for building custom integrations, extending the Etienne Intelligence platform, or contributing to the codebase.Prerequisites
Ensure you have the following installed on your machine:Node.js 18+
Download from nodejs.org. Verify with
node --version.npm or pnpm
Comes with Node.js. Alternatively, install pnpm for faster installs.
Git
Version control required for cloning the repository. Get it from git-scm.com.
Zenoti account
Admin access needed to generate API credentials for local testing.
Step 1: Clone the repository
Step 2: Install dependencies
The platform uses React 19, TypeScript, Vite, TanStack Query, and Recharts for visualization.reactreact-dom— React 19 frameworkreact-router-dom— Client-side routing for dashboard navigation@tanstack/react-query— Server state management and data fetchingrecharts— Revenue charts and visualizationsframer-motion— Animation library for smooth transitionszustand— Lightweight state management for auth and location filterslucide-react— Icon librarytailwindcss— Utility-first CSS framework (v4)
Installation typically takes 30-60 seconds. If you encounter peer dependency warnings, they’re usually safe to ignore.
Step 3: Configure environment variables
Create a local environment file to store Zenoti API credentials.Generate Zenoti credentials
Follow the same process as the Quickstart guide:
- Log into Zenoti Admin > Setup > Apps
- Create a backend application named “Etienne Dev”
- Copy Application ID, Secret Key, and API Key
Environment variable reference
| Variable | Description | Example |
|---|---|---|
VITE_ZENOTI_BASE_URL | Zenoti API endpoint (US or EU) | https://api.zenoti.com |
VITE_ZENOTI_API_KEY | Long-lived API key (~1 year validity) | zapi_abc123... |
VITE_ZENOTI_APP_ID | Application identifier from Zenoti | app-12345 |
VITE_ZENOTI_SECRET_KEY | Authentication secret (treat as password) | sk_live_... |
VITE_ZENOTI_ACCOUNT_NAME | Your organization name in Zenoti | Acme Wellness Spa |
Step 4: Start development server
Run the Vite development server with hot module replacement (HMR).Step 5: Verify Zenoti connection
Test the integration to ensure data flows correctly.Check sync badge
Look for the Zenoti sync badge in the top-right corner of the dashboard. It should show “Synced” with a green indicator.
Inspect network requests
Open browser DevTools (F12) and go to the Network tab. Filter by
zenoti. You should see API calls to endpoints like:/v1/appointments/v1/guests/v1/invoices
Project structure
Understanding the codebase organization helps you navigate efficiently.Development workflow
Running tests
Test suite uses Vitest and React Testing Library. Coverage reports generate in
/coverage.Building for production
/dist. Vite automatically:
- Minifies JavaScript and CSS
- Tree-shakes unused code
- Generates source maps
- Splits vendor and app bundles
Linting and formatting
Preview production build
/dist folder locally at http://localhost:4173 to test production builds before deployment.
Common development tasks
Adding a new module
Adding a new module
- Create folder in
/src/modules/[module-name]/ - Build
Overview.tsxcomponent with module layout - Add route to
App.tsx:
- Update sidebar navigation in
DashboardLayout.tsx
Creating a new Zenoti endpoint
Creating a new Zenoti endpoint
- Define endpoint in
/src/integrations/zenoti/endpoints.ts:
- Create React Query hook in
hooks.ts:
- Use hook in component:
Adding a new metric card
Adding a new metric card
Use the
MetricCard component with these props:Customizing AI analyst responses
Customizing AI analyst responses
Edit
/src/lib/ai-responses.ts. The generateAIResponse() function maps user queries to response templates. Add new patterns:Troubleshooting
Port 5173 already in use
Port 5173 already in use
Another process is using the default Vite port. Either:
- Kill the process:
lsof -ti:5173 | xargs kill - Or specify a different port:
vite --port 3000
TypeScript errors after pulling latest code
TypeScript errors after pulling latest code
Dependency mismatch. Reinstall:
Zenoti API rate limits
Zenoti API rate limits
Zenoti allows 100 requests/minute. Use React Query’s caching:
CSS not updating
CSS not updating
Tailwind rebuild issue. Restart dev server:
Next steps
API reference
Explore Etienne’s REST API for building custom integrations
Component library
Documentation for all reusable UI components
Zenoti integration guide
Deep dive into Zenoti API client architecture
Contributing guidelines
How to contribute code, report bugs, and request features
Development environment ready! You can now build custom features, extend integrations, or contribute to the Etienne Intelligence platform.