aki-008
commited on
Commit
·
b916395
1
Parent(s):
69d1821
feat: spaces deployement
Browse files
Readme.md
CHANGED
|
@@ -1,258 +1,5 @@
|
|
| 1 |
-
# PrepAI – Intelligent Interview & Notes Assistant
|
| 2 |
-
|
| 3 |
-
<img src='img\1.png' alt="Devecho" width="350">
|
| 4 |
-
|
| 5 |
-
PrepAI is a comprehensive AI-powered platform designed to help users prepare for interviews, generate personalized quizzes, manage study notes, and even participate in real-time mock interviews using conversational AI. It blends multiple modern technologies such as FastAPI, React, ChromaDB, PostgreSQL, Vapi, Groq, and LlamaIndex into a cohesive, production-ready system.
|
| 6 |
-
|
| 7 |
---
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
PrepAI enables users to:
|
| 12 |
-
|
| 13 |
-
- Conduct **AI-powered mock interviews** with real-time voice interaction.
|
| 14 |
-
- Upload PDFs and **chat with notes** using vector search + RAG.
|
| 15 |
-
- Generate **MCQ quizzes** from resumes or study material.
|
| 16 |
-
- Maintain persistent **chat sessions**, interview transcripts, and summaries.
|
| 17 |
-
- Work inside a fully containerized architecture with isolated services.
|
| 18 |
-
|
| 19 |
-
This system is ideal for interview preparation platforms, ed-tech tools, or personal study automation.
|
| 20 |
-
|
| 21 |
---
|
| 22 |
-
|
| 23 |
-
## 🧩 Architecture
|
| 24 |
-
|
| 25 |
-
PrepAI is built with a modular full‑stack architecture:
|
| 26 |
-
|
| 27 |
-
### **Backend (FastAPI)**
|
| 28 |
-
|
| 29 |
-
- JWT Authentication
|
| 30 |
-
- Upload & process PDFs
|
| 31 |
-
- ChromaDB vector store integration
|
| 32 |
-
- Streaming LLM responses
|
| 33 |
-
- Vapi-powered live interview assistant
|
| 34 |
-
- Quiz generation using Groq/OpenAI
|
| 35 |
-
|
| 36 |
-
### **Frontend (React + TypeScript + Vite)**
|
| 37 |
-
|
| 38 |
-
- User onboarding (Sign In / Sign Up)
|
| 39 |
-
- PDF upload, preview, rename, deletion
|
| 40 |
-
- Interactive note‑chat interface
|
| 41 |
-
- Dashboard with metrics
|
| 42 |
-
- Seamless Vapi interview client
|
| 43 |
-
|
| 44 |
-
### **Database Layer**
|
| 45 |
-
|
| 46 |
-
- **PostgreSQL** stores:
|
| 47 |
-
|
| 48 |
-
- Users
|
| 49 |
-
- PDFs
|
| 50 |
-
- Chat sessions
|
| 51 |
-
- Messages
|
| 52 |
-
- Metadata
|
| 53 |
-
|
| 54 |
-
### **Vector Search Layer**
|
| 55 |
-
|
| 56 |
-
- **ChromaDB** stores:
|
| 57 |
-
|
| 58 |
-
- Chunked PDF embeddings
|
| 59 |
-
- User-ingested knowledge
|
| 60 |
-
|
| 61 |
-
### **AI Services**
|
| 62 |
-
|
| 63 |
-
- **Groq/OpenAI** for LLM responses
|
| 64 |
-
- **SentenceTransformers** for embeddings
|
| 65 |
-
- **Vapi** for real-time voice conversations
|
| 66 |
-
- **LlamaIndex** for PDF parsing & chunking
|
| 67 |
-
|
| 68 |
-
---
|
| 69 |
-
|
| 70 |
-
## 📦 Directory Structure
|
| 71 |
-
|
| 72 |
-
```
|
| 73 |
-
aki-008-prepai/
|
| 74 |
-
├── Backend/
|
| 75 |
-
│ ├── app/
|
| 76 |
-
│ ├── Dockerfile
|
| 77 |
-
│ └── requirements.txt
|
| 78 |
-
│
|
| 79 |
-
├── Frontend/
|
| 80 |
-
│ ├── src/
|
| 81 |
-
│ ├── Dockerfile
|
| 82 |
-
│ └── vite.config.ts
|
| 83 |
-
│
|
| 84 |
-
├── docker-compose.yml
|
| 85 |
-
└── RUN.md
|
| 86 |
-
```
|
| 87 |
-
|
| 88 |
-
---
|
| 89 |
-
|
| 90 |
-
## ⚙️ Installation & Setup
|
| 91 |
-
|
| 92 |
-
### **1. Clone the repository**
|
| 93 |
-
|
| 94 |
-
```
|
| 95 |
-
git clone <repo-url>
|
| 96 |
-
cd aki-008-prepai
|
| 97 |
-
```
|
| 98 |
-
|
| 99 |
-
### **2. Create your `.env` file**
|
| 100 |
-
|
| 101 |
-
Provide:
|
| 102 |
-
|
| 103 |
-
- PostgreSQL credentials
|
| 104 |
-
- Groq API key
|
| 105 |
-
- OpenAI key (if needed)
|
| 106 |
-
- VAPI_PRIVATE_KEY
|
| 107 |
-
- VAPI_PUBLIC_KEY
|
| 108 |
-
- VAPI_ASSISTANT_ID
|
| 109 |
-
|
| 110 |
-
Example:
|
| 111 |
-
|
| 112 |
-
```
|
| 113 |
-
DATABASE_URL=postgresql+asyncpg://postgres:password@dblocalhost:5432/studentdb
|
| 114 |
-
GROQ_API_KEY=your-key
|
| 115 |
-
VAPI_PRIVATE_KEY=your-key
|
| 116 |
-
VAPI_PUBLIC_KEY=your-key
|
| 117 |
-
VAPI_ASSISTANT_ID=your-assistant-id
|
| 118 |
-
```
|
| 119 |
-
|
| 120 |
-
### **3. Run the system (Docker)**
|
| 121 |
-
|
| 122 |
-
```
|
| 123 |
-
docker-compose up --build
|
| 124 |
-
```
|
| 125 |
-
|
| 126 |
-
Services started:
|
| 127 |
-
|
| 128 |
-
- Frontend → [http://localhost:5173](http://localhost:5173)
|
| 129 |
-
- Backend → [http://localhost:8000](http://localhost:8000)
|
| 130 |
-
- ChromaDB → [http://localhost:8080](http://localhost:8080)
|
| 131 |
-
- PostgreSQL → [http://localhost:5347](http://localhost:5347)
|
| 132 |
-
|
| 133 |
-
### **4. Dev mode (manual)**
|
| 134 |
-
|
| 135 |
-
Backend:
|
| 136 |
-
|
| 137 |
-
```
|
| 138 |
-
cd Backend
|
| 139 |
-
python run.py
|
| 140 |
-
```
|
| 141 |
-
|
| 142 |
-
Frontend:
|
| 143 |
-
|
| 144 |
-
```
|
| 145 |
-
cd Frontend
|
| 146 |
-
npm install
|
| 147 |
-
npm run dev
|
| 148 |
-
```
|
| 149 |
-
|
| 150 |
-
ChromaDB:
|
| 151 |
-
|
| 152 |
-
```
|
| 153 |
-
chroma run --host 0.0.0.0 --port 8080 --path ./chroma_store
|
| 154 |
-
```
|
| 155 |
-
|
| 156 |
-
---
|
| 157 |
-
|
| 158 |
-
## 🧪 Key Features in Detail
|
| 159 |
-
|
| 160 |
-
### **1. PDF Upload & Notes Chat**
|
| 161 |
-
|
| 162 |
-
- PDFs are chunked using PyMuPDF + LlamaIndex.
|
| 163 |
-
- Embeddings generated via MiniLM.
|
| 164 |
-
- Chunks stored in ChromaDB.
|
| 165 |
-
- Users can open chats tied to each PDF with full chat history.
|
| 166 |
-
|
| 167 |
-
### **2. AI Interview System**
|
| 168 |
-
|
| 169 |
-
- Dynamic prompt generation based on job-role, experience, difficulty.
|
| 170 |
-
- Real-time Vapi-based interview with:
|
| 171 |
-
|
| 172 |
-
- Emotion recognition
|
| 173 |
-
- Adjustable voice
|
| 174 |
-
- Adaptive follow-ups
|
| 175 |
-
- Strict 5-minute flow
|
| 176 |
-
|
| 177 |
-
- Transcripts saved automatically.
|
| 178 |
-
|
| 179 |
-
### **3. Quiz Generation**
|
| 180 |
-
|
| 181 |
-
From resumes or notes:
|
| 182 |
-
|
| 183 |
-
- Strict rules enforced by the SYSTEM_PROMPT
|
| 184 |
-
- Always 10 MCQs with 4 options
|
| 185 |
-
- JSON‑structured output
|
| 186 |
-
- Options + explanations
|
| 187 |
-
|
| 188 |
-
### **4. Authentication**
|
| 189 |
-
|
| 190 |
-
- Secure hashing using Argon2
|
| 191 |
-
- JWT tokens
|
| 192 |
-
- Protected routes for all user-specific actions
|
| 193 |
-
|
| 194 |
-
---
|
| 195 |
-
|
| 196 |
-
## 🛠️ Development Notes
|
| 197 |
-
|
| 198 |
-
### **Backend**
|
| 199 |
-
|
| 200 |
-
- Powered by **FastAPI** with async SQLAlchemy.
|
| 201 |
-
- Auto-table creation on startup.
|
| 202 |
-
- Organized into clear routers: Auth, Notes, Interview, Quiz.
|
| 203 |
-
- Streaming responses for chat.
|
| 204 |
-
|
| 205 |
-
### **Frontend**
|
| 206 |
-
|
| 207 |
-
- Built on **React + TypeScript**.
|
| 208 |
-
- Modern UI with Tailwind.
|
| 209 |
-
- Routes include: Home, Dashboard, Notes, Interview.
|
| 210 |
-
- ProtectedRoute ensures authentication.
|
| 211 |
-
|
| 212 |
-
### **Docker Setup**
|
| 213 |
-
|
| 214 |
-
`docker-compose.yml` orchestrates:
|
| 215 |
-
|
| 216 |
-
- PostgreSQL database
|
| 217 |
-
- ChromaDB vector server
|
| 218 |
-
- Backend (Python)
|
| 219 |
-
- Frontend (Nginx)
|
| 220 |
-
|
| 221 |
-
---
|
| 222 |
-
|
| 223 |
-
## 📄 Interview Transcript Storage
|
| 224 |
-
|
| 225 |
-
During every interview:
|
| 226 |
-
|
| 227 |
-
- All real-time transcripts are appended in `Backend/transcripts/<call_id>.txt`.
|
| 228 |
-
- Summary is appended at end of call.
|
| 229 |
-
|
| 230 |
-
---
|
| 231 |
-
|
| 232 |
-
## 🚧 Roadmap
|
| 233 |
-
|
| 234 |
-
Future improvements:
|
| 235 |
-
|
| 236 |
-
- User analytics dashboard
|
| 237 |
-
- Multi-file knowledge merging
|
| 238 |
-
- Advanced scoring for interview responses
|
| 239 |
-
- Multi-voice model selector
|
| 240 |
-
- Mobile-friendly front-end layout
|
| 241 |
-
|
| 242 |
-
---
|
| 243 |
-
|
| 244 |
-
## 🧑💻 Contributing
|
| 245 |
-
|
| 246 |
-
Feel free to open issues or submit pull requests. Contributions are welcome for both frontend and backend.
|
| 247 |
-
|
| 248 |
-
---
|
| 249 |
-
|
| 250 |
-
## 📜 License
|
| 251 |
-
|
| 252 |
-
This project is licensed under your chosen license (MIT recommended).
|
| 253 |
-
|
| 254 |
-
---
|
| 255 |
-
|
| 256 |
-
### ❤️ Thank you for using PrepAI!
|
| 257 |
-
|
| 258 |
-
If you'd like additional documentation (API reference, UML diagrams, onboarding guide), just ask!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: PrepAI
|
| 3 |
+
sdk: docker
|
| 4 |
+
app_port: 7860
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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