@moveo-ai/web-client 0.84.0 → 0.85.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -15,3 +15,120 @@
15
15
  1. Create a web integration
16
16
  1. Copy the snippet to your website html
17
17
  1. Enjoy 🚀
18
+
19
+ ## 🛠 Development
20
+
21
+ ### Prerequisites
22
+
23
+ - Node.js (v16 or higher)
24
+ - npm or yarn
25
+
26
+ ### Installation
27
+
28
+ ```bash
29
+ # Install dependencies
30
+ npm install
31
+ ```
32
+
33
+ ### Running Locally
34
+
35
+ The web-client can be run in different modes depending on your development needs:
36
+
37
+ #### Development Mode
38
+ ```bash
39
+ npm start
40
+ ```
41
+ This starts the webpack dev server on https://localhost:8880 with hot module replacement enabled.
42
+
43
+ #### Local Testing with Different Environments
44
+
45
+ When running locally, you can specify which Moveo Channels backend to connect to using query parameters:
46
+
47
+ - **Development Backend**: Default when running locally
48
+ - **Production Backend**: Add `?host=https://channels.moveo.ai` to your URL
49
+ - **Custom Backend**: Add `?host=YOUR_BACKEND_URL` to test against different environments
50
+
51
+ Example URLs:
52
+ ```
53
+ https://localhost:8880/?integration_id=YOUR_ID&host=https://channels.moveo.ai # Production
54
+ https://localhost:8880/?integration_id=YOUR_ID&host=https://dev-channels.moveo.ai # Dev
55
+ https://localhost:8880/?integration_id=YOUR_ID # Uses default development backend
56
+ ```
57
+
58
+ ### Build Commands
59
+
60
+ ```bash
61
+ # Production build (minified)
62
+ npm run build
63
+
64
+ # Development build (unminified)
65
+ npm run build:dev
66
+
67
+ # Watch mode for continuous builds
68
+ npm run watch
69
+ ```
70
+
71
+ ### Testing
72
+
73
+ ```bash
74
+ # Run unit tests
75
+ npm test
76
+
77
+ # Run E2E tests
78
+ npm run test:ci
79
+
80
+ # Run specific Playwright test
81
+ npx playwright test tests/custom-fields.spec.ts
82
+
83
+ # Run specific Jest test
84
+ jest src/components/Header/Header.test.tsx
85
+ ```
86
+
87
+ ### Code Quality
88
+
89
+ ```bash
90
+ # Run linters
91
+ npm run lint
92
+
93
+ # Auto-fix linting issues
94
+ npm run autofix
95
+
96
+ # Format code with Prettier
97
+ npm run prettier
98
+
99
+ # Type checking
100
+ npm run type-check
101
+ ```
102
+
103
+ ### Storybook
104
+
105
+ ```bash
106
+ # Run Storybook development server
107
+ npm run storybook
108
+
109
+ # Build Storybook for production
110
+ npm run build-storybook
111
+ ```
112
+
113
+ ## 🚀 Deployment
114
+
115
+ ### Current: Cloudflare Pages
116
+
117
+ The web-client is currently deployed to **Cloudflare Pages**, providing:
118
+ - Global CDN distribution
119
+ - Automatic deployments from GitHub
120
+ - Preview deployments for pull requests
121
+ - Zero-config SSL/TLS
122
+
123
+ ### Previous: Vercel
124
+
125
+ The project was originally deployed on Vercel but has been migrated to Cloudflare Pages for improved performance and better integration with our infrastructure.
126
+
127
+ ### Deployment Configuration
128
+
129
+ The production build is automatically deployed when changes are pushed to the `main` branch. Preview deployments are created for pull requests to the `next` branch.
130
+
131
+ Build settings:
132
+ - Build command: `npm run build`
133
+ - Build output directory: `dist`
134
+ - Node version: 16+