dataTeam24/GeneralPurposeRAG
0
1# PostgreSQL RAG – Frontend2 3React + TypeScript + Vite frontend for the PostgreSQL L0/L1 Support Assistant.4 5## Running the app6 71. **Start the backend** (from the project root, not inside `frontend/`):8 ```bash9 uvicorn backend.api:app --reload10 ```11 The API runs on `http://localhost:8000`.12 132. **Start the frontend** (from this directory):14 ```bash15 npm install16 npm run dev17 ```18 The dev server proxies `/chat` and `/health` to the backend.19 20---21 22This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.23 24Currently, two official plugins are available:25 26- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh27- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh28 29## React Compiler30 31The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).32 33## Expanding the ESLint configuration34 35If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:36 37```js38export default defineConfig([39 globalIgnores(['dist']),40 {41 files: ['**/*.{ts,tsx}'],42 extends: [43 // Other configs...44 45 // Remove tseslint.configs.recommended and replace with this46 tseslint.configs.recommendedTypeChecked,47 // Alternatively, use this for stricter rules48 tseslint.configs.strictTypeChecked,49 // Optionally, add this for stylistic rules50 tseslint.configs.stylisticTypeChecked,51 52 // Other configs...53 ],54 languageOptions: {55 parserOptions: {56 project: ['./tsconfig.node.json', './tsconfig.app.json'],57 tsconfigRootDir: import.meta.dirname,58 },59 // other options...60 },61 },62])63```64 65You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:66 67```js68// eslint.config.js69import reactX from 'eslint-plugin-react-x'70import reactDom from 'eslint-plugin-react-dom'71 72export default defineConfig([73 globalIgnores(['dist']),74 {75 files: ['**/*.{ts,tsx}'],76 extends: [77 // Other configs...78 // Enable lint rules for React79 reactX.configs['recommended-typescript'],80 // Enable lint rules for React DOM81 reactDom.configs.recommended,82 ],83 languageOptions: {84 parserOptions: {85 project: ['./tsconfig.node.json', './tsconfig.app.json'],86 tsconfigRootDir: import.meta.dirname,87 },88 // other options...89 },90 },91])92```93 