An AI-powered full-stack learning platform for biotechnology students. BioTechAI helps users learn through an AI tutor chatbot, generate personalized learning roadmaps, take AI-generated quizzes, and track their progress — all in one place.
- 🤖 AI Tutor Chat — Ask any biotechnology question and get concise, structured answers powered by Groq's LLaMA 3.1
- 🗺️ Learning Roadmap Generator — Input your goal and experience level to get a personalized roadmap covering subjects, tools, certifications, projects, and career paths
- 📝 AI Quiz Generator — Generate multiple-choice quizzes on any biotech topic with configurable difficulty and number of questions
- 📊 Quiz Result Tracking — Save quiz scores and review past performance from your personal dashboard
- 🔐 User Authentication — Secure register/login with bcrypt password hashing and JWT token-based sessions
- 👤 User Profile & Account Management — View profile, delete account, and manage personal data
- FastAPI — REST API framework
- Groq SDK — LLaMA 3.1-8b-instant model for AI features
- MongoDB — User data and quiz results storage
- PyMongo — MongoDB driver
- Pydantic — Request/response data validation
- python-jose — JWT token creation and verification
- passlib + bcrypt — Secure password hashing
- python-dotenv — Environment variable management
- JavaScript — 83.9% of codebase
- React-based UI connecting to the FastAPI backend
BioTechAI/
├── main.py # FastAPI app — all routes and business logic
├── models.py # Pydantic models (UserRegister, UserLogin, SaveQuizResult)
├── database.py # MongoDB connection and collections
├── src/ # Frontend (React/JS)
└── .env # Environment variables (not committed)
| Method | Endpoint | Auth Required | Description |
|---|---|---|---|
| POST | /register |
❌ | Register a new user |
| POST | /login |
❌ | Login and receive JWT token |
| GET | /me |
✅ | Get current user profile |
| DELETE | /delete-account |
✅ | Delete user and all their data |
| POST | /chat |
❌ | Ask the AI biotech tutor a question |
| POST | /roadmap |
❌ | Generate a personalized learning roadmap |
| POST | /question |
❌ | Generate AI quiz questions |
| POST | /save-result |
✅ | Save a completed quiz result |
| GET | /my-results |
✅ | Retrieve all past quiz results |
- Python 3.9+
- MongoDB (local or Atlas)
- Groq API key — get one at console.groq.com
git clone https://github.com/Sashriya/BioTechAI.git
cd BioTechAIpip install fastapi uvicorn groq python-dotenv passlib[bcrypt] python-jose[cryptography] pymongo pydantic[email]Create a .env file in the root:
GROQ_API_KEY=your_groq_api_key_here
JWT_SECRET=your_jwt_secret_here
MONGO_URI=your_mongodb_connection_stringuvicorn main:app --reloadAPI runs at http://localhost:8000
cd src
npm install
npm start- User registers with name, email, and password
- Password is truncated to 72 bytes and hashed with bcrypt before storage
- On login, the password is verified and a JWT token (2-hour expiry) is returned
- Protected routes require the token as a
Bearerheader:Authorization: Bearer <token> - The
verify_tokendependency decodes the JWT and extracts the user's email for use in handlers
All AI features use Groq's LLaMA 3.1-8b-instant model for fast inference.
- Chat — System-prompted as a biotech tutor, responses kept to 20-30 lines
- Roadmap — Structured prompt requesting subjects, skills, tools, certifications, projects, and careers
- Quiz — Strict JSON-only prompt with regex fallback parsing to reliably extract MCQ arrays
- Streamed AI responses for faster perceived performance
- Leaderboard across users for quiz scores
- Topic-based progress tracking and learning streaks
- PDF export of roadmaps
- Refresh token support for longer sessions
Sashriya — github.com/Sashriya Shakthivishwa — github.com/SHAKTHImsv