mamoodi 13097f9d1d Release 0.16.1 (#5693) 1 tahun lalu
..
.husky 8bfa61f3e4 Run package commands directly (#3013) 1 tahun lalu
__tests__ 2c47a1b33f [Bug]: Settings modal opens on every refresh (#5670) 1 tahun lalu
public f9d052c493 [Refactor]: Changes to Github Authentication (#5371) 1 tahun lalu
scripts e32d95cb1a lint: simplify hooks already covered by Ruff (#1204) 1 tahun lalu
src 2a66439ca6 Fix issue #5676: [Bug]: Frontend Hyperlink in Chat window should open link in a new tab (#5677) 1 tahun lalu
tests becb17f0c8 feat(frontend): Utilize TanStack Query (#5096) 1 tahun lalu
.env.sample 6fe5482b20 [ALL-571] chore(frontend): Move `saas`-related configs to `config.json` (#4496) 1 tahun lalu
.eslintrc becb17f0c8 feat(frontend): Utilize TanStack Query (#5096) 1 tahun lalu
.gitignore a378ff0965 chore(frontend): Migrate from Remix to React Router 7 (#5304) 1 tahun lalu
.npmrc 0534c14279 feat: i18n (#723) 1 tahun lalu
.prettierrc.json e32d95cb1a lint: simplify hooks already covered by Ruff (#1204) 1 tahun lalu
README.md b9b6cfd406 refactor(frontend) Refactor and move components (#5290) 1 tahun lalu
global.d.ts 6fe5482b20 [ALL-571] chore(frontend): Move `saas`-related configs to `config.json` (#4496) 1 tahun lalu
index.html 01ae22ef57 Rename OpenDevin to OpenHands (#3472) 1 tahun lalu
package-lock.json 13097f9d1d Release 0.16.1 (#5693) 1 tahun lalu
package.json 13097f9d1d Release 0.16.1 (#5693) 1 tahun lalu
playwright.config.ts becb17f0c8 feat(frontend): Utilize TanStack Query (#5096) 1 tahun lalu
postcss.config.js 658b860d04 feat: support tailwind and daisyUI (#266) 2 tahun lalu
react-router.config.ts a378ff0965 chore(frontend): Migrate from Remix to React Router 7 (#5304) 1 tahun lalu
tailwind.config.js bd3e38fe67 Implement file-by-file download with progress (#5008) 1 tahun lalu
test-utils.tsx 6a6ce5f3ee Fix issue #5478: Add color to the line next to "Ran a XXX Command" based on return value (#5483) 1 tahun lalu
tsconfig.json a378ff0965 chore(frontend): Migrate from Remix to React Router 7 (#5304) 1 tahun lalu
vite-env.d.ts cac687508f cra -> vite (#47) 2 tahun lalu
vite.config.ts a378ff0965 chore(frontend): Migrate from Remix to React Router 7 (#5304) 1 tahun lalu
vitest.setup.ts 6a6ce5f3ee Fix issue #5478: Add color to the line next to "Ran a XXX Command" based on return value (#5483) 1 tahun lalu

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
  • TanStack Query
  • 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
│   ├── 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

Components

Components are organized into folders based on their domain, feature, or shared functionality.

components
├── features # Domain-specific components
├── layout
├── modals
└── ui # Shared UI components

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