Sonnet Web UI is a React-based web application that provides an interface for interacting with the Claude 3 Sonnet AI model via the OpenRouter API. It features a split-screen layout with a chat interface on the left and a React component rendering area on the right.
- Chat interface for Claude 3 Sonnet AI
- Real-time React component rendering with automatic updates
- Dark mode toggle
- Syntax highlighting for code blocks in chat
- Responsive design using Tailwind CSS
- Enhanced error handling and user-friendly error messages
- Improved React code validation and error reporting
For detailed information about our completed features, current work, and future plans, please see the ROADMAP.md file.
We welcome contributions to the Sonnet Web UI project! If you're interested in helping, please check our issue tracker for open tasks or suggest new features by opening an issue.
This project is licensed under the MIT License - see the LICENSE file for details.
- This project uses the OpenRouter API to interact with the Claude 3 Sonnet model.
- UI components are built using the shadcn/ui library and Tailwind CSS.
- We use React Syntax Highlighter for code block formatting in the chat interface.
- Clone the repository
- Install dependencies with
npm install
- Create a
.env
file in the root directory of the project - Add your OpenRouter API key to the
.env
file:
REACT_APP_OPENROUTER_API_KEY=your_api_key_here
- Run the development server with
npm start
When writing React components for the rendering area, please follow these guidelines:
- Remove any import statements.
- Define the component as an arrow function.
- Use React.useState() directly instead of importing the useState hook.
- Maintain the basic structure of a React component.
- Double-check all brackets and semicolons to ensure there are no syntax errors.
Example:
const MyComponent = () => {
const [count, setCount] = React.useState(0);
return (
<div>
<p>You clicked {count} times</p>
<button onClick={() => setCount(count + 1)}>
Click me
</button>
</div>
);
};
These guidelines ensure that your component will work correctly in the rendering area.
Sonnet Web UI is a React-based web application that provides an interface for interacting with the Claude 3 Sonnet AI model via the OpenRouter API. It features a split-screen layout with a chat interface on the left and a React component rendering area on the right.
- Chat interface for Claude 3 Sonnet AI
- Real-time React component rendering with automatic updates
- Dark mode toggle
- Syntax highlighting for code blocks in chat
- Responsive design using Tailwind CSS
- Enhanced error handling and user-friendly error messages
- Improved React code validation and error reporting
- Clone the repository
- Install dependencies with
npm install
- Create a
.env
file in the root directory and add your OpenRouter API key:REACT_APP_OPENROUTER_API_KEY=your_api_key_here
- For development:
- Run
npm run dev
to start the React development server on port 3000
- Run
- For production or to test the full stack application:
- Build the project with
npm run build
- Start the server with
npm start
- Open http://localhost:3001 in your browser
- Build the project with
- React
- Express
- Tailwind CSS
- OpenRouter API
- shadcn/ui components
- React Syntax Highlighter
We welcome contributions to the Sonnet Web UI project! If you're interested in helping, please check our issue tracker for open tasks or suggest new features by opening an issue.
This project is licensed under the MIT License - see the LICENSE file for details.
- This project uses the OpenRouter API to interact with the Claude 3 Sonnet model.
- UI components are built using the shadcn/ui library and Tailwind CSS.
- We use React Syntax Highlighter for code block formatting in the chat interface.