An AI-powered research assistant web app that allows users to:
- π€ Upload PDF or TXT files (like research papers)
- π Automatically generate a 150-word summary
- π€ Ask questions from the document
- π§ Take a "Challenge Me" quiz based on the content
Built with React (Vite) for frontend, FastAPI for backend, and Gemini AI for language processing.
- π Upload and parse large research papers (PDF or TXT)
- β¨ Get a clean, AI-generated summary
- π€ Ask questions with real-time answers
- π― Challenge yourself with AI-generated quiz questions
- π¬ Gemini Pro API integration for context-aware answers
- π Responsive, minimal UI with loading indicators
smart-assistant/ βββ backend/ # FastAPI server β βββ main.py β βββ requirements.txt β βββ frontend/ # React + Vite frontend β βββ public/ β β βββ index.html β βββ src/ β β βββ App.jsx β β βββ main.jsx β β βββ index.css / style.css β β βββ components/ β β βββ FileUpload.jsx β β βββ SummaryCard.jsx β β βββ AskSection.jsx β β βββ ChallengeSection.jsx β βββ package.json β βββ vite.config.js
π οΈ To set up the frontend:
Step 1: Navigate to the frontend directory
cd frontend
Step 2: Install dependencies and generate node_modules/
npm install
This command uses package.json to install all required packages.
Step 3: Run the development server
npm run dev
Your React app will be available at:
π http://localhost:5173
π Note on .gitignore
Make sure node_modules/ is excluded from version control by adding this line in .gitignore:
node_modules/
cd backend
pip install -r requirements.txt
uvicorn main:app --reload
Backend runs on http://127.0.0.1:8000
Open Swagger docs: http://127.0.0.1:8000/docs
βοΈ Frontend (React)
cd frontend
npm install
npm run dev
Frontend runs on http://localhost:5173
π Setup Gemini API
In main.py:
genai.configure(api_key="YOUR_GEMINI_API_KEY")
Get your API key from: https://makersuite.google.com/app/apikey
π License
MIT License. Use freely for learning and personal projects.
π Author
Made with π» and β by Abhinav Mishra