Rag-Model / SETUP_GUIDE.md
Abhisingh-18's picture
Mirror of github.com/Abhisingh18/Rag-Model
9ce3455 verified
|
Raw
History Blame Contribute Delete
2.04 kB

Quick Setup Guide

πŸš€ Getting Started in 5 Minutes

Step 1: Install Dependencies

Backend:

cd backend
npm install

Frontend:

cd frontend
npm install

Step 2: Get Gemini API Key

  1. Go to Google AI Studio
  2. Create a new API key
  3. Copy the API key

Step 3: Configure Environment

Edit backend/.env:

GEMINI_API_KEY=paste_your_api_key_here
MONGODB_URI=mongodb://localhost:27017/rag-document-analysis
PORT=5000
CLIENT_URL=http://localhost:5173

Step 4: Start MongoDB

Option A: Local MongoDB

mongod

Option B: MongoDB Atlas (Cloud)

  • Create free cluster at MongoDB Atlas
  • Get connection string
  • Update MONGODB_URI in .env

Step 5: Run the Application

Terminal 1 - Backend:

cd backend
npm run dev

Terminal 2 - Frontend:

cd frontend
npm run dev

Step 6: Test with Sample Data

  1. Open browser: http://localhost:5173
  2. Upload the sample_training_data.csv file
  3. Wait for analysis (30-60 seconds)
  4. View dashboard and download report

🎯 Testing Checklist

  • Backend server running on port 5000
  • Frontend running on port 5173
  • MongoDB connected successfully
  • Upload sample CSV file
  • View analysis dashboard
  • Download PDF report
  • Check report format

⚠️ Common Issues

Issue: "MongoDB connection failed"

Solution: Make sure MongoDB is running or use MongoDB Atlas

Issue: "Gemini API error"

Solution: Check if API key is valid and has quota

Issue: "Cannot upload file"

Solution: Check file size (max 10MB) and format (PDF/Excel/CSV)

Issue: "Port already in use"

Solution: Change port in .env or kill existing process

πŸ“ž Need Help?

Check the main README.md for detailed documentation.


Team JARVIS GGV | SIH 2025