This is a Create React App version of the Airbyte Embedded Widget demo application.
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
The React app will run on
http://localhost:3002 -
Make sure the backend server is running:
# In the root directory npm run devThe backend API server should be running on
http://localhost:3000
-
Three-step authentication flow:
- Password authentication for demo access
- User creation/login with email
- Airbyte widget integration for data connection
-
React.js advantages:
- Pure React implementation with Create React App
- Proxy configuration for API calls
- Hot module replacement for fast development
- Modern React features with hooks
- Component-based architecture
-
Modern React features:
- Functional components with hooks
- Component-based architecture
- API client abstraction
- Theme switching with localStorage persistence
-
Development optimizations:
- Hot reloading and fast refresh
- Error overlay for debugging
- ESLint integration
- Cross-platform development support
reactjs/
├── public/
│ ├── index.html
│ └── octavia-sonar.png
├── src/
│ ├── components/
│ │ ├── ThemeToggle.js
│ │ ├── LogoutToggle.js
│ │ ├── PasswordForm.js
│ │ ├── UserForm.js
│ │ ├── UserInfo.js
│ │ └── Toast.js
│ ├── api/
│ │ └── client.js
│ ├── App.js
│ ├── index.js
│ └── index.css
└── package.json
The React app communicates with the Node.js backend server through:
- Proxy Configuration: Configured in
package.jsonto proxy/api/*tohttp://localhost:3000/api/* - Client-side API calls: Uses centralized API client in
src/api/client.js - Cross-platform Port: Uses cross-env to ensure consistent port (3002) across platforms
- Hot reloading: Automatic page refresh on file changes
- Fast refresh: Preserves React state during development
- Error overlay: Helpful error messages in development
- ESLint integration: Code quality checking
- Cross-platform: Uses cross-env for consistent environment variables
npm run buildThis creates an optimized production build in the build/ folder with:
- Minified JavaScript and CSS
- Optimized images and assets
- Service worker for caching (if enabled)
- Static files ready for deployment
npm testRuns the test runner in interactive watch mode using Jest and React Testing Library.
For production deployment, you may need to set:
REACT_APP_API_URL: The URL of your deployed backend server