|
1 | | -# React + TypeScript + Vite |
| 1 | +# PegtAGI Frontend |
2 | 2 |
|
3 | | -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. |
| 3 | +A chat application built with React, TypeScript, and GraphQL that enables intelligent conversations with AI agents. |
4 | 4 |
|
5 | | -Currently, two official plugins are available: |
| 5 | +## Features |
6 | 6 |
|
7 | | -- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh |
8 | | -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh |
| 7 | +- 💬 Real-time chat interface with AI agents |
| 8 | +- 🤖 Multiple AI agent support and management |
| 9 | +- 📊 Real-time terminal output monitoring |
| 10 | +- 🎯 Task and subtask tracking system |
| 11 | +- 🔍 Integrated search capabilities |
| 12 | +- 📚 Vector store for knowledge base management |
| 13 | +- 📸 Screenshot capture and management |
| 14 | +- 🌓 Dark/Light theme support |
| 15 | +- 📱 Responsive design (mobile, tablet, desktop) |
| 16 | +- 🔐 Authentication system with multiple providers |
| 17 | +- 🔄 Real-time updates via GraphQL subscriptions |
| 18 | +- ⚡ High-performance React components |
9 | 19 |
|
10 | | -## Expanding the ESLint configuration |
| 20 | +## Tech Stack |
11 | 21 |
|
12 | | -If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: |
| 22 | +- **Framework**: React 18 with TypeScript |
| 23 | +- **Build Tool**: Vite |
| 24 | +- **Styling**: Tailwind CSS |
| 25 | +- **UI Components**: |
| 26 | + - shadcn/ui |
| 27 | + - Radix UI primitives |
| 28 | + - Lucide icons |
| 29 | +- **State Management**: |
| 30 | + - React Context |
| 31 | + - Custom Hooks |
| 32 | +- **API Integration**: |
| 33 | + - GraphQL |
| 34 | + - Apollo Client |
| 35 | + - WebSocket subscriptions |
| 36 | +- **Type Safety**: TypeScript |
| 37 | +- **Authentication**: Multiple provider support |
| 38 | +- **Code Quality**: |
| 39 | + - ESLint |
| 40 | + - Prettier |
| 41 | + - TypeScript strict mode |
13 | 42 |
|
14 | | -- Configure the top-level `parserOptions` property like this: |
| 43 | +## Project Structure |
15 | 44 |
|
16 | | -```js |
17 | | -export default { |
18 | | - // other rules... |
19 | | - parserOptions: { |
20 | | - ecmaVersion: "latest", |
21 | | - sourceType: "module", |
22 | | - project: ["./tsconfig.json", "./tsconfig.node.json"], |
23 | | - tsconfigRootDir: __dirname, |
24 | | - }, |
25 | | -}; |
26 | | -``` |
| 45 | +src/ |
| 46 | +├── components/ # Shared UI components |
| 47 | +│ ├── ui/ # Base UI components |
| 48 | +│ └── icons/ # SVG icons and logo |
| 49 | +├── features/ # Feature-based modules |
| 50 | +│ ├── chat/ # Chat related components |
| 51 | +│ ├── authentication/ # Auth related components |
| 52 | +├── hooks/ # Custom React hooks |
| 53 | +├── lib/ # Utilities and configurations |
| 54 | +├── graphql/ # GraphQL operations and types |
| 55 | +├── models/ # TypeScript interfaces |
| 56 | +└── pages/ # Application routes |
27 | 57 |
|
28 | | -- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked` |
29 | | -- Optionally add `plugin:@typescript-eslint/stylistic-type-checked` |
30 | | -- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list |
| 58 | +## Key Components |
| 59 | + |
| 60 | +### Chat Interface |
| 61 | + |
| 62 | +- Split view with messages and tools panels |
| 63 | +- Resizable panels for desktop |
| 64 | +- Mobile-optimized view with tabs |
| 65 | +- Real-time message updates |
| 66 | + |
| 67 | +### Task System |
| 68 | + |
| 69 | +- Real-time task tracking |
| 70 | +- Subtask management |
| 71 | +- Progress monitoring |
| 72 | +- Status updates |
| 73 | + |
| 74 | +### Terminal |
| 75 | + |
| 76 | +- Command output display |
| 77 | +- Real-time updates |
| 78 | +- Scrollable history |
| 79 | +- Syntax highlighting |
| 80 | + |
| 81 | +### Vector Store |
| 82 | + |
| 83 | +- Knowledge base integration |
| 84 | +- Search capabilities |
| 85 | +- Data management |
| 86 | + |
| 87 | +### Agent System |
| 88 | + |
| 89 | +- Multi-agent support |
| 90 | +- Agent status monitoring |
| 91 | +- Agent communication logs |
| 92 | + |
| 93 | +## Development |
| 94 | + |
| 95 | +### Prerequisites |
| 96 | + |
| 97 | +- Node.js 18+ |
| 98 | +- npm 8+ |
| 99 | + |
| 100 | +### Installation |
| 101 | + |
| 102 | +1. Clone the repository |
| 103 | +2. Install dependencies: |
| 104 | + npm install |
| 105 | +3. Start the development server: |
| 106 | + npm run dev |
| 107 | + |
| 108 | +### Building for Production |
| 109 | + |
| 110 | +npm run build |
| 111 | + |
| 112 | +### Environment Variables |
| 113 | + |
| 114 | +Create a .env file in the root directory: |
| 115 | + |
| 116 | +VITE_API_URL=your_api_url |
| 117 | + |
| 118 | +## Contributing |
| 119 | + |
| 120 | +1. Fork the repository |
| 121 | +2. Create your feature branch (git checkout -b feature/amazing-feature) |
| 122 | +3. Commit your changes (git commit -m 'Add some amazing feature') |
| 123 | +4. Push to the branch (git push origin feature/amazing-feature) |
| 124 | +5. Open a Pull Request |
0 commit comments