React-based frontend for KnowZero AI Learning Platform.
- React 18 + TypeScript - Modern React with type safety
- Vite - Fast development and building
- TailwindCSS - Utility-first CSS
- Radix UI - Unstyled, accessible components
- Zustand - Lightweight state management
- TanStack Query - Data fetching and caching
- React Router v6 - Client-side routing
npm installnpm run devThe app will be available at http://localhost:5173
npm run buildsrc/
├── api/ # API client
│ └── client.ts
├── components/ # React components
│ ├── Chat/ # Chat components
│ ├── DocumentView/# Document display
│ ├── Layout/ # Layout components
│ ├── Sidebar/ # Sidebar/Navigation
│ └── ui/ # UI primitives
├── lib/ # Utilities
│ └── utils.ts
├── pages/ # Page components
│ ├── HomePage.tsx
│ └── SessionPage.tsx
├── stores/ # Zustand stores
│ └── sessionStore.ts
├── types/ # TypeScript types
│ └── index.ts
├── App.tsx # Root component
├── main.tsx # Entry point
└── index.css # Global styles
# Lint code
npm run lint
# Fix linting issues
npm run lint:fix
# Format code
npm run format
# Type check
npm run type-checkChatArea- Chat container with message list and inputChatMessage- Individual message bubbleChatInput- Message input with send button
DocumentView- Markdown document renderer with entity highlighting
Layout- Main layout wrapperSidebar- Navigation sidebar with category tree
The Vite dev server proxies API requests to the backend:
// vite.config.ts
server: {
proxy: {
'/api': {
target: 'http://localhost:8000',
changeOrigin: true,
},
},
}Create .env file for environment-specific settings:
VITE_API_URL=http://localhost:8000
MIT