This is the frontend application for the RAG system, built with ReactJS.
Before you begin, you need to install:
-
Node.js and npm:
- Windows/macOS: Download and install from Node.js official website
- Linux (Ubuntu/Debian):
sudo apt update sudo apt install nodejs npm
-
Verify installations:
node --version npm --version
Both commands should display version numbers if installed correctly.
-
Clone the repository:
git clone https://github.com/fsabiu/RAG-frontend.git cd RAG-frontend -
Install dependencies:
npm install npm install react-scripts
This will install all required packages defined in package.json.
-
Environment Setup:
- The application uses default configuration for API endpoints
- If you need to modify API endpoints, update them in:
src/config/apiConfig.js
-
Start the application:
npm start
The application will run on http://localhost:3000
public/: Static filesindex.html: Main HTML fileimages/: Application images
src/: Source codecomponents/: React componentsconfig/: Configuration filespages/: Page componentsstyles/: CSS stylesutils/: Utility functions
npm start: Runs the app in development modenpm build: Builds the app for productionnpm test: Runs the test suitenpm eject: Ejects from create-react-app
Common issues and solutions:
-
Node.js version conflicts:
nvm install 18 nvm use 18
-
Port 3000 already in use:
kill -9 $(lsof -t -i:3000) # or npm start -- --port 3001
-
Module not found errors:
rm -rf node_modules npm cache clean --force npm install
- Use small, reusable components
- Manage state effectively
- Write tests for components
- Maintain code quality with ESLint and Prettier
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.