How sajjadhaider1016-dot/bzu-ai-assistant works
This is a BZU-focused AI chatbot with account access, conversational answers, university-knowledge retrieval, file upload, and persistent user/conversation data. The main workflow runs from the browser chat interface through the Express server to knowledge retrieval and an AI completion, then returns an answer to the browser. Authentication and uploaded-document handling are separate server capabilities. Source excerpts confirm the search implementation and portions of server behavior, but do not establish all route mounting, middleware, or integration wiring; uncertain connections are omitted.
Main entry points: server.js Express server · prisma.js Prisma client · CHATBOT.html Chat interface · script.js Chat behavior
Components 14
Chat client
- Chat interface
public/CHATBOT.html - Chat behavior
public/script.js
Assistant service
- Express server
server.js
BZU knowledge
- Knowledge search
searchService.js - Knowledge records
knowledge/knowledge.json - Prospectus PDFs
knowledge/prospectus_2024.pdf - PDF search
pdfSearch.js
Identity
- Auth routes
authRoutes.js
Persistence
- Prisma client
lib/prisma.js - SQLite database
prisma/schema.prisma - User memory files
memoryService.js - Uploaded files
uploads
Other components
- Visitor
- Groq AI
Connections 13
- Visitor → Chat interface: uses
- Chat interface → Chat behavior: loads
- Chat behavior → Express server: sends chat
- Express server → Groq AI: requests completion
- Groq AI → Express server: returns answer
- Express server → Knowledge search: searches knowledge
- Knowledge search → Knowledge records: reads records
- Express server → Prisma client: reads and writes
- Auth routes → Prisma client: reads and writes
- Prisma client → SQLite database: queries
- Express server → User memory files: saves memory
- Express server → Uploaded files: stores uploads
- PDF search → Prospectus PDFs: searches PDFs