This is the frontend of the OpenHands project. It is a React application that provides a web interface for the OpenHands project.
- Remix SPA Mode (React + Vite + React Router)
- TypeScript
- Redux
- TanStack Query
- Tailwind CSS
- i18next
- React Testing Library
- Vitest
- Mock Service Worker
- Node.js 20.x or later
npm,bun, or any other package manager that supports thepackage.jsonfile
# Clone the repository git clone https://github.com/All-Hands-AI/OpenHands.git # Change the directory to the frontend cd OpenHands/frontend # Install the dependencies npm installWe use msw to mock the backend API. To start the application with the mocked backend, run the following command:
npm run devThis will start the application in development mode. Open http://localhost:3001 to view it in the browser.
NOTE: The backend is partially mocked using msw. Therefore, some features may not work as they would with the actual backend.
There are two ways to run the application with the actual backend:
# Build the application from the root directory make build # Start the application make startOR
# Start the backend from the root directory make start-backend # Build the frontend cd frontend && npm run build # Serve the frontend npm start -- --port 3001TODO
frontend βββ __tests__ # Tests βββ public βββ src β βββ api # API calls β βββ assets β βββ components β βββ context # Local state management β βββ hooks # Custom hooks β βββ i18n # Internationalization β βββ mocks # MSW mocks for development β βββ routes # React Router file-based routes β βββ services β βββ state # Redux state management β βββ types β βββ utils # Utility/helper functions β βββ root.tsx # Entry point βββ .env.sample # Sample environment variablesComponents are organized into folders based on their domain, feature, or shared functionality.
components βββ features # Domain-specific components βββ layout βββ modals βββ ui # Shared UI components- Real-time updates with WebSockets
- Internationalization
- Router data loading with Remix
- User authentication with GitHub OAuth (if saas mode is enabled)
We use Vitest for testing. To run the tests, run the following command:
npm run testPlease read the CONTRIBUTING.md file for details on our code of conduct, and the process for submitting pull requests to us.
TODO