sp.wack 6a7abcc7c9 Rename Settings.ts to settings.ts (#4324) 1 жил өмнө
..
.husky 8bfa61f3e4 Run package commands directly (#3013) 1 жил өмнө
__tests__ 9d6c1e569d fix(frontend): Refactor frontend config (#4261) 1 жил өмнө
public bfdd7fd620 feat(frontend): UI overhaul (#3604) 1 жил өмнө
scripts e32d95cb1a lint: simplify hooks already covered by Ruff (#1204) 1 жил өмнө
src 6a7abcc7c9 Rename Settings.ts to settings.ts (#4324) 1 жил өмнө
.env.sample 9d6c1e569d fix(frontend): Refactor frontend config (#4261) 1 жил өмнө
.eslintrc bfdd7fd620 feat(frontend): UI overhaul (#3604) 1 жил өмнө
.gitignore bfdd7fd620 feat(frontend): UI overhaul (#3604) 1 жил өмнө
.npmrc 0534c14279 feat: i18n (#723) 1 жил өмнө
.prettierrc.json e32d95cb1a lint: simplify hooks already covered by Ruff (#1204) 1 жил өмнө
README.md ce18792b12 docs(frontend): Update README (#4262) 1 жил өмнө
index.html 01ae22ef57 Rename OpenDevin to OpenHands (#3472) 1 жил өмнө
package-lock.json 2d4c79f181 chore(deps-dev): bump typescript from 5.6.2 to 5.6.3 in /frontend (#4291) 1 жил өмнө
package.json 2d4c79f181 chore(deps-dev): bump typescript from 5.6.2 to 5.6.3 in /frontend (#4291) 1 жил өмнө
postcss.config.js 658b860d04 feat: support tailwind and daisyUI (#266) 1 жил өмнө
tailwind.config.js bfdd7fd620 feat(frontend): UI overhaul (#3604) 1 жил өмнө
test-utils.tsx 426f387123 setup env for controlled integration tests with redux (#1180) 1 жил өмнө
tsconfig.json bfdd7fd620 feat(frontend): UI overhaul (#3604) 1 жил өмнө
vite-env.d.ts cac687508f cra -> vite (#47) 1 жил өмнө
vite.config.ts 9d6c1e569d fix(frontend): Refactor frontend config (#4261) 1 жил өмнө
vitest.setup.ts bfdd7fd620 feat(frontend): UI overhaul (#3604) 1 жил өмнө

README.md

Getting Started with the OpenHands Frontend

Overview

This is the frontend of the OpenHands project. It is a React application that provides a web interface for the OpenHands project.

Tech Stack

  • Remix SPA Mode (React + Vite + React Router)
  • TypeScript
  • Redux
  • Tailwind CSS
  • i18next
  • React Testing Library
  • Vitest
  • Mock Service Worker

Getting Started

Prerequisites

  • Node.js 20.x or later
  • npm, bun, or any other package manager that supports the package.json file

Installation

# 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 install

Running the Application in Development Mode

We use msw to mock the backend API. To start the application with the mocked backend, run the following command:

npm run dev

This 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.

Running the Application with the Actual Backend (Production Mode)

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 start

OR

# Start the backend from the root directory
make start-backend

# Build the frontend
cd frontend && npm run build

# Serve the frontend
npm start -- --port 3001

Environment Variables

TODO

Project Structure

frontend
├── __tests__ # Tests
├── public
├── src
│   ├── api # API calls
│   ├── assets
│   ├── components # Reusable 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 variables

Features

  • Real-time updates with WebSockets
  • Internationalization
  • Router data loading with Remix
  • User authentication with GitHub OAuth (if saas mode is enabled)

Testing

We use Vitest for testing. To run the tests, run the following command:

npm run test

Contributing

Please read the CONTRIBUTING.md file for details on our code of conduct, and the process for submitting pull requests to us.

Troubleshooting

TODO